]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/iD/iD.js
Update to iD v1.8.0
[rails.git] / vendor / assets / iD / iD.js
index 4d1d147775c85c970273a0c9b1aea1d417698a15..3adf062d3d9fad5c8cee0c9fdd7e59c3fe75b9d0 100644 (file)
 
 })(this);
 !function(){
-  var d3 = {version: "3.4.6"}; // semver
+  var d3 = {version: "3.5.5"}; // semver
 d3.ascending = d3_ascending;
 
 function d3_ascending(a, b) {
@@ -190,10 +190,10 @@ d3.min = function(array, f) {
       a,
       b;
   if (arguments.length === 1) {
-    while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; }
     while (++i < n) if ((b = array[i]) != null && a > b) a = b;
   } else {
-    while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { a = b; break; }
     while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
   }
   return a;
@@ -204,10 +204,10 @@ d3.max = function(array, f) {
       a,
       b;
   if (arguments.length === 1) {
-    while (++i < n && !((a = array[i]) != null && a <= a)) a = undefined;
+    while (++i < n) if ((b = array[i]) != null && b >= b) { a = b; break; }
     while (++i < n) if ((b = array[i]) != null && b > a) a = b;
   } else {
-    while (++i < n && !((a = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { a = b; break; }
     while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
   }
   return a;
@@ -219,13 +219,13 @@ d3.extent = function(array, f) {
       b,
       c;
   if (arguments.length === 1) {
-    while (++i < n && !((a = c = array[i]) != null && a <= a)) a = c = undefined;
+    while (++i < n) if ((b = array[i]) != null && b >= b) { a = c = b; break; }
     while (++i < n) if ((b = array[i]) != null) {
       if (a > b) a = b;
       if (c < b) c = b;
     }
   } else {
-    while (++i < n && !((a = c = f.call(array, array[i], i)) != null && a <= a)) a = undefined;
+    while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) { a = c = b; break; }
     while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
       if (a > b) a = b;
       if (c < b) c = b;
@@ -233,23 +233,26 @@ d3.extent = function(array, f) {
   }
   return [a, c];
 };
+function d3_number(x) {
+  return x === null ? NaN : +x;
+}
+
+function d3_numeric(x) {
+  return !isNaN(x);
+}
+
 d3.sum = function(array, f) {
   var s = 0,
       n = array.length,
       a,
       i = -1;
-
   if (arguments.length === 1) {
-    while (++i < n) if (!isNaN(a = +array[i])) s += a;
+    while (++i < n) if (d3_numeric(a = +array[i])) s += a; // zero and null are equivalent
   } else {
-    while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
+    while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;
   }
-
   return s;
 };
-function d3_number(x) {
-  return x != null && !isNaN(x);
-}
 
 d3.mean = function(array, f) {
   var s = 0,
@@ -258,11 +261,11 @@ d3.mean = function(array, f) {
       i = -1,
       j = n;
   if (arguments.length === 1) {
-    while (++i < n) if (d3_number(a = array[i])) s += a; else --j;
+    while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;
   } else {
-    while (++i < n) if (d3_number(a = f.call(array, array[i], i))) s += a; else --j;
+    while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;
   }
-  return j ? s / j : undefined;
+  if (j) return s / j;
 };
 // R-7 per <http://en.wikipedia.org/wiki/Quantile>
 d3.quantile = function(values, p) {
@@ -274,9 +277,49 @@ d3.quantile = function(values, p) {
 };
 
 d3.median = function(array, f) {
-  if (arguments.length > 1) array = array.map(f);
-  array = array.filter(d3_number);
-  return array.length ? d3.quantile(array.sort(d3_ascending), .5) : undefined;
+  var numbers = [],
+      n = array.length,
+      a,
+      i = -1;
+  if (arguments.length === 1) {
+    while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);
+  } else {
+    while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);
+  }
+  if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);
+};
+
+d3.variance = function(array, f) {
+  var n = array.length,
+      m = 0,
+      a,
+      d,
+      s = 0,
+      i = -1,
+      j = 0;
+  if (arguments.length === 1) {
+    while (++i < n) {
+      if (d3_numeric(a = d3_number(array[i]))) {
+        d = a - m;
+        m += d / ++j;
+        s += d * (a - m);
+      }
+    }
+  } else {
+    while (++i < n) {
+      if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {
+        d = a - m;
+        m += d / ++j;
+        s += d * (a - m);
+      }
+    }
+  }
+  if (j > 1) return s / (j - 1);
+};
+
+d3.deviation = function() {
+  var v = d3.variance.apply(this, arguments);
+  return v ? Math.sqrt(v) : v;
 };
 
 function d3_bisector(compare) {
@@ -313,11 +356,12 @@ d3.bisector = function(f) {
       ? function(d, x) { return d3_ascending(f(d), x); }
       : f);
 };
-d3.shuffle = function(array) {
-  var m = array.length, t, i;
+d3.shuffle = function(array, i0, i1) {
+  if ((m = arguments.length) < 3) { i1 = array.length; if (m < 2) i0 = 0; }
+  var m = i1 - i0, t, i;
   while (m) {
     i = Math.random() * m-- | 0;
-    t = array[m], array[m] = array[i], array[i] = t;
+    t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;
   }
   return array;
 };
@@ -412,80 +456,94 @@ function d3_range_integerScale(x) {
   return k;
 }
 function d3_class(ctor, properties) {
-  try {
-    for (var key in properties) {
-      Object.defineProperty(ctor.prototype, key, {
-        value: properties[key],
-        enumerable: false
-      });
-    }
-  } catch (e) {
-    ctor.prototype = properties;
+  for (var key in properties) {
+    Object.defineProperty(ctor.prototype, key, {
+      value: properties[key],
+      enumerable: false
+    });
   }
 }
 
-d3.map = function(object) {
+d3.map = function(object, f) {
   var map = new d3_Map;
-  if (object instanceof d3_Map) object.forEach(function(key, value) { map.set(key, value); });
-  else for (var key in object) map.set(key, object[key]);
+  if (object instanceof d3_Map) {
+    object.forEach(function(key, value) { map.set(key, value); });
+  } else if (Array.isArray(object)) {
+    var i = -1,
+        n = object.length,
+        o;
+    if (arguments.length === 1) while (++i < n) map.set(i, object[i]);
+    else while (++i < n) map.set(f.call(object, o = object[i], i), o);
+  } else {
+    for (var key in object) map.set(key, object[key]);
+  }
   return map;
 };
 
-function d3_Map() {}
+function d3_Map() {
+  this._ = Object.create(null);
+}
+
+var d3_map_proto = "__proto__",
+    d3_map_zero = "\0";
 
 d3_class(d3_Map, {
   has: d3_map_has,
   get: function(key) {
-    return this[d3_map_prefix + key];
+    return this._[d3_map_escape(key)];
   },
   set: function(key, value) {
-    return this[d3_map_prefix + key] = value;
+    return this._[d3_map_escape(key)] = value;
   },
   remove: d3_map_remove,
   keys: d3_map_keys,
   values: function() {
     var values = [];
-    this.forEach(function(key, value) { values.push(value); });
+    for (var key in this._) values.push(this._[key]);
     return values;
   },
   entries: function() {
     var entries = [];
-    this.forEach(function(key, value) { entries.push({key: key, value: value}); });
+    for (var key in this._) entries.push({key: d3_map_unescape(key), value: this._[key]});
     return entries;
   },
   size: d3_map_size,
   empty: d3_map_empty,
   forEach: function(f) {
-    for (var key in this) if (key.charCodeAt(0) === d3_map_prefixCode) f.call(this, key.substring(1), this[key]);
+    for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);
   }
 });
 
-var d3_map_prefix = "\0", // prevent collision with built-ins
-    d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
+function d3_map_escape(key) {
+  return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;
+}
+
+function d3_map_unescape(key) {
+  return (key += "")[0] === d3_map_zero ? key.slice(1) : key;
+}
 
 function d3_map_has(key) {
-  return d3_map_prefix + key in this;
+  return d3_map_escape(key) in this._;
 }
 
 function d3_map_remove(key) {
-  key = d3_map_prefix + key;
-  return key in this && delete this[key];
+  return (key = d3_map_escape(key)) in this._ && delete this._[key];
 }
 
 function d3_map_keys() {
   var keys = [];
-  this.forEach(function(key) { keys.push(key); });
+  for (var key in this._) keys.push(d3_map_unescape(key));
   return keys;
 }
 
 function d3_map_size() {
   var size = 0;
-  for (var key in this) if (key.charCodeAt(0) === d3_map_prefixCode) ++size;
+  for (var key in this._) ++size;
   return size;
 }
 
 function d3_map_empty() {
-  for (var key in this) if (key.charCodeAt(0) === d3_map_prefixCode) return false;
+  for (var key in this._) return false;
   return true;
 }
 
@@ -591,42 +649,39 @@ d3.set = function(array) {
   return set;
 };
 
-function d3_Set() {}
+function d3_Set() {
+  this._ = Object.create(null);
+}
 
 d3_class(d3_Set, {
   has: d3_map_has,
-  add: function(value) {
-    this[d3_map_prefix + value] = true;
-    return value;
-  },
-  remove: function(value) {
-    value = d3_map_prefix + value;
-    return value in this && delete this[value];
+  add: function(key) {
+    this._[d3_map_escape(key += "")] = true;
+    return key;
   },
+  remove: d3_map_remove,
   values: d3_map_keys,
   size: d3_map_size,
   empty: d3_map_empty,
   forEach: function(f) {
-    for (var value in this) if (value.charCodeAt(0) === d3_map_prefixCode) f.call(this, value.substring(1));
+    for (var key in this._) f.call(this, d3_map_unescape(key));
   }
 });
 d3.behavior = {};
-var d3_arraySlice = [].slice,
-    d3_array = function(list) { return d3_arraySlice.call(list); }; // conversion for NodeLists
+var d3_document = this.document;
 
-var d3_document = document,
-    d3_documentElement = d3_document.documentElement,
-    d3_window = window;
-
-// Redefine d3_array if the browser doesn’t support slice-based conversion.
-try {
-  d3_array(d3_documentElement.childNodes)[0].nodeType;
-} catch(e) {
-  d3_array = function(list) {
-    var i = list.length, array = new Array(i);
-    while (i--) array[i] = list[i];
-    return array;
-  };
+function d3_documentElement(node) {
+  return node
+      && (node.ownerDocument // node is a Node
+      || node.document // node is a Window
+      || node).documentElement; // node is a Document
+}
+
+function d3_window(node) {
+  return node
+      && ((node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
+        || (node.document && node) // node is a Window
+        || node.defaultView); // node is a Document
 }
 // Copies a variable number of methods from source to target.
 d3.rebind = function(target, source) {
@@ -644,10 +699,9 @@ function d3_rebind(target, source, method) {
     return value === source ? target : value;
   };
 }
-
 function d3_vendorSymbol(object, name) {
   if (name in object) return name;
-  name = name.charAt(0).toUpperCase() + name.substring(1);
+  name = name.charAt(0).toUpperCase() + name.slice(1);
   for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {
     var prefixName = d3_vendorPrefixes[i] + name;
     if (prefixName in object) return prefixName;
@@ -655,6 +709,8 @@ function d3_vendorSymbol(object, name) {
 }
 
 var d3_vendorPrefixes = ["webkit", "ms", "moz", "Moz", "o", "O"];
+var d3_arraySlice = [].slice,
+    d3_array = function(list) { return d3_arraySlice.call(list); }; // conversion for NodeLists
 function d3_noop() {}
 
 d3.dispatch = function() {
@@ -673,8 +729,8 @@ d3_dispatch.prototype.on = function(type, listener) {
 
   // Extract optional namespace, e.g., "click.foo"
   if (i >= 0) {
-    name = type.substring(i + 1);
-    type = type.substring(0, i);
+    name = type.slice(i + 1);
+    type = type.slice(0, i);
   }
 
   if (type) return arguments.length < 2
@@ -802,8 +858,13 @@ function d3_selection(groups) {
 
 var d3_select = function(s, n) { return n.querySelector(s); },
     d3_selectAll = function(s, n) { return n.querySelectorAll(s); },
-    d3_selectMatcher = d3_documentElement[d3_vendorSymbol(d3_documentElement, "matchesSelector")],
-    d3_selectMatches = function(n, s) { return d3_selectMatcher.call(n, s); };
+    d3_selectMatches = function(n, s) {
+      var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")];
+      d3_selectMatches = function(n, s) {
+        return d3_selectMatcher.call(n, s);
+      };
+      return d3_selectMatches(n, s);
+    };
 
 // Prefer Sizzle, if available.
 if (typeof Sizzle === "function") {
@@ -813,7 +874,7 @@ if (typeof Sizzle === "function") {
 }
 
 d3.selection = function() {
-  return d3_selectionRoot;
+  return d3.select(d3_document.documentElement);
 };
 
 var d3_selectionPrototype = d3.selection.prototype = [];
@@ -888,8 +949,8 @@ d3.ns = {
     var i = name.indexOf(":"),
         prefix = name;
     if (i >= 0) {
-      prefix = name.substring(0, i);
-      name = name.substring(i + 1);
+      prefix = name.slice(0, i);
+      name = name.slice(i + 1);
     }
     return d3_nsPrefix.hasOwnProperty(prefix)
         ? {space: d3_nsPrefix[prefix], local: name}
@@ -994,7 +1055,7 @@ function d3_selection_classedRe(name) {
 }
 
 function d3_selection_classes(name) {
-  return name.trim().split(/^|\s+/);
+  return (name + "").trim().split(/^|\s+/);
 }
 
 // Multiple class names are allowed (e.g., "foo bar").
@@ -1048,7 +1109,10 @@ d3_selectionPrototype.style = function(name, value, priority) {
     }
 
     // For style(string), return the computed style value for the first node.
-    if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name);
+    if (n < 2) {
+      var node = this.node();
+      return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);
+    }
 
     // For style(string, string) or style(string, function), use the default
     // priority. The priority is ignored for style(string, null).
@@ -1155,9 +1219,22 @@ d3_selectionPrototype.append = function(name) {
 };
 
 function d3_selection_creator(name) {
+
+  function create() {
+    var document = this.ownerDocument,
+        namespace = this.namespaceURI;
+    return namespace
+        ? document.createElementNS(namespace, name)
+        : document.createElement(name);
+  }
+
+  function createNS() {
+    return this.ownerDocument.createElementNS(name.space, name.local);
+  }
+
   return typeof name === "function" ? name
-      : (name = d3.ns.qualify(name)).local ? function() { return this.ownerDocument.createElementNS(name.space, name.local); }
-      : function() { return this.ownerDocument.createElementNS(this.namespaceURI, name); };
+      : (name = d3.ns.qualify(name)).local ? createNS
+      : create;
 }
 
 d3_selectionPrototype.insert = function(name, before) {
@@ -1172,12 +1249,14 @@ d3_selectionPrototype.insert = function(name, before) {
 // TODO remove(node)?
 // TODO remove(function)?
 d3_selectionPrototype.remove = function() {
-  return this.each(function() {
-    var parent = this.parentNode;
-    if (parent) parent.removeChild(this);
-  });
+  return this.each(d3_selectionRemove);
 };
 
+function d3_selectionRemove() {
+  var parent = this.parentNode;
+  if (parent) parent.removeChild(this);
+}
+
 d3_selectionPrototype.data = function(value, key) {
   var i = -1,
       n = this.length,
@@ -1208,34 +1287,30 @@ d3_selectionPrototype.data = function(value, key) {
 
     if (key) {
       var nodeByKeyValue = new d3_Map,
-          dataByKeyValue = new d3_Map,
-          keyValues = [],
+          keyValues = new Array(n),
           keyValue;
 
       for (i = -1; ++i < n;) {
-        keyValue = key.call(node = group[i], node.__data__, i);
-        if (nodeByKeyValue.has(keyValue)) {
+        if (nodeByKeyValue.has(keyValue = key.call(node = group[i], node.__data__, i))) {
           exitNodes[i] = node; // duplicate selection key
         } else {
           nodeByKeyValue.set(keyValue, node);
         }
-        keyValues.push(keyValue);
+        keyValues[i] = keyValue;
       }
 
       for (i = -1; ++i < m;) {
-        keyValue = key.call(groupData, nodeData = groupData[i], i);
-        if (node = nodeByKeyValue.get(keyValue)) {
+        if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {
+          enterNodes[i] = d3_selection_dataNode(nodeData);
+        } else if (node !== true) { // no duplicate data key
           updateNodes[i] = node;
           node.__data__ = nodeData;
-        } else if (!dataByKeyValue.has(keyValue)) { // no duplicate data key
-          enterNodes[i] = d3_selection_dataNode(nodeData);
         }
-        dataByKeyValue.set(keyValue, nodeData);
-        nodeByKeyValue.remove(keyValue);
+        nodeByKeyValue.set(keyValue, true);
       }
 
       for (i = -1; ++i < n;) {
-        if (nodeByKeyValue.has(keyValues[i])) {
+        if (nodeByKeyValue.get(keyValues[i]) !== true) {
           exitNodes[i] = group[i];
         }
       }
@@ -1389,7 +1464,7 @@ d3_selectionPrototype.node = function() {
 
 d3_selectionPrototype.size = function() {
   var n = 0;
-  this.each(function() { ++n; });
+  d3_selection_each(this, function() { ++n; });
   return n;
 };
 
@@ -1453,51 +1528,31 @@ function d3_selection_enterInsertBefore(enter) {
   };
 }
 
-// import "../transition/transition";
-
-d3_selectionPrototype.transition = function() {
-  var id = d3_transitionInheritId || ++d3_transitionId,
-      subgroups = [],
-      subgroup,
-      node,
-      transition = d3_transitionInherit || {time: Date.now(), ease: d3_ease_cubicInOut, delay: 0, duration: 250};
-
-  for (var j = -1, m = this.length; ++j < m;) {
-    subgroups.push(subgroup = []);
-    for (var group = this[j], i = -1, n = group.length; ++i < n;) {
-      if (node = group[i]) d3_transitionNode(node, i, id, transition);
-      subgroup.push(node);
-    }
-  }
-
-  return d3_transition(subgroups, id);
-};
-// import "../transition/transition";
-
-d3_selectionPrototype.interrupt = function() {
-  return this.each(d3_selection_interrupt);
-};
-
-function d3_selection_interrupt() {
-  var lock = this.__transition__;
-  if (lock) ++lock.active;
-}
-
 // TODO fast singleton implementation?
 d3.select = function(node) {
-  var group = [typeof node === "string" ? d3_select(node, d3_document) : node];
-  group.parentNode = d3_documentElement;
+  var group;
+  if (typeof node === "string") {
+    group = [d3_select(node, d3_document)];
+    group.parentNode = d3_document.documentElement;
+  } else {
+    group = [node];
+    group.parentNode = d3_documentElement(node);
+  }
   return d3_selection([group]);
 };
 
 d3.selectAll = function(nodes) {
-  var group = d3_array(typeof nodes === "string" ? d3_selectAll(nodes, d3_document) : nodes);
-  group.parentNode = d3_documentElement;
+  var group;
+  if (typeof nodes === "string") {
+    group = d3_array(d3_selectAll(nodes, d3_document));
+    group.parentNode = d3_document.documentElement;
+  } else {
+    group = nodes;
+    group.parentNode = null;
+  }
   return d3_selection([group]);
 };
 
-var d3_selectionRoot = d3.select(d3_documentElement);
-
 d3_selectionPrototype.on = function(type, listener, capture) {
   var n = arguments.length;
   if (n < 3) {
@@ -1527,7 +1582,7 @@ function d3_selection_on(type, listener, capture) {
       i = type.indexOf("."),
       wrap = d3_selection_onListener;
 
-  if (i > 0) type = type.substring(0, i);
+  if (i > 0) type = type.slice(0, i);
   var filter = d3_selection_onFilters.get(type);
   if (filter) type = filter, wrap = d3_selection_onFilter;
 
@@ -1569,9 +1624,11 @@ var d3_selection_onFilters = d3.map({
   mouseleave: "mouseout"
 });
 
-d3_selection_onFilters.forEach(function(k) {
-  if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
-});
+if (d3_document) {
+  d3_selection_onFilters.forEach(function(k) {
+    if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
+  });
+}
 
 function d3_selection_onListener(listener, argumentz) {
   return function(e) {
@@ -1596,26 +1653,33 @@ function d3_selection_onFilter(listener, argumentz) {
   };
 }
 
-var d3_event_dragSelect = "onselectstart" in d3_document ? null : d3_vendorSymbol(d3_documentElement.style, "userSelect"),
+var d3_event_dragSelect,
     d3_event_dragId = 0;
 
-function d3_event_dragSuppress() {
+function d3_event_dragSuppress(node) {
   var name = ".dragsuppress-" + ++d3_event_dragId,
       click = "click" + name,
-      w = d3.select(d3_window)
+      w = d3.select(d3_window(node))
           .on("touchmove" + name, d3_eventPreventDefault)
           .on("dragstart" + name, d3_eventPreventDefault)
           .on("selectstart" + name, d3_eventPreventDefault);
+
+  if (d3_event_dragSelect == null) {
+    d3_event_dragSelect = "onselectstart" in node ? false
+        : d3_vendorSymbol(node.style, "userSelect");
+  }
+
   if (d3_event_dragSelect) {
-    var style = d3_documentElement.style,
+    var style = d3_documentElement(node).style,
         select = style[d3_event_dragSelect];
     style[d3_event_dragSelect] = "none";
   }
+
   return function(suppressClick) {
     w.on(name, null);
     if (d3_event_dragSelect) style[d3_event_dragSelect] = select;
     if (suppressClick) { // suppress the next click, but only if it’s immediate
-      function off() { w.on(click, null); }
+      var off = function() { w.on(click, null); };
       w.on(click, function() { d3_eventCancel(); off(); }, true);
       setTimeout(off, 0);
     }
@@ -1626,12 +1690,32 @@ d3.mouse = function(container) {
   return d3_mousePoint(container, d3_eventSource());
 };
 
+// https://bugs.webkit.org/show_bug.cgi?id=44083
+var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
+
 function d3_mousePoint(container, e) {
   if (e.changedTouches) e = e.changedTouches[0];
   var svg = container.ownerSVGElement || container;
   if (svg.createSVGPoint) {
     var point = svg.createSVGPoint();
-    point.x = e.clientX, point.y = e.clientY;
+    if (d3_mouse_bug44083 < 0) {
+      var window = d3_window(container);
+      if (window.scrollX || window.scrollY) {
+        svg = d3.select("body").append("svg").style({
+          position: "absolute",
+          top: 0,
+          left: 0,
+          margin: 0,
+          padding: 0,
+          border: "none"
+        }, "important");
+        var ctm = svg[0][0].getScreenCTM();
+        d3_mouse_bug44083 = !(ctm.f || ctm.e);
+        svg.remove();
+      }
+    }
+    if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY;
+    else point.x = e.clientX, point.y = e.clientY;
     point = point.matrixTransform(container.getScreenCTM().inverse());
     return [point.x, point.y];
   }
@@ -1647,11 +1731,12 @@ d3.touches = function(container, touches) {
     return point;
   }) : [];
 };
-var π = Math.PI,
+var ε = 1e-6,
+    ε2 = ε * ε,
+    π = Math.PI,
     τ = 2 * π,
+    τε = τ - ε,
     halfπ = π / 2,
-    ε = 1e-6,
-    ε2 = ε * ε,
     d3_radians = π / 180,
     d3_degrees = 180 / π;
 
@@ -1740,9 +1825,12 @@ d3.interpolateZoom = function(p0, p1) {
 d3.behavior.zoom = function() {
   var view = {x: 0, y: 0, k: 1},
       translate0, // translate when we started zooming (to avoid drift)
-      center, // desired position of translate0 after zooming
+      center0, // implicit desired position of translate0 after zooming
+      center, // explicit desired position of translate0 after zooming
       size = [960, 500], // viewport size; required for zoom interpolation
       scaleExtent = d3_behavior_zoomInfinity,
+      duration = 250,
+      zooming = 0,
       mousedown = "mousedown.zoom",
       mousemove = "mousemove.zoom",
       mouseup = "mouseup.zoom",
@@ -1755,10 +1843,17 @@ d3.behavior.zoom = function() {
       y0,
       y1;
 
+  // Lazily determine the DOM’s support for Wheel events.
+  // https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/wheel
+  if (!d3_behavior_zoomWheel) {
+    d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() { return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1); }, "wheel")
+        : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() { return d3.event.wheelDelta; }, "mousewheel")
+        : (d3_behavior_zoomDelta = function() { return -d3.event.detail; }, "MozMousePixelScroll");
+  }
+
   function zoom(g) {
     g   .on(mousedown, mousedowned)
         .on(d3_behavior_zoomWheel + ".zoom", mousewheeled)
-        .on(mousemove, mousewheelreset)
         .on("dblclick.zoom", dblclicked)
         .on(touchstart, touchstarted);
   }
@@ -1776,8 +1871,8 @@ d3.behavior.zoom = function() {
             .tween("zoom:zoom", function() {
               var dx = size[0],
                   dy = size[1],
-                  cx = dx / 2,
-                  cy = dy / 2,
+                  cx = center0 ? center0[0] : dx / 2,
+                  cy = center0 ? center0[1] : dy / 2,
                   i = d3.interpolateZoom(
                     [(cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k],
                     [(cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k]
@@ -1788,6 +1883,9 @@ d3.behavior.zoom = function() {
                 zoomed(dispatch);
               };
             })
+            .each("interrupt.zoom", function() {
+              zoomended(dispatch);
+            })
             .each("end.zoom", function() {
               zoomended(dispatch);
             });
@@ -1832,6 +1930,12 @@ d3.behavior.zoom = function() {
     return zoom;
   };
 
+  zoom.duration = function(_) {
+    if (!arguments.length) return duration;
+    duration = +_; // TODO function based on interpolateZoom distance?
+    return zoom;
+  };
+
   zoom.x = function(z) {
     if (!arguments.length) return x1;
     x1 = z;
@@ -1866,13 +1970,24 @@ d3.behavior.zoom = function() {
     view.y += p[1] - l[1];
   }
 
+  function zoomTo(that, p, l, k) {
+    that.__chart__ = {x: view.x, y: view.y, k: view.k};
+
+    scaleTo(Math.pow(2, k));
+    translateTo(center0 = p, l);
+
+    that = d3.select(that);
+    if (duration > 0) that = that.transition().duration(duration);
+    that.call(zoom.event);
+  }
+
   function rescale() {
     if (x1) x1.domain(x0.range().map(function(x) { return (x - view.x) / view.k; }).map(x0.invert));
     if (y1) y1.domain(y0.range().map(function(y) { return (y - view.y) / view.k; }).map(y0.invert));
   }
 
   function zoomstarted(dispatch) {
-    dispatch({type: "zoomstart"});
+    if (!zooming++) dispatch({type: "zoomstart"});
   }
 
   function zoomed(dispatch) {
@@ -1881,7 +1996,8 @@ d3.behavior.zoom = function() {
   }
 
   function zoomended(dispatch) {
-    dispatch({type: "zoomend"});
+    if (!--zooming) dispatch({type: "zoomend"});
+    center0 = null;
   }
 
   function mousedowned() {
@@ -1889,9 +2005,9 @@ d3.behavior.zoom = function() {
         target = d3.event.target,
         dispatch = event.of(that, arguments),
         dragged = 0,
-        subject = d3.select(d3_window).on(mousemove, moved).on(mouseup, ended),
+        subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended),
         location0 = location(d3.mouse(that)),
-        dragRestore = d3_event_dragSuppress();
+        dragRestore = d3_event_dragSuppress(that);
 
     d3_selection_interrupt.call(that);
     zoomstarted(dispatch);
@@ -1903,7 +2019,7 @@ d3.behavior.zoom = function() {
     }
 
     function ended() {
-      subject.on(mousemove, d3_window === that ? mousewheelreset : null).on(mouseup, null);
+      subject.on(mousemove, null).on(mouseup, null);
       dragRestore(dragged && d3.event.target === target);
       zoomended(dispatch);
     }
@@ -1919,14 +2035,17 @@ d3.behavior.zoom = function() {
         zoomName = ".zoom-" + d3.event.changedTouches[0].identifier,
         touchmove = "touchmove" + zoomName,
         touchend = "touchend" + zoomName,
-        target = d3.select(d3.event.target).on(touchmove, moved).on(touchend, ended),
-        subject = d3.select(that).on(mousedown, null).on(touchstart, started), // prevent duplicate events
-        dragRestore = d3_event_dragSuppress();
+        targets = [],
+        subject = d3.select(that),
+        dragRestore = d3_event_dragSuppress(that);
 
-    d3_selection_interrupt.call(that);
     started();
     zoomstarted(dispatch);
 
+    // Workaround for Chrome issue 412723: the touchstart listener must be set
+    // after the touchmove listener.
+    subject.on(mousedown, null).on(touchstart, started); // prevent duplicate events
+
     // Updates locations of any touches in locations0.
     function relocate() {
       var touches = d3.touches(that);
@@ -1939,7 +2058,13 @@ d3.behavior.zoom = function() {
 
     // Temporarily override touchstart while gesture is active.
     function started() {
-      // Only track touches started on the target element.
+
+      // Listen for touchmove and touchend on the target of touchstart.
+      var target = d3.event.target;
+      d3.select(target).on(touchmove, moved).on(touchend, ended);
+      targets.push(target);
+
+      // Only track touches started on the same subject element.
       var changed = d3.event.changedTouches;
       for (var i = 0, n = changed.length; i < n; ++i) {
         locations0[changed[i].identifier] = null;
@@ -1950,11 +2075,9 @@ d3.behavior.zoom = function() {
 
       if (touches.length === 1) {
         if (now - touchtime < 500) { // dbltap
-          var p = touches[0], l = locations0[p.identifier];
-          scaleTo(view.k * 2);
-          translateTo(p, l);
+          var p = touches[0];
+          zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);
           d3_eventPreventDefault();
-          zoomed(dispatch);
         }
         touchtime = now;
       } else if (touches.length > 1) {
@@ -1968,6 +2091,9 @@ d3.behavior.zoom = function() {
       var touches = d3.touches(that),
           p0, l0,
           p1, l1;
+
+      d3_selection_interrupt.call(that);
+
       for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {
         p1 = touches[i];
         if (l1 = locations0[p1.identifier]) {
@@ -2004,7 +2130,7 @@ d3.behavior.zoom = function() {
         }
       }
       // Otherwise, remove touchmove and touchend listeners.
-      target.on(zoomName, null);
+      d3.selectAll(targets).on(zoomName, null);
       subject.on(mousedown, mousedowned).on(touchstart, touchstarted);
       dragRestore();
       zoomended(dispatch);
@@ -2014,42 +2140,27 @@ d3.behavior.zoom = function() {
   function mousewheeled() {
     var dispatch = event.of(this, arguments);
     if (mousewheelTimer) clearTimeout(mousewheelTimer);
-    else d3_selection_interrupt.call(this), zoomstarted(dispatch);
+    else translate0 = location(center0 = center || d3.mouse(this)), d3_selection_interrupt.call(this), zoomstarted(dispatch);
     mousewheelTimer = setTimeout(function() { mousewheelTimer = null; zoomended(dispatch); }, 50);
     d3_eventPreventDefault();
-    var point = center || d3.mouse(this);
-    if (!translate0) translate0 = location(point);
     scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);
-    translateTo(point, translate0);
+    translateTo(center0, translate0);
     zoomed(dispatch);
   }
 
-  function mousewheelreset() {
-    translate0 = null;
-  }
-
   function dblclicked() {
-    var dispatch = event.of(this, arguments),
-        p = d3.mouse(this),
-        l = location(p),
+    var p = d3.mouse(this),
         k = Math.log(view.k) / Math.LN2;
-    zoomstarted(dispatch);
-    scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1));
-    translateTo(p, l);
-    zoomed(dispatch);
-    zoomended(dispatch);
+
+    zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);
   }
 
   return d3.rebind(zoom, event, "on");
 };
 
-var d3_behavior_zoomInfinity = [0, Infinity]; // default scale extent
-
-// https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/wheel
-var d3_behavior_zoomDelta, d3_behavior_zoomWheel
-    = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() { return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1); }, "wheel")
-    : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() { return d3.event.wheelDelta; }, "mousewheel")
-    : (d3_behavior_zoomDelta = function() { return -d3.event.detail; }, "MozMousePixelScroll");
+var d3_behavior_zoomInfinity = [0, Infinity], // default scale extent
+    d3_behavior_zoomDelta, // initialized lazily
+    d3_behavior_zoomWheel;
 function d3_functor(v) {
   return typeof v === "function" ? v : function() { return v; };
 }
@@ -2070,7 +2181,7 @@ var d3_timer_queueHead,
     d3_timer_interval, // is an interval (or frame) active?
     d3_timer_timeout, // is a timeout active?
     d3_timer_active, // active timer object
-    d3_timer_frame = d3_window[d3_vendorSymbol(d3_window, "requestAnimationFrame")] || function(callback) { setTimeout(callback, 17); };
+    d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) { setTimeout(callback, 17); };
 
 // The timer will continue to fire until callback returns true.
 d3.timer = function(callback, delay, then) {
@@ -2140,304 +2251,6 @@ function d3_timer_sweep() {
   return time;
 }
 d3.geo = {};
-function d3_identity(d) {
-  return d;
-}
-function d3_true() {
-  return true;
-}
-
-function d3_geo_spherical(cartesian) {
-  return [
-    Math.atan2(cartesian[1], cartesian[0]),
-    d3_asin(cartesian[2])
-  ];
-}
-
-function d3_geo_sphericalEqual(a, b) {
-  return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;
-}
-
-// General spherical polygon clipping algorithm: takes a polygon, cuts it into
-// visible line segments and rejoins the segments by interpolating along the
-// clip edge.
-function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {
-  var subject = [],
-      clip = [];
-
-  segments.forEach(function(segment) {
-    if ((n = segment.length - 1) <= 0) return;
-    var n, p0 = segment[0], p1 = segment[n];
-
-    // If the first and last points of a segment are coincident, then treat as
-    // a closed ring.
-    // TODO if all rings are closed, then the winding order of the exterior
-    // ring should be checked.
-    if (d3_geo_sphericalEqual(p0, p1)) {
-      listener.lineStart();
-      for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);
-      listener.lineEnd();
-      return;
-    }
-
-    var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true),
-        b = new d3_geo_clipPolygonIntersection(p0, null, a, false);
-    a.o = b;
-    subject.push(a);
-    clip.push(b);
-    a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);
-    b = new d3_geo_clipPolygonIntersection(p1, null, a, true);
-    a.o = b;
-    subject.push(a);
-    clip.push(b);
-  });
-  clip.sort(compare);
-  d3_geo_clipPolygonLinkCircular(subject);
-  d3_geo_clipPolygonLinkCircular(clip);
-  if (!subject.length) return;
-
-  for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {
-    clip[i].e = entry = !entry;
-  }
-
-  var start = subject[0],
-      points,
-      point;
-  while (1) {
-    // Find first unvisited intersection.
-    var current = start,
-        isSubject = true;
-    while (current.v) if ((current = current.n) === start) return;
-    points = current.z;
-    listener.lineStart();
-    do {
-      current.v = current.o.v = true;
-      if (current.e) {
-        if (isSubject) {
-          for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);
-        } else {
-          interpolate(current.x, current.n.x, 1, listener);
-        }
-        current = current.n;
-      } else {
-        if (isSubject) {
-          points = current.p.z;
-          for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
-        } else {
-          interpolate(current.x, current.p.x, -1, listener);
-        }
-        current = current.p;
-      }
-      current = current.o;
-      points = current.z;
-      isSubject = !isSubject;
-    } while (!current.v);
-    listener.lineEnd();
-  }
-}
-
-function d3_geo_clipPolygonLinkCircular(array) {
-  if (!(n = array.length)) return;
-  var n,
-      i = 0,
-      a = array[0],
-      b;
-  while (++i < n) {
-    a.n = b = array[i];
-    b.p = a;
-    a = b;
-  }
-  a.n = b = array[0];
-  b.p = a;
-}
-
-function d3_geo_clipPolygonIntersection(point, points, other, entry) {
-  this.x = point;
-  this.z = points;
-  this.o = other; // another intersection
-  this.e = entry; // is an entry?
-  this.v = false; // visited
-  this.n = this.p = null; // next & previous
-}
-
-function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
-  return function(rotate, listener) {
-    var line = clipLine(listener),
-        rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
-
-    var clip = {
-      point: point,
-      lineStart: lineStart,
-      lineEnd: lineEnd,
-      polygonStart: function() {
-        clip.point = pointRing;
-        clip.lineStart = ringStart;
-        clip.lineEnd = ringEnd;
-        segments = [];
-        polygon = [];
-      },
-      polygonEnd: function() {
-        clip.point = point;
-        clip.lineStart = lineStart;
-        clip.lineEnd = lineEnd;
-
-        segments = d3.merge(segments);
-        var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);
-        if (segments.length) {
-          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
-          d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);
-        } else if (clipStartInside) {
-          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
-          listener.lineStart();
-          interpolate(null, null, 1, listener);
-          listener.lineEnd();
-        }
-        if (polygonStarted) listener.polygonEnd(), polygonStarted = false;
-        segments = polygon = null;
-      },
-      sphere: function() {
-        listener.polygonStart();
-        listener.lineStart();
-        interpolate(null, null, 1, listener);
-        listener.lineEnd();
-        listener.polygonEnd();
-      }
-    };
-
-    function point(λ, φ) {
-      var point = rotate(λ, φ);
-      if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);
-    }
-    function pointLine(λ, φ) {
-      var point = rotate(λ, φ);
-      line.point(point[0], point[1]);
-    }
-    function lineStart() { clip.point = pointLine; line.lineStart(); }
-    function lineEnd() { clip.point = point; line.lineEnd(); }
-
-    var segments;
-
-    var buffer = d3_geo_clipBufferListener(),
-        ringListener = clipLine(buffer),
-        polygonStarted = false,
-        polygon,
-        ring;
-
-    function pointRing(λ, φ) {
-      ring.push([λ, φ]);
-      var point = rotate(λ, φ);
-      ringListener.point(point[0], point[1]);
-    }
-
-    function ringStart() {
-      ringListener.lineStart();
-      ring = [];
-    }
-
-    function ringEnd() {
-      pointRing(ring[0][0], ring[0][1]);
-      ringListener.lineEnd();
-
-      var clean = ringListener.clean(),
-          ringSegments = buffer.buffer(),
-          segment,
-          n = ringSegments.length;
-
-      ring.pop();
-      polygon.push(ring);
-      ring = null;
-
-      if (!n) return;
-
-      // No intersections.
-      if (clean & 1) {
-        segment = ringSegments[0];
-        var n = segment.length - 1,
-            i = -1,
-            point;
-        if (n > 0) {
-          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
-          listener.lineStart();
-          while (++i < n) listener.point((point = segment[i])[0], point[1]);
-          listener.lineEnd();
-        }
-        return;
-      }
-
-      // Rejoin connected segments.
-      // TODO reuse bufferListener.rejoin()?
-      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
-
-      segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
-    }
-
-    return clip;
-  };
-}
-
-function d3_geo_clipSegmentLength1(segment) {
-  return segment.length > 1;
-}
-
-function d3_geo_clipBufferListener() {
-  var lines = [],
-      line;
-  return {
-    lineStart: function() { lines.push(line = []); },
-    point: function(λ, φ) { line.push([λ, φ]); },
-    lineEnd: d3_noop,
-    buffer: function() {
-      var buffer = lines;
-      lines = [];
-      line = null;
-      return buffer;
-    },
-    rejoin: function() {
-      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
-    }
-  };
-}
-
-// Intersection points are sorted along the clip edge. For both antimeridian
-// cutting and circle clipping, the same comparison is used.
-function d3_geo_clipSort(a, b) {
-  return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1])
-       - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);
-}
-// Adds floating point numbers with twice the normal precision.
-// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and
-// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)
-// 305–363 (1997).
-// Code adapted from GeographicLib by Charles F. F. Karney,
-// http://geographiclib.sourceforge.net/
-// See lib/geographiclib/LICENSE for details.
-
-function d3_adder() {}
-
-d3_adder.prototype = {
-  s: 0, // rounded value
-  t: 0, // exact error
-  add: function(y) {
-    d3_adderSum(y, this.t, d3_adderTemp);
-    d3_adderSum(d3_adderTemp.s, this.s, this);
-    if (this.s) this.t += d3_adderTemp.t;
-    else this.s = d3_adderTemp.t;
-  },
-  reset: function() {
-    this.s = this.t = 0;
-  },
-  valueOf: function() {
-    return this.s;
-  }
-};
-
-var d3_adderTemp = new d3_adder;
-
-function d3_adderSum(a, b, o) {
-  var x = o.s = a + b, // a + b
-      bv = x - a, av = x - bv; // b_virtual & a_virtual
-  o.t = (a - av) + (b - bv); // a_roundoff + b_roundoff
-}
 
 d3.geo.stream = function(object, listener) {
   if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {
@@ -2509,181 +2322,307 @@ function d3_geo_streamPolygon(coordinates, listener) {
   listener.polygonEnd();
 }
 
-d3.geo.area = function(object) {
-  d3_geo_areaSum = 0;
-  d3.geo.stream(object, d3_geo_area);
-  return d3_geo_areaSum;
+d3.geo.length = function(object) {
+  d3_geo_lengthSum = 0;
+  d3.geo.stream(object, d3_geo_length);
+  return d3_geo_lengthSum;
 };
 
-var d3_geo_areaSum,
-    d3_geo_areaRingSum = new d3_adder;
+var d3_geo_lengthSum;
 
-var d3_geo_area = {
-  sphere: function() { d3_geo_areaSum += 4 * π; },
+var d3_geo_length = {
+  sphere: d3_noop,
   point: d3_noop,
-  lineStart: d3_noop,
+  lineStart: d3_geo_lengthLineStart,
   lineEnd: d3_noop,
-
-  // Only count area for polygon rings.
-  polygonStart: function() {
-    d3_geo_areaRingSum.reset();
-    d3_geo_area.lineStart = d3_geo_areaRingStart;
-  },
-  polygonEnd: function() {
-    var area = 2 * d3_geo_areaRingSum;
-    d3_geo_areaSum += area < 0 ? 4 * π + area : area;
-    d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;
-  }
+  polygonStart: d3_noop,
+  polygonEnd: d3_noop
 };
 
-function d3_geo_areaRingStart() {
-  var λ00, φ00, λ0, cosφ0, sinφ0; // start point and previous point
+function d3_geo_lengthLineStart() {
+  var λ0, sinφ0, cosφ0;
 
-  // For the first point, …
-  d3_geo_area.point = function(λ, φ) {
-    d3_geo_area.point = nextPoint;
-    λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), sinφ0 = Math.sin(φ);
+  d3_geo_length.point = function(λ, φ) {
+    λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);
+    d3_geo_length.point = nextPoint;
   };
 
-  // For subsequent points, …
-  function nextPoint(λ, φ) {
-    λ *= d3_radians;
-    φ = φ * d3_radians / 2 + π / 4; // half the angular distance from south pole
+  d3_geo_length.lineEnd = function() {
+    d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;
+  };
 
-    // Spherical excess E for a spherical triangle with vertices: south pole,
-    // previous point, current point.  Uses a formula derived from Cagnoli’s
-    // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
-    var dλ = λ - λ0,
-        sdλ = dλ >= 0 ? 1 : -1,
-        adλ = sdλ * dλ,
+  function nextPoint(λ, φ) {
+    var sinφ = Math.sin(φ *= d3_radians),
         cosφ = Math.cos(φ),
-        sinφ = Math.sin(φ),
-        k = sinφ0 * sinφ,
-        u = cosφ0 * cosφ + k * Math.cos(adλ),
-        v = k * sdλ * Math.sin(adλ);
-    d3_geo_areaRingSum.add(Math.atan2(v, u));
-
-    // Advance the previous points.
-    λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
+        t = abs((λ *= d3_radians) - λ0),
+        cosΔλ = Math.cos(t);
+    d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);
+    λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;
   }
-
-  // For the last point, return to the start.
-  d3_geo_area.lineEnd = function() {
-    nextPoint(λ00, φ00);
-  };
 }
-// TODO
-// cross and scale return new vectors,
-// whereas add and normalize operate in-place
+function d3_identity(d) {
+  return d;
+}
+function d3_true() {
+  return true;
+}
 
-function d3_geo_cartesian(spherical) {
-  var λ = spherical[0],
-      φ = spherical[1],
-      cosφ = Math.cos(φ);
+function d3_geo_spherical(cartesian) {
   return [
-    cosφ * Math.cos(λ),
-    cosφ * Math.sin(λ),
-    Math.sin(φ)
+    Math.atan2(cartesian[1], cartesian[0]),
+    d3_asin(cartesian[2])
   ];
 }
 
-function d3_geo_cartesianDot(a, b) {
-  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+function d3_geo_sphericalEqual(a, b) {
+  return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;
 }
 
-function d3_geo_cartesianCross(a, b) {
-  return [
-    a[1] * b[2] - a[2] * b[1],
-    a[2] * b[0] - a[0] * b[2],
-    a[0] * b[1] - a[1] * b[0]
-  ];
-}
+// General spherical polygon clipping algorithm: takes a polygon, cuts it into
+// visible line segments and rejoins the segments by interpolating along the
+// clip edge.
+function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {
+  var subject = [],
+      clip = [];
 
-function d3_geo_cartesianAdd(a, b) {
-  a[0] += b[0];
-  a[1] += b[1];
-  a[2] += b[2];
+  segments.forEach(function(segment) {
+    if ((n = segment.length - 1) <= 0) return;
+    var n, p0 = segment[0], p1 = segment[n];
+
+    // If the first and last points of a segment are coincident, then treat as
+    // a closed ring.
+    // TODO if all rings are closed, then the winding order of the exterior
+    // ring should be checked.
+    if (d3_geo_sphericalEqual(p0, p1)) {
+      listener.lineStart();
+      for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);
+      listener.lineEnd();
+      return;
+    }
+
+    var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true),
+        b = new d3_geo_clipPolygonIntersection(p0, null, a, false);
+    a.o = b;
+    subject.push(a);
+    clip.push(b);
+    a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);
+    b = new d3_geo_clipPolygonIntersection(p1, null, a, true);
+    a.o = b;
+    subject.push(a);
+    clip.push(b);
+  });
+  clip.sort(compare);
+  d3_geo_clipPolygonLinkCircular(subject);
+  d3_geo_clipPolygonLinkCircular(clip);
+  if (!subject.length) return;
+
+  for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {
+    clip[i].e = entry = !entry;
+  }
+
+  var start = subject[0],
+      points,
+      point;
+  while (1) {
+    // Find first unvisited intersection.
+    var current = start,
+        isSubject = true;
+    while (current.v) if ((current = current.n) === start) return;
+    points = current.z;
+    listener.lineStart();
+    do {
+      current.v = current.o.v = true;
+      if (current.e) {
+        if (isSubject) {
+          for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);
+        } else {
+          interpolate(current.x, current.n.x, 1, listener);
+        }
+        current = current.n;
+      } else {
+        if (isSubject) {
+          points = current.p.z;
+          for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
+        } else {
+          interpolate(current.x, current.p.x, -1, listener);
+        }
+        current = current.p;
+      }
+      current = current.o;
+      points = current.z;
+      isSubject = !isSubject;
+    } while (!current.v);
+    listener.lineEnd();
+  }
 }
 
-function d3_geo_cartesianScale(vector, k) {
-  return [
-    vector[0] * k,
-    vector[1] * k,
-    vector[2] * k
-  ];
+function d3_geo_clipPolygonLinkCircular(array) {
+  if (!(n = array.length)) return;
+  var n,
+      i = 0,
+      a = array[0],
+      b;
+  while (++i < n) {
+    a.n = b = array[i];
+    b.p = a;
+    a = b;
+  }
+  a.n = b = array[0];
+  b.p = a;
 }
 
-function d3_geo_cartesianNormalize(d) {
-  var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
-  d[0] /= l;
-  d[1] /= l;
-  d[2] /= l;
+function d3_geo_clipPolygonIntersection(point, points, other, entry) {
+  this.x = point;
+  this.z = points;
+  this.o = other; // another intersection
+  this.e = entry; // is an entry?
+  this.v = false; // visited
+  this.n = this.p = null; // next & previous
 }
 
-function d3_geo_pointInPolygon(point, polygon) {
-  var meridian = point[0],
-      parallel = point[1],
-      meridianNormal = [Math.sin(meridian), -Math.cos(meridian), 0],
-      polarAngle = 0,
-      winding = 0;
-  d3_geo_areaRingSum.reset();
+function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
+  return function(rotate, listener) {
+    var line = clipLine(listener),
+        rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
 
-  for (var i = 0, n = polygon.length; i < n; ++i) {
-    var ring = polygon[i],
-        m = ring.length;
-    if (!m) continue;
-    var point0 = ring[0],
-        λ0 = point0[0],
-        φ0 = point0[1] / 2 + π / 4,
-        sinφ0 = Math.sin(φ0),
-        cosφ0 = Math.cos(φ0),
-        j = 1;
+    var clip = {
+      point: point,
+      lineStart: lineStart,
+      lineEnd: lineEnd,
+      polygonStart: function() {
+        clip.point = pointRing;
+        clip.lineStart = ringStart;
+        clip.lineEnd = ringEnd;
+        segments = [];
+        polygon = [];
+      },
+      polygonEnd: function() {
+        clip.point = point;
+        clip.lineStart = lineStart;
+        clip.lineEnd = lineEnd;
 
-    while (true) {
-      if (j === m) j = 0;
-      point = ring[j];
-      var λ = point[0],
-          φ = point[1] / 2 + π / 4,
-          sinφ = Math.sin(φ),
-          cosφ = Math.cos(φ),
-          dλ = λ - λ0,
-          sdλ = dλ >= 0 ? 1 : -1,
-          adλ = sdλ * dλ,
-          antimeridian = adλ > π,
-          k = sinφ0 * sinφ;
-      d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));
+        segments = d3.merge(segments);
+        var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);
+        if (segments.length) {
+          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+          d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);
+        } else if (clipStartInside) {
+          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+          listener.lineStart();
+          interpolate(null, null, 1, listener);
+          listener.lineEnd();
+        }
+        if (polygonStarted) listener.polygonEnd(), polygonStarted = false;
+        segments = polygon = null;
+      },
+      sphere: function() {
+        listener.polygonStart();
+        listener.lineStart();
+        interpolate(null, null, 1, listener);
+        listener.lineEnd();
+        listener.polygonEnd();
+      }
+    };
 
-      polarAngle += antimeridian ? dλ + sdλ * τ : dλ;
+    function point(λ, φ) {
+      var point = rotate(λ, φ);
+      if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);
+    }
+    function pointLine(λ, φ) {
+      var point = rotate(λ, φ);
+      line.point(point[0], point[1]);
+    }
+    function lineStart() { clip.point = pointLine; line.lineStart(); }
+    function lineEnd() { clip.point = point; line.lineEnd(); }
 
-      // Are the longitudes either side of the point's meridian, and are the
-      // latitudes smaller than the parallel?
-      if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {
-        var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));
-        d3_geo_cartesianNormalize(arc);
-        var intersection = d3_geo_cartesianCross(meridianNormal, arc);
-        d3_geo_cartesianNormalize(intersection);
-        var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);
-        if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {
-          winding += antimeridian ^ dλ >= 0 ? 1 : -1;
+    var segments;
+
+    var buffer = d3_geo_clipBufferListener(),
+        ringListener = clipLine(buffer),
+        polygonStarted = false,
+        polygon,
+        ring;
+
+    function pointRing(λ, φ) {
+      ring.push([λ, φ]);
+      var point = rotate(λ, φ);
+      ringListener.point(point[0], point[1]);
+    }
+
+    function ringStart() {
+      ringListener.lineStart();
+      ring = [];
+    }
+
+    function ringEnd() {
+      pointRing(ring[0][0], ring[0][1]);
+      ringListener.lineEnd();
+
+      var clean = ringListener.clean(),
+          ringSegments = buffer.buffer(),
+          segment,
+          n = ringSegments.length;
+
+      ring.pop();
+      polygon.push(ring);
+      ring = null;
+
+      if (!n) return;
+
+      // No intersections.
+      if (clean & 1) {
+        segment = ringSegments[0];
+        var n = segment.length - 1,
+            i = -1,
+            point;
+        if (n > 0) {
+          if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+          listener.lineStart();
+          while (++i < n) listener.point((point = segment[i])[0], point[1]);
+          listener.lineEnd();
         }
+        return;
       }
-      if (!j++) break;
-      λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;
+
+      // Rejoin connected segments.
+      // TODO reuse bufferListener.rejoin()?
+      if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
+
+      segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
     }
-  }
 
-  // First, determine whether the South pole is inside or outside:
-  //
-  // It is inside if:
-  // * the polygon winds around it in a clockwise direction.
-  // * the polygon does not (cumulatively) wind around it, but has a negative
-  //   (counter-clockwise) area.
-  //
-  // Second, count the (signed) number of times a segment crosses a meridian
-  // from the point to the South pole.  If it is zero, then the point is the
-  // same side as the South pole.
+    return clip;
+  };
+}
 
-  return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < 0) ^ (winding & 1);
+function d3_geo_clipSegmentLength1(segment) {
+  return segment.length > 1;
+}
+
+function d3_geo_clipBufferListener() {
+  var lines = [],
+      line;
+  return {
+    lineStart: function() { lines.push(line = []); },
+    point: function(λ, φ) { line.push([λ, φ]); },
+    lineEnd: d3_noop,
+    buffer: function() {
+      var buffer = lines;
+      lines = [];
+      line = null;
+      return buffer;
+    },
+    rejoin: function() {
+      if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
+    }
+  };
+}
+
+// Intersection points are sorted along the clip edge. For both antimeridian
+// cutting and circle clipping, the same comparison is used.
+function d3_geo_clipSort(a, b) {
+  return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1])
+       - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);
 }
 
 var d3_geo_clipAntimeridian = d3_geo_clip(
@@ -2776,6 +2715,65 @@ function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {
     listener.point(to[0], to[1]);
   }
 }
+// TODO
+// cross and scale return new vectors,
+// whereas add and normalize operate in-place
+
+function d3_geo_cartesian(spherical) {
+  var λ = spherical[0],
+      φ = spherical[1],
+      cosφ = Math.cos(φ);
+  return [
+    cosφ * Math.cos(λ),
+    cosφ * Math.sin(λ),
+    Math.sin(φ)
+  ];
+}
+
+function d3_geo_cartesianDot(a, b) {
+  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+
+function d3_geo_cartesianCross(a, b) {
+  return [
+    a[1] * b[2] - a[2] * b[1],
+    a[2] * b[0] - a[0] * b[2],
+    a[0] * b[1] - a[1] * b[0]
+  ];
+}
+
+function d3_geo_cartesianAdd(a, b) {
+  a[0] += b[0];
+  a[1] += b[1];
+  a[2] += b[2];
+}
+
+function d3_geo_cartesianScale(vector, k) {
+  return [
+    vector[0] * k,
+    vector[1] * k,
+    vector[2] * k
+  ];
+}
+
+function d3_geo_cartesianNormalize(d) {
+  var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
+  d[0] /= l;
+  d[1] /= l;
+  d[2] /= l;
+}
+function d3_geo_compose(a, b) {
+
+  function compose(x, y) {
+    return x = a(x, y), b(x[0], x[1]);
+  }
+
+  if (a.invert && b.invert) compose.invert = function(x, y) {
+    return x = b.invert(x, y), x && a.invert(x[0], x[1]);
+  };
+
+  return compose;
+}
 
 function d3_geo_equirectangular(λ, φ) {
   return [λ, φ];
@@ -2935,24 +2933,188 @@ function d3_geo_circleAngle(cr, point) {
   var angle = d3_acos(-a[1]);
   return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);
 }
+// Adds floating point numbers with twice the normal precision.
+// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and
+// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)
+// 305–363 (1997).
+// Code adapted from GeographicLib by Charles F. F. Karney,
+// http://geographiclib.sourceforge.net/
+// See lib/geographiclib/LICENSE for details.
+
+function d3_adder() {}
+
+d3_adder.prototype = {
+  s: 0, // rounded value
+  t: 0, // exact error
+  add: function(y) {
+    d3_adderSum(y, this.t, d3_adderTemp);
+    d3_adderSum(d3_adderTemp.s, this.s, this);
+    if (this.s) this.t += d3_adderTemp.t;
+    else this.s = d3_adderTemp.t;
+  },
+  reset: function() {
+    this.s = this.t = 0;
+  },
+  valueOf: function() {
+    return this.s;
+  }
+};
+
+var d3_adderTemp = new d3_adder;
+
+function d3_adderSum(a, b, o) {
+  var x = o.s = a + b, // a + b
+      bv = x - a, av = x - bv; // b_virtual & a_virtual
+  o.t = (a - av) + (b - bv); // a_roundoff + b_roundoff
+}
 
-// Clip features against a small circle centered at [0°, 0°].
-function d3_geo_clipCircle(radius) {
-  var cr = Math.cos(radius),
-      smallRadius = cr > 0,
-      notHemisphere = abs(cr) > ε, // TODO optimise for this common case
-      interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
+d3.geo.area = function(object) {
+  d3_geo_areaSum = 0;
+  d3.geo.stream(object, d3_geo_area);
+  return d3_geo_areaSum;
+};
 
-  return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-π, radius - π]);
+var d3_geo_areaSum,
+    d3_geo_areaRingSum = new d3_adder;
 
-  function visible(λ, φ) {
-    return Math.cos(λ) * Math.cos(φ) > cr;
+var d3_geo_area = {
+  sphere: function() { d3_geo_areaSum += 4 * π; },
+  point: d3_noop,
+  lineStart: d3_noop,
+  lineEnd: d3_noop,
+
+  // Only count area for polygon rings.
+  polygonStart: function() {
+    d3_geo_areaRingSum.reset();
+    d3_geo_area.lineStart = d3_geo_areaRingStart;
+  },
+  polygonEnd: function() {
+    var area = 2 * d3_geo_areaRingSum;
+    d3_geo_areaSum += area < 0 ? 4 * π + area : area;
+    d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;
   }
+};
 
-  // Takes a line and cuts into visible segments. Return values used for
-  // polygon clipping:
-  //   0: there were intersections or the line was empty.
-  //   1: no intersections.
+function d3_geo_areaRingStart() {
+  var λ00, φ00, λ0, cosφ0, sinφ0; // start point and previous point
+
+  // For the first point, …
+  d3_geo_area.point = function(λ, φ) {
+    d3_geo_area.point = nextPoint;
+    λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), sinφ0 = Math.sin(φ);
+  };
+
+  // For subsequent points, …
+  function nextPoint(λ, φ) {
+    λ *= d3_radians;
+    φ = φ * d3_radians / 2 + π / 4; // half the angular distance from south pole
+
+    // Spherical excess E for a spherical triangle with vertices: south pole,
+    // previous point, current point.  Uses a formula derived from Cagnoli’s
+    // theorem.  See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
+    var dλ = λ - λ0,
+        sdλ = dλ >= 0 ? 1 : -1,
+        adλ = sdλ * dλ,
+        cosφ = Math.cos(φ),
+        sinφ = Math.sin(φ),
+        k = sinφ0 * sinφ,
+        u = cosφ0 * cosφ + k * Math.cos(adλ),
+        v = k * sdλ * Math.sin(adλ);
+    d3_geo_areaRingSum.add(Math.atan2(v, u));
+
+    // Advance the previous points.
+    λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
+  }
+
+  // For the last point, return to the start.
+  d3_geo_area.lineEnd = function() {
+    nextPoint(λ00, φ00);
+  };
+}
+
+function d3_geo_pointInPolygon(point, polygon) {
+  var meridian = point[0],
+      parallel = point[1],
+      meridianNormal = [Math.sin(meridian), -Math.cos(meridian), 0],
+      polarAngle = 0,
+      winding = 0;
+  d3_geo_areaRingSum.reset();
+
+  for (var i = 0, n = polygon.length; i < n; ++i) {
+    var ring = polygon[i],
+        m = ring.length;
+    if (!m) continue;
+    var point0 = ring[0],
+        λ0 = point0[0],
+        φ0 = point0[1] / 2 + π / 4,
+        sinφ0 = Math.sin(φ0),
+        cosφ0 = Math.cos(φ0),
+        j = 1;
+
+    while (true) {
+      if (j === m) j = 0;
+      point = ring[j];
+      var λ = point[0],
+          φ = point[1] / 2 + π / 4,
+          sinφ = Math.sin(φ),
+          cosφ = Math.cos(φ),
+          dλ = λ - λ0,
+          sdλ = dλ >= 0 ? 1 : -1,
+          adλ = sdλ * dλ,
+          antimeridian = adλ > π,
+          k = sinφ0 * sinφ;
+      d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));
+
+      polarAngle += antimeridian ? dλ + sdλ * τ : dλ;
+
+      // Are the longitudes either side of the point's meridian, and are the
+      // latitudes smaller than the parallel?
+      if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {
+        var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));
+        d3_geo_cartesianNormalize(arc);
+        var intersection = d3_geo_cartesianCross(meridianNormal, arc);
+        d3_geo_cartesianNormalize(intersection);
+        var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);
+        if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {
+          winding += antimeridian ^ dλ >= 0 ? 1 : -1;
+        }
+      }
+      if (!j++) break;
+      λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;
+    }
+  }
+
+  // First, determine whether the South pole is inside or outside:
+  //
+  // It is inside if:
+  // * the polygon winds around it in a clockwise direction.
+  // * the polygon does not (cumulatively) wind around it, but has a negative
+  //   (counter-clockwise) area.
+  //
+  // Second, count the (signed) number of times a segment crosses a meridian
+  // from the point to the South pole.  If it is zero, then the point is the
+  // same side as the South pole.
+
+  return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < 0) ^ (winding & 1);
+}
+
+// Clip features against a small circle centered at [0°, 0°].
+function d3_geo_clipCircle(radius) {
+  var cr = Math.cos(radius),
+      smallRadius = cr > 0,
+      notHemisphere = abs(cr) > ε, // TODO optimise for this common case
+      interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
+
+  return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-π, radius - π]);
+
+  function visible(λ, φ) {
+    return Math.cos(λ) * Math.cos(φ) > cr;
+  }
+
+  // Takes a line and cuts into visible segments. Return values used for
+  // polygon clipping:
+  //   0: there were intersections or the line was empty.
+  //   1: no intersections.
   //   2: there were intersections, and the first and last segments should be
   //      rejoined.
   function clipLine(listener) {
@@ -3360,18 +3522,6 @@ function d3_geo_clipExtent(x0, y0, x1, y1) {
         : b[0] - a[0];
   }
 }
-function d3_geo_compose(a, b) {
-
-  function compose(x, y) {
-    return x = a(x, y), b(x[0], x[1]);
-  }
-
-  if (a.invert && b.invert) compose.invert = function(x, y) {
-    return x = b.invert(x, y), x && a.invert(x[0], x[1]);
-  };
-
-  return compose;
-}
 
 function d3_geo_conic(projectAt) {
   var φ0 = 0,
@@ -4076,7 +4226,7 @@ function d3_geo_pathContext(context) {
   };
 
   function point(x, y) {
-    context.moveTo(x, y);
+    context.moveTo(x + pointRadius, y);
     context.arc(x, y, pointRadius, 0, τ);
   }
 
@@ -4578,13 +4728,15 @@ function d3_geom_pointY(d) {
 }
 
 /**
- * Computes the 2D convex hull of a set of points using Graham's scanning
- * algorithm. The algorithm has been implemented as described in Cormen,
- * Leiserson, and Rivest's Introduction to Algorithms. The running time of
- * this algorithm is O(n log n), where n is the number of input points.
+ * Computes the 2D convex hull of a set of points using the monotone chain
+ * algorithm:
+ * http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain)
  *
- * @param vertices [[x1, y1], [x2, y2], …]
- * @returns polygon [[x1, y1], [x2, y2], …]
+ * The runtime of this algorithm is O(n log n), where n is the number of input
+ * points. However in practice it outperforms other O(n log n) hulls.
+ *
+ * @param vertices [[x1, y1], [x2, y2], ...]
+ * @returns polygon [[x1, y1], [x2, y2], ...]
  */
 d3.geom.hull = function(vertices) {
   var x = d3_geom_pointX,
@@ -4593,86 +4745,40 @@ d3.geom.hull = function(vertices) {
   if (arguments.length) return hull(vertices);
 
   function hull(data) {
+    // Hull of < 3 points is not well-defined
     if (data.length < 3) return [];
 
     var fx = d3_functor(x),
         fy = d3_functor(y),
+        i,
         n = data.length,
-        vertices, // TODO use parallel arrays
-        plen = n - 1,
-        points = [],
-        stack = [],
-        d,
-        i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
-
-    if (fx === d3_geom_pointX && y === d3_geom_pointY) vertices = data;
-    else for (i = 0, vertices = []; i < n; ++i) {
-      vertices.push([+fx.call(this, d = data[i], i), +fy.call(this, d, i)]);
-    }
-
-    // find the starting ref point: leftmost point with the minimum y coord
-    for (i = 1; i < n; ++i) {
-      if (vertices[i][1] < vertices[h][1]
-          || vertices[i][1] == vertices[h][1]
-          && vertices[i][0] < vertices[h][0]) h = i;
-    }
-
-    // calculate polar angles from ref point and sort
-    for (i = 0; i < n; ++i) {
-      if (i === h) continue;
-      y1 = vertices[i][1] - vertices[h][1];
-      x1 = vertices[i][0] - vertices[h][0];
-      points.push({angle: Math.atan2(y1, x1), index: i});
-    }
-    points.sort(function(a, b) { return a.angle - b.angle; });
-
-    // toss out duplicate angles
-    a = points[0].angle;
-    v = points[0].index;
-    u = 0;
-    for (i = 1; i < plen; ++i) {
-      j = points[i].index;
-      if (a == points[i].angle) {
-        // keep angle for point most distant from the reference
-        x1 = vertices[v][0] - vertices[h][0];
-        y1 = vertices[v][1] - vertices[h][1];
-        x2 = vertices[j][0] - vertices[h][0];
-        y2 = vertices[j][1] - vertices[h][1];
-        if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
-          points[i].index = -1;
-          continue;
-        } else {
-          points[u].index = -1;
-        }
-      }
-      a = points[i].angle;
-      u = i;
-      v = j;
-    }
+        points = [], // of the form [[x0, y0, 0], ..., [xn, yn, n]]
+        flippedPoints = [];
 
-    // initialize the stack
-    stack.push(h);
-    for (i = 0, j = 0; i < 2; ++j) {
-      if (points[j].index > -1) {
-        stack.push(points[j].index);
-        i++;
-      }
+    for (i = 0 ; i < n; i++) {
+      points.push([+fx.call(this, data[i], i), +fy.call(this, data[i], i), i]);
     }
-    sp = stack.length;
 
-    // do graham's scan
-    for (; j < plen; ++j) {
-      if (points[j].index < 0) continue; // skip tossed out points
-      while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
-        --sp;
-      }
-      stack[sp++] = points[j].index;
-    }
+    // sort ascending by x-coord first, y-coord second
+    points.sort(d3_geom_hullOrder);
+
+    // we flip bottommost points across y axis so we can use the upper hull routine on both
+    for (i = 0; i < n; i++) flippedPoints.push([points[i][0], -points[i][1]]);
+
+    var upper = d3_geom_hullUpper(points),
+        lower = d3_geom_hullUpper(flippedPoints);
+
+    // construct the polygon, removing possible duplicate endpoints
+    var skipLeft = lower[0] === upper[0],
+        skipRight  = lower[lower.length - 1] === upper[upper.length - 1],
+        polygon = [];
+
+    // add upper hull in r->l order
+    // then add lower hull in l->r order
+    for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]);
+    for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]);
 
-    // construct the hull
-    var poly = [];
-    for (i = sp - 1; i >= 0; --i) poly.push(data[stack[i]]);
-    return poly;
+    return polygon;
   }
 
   hull.x = function(_) {
@@ -4686,126 +4792,76 @@ d3.geom.hull = function(vertices) {
   return hull;
 };
 
-// are three points in counter-clockwise order?
-function d3_geom_hullCCW(i1, i2, i3, v) {
-  var t, a, b, c, d, e, f;
-  t = v[i1]; a = t[0]; b = t[1];
-  t = v[i2]; c = t[0]; d = t[1];
-  t = v[i3]; e = t[0]; f = t[1];
-  return (f - b) * (c - a) - (d - b) * (e - a) > 0;
-}
-
-var d3_ease_default = function() { return d3_identity; };
-
-var d3_ease = d3.map({
-  linear: d3_ease_default,
-  poly: d3_ease_poly,
-  quad: function() { return d3_ease_quad; },
-  cubic: function() { return d3_ease_cubic; },
-  sin: function() { return d3_ease_sin; },
-  exp: function() { return d3_ease_exp; },
-  circle: function() { return d3_ease_circle; },
-  elastic: d3_ease_elastic,
-  back: d3_ease_back,
-  bounce: function() { return d3_ease_bounce; }
-});
-
-var d3_ease_mode = d3.map({
-  "in": d3_identity,
-  "out": d3_ease_reverse,
-  "in-out": d3_ease_reflect,
-  "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }
-});
-
-d3.ease = function(name) {
-  var i = name.indexOf("-"),
-      t = i >= 0 ? name.substring(0, i) : name,
-      m = i >= 0 ? name.substring(i + 1) : "in";
-  t = d3_ease.get(t) || d3_ease_default;
-  m = d3_ease_mode.get(m) || d3_identity;
-  return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));
-};
-
-function d3_ease_clamp(f) {
-  return function(t) {
-    return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
-  };
-}
-
-function d3_ease_reverse(f) {
-  return function(t) {
-    return 1 - f(1 - t);
-  };
-}
-
-function d3_ease_reflect(f) {
-  return function(t) {
-    return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));
-  };
-}
+// finds the 'upper convex hull' (see wiki link above)
+// assumes points arg has >=3 elements, is sorted by x, unique in y
+// returns array of indices into points in left to right order
+function d3_geom_hullUpper(points) {
+  var n = points.length,
+      hull = [0, 1],
+      hs = 2; // hull size
 
-function d3_ease_quad(t) {
-  return t * t;
-}
+  for (var i = 2; i < n; i++) {
+    while (hs > 1 && d3_cross2d(points[hull[hs-2]], points[hull[hs-1]], points[i]) <= 0) --hs;
+    hull[hs++] = i;
+  }
 
-function d3_ease_cubic(t) {
-  return t * t * t;
+  // we slice to make sure that the points we 'popped' from hull don't stay behind
+  return hull.slice(0, hs);
 }
 
-// Optimized clamp(reflect(poly(3))).
-function d3_ease_cubicInOut(t) {
-  if (t <= 0) return 0;
-  if (t >= 1) return 1;
-  var t2 = t * t, t3 = t2 * t;
-  return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);
+// comparator for ascending sort by x-coord first, y-coord second
+function d3_geom_hullOrder(a, b) {
+  return a[0] - b[0] || a[1] - b[1];
 }
+// import "../transition/transition";
 
-function d3_ease_poly(e) {
-  return function(t) {
-    return Math.pow(t, e);
-  };
-}
+d3_selectionPrototype.transition = function(name) {
+  var id = d3_transitionInheritId || ++d3_transitionId,
+      ns = d3_transitionNamespace(name),
+      subgroups = [],
+      subgroup,
+      node,
+      transition = d3_transitionInherit || {time: Date.now(), ease: d3_ease_cubicInOut, delay: 0, duration: 250};
 
-function d3_ease_sin(t) {
-  return 1 - Math.cos(t * halfπ);
-}
+  for (var j = -1, m = this.length; ++j < m;) {
+    subgroups.push(subgroup = []);
+    for (var group = this[j], i = -1, n = group.length; ++i < n;) {
+      if (node = group[i]) d3_transitionNode(node, i, ns, id, transition);
+      subgroup.push(node);
+    }
+  }
 
-function d3_ease_exp(t) {
-  return Math.pow(2, 10 * (t - 1));
-}
+  return d3_transition(subgroups, ns, id);
+};
+// import "../transition/transition";
 
-function d3_ease_circle(t) {
-  return 1 - Math.sqrt(1 - t * t);
-}
+// TODO Interrupt transitions for all namespaces?
+d3_selectionPrototype.interrupt = function(name) {
+  return this.each(name == null
+      ? d3_selection_interrupt
+      : d3_selection_interruptNS(d3_transitionNamespace(name)));
+};
 
-function d3_ease_elastic(a, p) {
-  var s;
-  if (arguments.length < 2) p = 0.45;
-  if (arguments.length) s = p / τ * Math.asin(1 / a);
-  else a = 1, s = p / 4;
-  return function(t) {
-    return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);
-  };
-}
+var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace());
 
-function d3_ease_back(s) {
-  if (!s) s = 1.70158;
-  return function(t) {
-    return t * t * ((s + 1) * t - s);
+function d3_selection_interruptNS(ns) {
+  return function() {
+    var lock, active;
+    if ((lock = this[ns]) && (active = lock[lock.active])) {
+      if (--lock.count) delete lock[lock.active];
+      else delete this[ns];
+      lock.active += .5;
+      active.event && active.event.interrupt.call(this, this.__data__, active.index);
+    }
   };
 }
 
-function d3_ease_bounce(t) {
-  return t < 1 / 2.75 ? 7.5625 * t * t
-      : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75
-      : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375
-      : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
-}
-
-function d3_transition(groups, id) {
+function d3_transition(groups, ns, id) {
   d3_subclass(groups, d3_transitionPrototype);
 
-  groups.id = id; // Note: read-only!
+  // Note: read-only!
+  groups.namespace = ns;
+  groups.id = id;
 
   return groups;
 }
@@ -4820,10 +4876,10 @@ d3_transitionPrototype.empty = d3_selectionPrototype.empty;
 d3_transitionPrototype.node = d3_selectionPrototype.node;
 d3_transitionPrototype.size = d3_selectionPrototype.size;
 
-d3.transition = function(selection) {
-  return arguments.length
-      ? (d3_transitionInheritId ? selection.transition() : selection)
-      : d3_selectionRoot.transition();
+d3.transition = function(selection, name) {
+  return selection && selection.transition
+      ? (d3_transitionInheritId ? selection.transition(name) : selection)
+      : d3.selection().transition(selection);
 };
 
 d3.transition.prototype = d3_transitionPrototype;
@@ -4831,6 +4887,7 @@ d3.transition.prototype = d3_transitionPrototype;
 
 d3_transitionPrototype.select = function(selector) {
   var id = this.id,
+      ns = this.namespace,
       subgroups = [],
       subgroup,
       subnode,
@@ -4843,7 +4900,7 @@ d3_transitionPrototype.select = function(selector) {
     for (var group = this[j], i = -1, n = group.length; ++i < n;) {
       if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {
         if ("__data__" in node) subnode.__data__ = node.__data__;
-        d3_transitionNode(subnode, i, id, node.__transition__[id]);
+        d3_transitionNode(subnode, i, ns, id, node[ns][id]);
         subgroup.push(subnode);
       } else {
         subgroup.push(null);
@@ -4851,11 +4908,12 @@ d3_transitionPrototype.select = function(selector) {
     }
   }
 
-  return d3_transition(subgroups, id);
+  return d3_transition(subgroups, ns, id);
 };
 
 d3_transitionPrototype.selectAll = function(selector) {
   var id = this.id,
+      ns = this.namespace,
       subgroups = [],
       subgroup,
       subnodes,
@@ -4868,18 +4926,18 @@ d3_transitionPrototype.selectAll = function(selector) {
   for (var j = -1, m = this.length; ++j < m;) {
     for (var group = this[j], i = -1, n = group.length; ++i < n;) {
       if (node = group[i]) {
-        transition = node.__transition__[id];
+        transition = node[ns][id];
         subnodes = selector.call(node, node.__data__, i, j);
         subgroups.push(subgroup = []);
         for (var k = -1, o = subnodes.length; ++k < o;) {
-          if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
+          if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition);
           subgroup.push(subnode);
         }
       }
     }
   }
 
-  return d3_transition(subgroups, id);
+  return d3_transition(subgroups, ns, id);
 };
 
 d3_transitionPrototype.filter = function(filter) {
@@ -4899,41 +4957,35 @@ d3_transitionPrototype.filter = function(filter) {
     }
   }
 
-  return d3_transition(subgroups, this.id);
+  return d3_transition(subgroups, this.namespace, this.id);
 };
-function d3_Color() {}
+d3.color = d3_color;
 
-d3_Color.prototype.toString = function() {
+function d3_color() {}
+
+d3_color.prototype.toString = function() {
   return this.rgb() + "";
 };
 
-d3.hsl = function(h, s, l) {
-  return arguments.length === 1
-      ? (h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l)
-      : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl))
-      : d3_hsl(+h, +s, +l);
-};
+d3.hsl = d3_hsl;
 
 function d3_hsl(h, s, l) {
-  return new d3_Hsl(h, s, l);
-}
-
-function d3_Hsl(h, s, l) {
-  this.h = h;
-  this.s = s;
-  this.l = l;
+  return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l)
+      : arguments.length < 2 ? (h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l)
+      : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl))
+      : new d3_hsl(h, s, l);
 }
 
-var d3_hslPrototype = d3_Hsl.prototype = new d3_Color;
+var d3_hslPrototype = d3_hsl.prototype = new d3_color;
 
 d3_hslPrototype.brighter = function(k) {
   k = Math.pow(0.7, arguments.length ? k : 1);
-  return d3_hsl(this.h, this.s, this.l / k);
+  return new d3_hsl(this.h, this.s, this.l / k);
 };
 
 d3_hslPrototype.darker = function(k) {
   k = Math.pow(0.7, arguments.length ? k : 1);
-  return d3_hsl(this.h, this.s, k * this.l);
+  return new d3_hsl(this.h, this.s, k * this.l);
 };
 
 d3_hslPrototype.rgb = function() {
@@ -4966,35 +5018,27 @@ function d3_hsl_rgb(h, s, l) {
     return Math.round(v(h) * 255);
   }
 
-  return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+  return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));
 }
 
-d3.hcl = function(h, c, l) {
-  return arguments.length === 1
-      ? (h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l)
-      : (h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b)
-      : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b)))
-      : d3_hcl(+h, +c, +l);
-};
+d3.hcl = d3_hcl;
 
 function d3_hcl(h, c, l) {
-  return new d3_Hcl(h, c, l);
-}
-
-function d3_Hcl(h, c, l) {
-  this.h = h;
-  this.c = c;
-  this.l = l;
+  return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l)
+      : arguments.length < 2 ? (h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l)
+      : (h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b)
+      : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b)))
+      : new d3_hcl(h, c, l);
 }
 
-var d3_hclPrototype = d3_Hcl.prototype = new d3_Color;
+var d3_hclPrototype = d3_hcl.prototype = new d3_color;
 
 d3_hclPrototype.brighter = function(k) {
-  return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
+  return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
 };
 
 d3_hclPrototype.darker = function(k) {
-  return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
+  return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
 };
 
 d3_hclPrototype.rgb = function() {
@@ -5004,25 +5048,17 @@ d3_hclPrototype.rgb = function() {
 function d3_hcl_lab(h, c, l) {
   if (isNaN(h)) h = 0;
   if (isNaN(c)) c = 0;
-  return d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
+  return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
 }
 
-d3.lab = function(l, a, b) {
-  return arguments.length === 1
-      ? (l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b)
-      : (l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h)
-      : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b)))
-      : d3_lab(+l, +a, +b);
-};
+d3.lab = d3_lab;
 
 function d3_lab(l, a, b) {
-  return new d3_Lab(l, a, b);
-}
-
-function d3_Lab(l, a, b) {
-  this.l = l;
-  this.a = a;
-  this.b = b;
+  return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b)
+      : arguments.length < 2 ? (l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b)
+      : (l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l)
+      : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b)))
+      : new d3_lab(l, a, b);
 }
 
 // Corresponds roughly to RGB brighter/darker
@@ -5033,14 +5069,14 @@ var d3_lab_X = 0.950470,
     d3_lab_Y = 1,
     d3_lab_Z = 1.088830;
 
-var d3_labPrototype = d3_Lab.prototype = new d3_Color;
+var d3_labPrototype = d3_lab.prototype = new d3_color;
 
 d3_labPrototype.brighter = function(k) {
-  return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+  return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
 };
 
 d3_labPrototype.darker = function(k) {
-  return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+  return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
 };
 
 d3_labPrototype.rgb = function() {
@@ -5054,7 +5090,7 @@ function d3_lab_rgb(l, a, b) {
   x = d3_lab_xyz(x) * d3_lab_X;
   y = d3_lab_xyz(y) * d3_lab_Y;
   z = d3_lab_xyz(z) * d3_lab_Z;
-  return d3_rgb(
+  return new d3_rgb(
     d3_xyz_rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z),
     d3_xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
     d3_xyz_rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)
@@ -5063,8 +5099,8 @@ function d3_lab_rgb(l, a, b) {
 
 function d3_lab_hcl(l, a, b) {
   return l > 0
-      ? d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l)
-      : d3_hcl(NaN, NaN, l);
+      ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l)
+      : new d3_hcl(NaN, NaN, l);
 }
 
 function d3_lab_xyz(x) {
@@ -5078,32 +5114,24 @@ function d3_xyz_rgb(r) {
   return Math.round(255 * (r <= 0.00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055));
 }
 
-d3.rgb = function(r, g, b) {
-  return arguments.length === 1
-      ? (r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b)
+d3.rgb = d3_rgb;
+
+function d3_rgb(r, g, b) {
+  return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b)
+      : arguments.length < 2 ? (r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b)
       : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb))
-      : d3_rgb(~~r, ~~g, ~~b);
-};
+      : new d3_rgb(r, g, b);
+}
 
 function d3_rgbNumber(value) {
-  return d3_rgb(value >> 16, value >> 8 & 0xff, value & 0xff);
+  return new d3_rgb(value >> 16, value >> 8 & 0xff, value & 0xff);
 }
 
 function d3_rgbString(value) {
   return d3_rgbNumber(value) + "";
 }
 
-function d3_rgb(r, g, b) {
-  return new d3_Rgb(r, g, b);
-}
-
-function d3_Rgb(r, g, b) {
-  this.r = r;
-  this.g = g;
-  this.b = b;
-}
-
-var d3_rgbPrototype = d3_Rgb.prototype = new d3_Color;
+var d3_rgbPrototype = d3_rgb.prototype = new d3_color;
 
 d3_rgbPrototype.brighter = function(k) {
   k = Math.pow(0.7, arguments.length ? k : 1);
@@ -5111,16 +5139,16 @@ d3_rgbPrototype.brighter = function(k) {
       g = this.g,
       b = this.b,
       i = 30;
-  if (!r && !g && !b) return d3_rgb(i, i, i);
+  if (!r && !g && !b) return new d3_rgb(i, i, i);
   if (r && r < i) r = i;
   if (g && g < i) g = i;
   if (b && b < i) b = i;
-  return d3_rgb(Math.min(255, ~~(r / k)), Math.min(255, ~~(g / k)), Math.min(255, ~~(b / k)));
+  return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));
 };
 
 d3_rgbPrototype.darker = function(k) {
   k = Math.pow(0.7, arguments.length ? k : 1);
-  return d3_rgb(~~(k * this.r), ~~(k * this.g), ~~(k * this.b));
+  return new d3_rgb(k * this.r, k * this.g, k * this.b);
 };
 
 d3_rgbPrototype.hsl = function() {
@@ -5168,10 +5196,12 @@ function d3_rgb_parse(format, rgb, hsl) {
   }
 
   /* Named colors. */
-  if (color = d3_rgb_names.get(format)) return rgb(color.r, color.g, color.b);
+  if (color = d3_rgb_names.get(format.toLowerCase())) {
+    return rgb(color.r, color.g, color.b);
+  }
 
   /* Hexadecimal colors: #rgb and #rrggbb. */
-  if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.substring(1), 16))) {
+  if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) {
     if (format.length === 4) {
       r = (color & 0xf00) >> 4; r = (r >> 4) | r;
       g = (color & 0xf0); g = (g >> 4) | g;
@@ -5203,7 +5233,7 @@ function d3_rgb_hsl(r, g, b) {
     h = NaN;
     s = l > 0 && l < 1 ? 0 : h;
   }
-  return d3_hsl(h, s, l);
+  return new d3_hsl(h, s, l);
 }
 
 function d3_rgb_lab(r, g, b) {
@@ -5345,6 +5375,7 @@ var d3_rgb_names = d3.map({
   plum: 0xdda0dd,
   powderblue: 0xb0e0e6,
   purple: 0x800080,
+  rebeccapurple: 0x663399,
   red: 0xff0000,
   rosybrown: 0xbc8f8f,
   royalblue: 0x4169e1,
@@ -5442,8 +5473,8 @@ function d3_interpolateArray(a, b) {
 d3.interpolateNumber = d3_interpolateNumber;
 
 function d3_interpolateNumber(a, b) {
-  b -= a = +a;
-  return function(t) { return a + b * t; };
+  a = +a, b = +b;
+  return function(t) { return a * (1 - t) + b * t; };
 }
 
 d3.interpolateString = d3_interpolateString;
@@ -5464,7 +5495,7 @@ function d3_interpolateString(a, b) {
   while ((am = d3_interpolate_numberA.exec(a))
       && (bm = d3_interpolate_numberB.exec(b))) {
     if ((bs = bm.index) > bi) { // a string precedes the next number in b
-      bs = b.substring(bi, bs);
+      bs = b.slice(bi, bs);
       if (s[i]) s[i] += bs; // coalesce with previous string
       else s[++i] = bs;
     }
@@ -5480,7 +5511,7 @@ function d3_interpolateString(a, b) {
 
   // Add remains of b.
   if (bi < b.length) {
-    bs = b.substring(bi);
+    bs = b.slice(bi);
     if (s[i]) s[i] += bs; // coalesce with previous string
     else s[++i] = bs;
   }
@@ -5511,7 +5542,7 @@ d3.interpolators = [
   function(a, b) {
     var t = typeof b;
     return (t === "string" ? (d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) ? d3_interpolateRgb : d3_interpolateString)
-        : b instanceof d3_Color ? d3_interpolateRgb
+        : b instanceof d3_color ? d3_interpolateRgb
         : Array.isArray(b) ? d3_interpolateArray
         : t === "object" && isNaN(b) ? d3_interpolateObject
         : d3_interpolateNumber)(a, b);
@@ -5635,18 +5666,18 @@ function d3_interpolateTransform(a, b) {
 }
 
 d3_transitionPrototype.tween = function(name, tween) {
-  var id = this.id;
-  if (arguments.length < 2) return this.node().__transition__[id].tween.get(name);
+  var id = this.id, ns = this.namespace;
+  if (arguments.length < 2) return this.node()[ns][id].tween.get(name);
   return d3_selection_each(this, tween == null
-        ? function(node) { node.__transition__[id].tween.remove(name); }
-        : function(node) { node.__transition__[id].tween.set(name, tween); });
+        ? function(node) { node[ns][id].tween.remove(name); }
+        : function(node) { node[ns][id].tween.set(name, tween); });
 };
 
 function d3_transition_tween(groups, name, value, tween) {
-  var id = groups.id;
+  var id = groups.id, ns = groups.namespace;
   return d3_selection_each(groups, typeof value === "function"
-      ? function(node, i, j) { node.__transition__[id].tween.set(name, tween(value.call(node, node.__data__, i, j))); }
-      : (value = tween(value), function(node) { node.__transition__[id].tween.set(name, value); }));
+      ? function(node, i, j) { node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j))); }
+      : (value = tween(value), function(node) { node[ns][id].tween.set(name, value); }));
 }
 
 d3_transitionPrototype.attr = function(nameNS, value) {
@@ -5732,7 +5763,7 @@ d3_transitionPrototype.style = function(name, value, priority) {
   // Otherwise, a name, value and priority are specified, and handled as below.
   function styleString(b) {
     return b == null ? styleNull : (b += "", function() {
-      var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i;
+      var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;
       return a !== b && (i = d3_interpolate(a, b), function(t) { this.style.setProperty(name, i(t), priority); });
     });
   }
@@ -5744,7 +5775,7 @@ d3_transitionPrototype.styleTween = function(name, tween, priority) {
   if (arguments.length < 3) priority = "";
 
   function styleTween(d, i) {
-    var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name));
+    var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));
     return f && function(t) { this.style.setProperty(name, f(t), priority); };
   }
 
@@ -5761,51 +5792,162 @@ function d3_transition_text(b) {
 }
 
 d3_transitionPrototype.remove = function() {
+  var ns = this.namespace;
   return this.each("end.transition", function() {
     var p;
-    if (this.__transition__.count < 2 && (p = this.parentNode)) p.removeChild(this);
+    if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this);
   });
 };
 
+var d3_ease_default = function() { return d3_identity; };
+
+var d3_ease = d3.map({
+  linear: d3_ease_default,
+  poly: d3_ease_poly,
+  quad: function() { return d3_ease_quad; },
+  cubic: function() { return d3_ease_cubic; },
+  sin: function() { return d3_ease_sin; },
+  exp: function() { return d3_ease_exp; },
+  circle: function() { return d3_ease_circle; },
+  elastic: d3_ease_elastic,
+  back: d3_ease_back,
+  bounce: function() { return d3_ease_bounce; }
+});
+
+var d3_ease_mode = d3.map({
+  "in": d3_identity,
+  "out": d3_ease_reverse,
+  "in-out": d3_ease_reflect,
+  "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }
+});
+
+d3.ease = function(name) {
+  var i = name.indexOf("-"),
+      t = i >= 0 ? name.slice(0, i) : name,
+      m = i >= 0 ? name.slice(i + 1) : "in";
+  t = d3_ease.get(t) || d3_ease_default;
+  m = d3_ease_mode.get(m) || d3_identity;
+  return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));
+};
+
+function d3_ease_clamp(f) {
+  return function(t) {
+    return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
+  };
+}
+
+function d3_ease_reverse(f) {
+  return function(t) {
+    return 1 - f(1 - t);
+  };
+}
+
+function d3_ease_reflect(f) {
+  return function(t) {
+    return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));
+  };
+}
+
+function d3_ease_quad(t) {
+  return t * t;
+}
+
+function d3_ease_cubic(t) {
+  return t * t * t;
+}
+
+// Optimized clamp(reflect(poly(3))).
+function d3_ease_cubicInOut(t) {
+  if (t <= 0) return 0;
+  if (t >= 1) return 1;
+  var t2 = t * t, t3 = t2 * t;
+  return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);
+}
+
+function d3_ease_poly(e) {
+  return function(t) {
+    return Math.pow(t, e);
+  };
+}
+
+function d3_ease_sin(t) {
+  return 1 - Math.cos(t * halfπ);
+}
+
+function d3_ease_exp(t) {
+  return Math.pow(2, 10 * (t - 1));
+}
+
+function d3_ease_circle(t) {
+  return 1 - Math.sqrt(1 - t * t);
+}
+
+function d3_ease_elastic(a, p) {
+  var s;
+  if (arguments.length < 2) p = 0.45;
+  if (arguments.length) s = p / τ * Math.asin(1 / a);
+  else a = 1, s = p / 4;
+  return function(t) {
+    return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);
+  };
+}
+
+function d3_ease_back(s) {
+  if (!s) s = 1.70158;
+  return function(t) {
+    return t * t * ((s + 1) * t - s);
+  };
+}
+
+function d3_ease_bounce(t) {
+  return t < 1 / 2.75 ? 7.5625 * t * t
+      : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75
+      : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375
+      : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
+}
+
 d3_transitionPrototype.ease = function(value) {
-  var id = this.id;
-  if (arguments.length < 1) return this.node().__transition__[id].ease;
+  var id = this.id, ns = this.namespace;
+  if (arguments.length < 1) return this.node()[ns][id].ease;
   if (typeof value !== "function") value = d3.ease.apply(d3, arguments);
-  return d3_selection_each(this, function(node) { node.__transition__[id].ease = value; });
+  return d3_selection_each(this, function(node) { node[ns][id].ease = value; });
 };
 
 d3_transitionPrototype.delay = function(value) {
-  var id = this.id;
-  if (arguments.length < 1) return this.node().__transition__[id].delay;
+  var id = this.id, ns = this.namespace;
+  if (arguments.length < 1) return this.node()[ns][id].delay;
   return d3_selection_each(this, typeof value === "function"
-      ? function(node, i, j) { node.__transition__[id].delay = +value.call(node, node.__data__, i, j); }
-      : (value = +value, function(node) { node.__transition__[id].delay = value; }));
+      ? function(node, i, j) { node[ns][id].delay = +value.call(node, node.__data__, i, j); }
+      : (value = +value, function(node) { node[ns][id].delay = value; }));
 };
 
 d3_transitionPrototype.duration = function(value) {
-  var id = this.id;
-  if (arguments.length < 1) return this.node().__transition__[id].duration;
+  var id = this.id, ns = this.namespace;
+  if (arguments.length < 1) return this.node()[ns][id].duration;
   return d3_selection_each(this, typeof value === "function"
-      ? function(node, i, j) { node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j)); }
-      : (value = Math.max(1, value), function(node) { node.__transition__[id].duration = value; }));
+      ? function(node, i, j) { node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j)); }
+      : (value = Math.max(1, value), function(node) { node[ns][id].duration = value; }));
 };
 
 d3_transitionPrototype.each = function(type, listener) {
-  var id = this.id;
+  var id = this.id, ns = this.namespace;
   if (arguments.length < 2) {
     var inherit = d3_transitionInherit,
         inheritId = d3_transitionInheritId;
-    d3_transitionInheritId = id;
-    d3_selection_each(this, function(node, i, j) {
-      d3_transitionInherit = node.__transition__[id];
-      type.call(node, node.__data__, i, j);
-    });
-    d3_transitionInherit = inherit;
-    d3_transitionInheritId = inheritId;
+    try {
+      d3_transitionInheritId = id;
+      d3_selection_each(this, function(node, i, j) {
+        d3_transitionInherit = node[ns][id];
+        type.call(node, node.__data__, i, j);
+      });
+    } finally {
+      d3_transitionInherit = inherit;
+      d3_transitionInheritId = inheritId;
+    }
   } else {
     d3_selection_each(this, function(node) {
-      var transition = node.__transition__[id];
-      (transition.event || (transition.event = d3.dispatch("start", "end"))).on(type, listener);
+      var transition = node[ns][id];
+      (transition.event || (transition.event = d3.dispatch("start", "end", "interrupt"))).on(type, listener);
     });
   }
   return this;
@@ -5814,6 +5956,7 @@ d3_transitionPrototype.each = function(type, listener) {
 d3_transitionPrototype.transition = function() {
   var id0 = this.id,
       id1 = ++d3_transitionId,
+      ns = this.namespace,
       subgroups = [],
       subgroup,
       group,
@@ -5824,19 +5967,22 @@ d3_transitionPrototype.transition = function() {
     subgroups.push(subgroup = []);
     for (var group = this[j], i = 0, n = group.length; i < n; i++) {
       if (node = group[i]) {
-        transition = Object.create(node.__transition__[id0]);
-        transition.delay += transition.duration;
-        d3_transitionNode(node, i, id1, transition);
+        transition = node[ns][id0];
+        d3_transitionNode(node, i, ns, id1, {time: transition.time, ease: transition.ease, delay: transition.delay + transition.duration, duration: transition.duration});
       }
       subgroup.push(node);
     }
   }
 
-  return d3_transition(subgroups, id1);
+  return d3_transition(subgroups, ns, id1);
 };
 
-function d3_transitionNode(node, i, id, inherit) {
-  var lock = node.__transition__ || (node.__transition__ = {active: 0, count: 0}),
+function d3_transitionNamespace(name) {
+  return name == null ? "__transition__" : "__transition_" + name + "__";
+}
+
+function d3_transitionNode(node, i, ns, id, inherit) {
+  var lock = node[ns] || (node[ns] = {active: 0, count: 0}),
       transition = lock[id];
 
   if (!transition) {
@@ -5845,18 +5991,20 @@ function d3_transitionNode(node, i, id, inherit) {
     transition = lock[id] = {
       tween: new d3_Map,
       time: time,
-      ease: inherit.ease,
       delay: inherit.delay,
-      duration: inherit.duration
+      duration: inherit.duration,
+      ease: inherit.ease,
+      index: i
     };
 
+    inherit = null; // allow gc
+
     ++lock.count;
 
     d3.timer(function(elapsed) {
-      var d = node.__data__,
-          ease = transition.ease,
-          delay = transition.delay,
-          duration = transition.duration,
+      var delay = transition.delay,
+          duration,
+          ease,
           timer = d3_timer_active,
           tweened = [];
 
@@ -5866,15 +6014,28 @@ function d3_transitionNode(node, i, id, inherit) {
 
       function start(elapsed) {
         if (lock.active > id) return stop();
+
+        var active = lock[lock.active];
+        if (active) {
+          --lock.count;
+          delete lock[lock.active];
+          active.event && active.event.interrupt.call(node, node.__data__, active.index);
+        }
+
         lock.active = id;
-        transition.event && transition.event.start.call(node, d, i);
+
+        transition.event && transition.event.start.call(node, node.__data__, i);
 
         transition.tween.forEach(function(key, value) {
-          if (value = value.call(node, d, i)) {
+          if (value = value.call(node, node.__data__, i)) {
             tweened.push(value);
           }
         });
 
+        // Deferred capture to allow tweens to initialize ease & duration.
+        ease = transition.ease;
+        duration = transition.duration;
+
         d3.timer(function() { // defer to end of current frame
           timer.c = tick(elapsed || 1) ? d3_true : tick;
           return 1;
@@ -5882,7 +6043,7 @@ function d3_transitionNode(node, i, id, inherit) {
       }
 
       function tick(elapsed) {
-        if (lock.active !== id) return stop();
+        if (lock.active !== id) return 1;
 
         var t = elapsed / duration,
             e = ease(t),
@@ -5893,14 +6054,14 @@ function d3_transitionNode(node, i, id, inherit) {
         }
 
         if (t >= 1) {
-          transition.event && transition.event.end.call(node, d, i);
+          transition.event && transition.event.end.call(node, node.__data__, i);
           return stop();
         }
       }
 
       function stop() {
         if (--lock.count) delete lock[id];
-        else delete node.__transition__;
+        else delete node[ns];
         return 1;
       }
     }, 0, time);
@@ -5924,7 +6085,7 @@ function d3_xhr(url, mimeType, response, callback) {
       responseType = null;
 
   // If IE does not support CORS, use XDomainRequest.
-  if (d3_window.XDomainRequest
+  if (this.XDomainRequest
       && !("withCredentials" in request)
       && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest;
 
@@ -5934,7 +6095,7 @@ function d3_xhr(url, mimeType, response, callback) {
 
   function respond() {
     var status = request.status, result;
-    if (!status && request.responseText || status >= 200 && status < 300 || status === 304) {
+    if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {
       try {
         result = response.call(xhr, request);
       } catch (e) {
@@ -6021,6 +6182,13 @@ function d3_xhr_fixCallback(callback) {
       : callback;
 }
 
+function d3_xhrHasResponse(request) {
+  var type = request.responseType;
+  return type && type !== "text"
+      ? request.response // null on error
+      : request.responseText; // "" on error
+}
+
 d3.text = d3_xhrType(function(request) {
   return request.responseText;
 });
@@ -6046,13 +6214,9 @@ function d3_html(request) {
 d3.xml = d3_xhrType(function(request) {
   return request.responseXML;
 });
-  if (typeof define === "function" && define.amd) {
-    define(d3);
-  } else if (typeof module === "object" && module.exports) {
-    module.exports = d3;
-  } else {
-    this.d3 = d3;
-  }
+  if (typeof define === "function" && define.amd) define(d3);
+  else if (typeof module === "object" && module.exports) module.exports = d3;
+  this.d3 = d3;
 }();
 d3.combobox = function() {
     var event = d3.dispatch('accept'),
@@ -6243,7 +6407,7 @@ d3.combobox = function() {
 
             for (var i = 0; i < suggestions.length; i++) {
                 if (suggestions[i].value.toLowerCase().indexOf(v.toLowerCase()) === 0) {
-                    var completion = v + suggestions[i].value.substr(v.length);
+                    var completion = suggestions[i].value;
                     idx = i;
                     input.property('value', completion);
                     input.node().setSelectionRange(v.length, completion.length);
@@ -6916,6 +7080,437 @@ d3.selection.prototype.value = function(value) {
     if (!arguments.length) return this.property('value');
     return this.each(d3_selection_value(value));
 };
+// Copyright (c) 2006, 2008 Tony Garnock-Jones <tonyg@lshift.net>
+// Copyright (c) 2006, 2008 LShift Ltd. <query@lshift.net>
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation files
+// (the "Software"), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software,
+// and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+// source:  https://bitbucket.org/lshift/synchrotron/src
+
+Diff3 = (function() {
+    'use strict';
+
+    var diff3 = {
+        longest_common_subsequence: function(file1, file2) {
+            /* Text diff algorithm following Hunt and McIlroy 1976.
+             * J. W. Hunt and M. D. McIlroy, An algorithm for differential file
+             * comparison, Bell Telephone Laboratories CSTR #41 (1976)
+             * http://www.cs.dartmouth.edu/~doug/
+             *
+             * Expects two arrays of strings.
+             */
+            var equivalenceClasses;
+            var file2indices;
+            var newCandidate;
+            var candidates;
+            var line;
+            var c, i, j, jX, r, s;
+
+            equivalenceClasses = {};
+            for (j = 0; j < file2.length; j++) {
+                line = file2[j];
+                if (equivalenceClasses[line]) {
+                    equivalenceClasses[line].push(j);
+                } else {
+                    equivalenceClasses[line] = [j];
+                }
+            }
+
+            candidates = [{file1index: -1,
+                           file2index: -1,
+                           chain: null}];
+
+            for (i = 0; i < file1.length; i++) {
+                line = file1[i];
+                file2indices = equivalenceClasses[line] || [];
+
+                r = 0;
+                c = candidates[0];
+
+                for (jX = 0; jX < file2indices.length; jX++) {
+                    j = file2indices[jX];
+
+                    for (s = 0; s < candidates.length; s++) {
+                        if ((candidates[s].file2index < j) &&
+                            ((s == candidates.length - 1) ||
+                             (candidates[s + 1].file2index > j)))
+                            break;
+                    }
+
+                    if (s < candidates.length) {
+                        newCandidate = {file1index: i,
+                                        file2index: j,
+                                        chain: candidates[s]};
+                        if (r == candidates.length) {
+                            candidates.push(c);
+                        } else {
+                            candidates[r] = c;
+                        }
+                        r = s + 1;
+                        c = newCandidate;
+                        if (r == candidates.length) {
+                            break; // no point in examining further (j)s
+                        }
+                    }
+                }
+
+                candidates[r] = c;
+            }
+
+            // At this point, we know the LCS: it's in the reverse of the
+            // linked-list through .chain of
+            // candidates[candidates.length - 1].
+
+            return candidates[candidates.length - 1];
+        },
+
+        diff_comm: function(file1, file2) {
+            // We apply the LCS to build a "comm"-style picture of the
+            // differences between file1 and file2.
+
+            var result = [];
+            var tail1 = file1.length;
+            var tail2 = file2.length;
+            var common = {common: []};
+
+            function processCommon() {
+                if (common.common.length) {
+                    common.common.reverse();
+                    result.push(common);
+                    common = {common: []};
+                }
+            }
+
+            for (var candidate = Diff3.longest_common_subsequence(file1, file2);
+                 candidate !== null;
+                 candidate = candidate.chain)
+            {
+                var different = {file1: [], file2: []};
+
+                while (--tail1 > candidate.file1index) {
+                    different.file1.push(file1[tail1]);
+                }
+
+                while (--tail2 > candidate.file2index) {
+                    different.file2.push(file2[tail2]);
+                }
+
+                if (different.file1.length || different.file2.length) {
+                    processCommon();
+                    different.file1.reverse();
+                    different.file2.reverse();
+                    result.push(different);
+                }
+
+                if (tail1 >= 0) {
+                    common.common.push(file1[tail1]);
+                }
+            }
+
+            processCommon();
+
+            result.reverse();
+            return result;
+        },
+
+        diff_patch: function(file1, file2) {
+            // We apply the LCD to build a JSON representation of a
+            // diff(1)-style patch.
+
+            var result = [];
+            var tail1 = file1.length;
+            var tail2 = file2.length;
+
+            function chunkDescription(file, offset, length) {
+                var chunk = [];
+                for (var i = 0; i < length; i++) {
+                    chunk.push(file[offset + i]);
+                }
+                return {offset: offset,
+                        length: length,
+                        chunk: chunk};
+            }
+
+            for (var candidate = Diff3.longest_common_subsequence(file1, file2);
+                 candidate !== null;
+                 candidate = candidate.chain)
+            {
+                var mismatchLength1 = tail1 - candidate.file1index - 1;
+                var mismatchLength2 = tail2 - candidate.file2index - 1;
+                tail1 = candidate.file1index;
+                tail2 = candidate.file2index;
+
+                if (mismatchLength1 || mismatchLength2) {
+                    result.push({file1: chunkDescription(file1,
+                                                         candidate.file1index + 1,
+                                                         mismatchLength1),
+                                 file2: chunkDescription(file2,
+                                                         candidate.file2index + 1,
+                                                         mismatchLength2)});
+                }
+            }
+
+            result.reverse();
+            return result;
+        },
+
+        strip_patch: function(patch) {
+        // Takes the output of Diff3.diff_patch(), and removes
+        // information from it. It can still be used by patch(),
+        // below, but can no longer be inverted.
+        var newpatch = [];
+        for (var i = 0; i < patch.length; i++) {
+            var chunk = patch[i];
+            newpatch.push({file1: {offset: chunk.file1.offset,
+                       length: chunk.file1.length},
+                   file2: {chunk: chunk.file2.chunk}});
+        }
+        return newpatch;
+        },
+
+        invert_patch: function(patch) {
+            // Takes the output of Diff3.diff_patch(), and inverts the
+            // sense of it, so that it can be applied to file2 to give
+            // file1 rather than the other way around.
+
+            for (var i = 0; i < patch.length; i++) {
+                var chunk = patch[i];
+                var tmp = chunk.file1;
+                chunk.file1 = chunk.file2;
+                chunk.file2 = tmp;
+            }
+        },
+
+        patch: function (file, patch) {
+            // Applies a patch to a file.
+            //
+            // Given file1 and file2, Diff3.patch(file1,
+            // Diff3.diff_patch(file1, file2)) should give file2.
+
+            var result = [];
+            var commonOffset = 0;
+
+            function copyCommon(targetOffset) {
+                while (commonOffset < targetOffset) {
+                    result.push(file[commonOffset]);
+                    commonOffset++;
+                }
+            }
+
+            for (var chunkIndex = 0; chunkIndex < patch.length; chunkIndex++) {
+                var chunk = patch[chunkIndex];
+                copyCommon(chunk.file1.offset);
+                for (var lineIndex = 0; lineIndex < chunk.file2.chunk.length; lineIndex++) {
+                    result.push(chunk.file2.chunk[lineIndex]);
+                }
+                commonOffset += chunk.file1.length;
+            }
+
+            copyCommon(file.length);
+            return result;
+        },
+
+        diff_indices: function(file1, file2) {
+            // We apply the LCS to give a simple representation of the
+            // offsets and lengths of mismatched chunks in the input
+            // files. This is used by diff3_merge_indices below.
+
+            var result = [];
+            var tail1 = file1.length;
+            var tail2 = file2.length;
+
+            for (var candidate = Diff3.longest_common_subsequence(file1, file2);
+                 candidate !== null;
+                 candidate = candidate.chain)
+            {
+                var mismatchLength1 = tail1 - candidate.file1index - 1;
+                var mismatchLength2 = tail2 - candidate.file2index - 1;
+                tail1 = candidate.file1index;
+                tail2 = candidate.file2index;
+
+                if (mismatchLength1 || mismatchLength2) {
+                    result.push({file1: [tail1 + 1, mismatchLength1],
+                                 file2: [tail2 + 1, mismatchLength2]});
+                }
+            }
+
+            result.reverse();
+            return result;
+        },
+
+        diff3_merge_indices: function (a, o, b) {
+            // Given three files, A, O, and B, where both A and B are
+            // independently derived from O, returns a fairly complicated
+            // internal representation of merge decisions it's taken. The
+            // interested reader may wish to consult
+            //
+            // Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce. "A
+            // Formal Investigation of Diff3." In Arvind and Prasad,
+            // editors, Foundations of Software Technology and Theoretical
+            // Computer Science (FSTTCS), December 2007.
+            //
+            // (http://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf)
+            var i;
+
+            var m1 = Diff3.diff_indices(o, a);
+            var m2 = Diff3.diff_indices(o, b);
+
+            var hunks = [];
+            function addHunk(h, side) {
+                hunks.push([h.file1[0], side, h.file1[1], h.file2[0], h.file2[1]]);
+            }
+            for (i = 0; i < m1.length; i++) { addHunk(m1[i], 0); }
+            for (i = 0; i < m2.length; i++) { addHunk(m2[i], 2); }
+            hunks.sort();
+
+            var result = [];
+            var commonOffset = 0;
+            function copyCommon(targetOffset) {
+                if (targetOffset > commonOffset) {
+                    result.push([1, commonOffset, targetOffset - commonOffset]);
+                    commonOffset = targetOffset;
+                }
+            }
+
+            for (var hunkIndex = 0; hunkIndex < hunks.length; hunkIndex++) {
+                var firstHunkIndex = hunkIndex;
+                var hunk = hunks[hunkIndex];
+                var regionLhs = hunk[0];
+                var regionRhs = regionLhs + hunk[2];
+                while (hunkIndex < hunks.length - 1) {
+                    var maybeOverlapping = hunks[hunkIndex + 1];
+                    var maybeLhs = maybeOverlapping[0];
+                    if (maybeLhs > regionRhs) break;
+                    regionRhs = maybeLhs + maybeOverlapping[2];
+                    hunkIndex++;
+                }
+
+                copyCommon(regionLhs);
+                if (firstHunkIndex == hunkIndex) {
+            // The "overlap" was only one hunk long, meaning that
+            // there's no conflict here. Either a and o were the
+            // same, or b and o were the same.
+                    if (hunk[4] > 0) {
+                        result.push([hunk[1], hunk[3], hunk[4]]);
+                    }
+                } else {
+            // A proper conflict. Determine the extents of the
+            // regions involved from a, o and b. Effectively merge
+            // all the hunks on the left into one giant hunk, and
+            // do the same for the right; then, correct for skew
+            // in the regions of o that each side changed, and
+            // report appropriate spans for the three sides.
+            var regions = {
+                0: [a.length, -1, o.length, -1],
+                2: [b.length, -1, o.length, -1]
+            };
+                    for (i = firstHunkIndex; i <= hunkIndex; i++) {
+                hunk = hunks[i];
+                        var side = hunk[1];
+                var r = regions[side];
+                var oLhs = hunk[0];
+                var oRhs = oLhs + hunk[2];
+                        var abLhs = hunk[3];
+                        var abRhs = abLhs + hunk[4];
+                r[0] = Math.min(abLhs, r[0]);
+                r[1] = Math.max(abRhs, r[1]);
+                r[2] = Math.min(oLhs, r[2]);
+                r[3] = Math.max(oRhs, r[3]);
+                    }
+            var aLhs = regions[0][0] + (regionLhs - regions[0][2]);
+            var aRhs = regions[0][1] + (regionRhs - regions[0][3]);
+            var bLhs = regions[2][0] + (regionLhs - regions[2][2]);
+            var bRhs = regions[2][1] + (regionRhs - regions[2][3]);
+                    result.push([-1,
+                     aLhs,      aRhs      - aLhs,
+                     regionLhs, regionRhs - regionLhs,
+                     bLhs,      bRhs      - bLhs]);
+                }
+                commonOffset = regionRhs;
+            }
+
+            copyCommon(o.length);
+            return result;
+        },
+
+        diff3_merge: function (a, o, b, excludeFalseConflicts) {
+            // Applies the output of Diff3.diff3_merge_indices to actually
+            // construct the merged file; the returned result alternates
+            // between "ok" and "conflict" blocks.
+
+            var result = [];
+            var files = [a, o, b];
+            var indices = Diff3.diff3_merge_indices(a, o, b);
+
+            var okLines = [];
+            function flushOk() {
+                if (okLines.length) {
+                    result.push({ok: okLines});
+                }
+                okLines = [];
+            }
+            function pushOk(xs) {
+                for (var j = 0; j < xs.length; j++) {
+                    okLines.push(xs[j]);
+                }
+            }
+
+            function isTrueConflict(rec) {
+                if (rec[2] != rec[6]) return true;
+                var aoff = rec[1];
+                var boff = rec[5];
+                for (var j = 0; j < rec[2]; j++) {
+                    if (a[j + aoff] != b[j + boff]) return true;
+                }
+                return false;
+            }
+
+            for (var i = 0; i < indices.length; i++) {
+                var x = indices[i];
+                var side = x[0];
+                if (side == -1) {
+                    if (excludeFalseConflicts && !isTrueConflict(x)) {
+                        pushOk(files[0].slice(x[1], x[1] + x[2]));
+                    } else {
+                        flushOk();
+                        result.push({conflict: {a: a.slice(x[1], x[1] + x[2]),
+                                                aIndex: x[1],
+                                                o: o.slice(x[3], x[3] + x[4]),
+                                                oIndex: x[3],
+                                                b: b.slice(x[5], x[5] + x[6]),
+                                                bIndex: x[5]}});
+                    }
+                } else {
+                    pushOk(files[side].slice(x[1], x[1] + x[2]));
+                }
+            }
+
+            flushOk();
+            return result;
+        }
+    };
+    return diff3;
+})();
+
+if (typeof module !== 'undefined') module.exports = Diff3;
 var JXON = new (function () {
   var
     sValueProp = "keyValue", sAttributesProp = "keyAttributes", sAttrPref = "@", /* you can customize these values */
@@ -7059,145 +7654,191 @@ var JXON = new (function () {
 // we got our Document instance! try: alert((new XMLSerializer()).serializeToString(newDoc));
 /**
  * @license
- * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
- * Build: `lodash --debug --output js/lib/lodash.js include="any,assign,bind,clone,compact,contains,debounce,difference,each,every,extend,filter,find,first,forEach,groupBy,indexOf,intersection,isEmpty,isEqual,isFunction,keys,last,map,omit,pairs,pluck,reject,some,throttle,union,uniq,unique,values,without,flatten,value,chain,cloneDeep,merge,pick,reduce" exports="global,node"`
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <http://lodash.com/license>
+ * lodash 3.9.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash --development --output js/lib/lodash.js include="any,assign,bind,chunk,clone,compact,contains,debounce,difference,each,every,extend,filter,find,first,forEach,forOwn,groupBy,indexOf,intersection,isEmpty,isEqual,isFunction,keys,last,map,omit,pairs,pluck,reject,some,throttle,union,uniq,unique,values,without,flatten,value,chain,cloneDeep,merge,pick,reduce" exports="global,node"`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
  */
 ;(function() {
 
-  /** Used as a safe reference for `undefined` in pre ES5 environments */
+  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
   var undefined;
 
-  /** Used to pool arrays and objects used internally */
-  var arrayPool = [],
-      objectPool = [];
+  /** Used as the semantic version number. */
+  var VERSION = '3.9.3';
+
+  /** Used to compose bitmasks for wrapper metadata. */
+  var BIND_FLAG = 1,
+      BIND_KEY_FLAG = 2,
+      CURRY_BOUND_FLAG = 4,
+      CURRY_FLAG = 8,
+      CURRY_RIGHT_FLAG = 16,
+      PARTIAL_FLAG = 32,
+      PARTIAL_RIGHT_FLAG = 64,
+      ARY_FLAG = 128,
+      REARG_FLAG = 256;
+
+  /** Used to detect when a function becomes hot. */
+  var HOT_COUNT = 150,
+      HOT_SPAN = 16;
+
+  /** Used to indicate the type of lazy iteratees. */
+  var LAZY_DROP_WHILE_FLAG = 0,
+      LAZY_FILTER_FLAG = 1,
+      LAZY_MAP_FLAG = 2;
+
+  /** Used as the `TypeError` message for "Functions" methods. */
+  var FUNC_ERROR_TEXT = 'Expected a function';
+
+  /** Used as the internal argument placeholder. */
+  var PLACEHOLDER = '__lodash_placeholder__';
+
+  /** `Object#toString` result references. */
+  var argsTag = '[object Arguments]',
+      arrayTag = '[object Array]',
+      boolTag = '[object Boolean]',
+      dateTag = '[object Date]',
+      errorTag = '[object Error]',
+      funcTag = '[object Function]',
+      mapTag = '[object Map]',
+      numberTag = '[object Number]',
+      objectTag = '[object Object]',
+      regexpTag = '[object RegExp]',
+      setTag = '[object Set]',
+      stringTag = '[object String]',
+      weakMapTag = '[object WeakMap]';
+
+  var arrayBufferTag = '[object ArrayBuffer]',
+      float32Tag = '[object Float32Array]',
+      float64Tag = '[object Float64Array]',
+      int8Tag = '[object Int8Array]',
+      int16Tag = '[object Int16Array]',
+      int32Tag = '[object Int32Array]',
+      uint8Tag = '[object Uint8Array]',
+      uint8ClampedTag = '[object Uint8ClampedArray]',
+      uint16Tag = '[object Uint16Array]',
+      uint32Tag = '[object Uint32Array]';
+
+  /** Used to match property names within property paths. */
+  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+      reIsPlainProp = /^\w*$/,
+      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
 
-  /** Used internally to indicate various things */
-  var indicatorObject = {};
-
-  /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
-  var keyPrefix = +new Date + '';
-
-  /** Used as the size when optimizations are enabled for large arrays */
-  var largeArraySize = 75;
+  /**
+   * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
+   * In addition to special characters the forward slash is escaped to allow for
+   * easier `eval` use and `Function` compilation.
+   */
+  var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+      reHasRegExpChars = RegExp(reRegExpChars.source);
 
-  /** Used as the max size of the `arrayPool` and `objectPool` */
-  var maxPoolSize = 40;
+  /** Used to match backslashes in property paths. */
+  var reEscapeChar = /\\(\\)?/g;
 
-  /** Used to match regexp flags from their coerced string values */
+  /** Used to match `RegExp` flags from their coerced string values. */
   var reFlags = /\w*$/;
 
-  /** Used to detected named functions */
-  var reFuncName = /^\s*function[ \n\r\t]+\w/;
+  /** Used to detect host constructors (Safari > 5). */
+  var reIsHostCtor = /^\[object .+?Constructor\]$/;
 
-  /** Used to detect functions containing a `this` reference */
-  var reThis = /\bthis\b/;
+  /** Used to detect unsigned integer values. */
+  var reIsUint = /^\d+$/;
 
-  /** Used to fix the JScript [[DontEnum]] bug */
-  var shadowedProps = [
+  /** Used to fix the JScript `[[DontEnum]]` bug. */
+  var shadowProps = [
     'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
     'toLocaleString', 'toString', 'valueOf'
   ];
 
-  /** `Object#toString` result shortcuts */
-  var argsClass = '[object Arguments]',
-      arrayClass = '[object Array]',
-      boolClass = '[object Boolean]',
-      dateClass = '[object Date]',
-      errorClass = '[object Error]',
-      funcClass = '[object Function]',
-      numberClass = '[object Number]',
-      objectClass = '[object Object]',
-      regexpClass = '[object RegExp]',
-      stringClass = '[object String]';
-
-  /** Used to identify object classifications that `_.clone` supports */
-  var cloneableClasses = {};
-  cloneableClasses[funcClass] = false;
-  cloneableClasses[argsClass] = cloneableClasses[arrayClass] =
-  cloneableClasses[boolClass] = cloneableClasses[dateClass] =
-  cloneableClasses[numberClass] = cloneableClasses[objectClass] =
-  cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true;
-
-  /** Used as an internal `_.debounce` options object */
+  /** Used to identify `toStringTag` values of typed arrays. */
+  var typedArrayTags = {};
+  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+  typedArrayTags[uint32Tag] = true;
+  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+  typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+  typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+  typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+  typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+  typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+  /** Used to identify `toStringTag` values supported by `_.clone`. */
+  var cloneableTags = {};
+  cloneableTags[argsTag] = cloneableTags[arrayTag] =
+  cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+  cloneableTags[dateTag] = cloneableTags[float32Tag] =
+  cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+  cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+  cloneableTags[numberTag] = cloneableTags[objectTag] =
+  cloneableTags[regexpTag] = cloneableTags[stringTag] =
+  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+  cloneableTags[errorTag] = cloneableTags[funcTag] =
+  cloneableTags[mapTag] = cloneableTags[setTag] =
+  cloneableTags[weakMapTag] = false;
+
+  /** Used as an internal `_.debounce` options object by `_.throttle`. */
   var debounceOptions = {
     'leading': false,
     'maxWait': 0,
     'trailing': false
   };
 
-  /** Used as the property descriptor for `__bindData__` */
-  var descriptor = {
-    'configurable': false,
-    'enumerable': false,
-    'value': null,
-    'writable': false
-  };
-
-  /** Used as the data object for `iteratorTemplate` */
-  var iteratorData = {
-    'args': '',
-    'array': null,
-    'bottom': '',
-    'firstArg': '',
-    'init': '',
-    'keys': null,
-    'loop': '',
-    'shadowedProps': null,
-    'support': null,
-    'top': '',
-    'useHas': false
-  };
-
-  /** Used to determine if values are of the language type Object */
+  /** Used to determine if values are of the language type `Object`. */
   var objectTypes = {
-    'boolean': false,
     'function': true,
-    'object': true,
-    'number': false,
-    'string': false,
-    'undefined': false
+    'object': true
   };
 
-  /** Used as a reference to the global object */
-  var root = (objectTypes[typeof window] && window) || this;
-
-  /** Detect free variable `exports` */
+  /** Detect free variable `exports`. */
   var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
 
-  /** Detect free variable `module` */
+  /** Detect free variable `module`. */
   var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
 
-  /** Detect the popular CommonJS extension `module.exports` */
+  /** Detect free variable `global` from Node.js. */
+  var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
+
+  /** Detect free variable `self`. */
+  var freeSelf = objectTypes[typeof self] && self && self.Object && self;
+
+  /** Detect free variable `window`. */
+  var freeWindow = objectTypes[typeof window] && window && window.Object && window;
+
+  /** Detect the popular CommonJS extension `module.exports`. */
   var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
 
-  /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
-  var freeGlobal = objectTypes[typeof global] && global;
-  if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
-    root = freeGlobal;
-  }
+  /**
+   * Used as a reference to the global object.
+   *
+   * The `this` value is used if it's the global object to avoid Greasemonkey's
+   * restricted `window` object, otherwise the `window` object is used.
+   */
+  var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
 
   /*--------------------------------------------------------------------------*/
 
   /**
-   * The base implementation of `_.indexOf` without support for binary searches
-   * or `fromIndex` constraints.
+   * The base implementation of `_.findIndex` and `_.findLastIndex` without
+   * support for callback shorthands and `this` binding.
    *
    * @private
    * @param {Array} array The array to search.
-   * @param {*} value The value to search for.
-   * @param {number} [fromIndex=0] The index to search from.
-   * @returns {number} Returns the index of the matched value or `-1`.
+   * @param {Function} predicate The function invoked per iteration.
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {number} Returns the index of the matched value, else `-1`.
    */
-  function baseIndexOf(array, value, fromIndex) {
-    var index = (fromIndex || 0) - 1,
-        length = array ? array.length : 0;
+  function baseFindIndex(array, predicate, fromRight) {
+    var length = array.length,
+        index = fromRight ? length : -1;
 
-    while (++index < length) {
-      if (array[index] === value) {
+    while ((fromRight ? index-- : ++index < length)) {
+      if (predicate(array[index], index, array)) {
         return index;
       }
     }
@@ -7205,333 +7846,361 @@ var JXON = new (function () {
   }
 
   /**
-   * An implementation of `_.contains` for cache objects that mimics the return
-   * signature of `_.indexOf` by returning `0` if the value is found, else `-1`.
+   * The base implementation of `_.indexOf` without support for binary searches.
    *
    * @private
-   * @param {Object} cache The cache object to inspect.
+   * @param {Array} array The array to search.
    * @param {*} value The value to search for.
-   * @returns {number} Returns `0` if `value` is found, else `-1`.
+   * @param {number} fromIndex The index to search from.
+   * @returns {number} Returns the index of the matched value, else `-1`.
    */
-  function cacheIndexOf(cache, value) {
-    var type = typeof value;
-    cache = cache.cache;
-
-    if (type == 'boolean' || value == null) {
-      return cache[value] ? 0 : -1;
-    }
-    if (type != 'number' && type != 'string') {
-      type = 'object';
+  function baseIndexOf(array, value, fromIndex) {
+    if (value !== value) {
+      return indexOfNaN(array, fromIndex);
     }
-    var key = type == 'number' ? value : keyPrefix + value;
-    cache = (cache = cache[type]) && cache[key];
+    var index = fromIndex - 1,
+        length = array.length;
 
-    return type == 'object'
-      ? (cache && baseIndexOf(cache, value) > -1 ? 0 : -1)
-      : (cache ? 0 : -1);
+    while (++index < length) {
+      if (array[index] === value) {
+        return index;
+      }
+    }
+    return -1;
   }
 
   /**
-   * Adds a given value to the corresponding cache object.
+   * The base implementation of `_.isFunction` without support for environments
+   * with incorrect `typeof` results.
    *
    * @private
-   * @param {*} value The value to add to the cache.
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
    */
-  function cachePush(value) {
-    var cache = this.cache,
-        type = typeof value;
-
-    if (type == 'boolean' || value == null) {
-      cache[value] = true;
-    } else {
-      if (type != 'number' && type != 'string') {
-        type = 'object';
-      }
-      var key = type == 'number' ? value : keyPrefix + value,
-          typeCache = cache[type] || (cache[type] = {});
-
-      if (type == 'object') {
-        (typeCache[key] || (typeCache[key] = [])).push(value);
-      } else {
-        typeCache[key] = true;
-      }
-    }
+  function baseIsFunction(value) {
+    // Avoid a Chakra JIT bug in compatibility modes of IE 11.
+    // See https://github.com/jashkenas/underscore/issues/1621 for more details.
+    return typeof value == 'function' || false;
   }
 
   /**
-   * Creates a cache object to optimize linear searches of large arrays.
+   * Converts `value` to a string if it's not one. An empty string is returned
+   * for `null` or `undefined` values.
    *
    * @private
-   * @param {Array} [array=[]] The array to search.
-   * @returns {null|Object} Returns the cache object or `null` if caching should not be used.
+   * @param {*} value The value to process.
+   * @returns {string} Returns the string.
    */
-  function createCache(array) {
-    var index = -1,
-        length = array.length,
-        first = array[0],
-        mid = array[(length / 2) | 0],
-        last = array[length - 1];
-
-    if (first && typeof first == 'object' &&
-        mid && typeof mid == 'object' && last && typeof last == 'object') {
-      return false;
-    }
-    var cache = getObject();
-    cache['false'] = cache['null'] = cache['true'] = cache['undefined'] = false;
-
-    var result = getObject();
-    result.array = array;
-    result.cache = cache;
-    result.push = cachePush;
-
-    while (++index < length) {
-      result.push(array[index]);
+  function baseToString(value) {
+    if (typeof value == 'string') {
+      return value;
     }
-    return result;
+    return value == null ? '' : (value + '');
   }
 
   /**
-   * Gets an array from the array pool or creates a new one if the pool is empty.
+   * Gets the index at which the first occurrence of `NaN` is found in `array`.
    *
    * @private
-   * @returns {Array} The array from the pool.
+   * @param {Array} array The array to search.
+   * @param {number} fromIndex The index to search from.
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {number} Returns the index of the matched `NaN`, else `-1`.
    */
-  function getArray() {
-    return arrayPool.pop() || [];
+  function indexOfNaN(array, fromIndex, fromRight) {
+    var length = array.length,
+        index = fromIndex + (fromRight ? 0 : -1);
+
+    while ((fromRight ? index-- : ++index < length)) {
+      var other = array[index];
+      if (other !== other) {
+        return index;
+      }
+    }
+    return -1;
   }
 
   /**
-   * Gets an object from the object pool or creates a new one if the pool is empty.
+   * Checks if `value` is a host object in IE < 9.
    *
    * @private
-   * @returns {Object} The object from the pool.
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
    */
-  function getObject() {
-    return objectPool.pop() || {
-      'array': null,
-      'cache': null,
-      'false': false,
-      'null': false,
-      'number': null,
-      'object': null,
-      'push': null,
-      'string': null,
-      'true': false,
-      'undefined': false
+  var isHostObject = (function() {
+    try {
+      Object({ 'toString': 0 } + '');
+    } catch(e) {
+      return function() { return false; };
+    }
+    return function(value) {
+      // IE < 9 presents many host objects as `Object` objects that can coerce
+      // to strings despite having improperly defined `toString` methods.
+      return typeof value.toString != 'function' && typeof (value + '') == 'string';
     };
-  }
+  }());
 
   /**
-   * Checks if `value` is a DOM node in IE < 9.
+   * Checks if `value` is object-like.
    *
    * @private
    * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is a DOM node, else `false`.
+   * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
    */
-  function isNode(value) {
-    // IE < 9 presents DOM nodes as `Object` objects except they have `toString`
-    // methods that are `typeof` "string" and still can coerce nodes to strings
-    return typeof value.toString != 'function' && typeof (value + '') == 'string';
+  function isObjectLike(value) {
+    return !!value && typeof value == 'object';
   }
 
   /**
-   * Releases the given array back to the array pool.
+   * Replaces all `placeholder` elements in `array` with an internal placeholder
+   * and returns an array of their indexes.
    *
    * @private
-   * @param {Array} [array] The array to release.
+   * @param {Array} array The array to modify.
+   * @param {*} placeholder The placeholder to replace.
+   * @returns {Array} Returns the new array of placeholder indexes.
    */
-  function releaseArray(array) {
-    array.length = 0;
-    if (arrayPool.length < maxPoolSize) {
-      arrayPool.push(array);
-    }
-  }
+  function replaceHolders(array, placeholder) {
+    var index = -1,
+        length = array.length,
+        resIndex = -1,
+        result = [];
 
-  /**
-   * Releases the given object back to the object pool.
-   *
-   * @private
-   * @param {Object} [object] The object to release.
-   */
-  function releaseObject(object) {
-    var cache = object.cache;
-    if (cache) {
-      releaseObject(cache);
-    }
-    object.array = object.cache =object.object = object.number = object.string =null;
-    if (objectPool.length < maxPoolSize) {
-      objectPool.push(object);
+    while (++index < length) {
+      if (array[index] === placeholder) {
+        array[index] = PLACEHOLDER;
+        result[++resIndex] = index;
+      }
     }
+    return result;
   }
 
   /**
-   * Slices the `collection` from the `start` index up to, but not including,
-   * the `end` index.
-   *
-   * Note: This function is used instead of `Array#slice` to support node lists
-   * in IE < 9 and to ensure dense arrays are returned.
+   * An implementation of `_.uniq` optimized for sorted arrays without support
+   * for callback shorthands and `this` binding.
    *
    * @private
-   * @param {Array|Object|string} collection The collection to slice.
-   * @param {number} start The start index.
-   * @param {number} end The end index.
-   * @returns {Array} Returns the new array.
+   * @param {Array} array The array to inspect.
+   * @param {Function} [iteratee] The function invoked per iteration.
+   * @returns {Array} Returns the new duplicate-value-free array.
    */
-  function slice(array, start, end) {
-    start || (start = 0);
-    if (typeof end == 'undefined') {
-      end = array ? array.length : 0;
-    }
-    var index = -1,
-        length = end - start || 0,
-        result = Array(length < 0 ? 0 : length);
+  function sortedUniq(array, iteratee) {
+    var seen,
+        index = -1,
+        length = array.length,
+        resIndex = -1,
+        result = [];
 
     while (++index < length) {
-      result[index] = array[start + index];
+      var value = array[index],
+          computed = iteratee ? iteratee(value, index, array) : value;
+
+      if (!index || seen !== computed) {
+        seen = computed;
+        result[++resIndex] = value;
+      }
     }
     return result;
   }
 
   /*--------------------------------------------------------------------------*/
 
-  /**
-   * Used for `Array` method references.
-   *
-   * Normally `Array.prototype` would suffice, however, using an array literal
-   * avoids issues in Narwhal.
-   */
-  var arrayRef = [];
-
-  /** Used for native method references */
-  var errorProto = Error.prototype,
+  /** Used for native method references. */
+  var arrayProto = Array.prototype,
+      errorProto = Error.prototype,
       objectProto = Object.prototype,
       stringProto = String.prototype;
 
-  /** Used to resolve the internal [[Class]] of values */
-  var toString = objectProto.toString;
+  /** Used to resolve the decompiled source of functions. */
+  var fnToString = Function.prototype.toString;
+
+  /** Used to check objects for own properties. */
+  var hasOwnProperty = objectProto.hasOwnProperty;
+
+  /**
+   * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+   * of values.
+   */
+  var objToString = objectProto.toString;
 
-  /** Used to detect if a method is native */
-  var reNative = RegExp('^' +
-    String(toString)
-      .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
-      .replace(/toString| for [^\]]+/g, '.*?') + '$'
+  /** Used to detect if a method is native. */
+  var reIsNative = RegExp('^' +
+    escapeRegExp(fnToString.call(hasOwnProperty))
+    .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
   );
 
-  /** Native method shortcuts */
-  var fnToString = Function.prototype.toString,
-      getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
-      hasOwnProperty = objectProto.hasOwnProperty,
-      now = reNative.test(now = Date.now) && now || function() { return +new Date; },
-      push = arrayRef.push,
-      propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
-  /** Used to set meta data on functions */
-  var defineProperty = (function() {
-    // IE 8 only accepts DOM elements
+  /** Native method references. */
+  var ArrayBuffer = getNative(root, 'ArrayBuffer'),
+      bufferSlice = getNative(ArrayBuffer && new ArrayBuffer(0), 'slice'),
+      ceil = Math.ceil,
+      floor = Math.floor,
+      getPrototypeOf = getNative(Object, 'getPrototypeOf'),
+      push = arrayProto.push,
+      propertyIsEnumerable = objectProto.propertyIsEnumerable,
+      Set = getNative(root, 'Set'),
+      splice = arrayProto.splice,
+      Uint8Array = getNative(root, 'Uint8Array'),
+      WeakMap = getNative(root, 'WeakMap');
+
+  /** Used to clone array buffers. */
+  var Float64Array = (function() {
+    // Safari 5 errors when using an array buffer to initialize a typed array
+    // where the array buffer's `byteLength` is not a multiple of the typed
+    // array's `BYTES_PER_ELEMENT`.
     try {
-      var o = {},
-          func = reNative.test(func = Object.defineProperty) && func,
-          result = func(o, o, o) && func;
-    } catch(e) { }
-    return result;
+      var func = getNative(root, 'Float64Array'),
+          result = new func(new ArrayBuffer(10), 0, 1) && func;
+    } catch(e) {}
+    return result || null;
   }());
 
-  /* Native method shortcuts for methods with the same name as other `lodash` methods */
-  var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
-      nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
-      nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
+  /* Native method references for those with the same name as other `lodash` methods. */
+  var nativeCreate = getNative(Object, 'create'),
+      nativeIsArray = getNative(Array, 'isArray'),
+      nativeKeys = getNative(Object, 'keys'),
       nativeMax = Math.max,
-      nativeMin = Math.min;
-
-  /** Used to lookup a built-in constructor by [[Class]] */
-  var ctorByClass = {};
-  ctorByClass[arrayClass] = Array;
-  ctorByClass[boolClass] = Boolean;
-  ctorByClass[dateClass] = Date;
-  ctorByClass[funcClass] = Function;
-  ctorByClass[objectClass] = Object;
-  ctorByClass[numberClass] = Number;
-  ctorByClass[regexpClass] = RegExp;
-  ctorByClass[stringClass] = String;
-
-  /** Used to avoid iterating non-enumerable properties in IE < 9 */
-  var nonEnumProps = {};
-  nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };
-  nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true };
-  nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true };
-  nonEnumProps[objectClass] = { 'constructor': true };
+      nativeMin = Math.min,
+      nativeNow = getNative(Date, 'now');
 
-  (function() {
-    var length = shadowedProps.length;
-    while (length--) {
-      var key = shadowedProps[length];
-      for (var className in nonEnumProps) {
-        if (hasOwnProperty.call(nonEnumProps, className) && !hasOwnProperty.call(nonEnumProps[className], key)) {
-          nonEnumProps[className][key] = false;
-        }
+  /** Used as references for `-Infinity` and `Infinity`. */
+  var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+
+  /** Used as references for the maximum length and index of an array. */
+  var MAX_ARRAY_LENGTH = 4294967295,
+      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+  /** Used as the size, in bytes, of each `Float64Array` element. */
+  var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0;
+
+  /**
+   * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+   * of an array-like value.
+   */
+  var MAX_SAFE_INTEGER = 9007199254740991;
+
+  /** Used to store function metadata. */
+  var metaMap = WeakMap && new WeakMap;
+
+  /** Used to lookup unminified function names. */
+  var realNames = {};
+
+  /** Used to lookup a type array constructors by `toStringTag`. */
+  var ctorByTag = {};
+  ctorByTag[float32Tag] = root.Float32Array;
+  ctorByTag[float64Tag] = root.Float64Array;
+  ctorByTag[int8Tag] = root.Int8Array;
+  ctorByTag[int16Tag] = root.Int16Array;
+  ctorByTag[int32Tag] = root.Int32Array;
+  ctorByTag[uint8Tag] = root.Uint8Array;
+  ctorByTag[uint8ClampedTag] = root.Uint8ClampedArray;
+  ctorByTag[uint16Tag] = root.Uint16Array;
+  ctorByTag[uint32Tag] = root.Uint32Array;
+
+  /** Used to avoid iterating over non-enumerable properties in IE < 9. */
+  var nonEnumProps = {};
+  nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };
+  nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };
+  nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };
+  nonEnumProps[objectTag] = { 'constructor': true };
+
+  arrayEach(shadowProps, function(key) {
+    for (var tag in nonEnumProps) {
+      if (hasOwnProperty.call(nonEnumProps, tag)) {
+        var props = nonEnumProps[tag];
+        props[key] = hasOwnProperty.call(props, key);
       }
     }
-  }());
+  });
 
-  /*--------------------------------------------------------------------------*/
+  /*------------------------------------------------------------------------*/
 
   /**
-   * Creates a `lodash` object which wraps the given value to enable intuitive
-   * method chaining.
-   *
-   * In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
-   * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`,
-   * and `unshift`
-   *
-   * Chaining is supported in custom builds as long as the `value` method is
-   * implicitly or explicitly included in the build.
-   *
-   * The chainable wrapper functions are:
-   * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`,
-   * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`,
-   * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`,
-   * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
-   * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
-   * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`,
-   * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`,
-   * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`,
-   * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`,
-   * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`,
-   * and `zip`
-   *
-   * The non-chainable wrapper functions are:
-   * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`,
-   * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`,
-   * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
-   * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`,
-   * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`,
-   * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`,
-   * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`,
-   * `template`, `unescape`, `uniqueId`, and `value`
-   *
-   * The wrapper functions `first` and `last` return wrapped values when `n` is
-   * provided, otherwise they return unwrapped values.
-   *
-   * Explicit chaining can be enabled by using the `_.chain` method.
+   * Creates a `lodash` object which wraps `value` to enable implicit chaining.
+   * Methods that operate on and return arrays, collections, and functions can
+   * be chained together. Methods that return a boolean or single value will
+   * automatically end the chain returning the unwrapped value. Explicit chaining
+   * may be enabled using `_.chain`. The execution of chained methods is lazy,
+   * that is, execution is deferred until `_#value` is implicitly or explicitly
+   * called.
+   *
+   * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
+   * fusion is an optimization that merges iteratees to avoid creating intermediate
+   * arrays and reduce the number of iteratee executions.
+   *
+   * Chaining is supported in custom builds as long as the `_#value` method is
+   * directly or indirectly included in the build.
+   *
+   * In addition to lodash methods, wrappers have `Array` and `String` methods.
+   *
+   * The wrapper `Array` methods are:
+   * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
+   * `splice`, and `unshift`
+   *
+   * The wrapper `String` methods are:
+   * `replace` and `split`
+   *
+   * The wrapper methods that support shortcut fusion are:
+   * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
+   * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
+   * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
+   * and `where`
+   *
+   * The chainable wrapper methods are:
+   * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
+   * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
+   * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defer`, `delay`,
+   * `difference`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `fill`,
+   * `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, `forEach`,
+   * `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `functions`,
+   * `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, `invoke`, `keys`,
+   * `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+   * `memoize`, `merge`, `method`, `methodOf`, `mixin`, `negate`, `omit`, `once`,
+   * `pairs`, `partial`, `partialRight`, `partition`, `pick`, `plant`, `pluck`,
+   * `property`, `propertyOf`, `pull`, `pullAt`, `push`, `range`, `rearg`,
+   * `reject`, `remove`, `rest`, `restParam`, `reverse`, `set`, `shuffle`,
+   * `slice`, `sort`, `sortBy`, `sortByAll`, `sortByOrder`, `splice`, `spread`,
+   * `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `tap`, `throttle`,
+   * `thru`, `times`, `toArray`, `toPlainObject`, `transform`, `union`, `uniq`,
+   * `unshift`, `unzip`, `unzipWith`, `values`, `valuesIn`, `where`, `without`,
+   * `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
+   *
+   * The wrapper methods that are **not** chainable by default are:
+   * `add`, `attempt`, `camelCase`, `capitalize`, `clone`, `cloneDeep`, `deburr`,
+   * `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`,
+   * `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, `get`,
+   * `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, `inRange`, `isArguments`,
+   * `isArray`, `isBoolean`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isError`,
+   * `isFinite` `isFunction`, `isMatch`, `isNative`, `isNaN`, `isNull`, `isNumber`,
+   * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`,
+   * `isTypedArray`, `join`, `kebabCase`, `last`, `lastIndexOf`, `lt`, `lte`,
+   * `max`, `min`, `noConflict`, `noop`, `now`, `pad`, `padLeft`, `padRight`,
+   * `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`,
+   * `runInContext`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
+   * `sortedLastIndex`, `startCase`, `startsWith`, `sum`, `template`, `trim`,
+   * `trimLeft`, `trimRight`, `trunc`, `unescape`, `uniqueId`, `value`, and `words`
+   *
+   * The wrapper method `sample` will return a wrapped value when `n` is provided,
+   * otherwise an unwrapped value is returned.
    *
    * @name _
    * @constructor
-   * @category Chaining
+   * @category Chain
    * @param {*} value The value to wrap in a `lodash` instance.
-   * @returns {Object} Returns a `lodash` instance.
+   * @returns {Object} Returns the new `lodash` wrapper instance.
    * @example
    *
    * var wrapped = _([1, 2, 3]);
    *
    * // returns an unwrapped value
-   * wrapped.reduce(function(sum, num) {
-   *   return sum + num;
+   * wrapped.reduce(function(total, n) {
+   *   return total + n;
    * });
    * // => 6
    *
    * // returns a wrapped value
-   * var squares = wrapped.map(function(num) {
-   *   return num * num;
+   * var squares = wrapped.map(function(n) {
+   *   return n * n;
    * });
    *
    * _.isArray(squares);
@@ -7541,29 +8210,42 @@ var JXON = new (function () {
    * // => true
    */
   function lodash(value) {
-    // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor
-    return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__'))
-     ? value
-     : new lodashWrapper(value);
+    if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+      if (value instanceof LodashWrapper) {
+        return value;
+      }
+      if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
+        return wrapperClone(value);
+      }
+    }
+    return new LodashWrapper(value);
   }
 
   /**
-   * A fast path for creating `lodash` wrapper objects.
+   * The function whose prototype all chaining wrappers inherit from.
    *
    * @private
-   * @param {*} value The value to wrap in a `lodash` instance.
-   * @param {boolean} chainAll A flag to enable chaining for all methods
-   * @returns {Object} Returns a `lodash` instance.
    */
-  function lodashWrapper(value, chainAll) {
-    this.__chain__ = !!chainAll;
+  function baseLodash() {
+    // No operation performed.
+  }
+
+  /**
+   * The base constructor for creating `lodash` wrapper objects.
+   *
+   * @private
+   * @param {*} value The value to wrap.
+   * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
+   * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
+   */
+  function LodashWrapper(value, chainAll, actions) {
     this.__wrapped__ = value;
+    this.__actions__ = actions || [];
+    this.__chain__ = !!chainAll;
   }
-  // ensure `new lodashWrapper` is an instance of `lodash`
-  lodashWrapper.prototype = lodash.prototype;
 
   /**
-   * An object used to flag environments features.
+   * An object environment feature flags.
    *
    * @static
    * @memberOf _
@@ -7571,84 +8253,51 @@ var JXON = new (function () {
    */
   var support = lodash.support = {};
 
-  (function() {
-    var ctor = function() { this.x = 1; },
-        object = { '0': 1, 'length': 1 },
+  (function(x) {
+    var Ctor = function() { this.x = x; },
+        object = { '0': x, 'length': x },
         props = [];
 
-    ctor.prototype = { 'valueOf': 1, 'y': 1 };
-    for (var key in new ctor) { props.push(key); }
-    for (key in arguments) { }
-
-    /**
-     * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9).
-     *
-     * @memberOf _.support
-     * @type boolean
-     */
-    support.argsClass = toString.call(arguments) == argsClass;
+    Ctor.prototype = { 'valueOf': x, 'y': x };
+    for (var key in new Ctor) { props.push(key); }
 
     /**
-     * Detect if `arguments` objects are `Object` objects (all but Narwhal and Opera < 10.5).
+     * Detect if the `toStringTag` of `arguments` objects is resolvable
+     * (all but Firefox < 4, IE < 9).
      *
      * @memberOf _.support
      * @type boolean
      */
-    support.argsObject = arguments.constructor == Object && !(arguments instanceof Array);
+    support.argsTag = objToString.call(arguments) == argsTag;
 
     /**
      * Detect if `name` or `message` properties of `Error.prototype` are
-     * enumerable by default. (IE < 9, Safari < 5.1)
+     * enumerable by default (IE < 9, Safari < 5.1).
      *
      * @memberOf _.support
      * @type boolean
      */
-    support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name');
+    support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||
+      propertyIsEnumerable.call(errorProto, 'name');
 
     /**
      * Detect if `prototype` properties are enumerable by default.
      *
      * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1
      * (if the prototype or a property on the prototype has been set)
-     * incorrectly sets a function's `prototype` property [[Enumerable]]
-     * value to `true`.
-     *
-     * @memberOf _.support
-     * @type boolean
-     */
-    support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype');
-
-    /**
-     * Detect if functions can be decompiled by `Function#toString`
-     * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
-     *
-     * @memberOf _.support
-     * @type boolean
-     */
-    support.funcDecomp = !reNative.test(root.WinRTError) && reThis.test(function() { return this; });
-
-    /**
-     * Detect if `Function#name` is supported (all but IE).
-     *
-     * @memberOf _.support
-     * @type boolean
-     */
-    support.funcNames = typeof Function.name == 'string';
-
-    /**
-     * Detect if `arguments` object indexes are non-enumerable
-     * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1).
+     * incorrectly set the `[[Enumerable]]` value of a function's `prototype`
+     * property to `true`.
      *
      * @memberOf _.support
      * @type boolean
      */
-    support.nonEnumArgs = key != 0;
+    support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');
 
     /**
      * Detect if properties shadowing those on `Object.prototype` are non-enumerable.
      *
-     * In IE < 9 an objects own properties, shadowing non-enumerable ones, are
-     * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug).
+     * In IE < 9 an object's own properties, shadowing non-enumerable ones,
+     * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
      *
      * @memberOf _.support
      * @type boolean
@@ -7656,7 +8305,7 @@ var JXON = new (function () {
     support.nonEnumShadows = !/valueOf/.test(props);
 
     /**
-     * Detect if own properties are iterated after inherited properties (all but IE < 9).
+     * Detect if own properties are iterated after inherited properties (IE < 9).
      *
      * @memberOf _.support
      * @type boolean
@@ -7664,5417 +8313,6611 @@ var JXON = new (function () {
     support.ownLast = props[0] != 'x';
 
     /**
-     * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly.
+     * Detect if `Array#shift` and `Array#splice` augment array-like objects
+     * correctly.
      *
-     * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()`
-     * and `splice()` functions that fail to remove the last element, `value[0]`,
-     * of array-like objects even though the `length` property is set to `0`.
-     * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()`
-     * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9.
+     * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array
+     * `shift()` and `splice()` functions that fail to remove the last element,
+     * `value[0]`, of array-like objects even though the "length" property is
+     * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,
+     * while `splice()` is buggy regardless of mode in IE < 9.
      *
      * @memberOf _.support
      * @type boolean
      */
-    support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]);
+    support.spliceObjects = (splice.call(object, 0, 1), !object[0]);
 
     /**
      * Detect lack of support for accessing string characters by index.
      *
-     * IE < 8 can't access characters by index and IE 8 can only access
-     * characters by index on string literals.
+     * IE < 8 can't access characters by index. IE 8 can only access characters
+     * by index on string literals, not string objects.
      *
      * @memberOf _.support
      * @type boolean
      */
     support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';
+  }(1, 0));
 
-    /**
-     * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9)
-     * and that the JS engine errors when attempting to coerce an object to
-     * a string without a `toString` function.
-     *
-     * @memberOf _.support
-     * @type boolean
-     */
-    try {
-      support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + ''));
-    } catch(e) {
-      support.nodeClass = true;
-    }
-  }(1));
-
-  /*--------------------------------------------------------------------------*/
+  /*------------------------------------------------------------------------*/
 
   /**
-   * The template used to create iterator functions.
+   * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
    *
    * @private
-   * @param {Object} data The data object used to populate the text.
-   * @returns {string} Returns the interpolated text.
+   * @param {*} value The value to wrap.
    */
-  var iteratorTemplate = function(obj) {
-
-    var __p = 'var index, iterable = ' +
-    (obj.firstArg) +
-    ', result = ' +
-    (obj.init) +
-    ';\nif (!iterable) return result;\n' +
-    (obj.top) +
-    ';';
-     if (obj.array) {
-    __p += '\nvar length = iterable.length; index = -1;\nif (' +
-    (obj.array) +
-    ') {  ';
-     if (support.unindexedChars) {
-    __p += '\n  if (isString(iterable)) {\n    iterable = iterable.split(\'\')\n  }  ';
-     }
-    __p += '\n  while (++index < length) {\n    ' +
-    (obj.loop) +
-    ';\n  }\n}\nelse {  ';
-     } else if (support.nonEnumArgs) {
-    __p += '\n  var length = iterable.length; index = -1;\n  if (length && isArguments(iterable)) {\n    while (++index < length) {\n      index += \'\';\n      ' +
-    (obj.loop) +
-    ';\n    }\n  } else {  ';
-     }
-
-     if (support.enumPrototypes) {
-    __p += '\n  var skipProto = typeof iterable == \'function\';\n  ';
-     }
-
-     if (support.enumErrorProps) {
-    __p += '\n  var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n  ';
-     }
-
-        var conditions = [];    if (support.enumPrototypes) { conditions.push('!(skipProto && index == "prototype")'); }    if (support.enumErrorProps)  { conditions.push('!(skipErrorProps && (index == "message" || index == "name"))'); }
-
-     if (obj.useHas && obj.keys) {
-    __p += '\n  var ownIndex = -1,\n      ownProps = objectTypes[typeof iterable] && keys(iterable),\n      length = ownProps ? ownProps.length : 0;\n\n  while (++ownIndex < length) {\n    index = ownProps[ownIndex];\n';
-        if (conditions.length) {
-    __p += '    if (' +
-    (conditions.join(' && ')) +
-    ') {\n  ';
-     }
-    __p +=
-    (obj.loop) +
-    ';    ';
-     if (conditions.length) {
-    __p += '\n    }';
-     }
-    __p += '\n  }  ';
-     } else {
-    __p += '\n  for (index in iterable) {\n';
-        if (obj.useHas) { conditions.push("hasOwnProperty.call(iterable, index)"); }    if (conditions.length) {
-    __p += '    if (' +
-    (conditions.join(' && ')) +
-    ') {\n  ';
-     }
-    __p +=
-    (obj.loop) +
-    ';    ';
-     if (conditions.length) {
-    __p += '\n    }';
-     }
-    __p += '\n  }    ';
-     if (support.nonEnumShadows) {
-    __p += '\n\n  if (iterable !== objectProto) {\n    var ctor = iterable.constructor,\n        isProto = iterable === (ctor && ctor.prototype),\n        className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n        nonEnum = nonEnumProps[className];\n      ';
-     for (k = 0; k < 7; k++) {
-    __p += '\n    index = \'' +
-    (obj.shadowedProps[k]) +
-    '\';\n    if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))';
-            if (!obj.useHas) {
-    __p += ' || (!nonEnum[index] && iterable[index] !== objectProto[index])';
-     }
-    __p += ') {\n      ' +
-    (obj.loop) +
-    ';\n    }      ';
-     }
-    __p += '\n  }    ';
-     }
-
-     }
-
-     if (obj.array || support.nonEnumArgs) {
-    __p += '\n}';
-     }
-    __p +=
-    (obj.bottom) +
-    ';\nreturn result';
-
-    return __p
-  };
-
-  /*--------------------------------------------------------------------------*/
+  function LazyWrapper(value) {
+    this.__wrapped__ = value;
+    this.__actions__ = null;
+    this.__dir__ = 1;
+    this.__dropCount__ = 0;
+    this.__filtered__ = false;
+    this.__iteratees__ = null;
+    this.__takeCount__ = POSITIVE_INFINITY;
+    this.__views__ = null;
+  }
 
   /**
-   * The base implementation of `_.bind` that creates the bound function and
-   * sets its meta data.
+   * Creates a clone of the lazy wrapper object.
    *
    * @private
-   * @param {Array} bindData The bind data array.
-   * @returns {Function} Returns the new bound function.
+   * @name clone
+   * @memberOf LazyWrapper
+   * @returns {Object} Returns the cloned `LazyWrapper` object.
    */
-  function baseBind(bindData) {
-    var func = bindData[0],
-        partialArgs = bindData[2],
-        thisArg = bindData[4];
-
-    function bound() {
-      // `Function#bind` spec
-      // http://es5.github.io/#x15.3.4.5
-      if (partialArgs) {
-        var args = partialArgs.slice();
-        push.apply(args, arguments);
-      }
-      // mimic the constructor's `return` behavior
-      // http://es5.github.io/#x13.2.2
-      if (this instanceof bound) {
-        // ensure `new bound` is an instance of `func`
-        var thisBinding = baseCreate(func.prototype),
-            result = func.apply(thisBinding, args || arguments);
-        return isObject(result) ? result : thisBinding;
-      }
-      return func.apply(thisArg, args || arguments);
-    }
-    setBindData(bound, bindData);
-    return bound;
+  function lazyClone() {
+    var actions = this.__actions__,
+        iteratees = this.__iteratees__,
+        views = this.__views__,
+        result = new LazyWrapper(this.__wrapped__);
+
+    result.__actions__ = actions ? arrayCopy(actions) : null;
+    result.__dir__ = this.__dir__;
+    result.__filtered__ = this.__filtered__;
+    result.__iteratees__ = iteratees ? arrayCopy(iteratees) : null;
+    result.__takeCount__ = this.__takeCount__;
+    result.__views__ = views ? arrayCopy(views) : null;
+    return result;
   }
 
   /**
-   * The base implementation of `_.clone` without argument juggling or support
-   * for `thisArg` binding.
+   * Reverses the direction of lazy iteration.
    *
    * @private
-   * @param {*} value The value to clone.
-   * @param {boolean} [isDeep=false] Specify a deep clone.
-   * @param {Function} [callback] The function to customize cloning values.
-   * @param {Array} [stackA=[]] Tracks traversed source objects.
-   * @param {Array} [stackB=[]] Associates clones with source counterparts.
-   * @returns {*} Returns the cloned value.
+   * @name reverse
+   * @memberOf LazyWrapper
+   * @returns {Object} Returns the new reversed `LazyWrapper` object.
    */
-  function baseClone(value, isDeep, callback, stackA, stackB) {
-    if (callback) {
-      var result = callback(value);
-      if (typeof result != 'undefined') {
-        return result;
-      }
-    }
-    // inspect [[Class]]
-    var isObj = isObject(value);
-    if (isObj) {
-      var className = toString.call(value);
-      if (!cloneableClasses[className] || (!support.nodeClass && isNode(value))) {
-        return value;
-      }
-      var ctor = ctorByClass[className];
-      switch (className) {
-        case boolClass:
-        case dateClass:
-          return new ctor(+value);
-
-        case numberClass:
-        case stringClass:
-          return new ctor(value);
-
-        case regexpClass:
-          result = ctor(value.source, reFlags.exec(value));
-          result.lastIndex = value.lastIndex;
-          return result;
-      }
+  function lazyReverse() {
+    if (this.__filtered__) {
+      var result = new LazyWrapper(this);
+      result.__dir__ = -1;
+      result.__filtered__ = true;
     } else {
-      return value;
+      result = this.clone();
+      result.__dir__ *= -1;
     }
-    var isArr = isArray(value);
-    if (isDeep) {
-      // check for circular references and return corresponding clone
-      var initedStack = !stackA;
-      stackA || (stackA = getArray());
-      stackB || (stackB = getArray());
+    return result;
+  }
 
-      var length = stackA.length;
-      while (length--) {
-        if (stackA[length] == value) {
-          return stackB[length];
+  /**
+   * Extracts the unwrapped value from its lazy wrapper.
+   *
+   * @private
+   * @name value
+   * @memberOf LazyWrapper
+   * @returns {*} Returns the unwrapped value.
+   */
+  function lazyValue() {
+    var array = this.__wrapped__.value();
+    if (!isArray(array)) {
+      return baseWrapperValue(array, this.__actions__);
+    }
+    var dir = this.__dir__,
+        isRight = dir < 0,
+        view = getView(0, array.length, this.__views__),
+        start = view.start,
+        end = view.end,
+        length = end - start,
+        index = isRight ? end : (start - 1),
+        takeCount = nativeMin(length, this.__takeCount__),
+        iteratees = this.__iteratees__,
+        iterLength = iteratees ? iteratees.length : 0,
+        resIndex = 0,
+        result = [];
+
+    outer:
+    while (length-- && resIndex < takeCount) {
+      index += dir;
+
+      var iterIndex = -1,
+          value = array[index];
+
+      while (++iterIndex < iterLength) {
+        var data = iteratees[iterIndex],
+            iteratee = data.iteratee,
+            type = data.type;
+
+        if (type == LAZY_DROP_WHILE_FLAG) {
+          if (data.done && (isRight ? (index > data.index) : (index < data.index))) {
+            data.count = 0;
+            data.done = false;
+          }
+          data.index = index;
+          if (!data.done) {
+            var limit = data.limit;
+            if (!(data.done = limit > -1 ? (data.count++ >= limit) : !iteratee(value))) {
+              continue outer;
+            }
+          }
+        } else {
+          var computed = iteratee(value);
+          if (type == LAZY_MAP_FLAG) {
+            value = computed;
+          } else if (!computed) {
+            if (type == LAZY_FILTER_FLAG) {
+              continue outer;
+            } else {
+              break outer;
+            }
+          }
         }
       }
-      result = isArr ? ctor(value.length) : {};
-    }
-    else {
-      result = isArr ? slice(value) : assign({}, value);
-    }
-    // add array properties assigned by `RegExp#exec`
-    if (isArr) {
-      if (hasOwnProperty.call(value, 'index')) {
-        result.index = value.index;
-      }
-      if (hasOwnProperty.call(value, 'input')) {
-        result.input = value.input;
-      }
-    }
-    // exit for shallow clone
-    if (!isDeep) {
-      return result;
+      result[resIndex++] = value;
     }
-    // add the source value to the stack of traversed objects
-    // and associate it with its clone
-    stackA.push(value);
-    stackB.push(result);
+    return result;
+  }
 
-    // recursively populate clone (susceptible to call stack limits)
-    (isArr ? baseEach : forOwn)(value, function(objValue, key) {
-      result[key] = baseClone(objValue, isDeep, callback, stackA, stackB);
-    });
+  /*------------------------------------------------------------------------*/
+
+  /**
+   *
+   * Creates a cache object to store unique values.
+   *
+   * @private
+   * @param {Array} [values] The values to cache.
+   */
+  function SetCache(values) {
+    var length = values ? values.length : 0;
 
-    if (initedStack) {
-      releaseArray(stackA);
-      releaseArray(stackB);
+    this.data = { 'hash': nativeCreate(null), 'set': new Set };
+    while (length--) {
+      this.push(values[length]);
     }
-    return result;
   }
 
   /**
-   * The base implementation of `_.create` without support for assigning
-   * properties to the created object.
+   * Checks if `value` is in `cache` mimicking the return signature of
+   * `_.indexOf` by returning `0` if the value is found, else `-1`.
    *
    * @private
-   * @param {Object} prototype The object to inherit from.
-   * @returns {Object} Returns the new object.
+   * @param {Object} cache The cache to search.
+   * @param {*} value The value to search for.
+   * @returns {number} Returns `0` if `value` is found, else `-1`.
    */
-  function baseCreate(prototype, properties) {
-    return isObject(prototype) ? nativeCreate(prototype) : {};
-  }
-  // fallback for browsers without `Object.create`
-  if (!nativeCreate) {
-    baseCreate = (function() {
-      function Object() {}
-      return function(prototype) {
-        if (isObject(prototype)) {
-          Object.prototype = prototype;
-          var result = new Object;
-          Object.prototype = null;
-        }
-        return result || root.Object();
-      };
-    }());
+  function cacheIndexOf(cache, value) {
+    var data = cache.data,
+        result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
+
+    return result ? 0 : -1;
   }
 
   /**
-   * The base implementation of `_.createCallback` without support for creating
-   * "_.pluck" or "_.where" style callbacks.
+   * Adds `value` to the cache.
    *
    * @private
-   * @param {*} [func=identity] The value to convert to a callback.
-   * @param {*} [thisArg] The `this` binding of the created callback.
-   * @param {number} [argCount] The number of arguments the callback accepts.
-   * @returns {Function} Returns a callback function.
+   * @name push
+   * @memberOf SetCache
+   * @param {*} value The value to cache.
    */
-  function baseCreateCallback(func, thisArg, argCount) {
-    if (typeof func != 'function') {
-      return identity;
-    }
-    // exit early for no `thisArg` or already bound by `Function#bind`
-    if (typeof thisArg == 'undefined' || !('prototype' in func)) {
-      return func;
-    }
-    var bindData = func.__bindData__;
-    if (typeof bindData == 'undefined') {
-      if (support.funcNames) {
-        bindData = !func.name;
-      }
-      bindData = bindData || !support.funcDecomp;
-      if (!bindData) {
-        var source = fnToString.call(func);
-        if (!support.funcNames) {
-          bindData = !reFuncName.test(source);
-        }
-        if (!bindData) {
-          // checks if `func` references the `this` keyword and stores the result
-          bindData = reThis.test(source);
-          setBindData(func, bindData);
-        }
-      }
-    }
-    // exit early if there are no `this` references or `func` is bound
-    if (bindData === false || (bindData !== true && bindData[1] & 1)) {
-      return func;
-    }
-    switch (argCount) {
-      case 1: return function(value) {
-        return func.call(thisArg, value);
-      };
-      case 2: return function(a, b) {
-        return func.call(thisArg, a, b);
-      };
-      case 3: return function(value, index, collection) {
-        return func.call(thisArg, value, index, collection);
-      };
-      case 4: return function(accumulator, value, index, collection) {
-        return func.call(thisArg, accumulator, value, index, collection);
-      };
+  function cachePush(value) {
+    var data = this.data;
+    if (typeof value == 'string' || isObject(value)) {
+      data.set.add(value);
+    } else {
+      data.hash[value] = true;
     }
-    return bind(func, thisArg);
   }
 
+  /*------------------------------------------------------------------------*/
+
   /**
-   * The base implementation of `createWrapper` that creates the wrapper and
-   * sets its meta data.
+   * Copies the values of `source` to `array`.
    *
    * @private
-   * @param {Array} bindData The bind data array.
-   * @returns {Function} Returns the new function.
+   * @param {Array} source The array to copy values from.
+   * @param {Array} [array=[]] The array to copy values to.
+   * @returns {Array} Returns `array`.
    */
-  function baseCreateWrapper(bindData) {
-    var func = bindData[0],
-        bitmask = bindData[1],
-        partialArgs = bindData[2],
-        partialRightArgs = bindData[3],
-        thisArg = bindData[4],
-        arity = bindData[5];
-
-    var isBind = bitmask & 1,
-        isBindKey = bitmask & 2,
-        isCurry = bitmask & 4,
-        isCurryBound = bitmask & 8,
-        key = func;
-
-    function bound() {
-      var thisBinding = isBind ? thisArg : this;
-      if (partialArgs) {
-        var args = partialArgs.slice();
-        push.apply(args, arguments);
-      }
-      if (partialRightArgs || isCurry) {
-        args || (args = slice(arguments));
-        if (partialRightArgs) {
-          push.apply(args, partialRightArgs);
-        }
-        if (isCurry && args.length < arity) {
-          bitmask |= 16 & ~32;
-          return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]);
-        }
-      }
-      args || (args = arguments);
-      if (isBindKey) {
-        func = thisBinding[key];
-      }
-      if (this instanceof bound) {
-        thisBinding = baseCreate(func.prototype);
-        var result = func.apply(thisBinding, args);
-        return isObject(result) ? result : thisBinding;
-      }
-      return func.apply(thisBinding, args);
+  function arrayCopy(source, array) {
+    var index = -1,
+        length = source.length;
+
+    array || (array = Array(length));
+    while (++index < length) {
+      array[index] = source[index];
     }
-    setBindData(bound, bindData);
-    return bound;
+    return array;
   }
 
   /**
-   * The base implementation of `_.difference` that accepts a single array
-   * of values to exclude.
+   * A specialized version of `_.forEach` for arrays without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @param {Array} array The array to process.
-   * @param {Array} [values] The array of values to exclude.
-   * @returns {Array} Returns a new array of filtered values.
+   * @param {Array} array The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns `array`.
    */
-  function baseDifference(array, values) {
+  function arrayEach(array, iteratee) {
     var index = -1,
-        indexOf = getIndexOf(),
-        length = array ? array.length : 0,
-        isLarge = length >= largeArraySize && indexOf === baseIndexOf,
-        result = [];
+        length = array.length;
 
-    if (isLarge) {
-      var cache = createCache(values);
-      if (cache) {
-        indexOf = cacheIndexOf;
-        values = cache;
-      } else {
-        isLarge = false;
+    while (++index < length) {
+      if (iteratee(array[index], index, array) === false) {
+        break;
       }
     }
+    return array;
+  }
+
+  /**
+   * A specialized version of `_.every` for arrays without support for callback
+   * shorthands and `this` binding.
+   *
+   * @private
+   * @param {Array} array The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if all elements pass the predicate check,
+   *  else `false`.
+   */
+  function arrayEvery(array, predicate) {
+    var index = -1,
+        length = array.length;
+
     while (++index < length) {
-      var value = array[index];
-      if (indexOf(values, value) < 0) {
-        result.push(value);
+      if (!predicate(array[index], index, array)) {
+        return false;
       }
     }
-    if (isLarge) {
-      releaseObject(values);
-    }
-    return result;
+    return true;
   }
 
   /**
-   * The base implementation of `_.flatten` without support for callback
-   * shorthands or `thisArg` binding.
+   * A specialized version of `_.filter` for arrays without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @param {Array} array The array to flatten.
-   * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level.
-   * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects.
-   * @param {number} [fromIndex=0] The index to start from.
-   * @returns {Array} Returns a new flattened array.
+   * @param {Array} array The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {Array} Returns the new filtered array.
    */
-  function baseFlatten(array, isShallow, isStrict, fromIndex) {
-    var index = (fromIndex || 0) - 1,
-        length = array ? array.length : 0,
+  function arrayFilter(array, predicate) {
+    var index = -1,
+        length = array.length,
+        resIndex = -1,
         result = [];
 
     while (++index < length) {
       var value = array[index];
-
-      if (value && typeof value == 'object' && typeof value.length == 'number'
-          && (isArray(value) || isArguments(value))) {
-        // recursively flatten arrays (susceptible to call stack limits)
-        if (!isShallow) {
-          value = baseFlatten(value, isShallow, isStrict);
-        }
-        var valIndex = -1,
-            valLength = value.length,
-            resIndex = result.length;
-
-        result.length += valLength;
-        while (++valIndex < valLength) {
-          result[resIndex++] = value[valIndex];
-        }
-      } else if (!isStrict) {
-        result.push(value);
+      if (predicate(value, index, array)) {
+        result[++resIndex] = value;
       }
     }
     return result;
   }
 
   /**
-   * The base implementation of `_.isEqual`, without support for `thisArg` binding,
-   * that allows partial "_.where" style comparisons.
+   * A specialized version of `_.map` for arrays without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @param {*} a The value to compare.
-   * @param {*} b The other value to compare.
-   * @param {Function} [callback] The function to customize comparing values.
-   * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons.
-   * @param {Array} [stackA=[]] Tracks traversed `a` objects.
-   * @param {Array} [stackB=[]] Tracks traversed `b` objects.
-   * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+   * @param {Array} array The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns the new mapped array.
    */
-  function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
-    // used to indicate that when comparing objects, `a` has at least the properties of `b`
-    if (callback) {
-      var result = callback(a, b);
-      if (typeof result != 'undefined') {
-        return !!result;
-      }
-    }
-    // exit early for identical values
-    if (a === b) {
-      // treat `+0` vs. `-0` as not equal
-      return a !== 0 || (1 / a == 1 / b);
-    }
-    var type = typeof a,
-        otherType = typeof b;
-
-    // exit early for unlike primitive values
-    if (a === a &&
-        !(a && objectTypes[type]) &&
-        !(b && objectTypes[otherType])) {
-      return false;
-    }
-    // exit early for `null` and `undefined` avoiding ES3's Function#call behavior
-    // http://es5.github.io/#x15.3.4.4
-    if (a == null || b == null) {
-      return a === b;
-    }
-    // compare [[Class]] names
-    var className = toString.call(a),
-        otherClass = toString.call(b);
-
-    if (className == argsClass) {
-      className = objectClass;
-    }
-    if (otherClass == argsClass) {
-      otherClass = objectClass;
-    }
-    if (className != otherClass) {
-      return false;
-    }
-    switch (className) {
-      case boolClass:
-      case dateClass:
-        // coerce dates and booleans to numbers, dates to milliseconds and booleans
-        // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
-        return +a == +b;
-
-      case numberClass:
-        // treat `NaN` vs. `NaN` as equal
-        return (a != +a)
-          ? b != +b
-          // but treat `+0` vs. `-0` as not equal
-          : (a == 0 ? (1 / a == 1 / b) : a == +b);
-
-      case regexpClass:
-      case stringClass:
-        // coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
-        // treat string primitives and their corresponding object instances as equal
-        return a == String(b);
-    }
-    var isArr = className == arrayClass;
-    if (!isArr) {
-      // unwrap any `lodash` wrapped values
-      var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
-          bWrapped = hasOwnProperty.call(b, '__wrapped__');
-
-      if (aWrapped || bWrapped) {
-        return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
-      }
-      // exit for functions and DOM nodes
-      if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) {
-        return false;
-      }
-      // in older versions of Opera, `arguments` objects have `Array` constructors
-      var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor,
-          ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor;
-
-      // non `Object` object instances with different constructors are not equal
-      if (ctorA != ctorB &&
-            !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
-            ('constructor' in a && 'constructor' in b)
-          ) {
-        return false;
-      }
-    }
-    // assume cyclic structures are equal
-    // the algorithm for detecting cyclic structures is adapted from ES 5.1
-    // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
-    var initedStack = !stackA;
-    stackA || (stackA = getArray());
-    stackB || (stackB = getArray());
+  function arrayMap(array, iteratee) {
+    var index = -1,
+        length = array.length,
+        result = Array(length);
 
-    var length = stackA.length;
-    while (length--) {
-      if (stackA[length] == a) {
-        return stackB[length] == b;
-      }
+    while (++index < length) {
+      result[index] = iteratee(array[index], index, array);
     }
-    var size = 0;
-    result = true;
-
-    // add `a` and `b` to the stack of traversed objects
-    stackA.push(a);
-    stackB.push(b);
-
-    // recursively compare objects and arrays (susceptible to call stack limits)
-    if (isArr) {
-      length = a.length;
-      size = b.length;
-
-      // compare lengths to determine if a deep comparison is necessary
-      result = size == a.length;
-      if (!result && !isWhere) {
-        return result;
-      }
-      // deep compare the contents, ignoring non-numeric properties
-      while (size--) {
-        var index = length,
-            value = b[size];
+    return result;
+  }
 
-        if (isWhere) {
-          while (index--) {
-            if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
-              break;
-            }
-          }
-        } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
-          break;
-        }
-      }
-      return result;
-    }
-    // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
-    // which, in this case, is more costly
-    forIn(b, function(value, key, b) {
-      if (hasOwnProperty.call(b, key)) {
-        // count the number of properties.
-        size++;
-        // deep compare each property value.
-        return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
-      }
-    });
+  /**
+   * A specialized version of `_.reduce` for arrays without support for callback
+   * shorthands and `this` binding.
+   *
+   * @private
+   * @param {Array} array The array to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {*} [accumulator] The initial value.
+   * @param {boolean} [initFromArray] Specify using the first element of `array`
+   *  as the initial value.
+   * @returns {*} Returns the accumulated value.
+   */
+  function arrayReduce(array, iteratee, accumulator, initFromArray) {
+    var index = -1,
+        length = array.length;
 
-    if (result && !isWhere) {
-      // ensure both objects have the same number of properties
-      forIn(a, function(value, key, a) {
-        if (hasOwnProperty.call(a, key)) {
-          // `size` will be `-1` if `a` has more properties than `b`
-          return (result = --size > -1);
-        }
-      });
+    if (initFromArray && length) {
+      accumulator = array[++index];
     }
-    if (initedStack) {
-      releaseArray(stackA);
-      releaseArray(stackB);
+    while (++index < length) {
+      accumulator = iteratee(accumulator, array[index], index, array);
     }
-    return result;
+    return accumulator;
   }
 
   /**
-   * The base implementation of `_.merge` without argument juggling or support
-   * for `thisArg` binding.
+   * A specialized version of `_.some` for arrays without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @param {Object} object The destination object.
-   * @param {Object} source The source object.
-   * @param {Function} [callback] The function to customize merging properties.
-   * @param {Array} [stackA=[]] Tracks traversed source objects.
-   * @param {Array} [stackB=[]] Associates values with source counterparts.
+   * @param {Array} array The array to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if any element passes the predicate check,
+   *  else `false`.
    */
-  function baseMerge(object, source, callback, stackA, stackB) {
-    (isArray(source) ? forEach : forOwn)(source, function(source, key) {
-      var found,
-          isArr,
-          result = source,
-          value = object[key];
-
-      if (source && ((isArr = isArray(source)) || isPlainObject(source))) {
-        // avoid merging previously merged cyclic sources
-        var stackLength = stackA.length;
-        while (stackLength--) {
-          if ((found = stackA[stackLength] == source)) {
-            value = stackB[stackLength];
-            break;
-          }
-        }
-        if (!found) {
-          var isShallow;
-          if (callback) {
-            result = callback(value, source);
-            if ((isShallow = typeof result != 'undefined')) {
-              value = result;
-            }
-          }
-          if (!isShallow) {
-            value = isArr
-              ? (isArray(value) ? value : [])
-              : (isPlainObject(value) ? value : {});
-          }
-          // add `source` and associated `value` to the stack of traversed objects
-          stackA.push(source);
-          stackB.push(value);
+  function arraySome(array, predicate) {
+    var index = -1,
+        length = array.length;
 
-          // recursively merge objects and arrays (susceptible to call stack limits)
-          if (!isShallow) {
-            baseMerge(value, source, callback, stackA, stackB);
-          }
-        }
-      }
-      else {
-        if (callback) {
-          result = callback(value, source);
-          if (typeof result == 'undefined') {
-            result = source;
-          }
-        }
-        if (typeof result != 'undefined') {
-          value = result;
-        }
+    while (++index < length) {
+      if (predicate(array[index], index, array)) {
+        return true;
       }
-      object[key] = value;
-    });
+    }
+    return false;
   }
 
   /**
-   * The base implementation of `_.uniq` without support for callback shorthands
-   * or `thisArg` binding.
+   * A specialized version of `_.assign` for customizing assigned values without
+   * support for argument juggling, multiple sources, and `this` binding `customizer`
+   * functions.
    *
    * @private
-   * @param {Array} array The array to process.
-   * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted.
-   * @param {Function} [callback] The function called per iteration.
-   * @returns {Array} Returns a duplicate-value-free array.
+   * @param {Object} object The destination object.
+   * @param {Object} source The source object.
+   * @param {Function} customizer The function to customize assigned values.
+   * @returns {Object} Returns `object`.
    */
-  function baseUniq(array, isSorted, callback) {
+  function assignWith(object, source, customizer) {
     var index = -1,
-        indexOf = getIndexOf(),
-        length = array ? array.length : 0,
-        result = [];
+        props = keys(source),
+        length = props.length;
 
-    var isLarge = !isSorted && length >= largeArraySize && indexOf === baseIndexOf,
-        seen = (callback || isLarge) ? getArray() : result;
-
-    if (isLarge) {
-      var cache = createCache(seen);
-      if (cache) {
-        indexOf = cacheIndexOf;
-        seen = cache;
-      } else {
-        isLarge = false;
-        seen = callback ? seen : (releaseArray(seen), result);
-      }
-    }
     while (++index < length) {
-      var value = array[index],
-          computed = callback ? callback(value, index, array) : value;
+      var key = props[index],
+          value = object[key],
+          result = customizer(value, source[key], key, object, source);
 
-      if (isSorted
-            ? !index || seen[seen.length - 1] !== computed
-            : indexOf(seen, computed) < 0
-          ) {
-        if (callback || isLarge) {
-          seen.push(computed);
-        }
-        result.push(value);
+      if ((result === result ? (result !== value) : (value === value)) ||
+          (value === undefined && !(key in object))) {
+        object[key] = result;
       }
     }
-    if (isLarge) {
-      releaseArray(seen.array);
-      releaseObject(seen);
-    } else if (callback) {
-      releaseArray(seen);
-    }
-    return result;
+    return object;
   }
 
   /**
-   * Creates a function that aggregates a collection, creating an object composed
-   * of keys generated from the results of running each element of the collection
-   * through a callback. The given `setter` function sets the keys and values
-   * of the composed object.
+   * The base implementation of `_.assign` without support for argument juggling,
+   * multiple sources, and `customizer` functions.
    *
    * @private
-   * @param {Function} setter The setter function.
-   * @returns {Function} Returns the new aggregator function.
+   * @param {Object} object The destination object.
+   * @param {Object} source The source object.
+   * @returns {Object} Returns `object`.
    */
-  function createAggregator(setter) {
-    return function(collection, callback, thisArg) {
-      var result = {};
-      callback = lodash.createCallback(callback, thisArg, 3);
-
-      if (isArray(collection)) {
-        var index = -1,
-            length = collection.length;
-
-        while (++index < length) {
-          var value = collection[index];
-          setter(result, value, callback(value, index, collection), collection);
-        }
-      } else {
-        baseEach(collection, function(value, key, collection) {
-          setter(result, value, callback(value, key, collection), collection);
-        });
-      }
-      return result;
-    };
+  function baseAssign(object, source) {
+    return source == null
+      ? object
+      : baseCopy(source, keys(source), object);
   }
 
   /**
-   * Creates a function that, when called, either curries or invokes `func`
-   * with an optional `this` binding and partially applied arguments.
+   * Copies properties of `source` to `object`.
    *
    * @private
-   * @param {Function|string} func The function or method name to reference.
-   * @param {number} bitmask The bitmask of method flags to compose.
-   *  The bitmask may be composed of the following flags:
-   *  1 - `_.bind`
-   *  2 - `_.bindKey`
-   *  4 - `_.curry`
-   *  8 - `_.curry` (bound)
-   *  16 - `_.partial`
-   *  32 - `_.partialRight`
-   * @param {Array} [partialArgs] An array of arguments to prepend to those
-   *  provided to the new function.
-   * @param {Array} [partialRightArgs] An array of arguments to append to those
-   *  provided to the new function.
-   * @param {*} [thisArg] The `this` binding of `func`.
-   * @param {number} [arity] The arity of `func`.
-   * @returns {Function} Returns the new function.
+   * @param {Object} source The object to copy properties from.
+   * @param {Array} props The property names to copy.
+   * @param {Object} [object={}] The object to copy properties to.
+   * @returns {Object} Returns `object`.
    */
-  function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
-    var isBind = bitmask & 1,
-        isBindKey = bitmask & 2,
-        isCurry = bitmask & 4,
-        isCurryBound = bitmask & 8,
-        isPartial = bitmask & 16,
-        isPartialRight = bitmask & 32;
-
-    if (!isBindKey && !isFunction(func)) {
-      throw new TypeError;
-    }
-    if (isPartial && !partialArgs.length) {
-      bitmask &= ~16;
-      isPartial = partialArgs = false;
-    }
-    if (isPartialRight && !partialRightArgs.length) {
-      bitmask &= ~32;
-      isPartialRight = partialRightArgs = false;
-    }
-    var bindData = func && func.__bindData__;
-    if (bindData && bindData !== true) {
-      bindData = bindData.slice();
-
-      // set `thisBinding` is not previously bound
-      if (isBind && !(bindData[1] & 1)) {
-        bindData[4] = thisArg;
-      }
-      // set if previously bound but not currently (subsequent curried functions)
-      if (!isBind && bindData[1] & 1) {
-        bitmask |= 8;
-      }
-      // set curried arity if not yet set
-      if (isCurry && !(bindData[1] & 4)) {
-        bindData[5] = arity;
-      }
-      // append partial left arguments
-      if (isPartial) {
-        push.apply(bindData[2] || (bindData[2] = []), partialArgs);
-      }
-      // append partial right arguments
-      if (isPartialRight) {
-        push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
-      }
-      // merge flags
-      bindData[1] |= bitmask;
-      return createWrapper.apply(null, bindData);
+  function baseCopy(source, props, object) {
+    object || (object = {});
+
+    var index = -1,
+        length = props.length;
+
+    while (++index < length) {
+      var key = props[index];
+      object[key] = source[key];
     }
-    // fast path for `_.bind`
-    var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper;
-    return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]);
+    return object;
   }
 
   /**
-   * Creates compiled iteration functions.
+   * The base implementation of `_.callback` which supports specifying the
+   * number of arguments to provide to `func`.
    *
    * @private
-   * @param {...Object} [options] The compile options object(s).
-   * @param {string} [options.array] Code to determine if the iterable is an array or array-like.
-   * @param {boolean} [options.useHas] Specify using `hasOwnProperty` checks in the object loop.
-   * @param {Function} [options.keys] A reference to `_.keys` for use in own property iteration.
-   * @param {string} [options.args] A comma separated string of iteration function arguments.
-   * @param {string} [options.top] Code to execute before the iteration branches.
-   * @param {string} [options.loop] Code to execute in the object loop.
-   * @param {string} [options.bottom] Code to execute after the iteration branches.
-   * @returns {Function} Returns the compiled function.
+   * @param {*} [func=_.identity] The value to convert to a callback.
+   * @param {*} [thisArg] The `this` binding of `func`.
+   * @param {number} [argCount] The number of arguments to provide to `func`.
+   * @returns {Function} Returns the callback.
    */
-  function createIterator() {
-    // data properties
-    iteratorData.shadowedProps = shadowedProps;
-
-    // iterator options
-    iteratorData.array = iteratorData.bottom = iteratorData.loop = iteratorData.top = '';
-    iteratorData.init = 'iterable';
-    iteratorData.useHas = true;
-
-    // merge options into a template data object
-    for (var object, index = 0; object = arguments[index]; index++) {
-      for (var key in object) {
-        iteratorData[key] = object[key];
-      }
+  function baseCallback(func, thisArg, argCount) {
+    var type = typeof func;
+    if (type == 'function') {
+      return thisArg === undefined
+        ? func
+        : bindCallback(func, thisArg, argCount);
     }
-    var args = iteratorData.args;
-    iteratorData.firstArg = /^[^,]+/.exec(args)[0];
-
-    // create the function factory
-    var factory = Function(
-        'baseCreateCallback, errorClass, errorProto, hasOwnProperty, ' +
-        'indicatorObject, isArguments, isArray, isString, keys, objectProto, ' +
-        'objectTypes, nonEnumProps, stringClass, stringProto, toString',
-      'return function(' + args + ') {\n' + iteratorTemplate(iteratorData) + '\n}'
-    );
-
-    // return the compiled function
-    return factory(
-      baseCreateCallback, errorClass, errorProto, hasOwnProperty,
-      indicatorObject, isArguments, isArray, isString, iteratorData.keys, objectProto,
-      objectTypes, nonEnumProps, stringClass, stringProto, toString
-    );
+    if (func == null) {
+      return identity;
+    }
+    if (type == 'object') {
+      return baseMatches(func);
+    }
+    return thisArg === undefined
+      ? property(func)
+      : baseMatchesProperty(func, thisArg);
   }
 
   /**
-   * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
-   * customized, this method returns the custom method, otherwise it returns
-   * the `baseIndexOf` function.
+   * The base implementation of `_.clone` without support for argument juggling
+   * and `this` binding `customizer` functions.
    *
    * @private
-   * @returns {Function} Returns the "indexOf" function.
+   * @param {*} value The value to clone.
+   * @param {boolean} [isDeep] Specify a deep clone.
+   * @param {Function} [customizer] The function to customize cloning values.
+   * @param {string} [key] The key of `value`.
+   * @param {Object} [object] The object `value` belongs to.
+   * @param {Array} [stackA=[]] Tracks traversed source objects.
+   * @param {Array} [stackB=[]] Associates clones with source counterparts.
+   * @returns {*} Returns the cloned value.
    */
-  function getIndexOf() {
-    var result = (result = lodash.indexOf) === indexOf ? baseIndexOf : result;
+  function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
+    var result;
+    if (customizer) {
+      result = object ? customizer(value, key, object) : customizer(value);
+    }
+    if (result !== undefined) {
+      return result;
+    }
+    if (!isObject(value)) {
+      return value;
+    }
+    var isArr = isArray(value);
+    if (isArr) {
+      result = initCloneArray(value);
+      if (!isDeep) {
+        return arrayCopy(value, result);
+      }
+    } else {
+      var tag = objToString.call(value),
+          isFunc = tag == funcTag;
+
+      if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+        if (isHostObject(value)) {
+          return object ? value : {};
+        }
+        result = initCloneObject(isFunc ? {} : value);
+        if (!isDeep) {
+          return baseAssign(result, value);
+        }
+      } else {
+        return cloneableTags[tag]
+          ? initCloneByTag(value, tag, isDeep)
+          : (object ? value : {});
+      }
+    }
+    // Check for circular references and return corresponding clone.
+    stackA || (stackA = []);
+    stackB || (stackB = []);
+
+    var length = stackA.length;
+    while (length--) {
+      if (stackA[length] == value) {
+        return stackB[length];
+      }
+    }
+    // Add the source value to the stack of traversed objects and associate it with its clone.
+    stackA.push(value);
+    stackB.push(result);
+
+    // Recursively populate clone (susceptible to call stack limits).
+    (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+      result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
+    });
     return result;
   }
 
   /**
-   * Sets `this` binding data on a given function.
+   * The base implementation of `_.create` without support for assigning
+   * properties to the created object.
    *
    * @private
-   * @param {Function} func The function to set data on.
-   * @param {Array} value The data array to set.
+   * @param {Object} prototype The object to inherit from.
+   * @returns {Object} Returns the new object.
    */
-  var setBindData = !defineProperty ? noop : function(func, value) {
-    descriptor.value = value;
-    defineProperty(func, '__bindData__', descriptor);
-  };
+  var baseCreate = (function() {
+    function object() {}
+    return function(prototype) {
+      if (isObject(prototype)) {
+        object.prototype = prototype;
+        var result = new object;
+        object.prototype = null;
+      }
+      return result || {};
+    };
+  }());
 
   /**
-   * A fallback implementation of `isPlainObject` which checks if a given value
-   * is an object created by the `Object` constructor, assuming objects created
-   * by the `Object` constructor have no inherited enumerable properties and that
-   * there are no `Object.prototype` extensions.
+   * The base implementation of `_.difference` which accepts a single array
+   * of values to exclude.
    *
    * @private
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+   * @param {Array} array The array to inspect.
+   * @param {Array} values The values to exclude.
+   * @returns {Array} Returns the new array of filtered values.
    */
-  function shimIsPlainObject(value) {
-    var ctor,
-        result;
-
-    // avoid non Object objects, `arguments` objects, and DOM elements
-    if (!(value && toString.call(value) == objectClass) ||
-        (ctor = value.constructor, isFunction(ctor) && !(ctor instanceof ctor)) ||
-        (!support.argsClass && isArguments(value)) ||
-        (!support.nodeClass && isNode(value))) {
-      return false;
-    }
-    // IE < 9 iterates inherited properties before own properties. If the first
-    // iterated property is an object's own property then there are no inherited
-    // enumerable properties.
-    if (support.ownLast) {
-      forIn(value, function(value, key, object) {
-        result = hasOwnProperty.call(object, key);
-        return false;
-      });
-      return result !== false;
+  function baseDifference(array, values) {
+    var length = array ? array.length : 0,
+        result = [];
+
+    if (!length) {
+      return result;
     }
-    // In most environments an object's own properties are iterated before
-    // its inherited properties. If the last iterated property is an object's
-    // own property then there are no inherited enumerable properties.
-    forIn(value, function(value, key) {
-      result = key;
-    });
-    return typeof result == 'undefined' || hasOwnProperty.call(value, result);
-  }
+    var index = -1,
+        indexOf = getIndexOf(),
+        isCommon = indexOf == baseIndexOf,
+        cache = (isCommon && values.length >= 200) ? createCache(values) : null,
+        valuesLength = values.length;
 
-  /*--------------------------------------------------------------------------*/
+    if (cache) {
+      indexOf = cacheIndexOf;
+      isCommon = false;
+      values = cache;
+    }
+    outer:
+    while (++index < length) {
+      var value = array[index];
 
-  /**
-   * Checks if `value` is an `arguments` object.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`.
-   * @example
-   *
-   * (function() { return _.isArguments(arguments); })(1, 2, 3);
-   * // => true
-   *
-   * _.isArguments([1, 2, 3]);
-   * // => false
-   */
-  function isArguments(value) {
-    return value && typeof value == 'object' && typeof value.length == 'number' &&
-      toString.call(value) == argsClass || false;
-  }
-  // fallback for browsers that can't detect `arguments` objects by [[Class]]
-  if (!support.argsClass) {
-    isArguments = function(value) {
-      return value && typeof value == 'object' && typeof value.length == 'number' &&
-        hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee') || false;
-    };
+      if (isCommon && value === value) {
+        var valuesIndex = valuesLength;
+        while (valuesIndex--) {
+          if (values[valuesIndex] === value) {
+            continue outer;
+          }
+        }
+        result.push(value);
+      }
+      else if (indexOf(values, value, 0) < 0) {
+        result.push(value);
+      }
+    }
+    return result;
   }
 
   /**
-   * Checks if `value` is an array.
-   *
-   * @static
-   * @memberOf _
-   * @type Function
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is an array, else `false`.
-   * @example
-   *
-   * (function() { return _.isArray(arguments); })();
-   * // => false
-   *
-   * _.isArray([1, 2, 3]);
-   * // => true
-   */
-  var isArray = nativeIsArray || function(value) {
-    return value && typeof value == 'object' && typeof value.length == 'number' &&
-      toString.call(value) == arrayClass || false;
-  };
-
-  /**
-   * A fallback implementation of `Object.keys` which produces an array of the
-   * given object's own enumerable property names.
+   * The base implementation of `_.forEach` without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @type Function
-   * @param {Object} object The object to inspect.
-   * @returns {Array} Returns an array of property names.
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array|Object|string} Returns `collection`.
    */
-  var shimKeys = createIterator({
-    'args': 'object',
-    'init': '[]',
-    'top': 'if (!(objectTypes[typeof object])) return result',
-    'loop': 'result.push(index)'
-  });
+  var baseEach = createBaseEach(baseForOwn);
 
   /**
-   * Creates an array composed of the own enumerable property names of an object.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Object} object The object to inspect.
-   * @returns {Array} Returns an array of property names.
-   * @example
+   * The base implementation of `_.every` without support for callback
+   * shorthands and `this` binding.
    *
-   * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
-   * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
+   * @private
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if all elements pass the predicate check,
+   *  else `false`
    */
-  var keys = !nativeKeys ? shimKeys : function(object) {
-    if (!isObject(object)) {
-      return [];
-    }
-    if ((support.enumPrototypes && typeof object == 'function') ||
-        (support.nonEnumArgs && object.length && isArguments(object))) {
-      return shimKeys(object);
-    }
-    return nativeKeys(object);
-  };
-
-  /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */
-  var eachIteratorOptions = {
-    'args': 'collection, callback, thisArg',
-    'top': "callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",
-    'array': "typeof length == 'number'",
-    'keys': keys,
-    'loop': 'if (callback(iterable[index], index, collection) === false) return result'
-  };
-
-  /** Reusable iterator options for `assign` and `defaults` */
-  var defaultsIteratorOptions = {
-    'args': 'object, source, guard',
-    'top':
-      'var args = arguments,\n' +
-      '    argsIndex = 0,\n' +
-      "    argsLength = typeof guard == 'number' ? 2 : args.length;\n" +
-      'while (++argsIndex < argsLength) {\n' +
-      '  iterable = args[argsIndex];\n' +
-      '  if (iterable && objectTypes[typeof iterable]) {',
-    'keys': keys,
-    'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]",
-    'bottom': '  }\n}'
-  };
-
-  /** Reusable iterator options for `forIn` and `forOwn` */
-  var forOwnIteratorOptions = {
-    'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top,
-    'array': false
-  };
+  function baseEvery(collection, predicate) {
+    var result = true;
+    baseEach(collection, function(value, index, collection) {
+      result = !!predicate(value, index, collection);
+      return result;
+    });
+    return result;
+  }
 
   /**
-   * A function compiled to iterate `arguments` objects, arrays, objects, and
-   * strings consistenly across environments, executing the callback for each
-   * element in the collection. The callback is bound to `thisArg` and invoked
-   * with three arguments; (value, index|key, collection). Callbacks may exit
-   * iteration early by explicitly returning `false`.
+   * The base implementation of `_.filter` without support for callback
+   * shorthands and `this` binding.
    *
    * @private
-   * @type Function
    * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function} [callback=identity] The function called per iteration.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array|Object|string} Returns `collection`.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {Array} Returns the new filtered array.
    */
-  var baseEach = createIterator(eachIteratorOptions);
-
-  /*--------------------------------------------------------------------------*/
+  function baseFilter(collection, predicate) {
+    var result = [];
+    baseEach(collection, function(value, index, collection) {
+      if (predicate(value, index, collection)) {
+        result.push(value);
+      }
+    });
+    return result;
+  }
 
   /**
-   * Assigns own enumerable properties of source object(s) to the destination
-   * object. Subsequent sources will overwrite property assignments of previous
-   * sources. If a callback is provided it will be executed to produce the
-   * assigned values. The callback is bound to `thisArg` and invoked with two
-   * arguments; (objectValue, sourceValue).
-   *
-   * @static
-   * @memberOf _
-   * @type Function
-   * @alias extend
-   * @category Objects
-   * @param {Object} object The destination object.
-   * @param {...Object} [source] The source objects.
-   * @param {Function} [callback] The function to customize assigning values.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Object} Returns the destination object.
-   * @example
-   *
-   * _.assign({ 'name': 'fred' }, { 'employer': 'slate' });
-   * // => { 'name': 'fred', 'employer': 'slate' }
+   * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
+   * without support for callback shorthands and `this` binding, which iterates
+   * over `collection` using the provided `eachFunc`.
    *
-   * var defaults = _.partialRight(_.assign, function(a, b) {
-   *   return typeof a == 'undefined' ? b : a;
-   * });
-   *
-   * var object = { 'name': 'barney' };
-   * defaults(object, { 'name': 'fred', 'employer': 'slate' });
-   * // => { 'name': 'barney', 'employer': 'slate' }
+   * @private
+   * @param {Array|Object|string} collection The collection to search.
+   * @param {Function} predicate The function invoked per iteration.
+   * @param {Function} eachFunc The function to iterate over `collection`.
+   * @param {boolean} [retKey] Specify returning the key of the found element
+   *  instead of the element itself.
+   * @returns {*} Returns the found element or its key, else `undefined`.
    */
-  var assign = createIterator(defaultsIteratorOptions, {
-    'top':
-      defaultsIteratorOptions.top.replace(';',
-        ';\n' +
-        "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" +
-        '  var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n' +
-        "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" +
-        '  callback = args[--argsLength];\n' +
-        '}'
-      ),
-    'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]'
-  });
+  function baseFind(collection, predicate, eachFunc, retKey) {
+    var result;
+    eachFunc(collection, function(value, key, collection) {
+      if (predicate(value, key, collection)) {
+        result = retKey ? key : value;
+        return false;
+      }
+    });
+    return result;
+  }
 
   /**
-   * Creates a clone of `value`. If `isDeep` is `true` nested objects will also
-   * be cloned, otherwise they will be assigned by reference. If a callback
-   * is provided it will be executed to produce the cloned values. If the
-   * callback returns `undefined` cloning will be handled by the method instead.
-   * The callback is bound to `thisArg` and invoked with one argument; (value).
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to clone.
-   * @param {boolean} [isDeep=false] Specify a deep clone.
-   * @param {Function} [callback] The function to customize cloning values.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the cloned value.
-   * @example
+   * The base implementation of `_.flatten` with added support for restricting
+   * flattening and specifying the start index.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
-   *
-   * var shallow = _.clone(characters);
-   * shallow[0] === characters[0];
-   * // => true
-   *
-   * var deep = _.clone(characters, true);
-   * deep[0] === characters[0];
-   * // => false
-   *
-   * _.mixin({
-   *   'clone': _.partialRight(_.clone, function(value) {
-   *     return _.isElement(value) ? value.cloneNode(false) : undefined;
-   *   })
-   * });
-   *
-   * var clone = _.clone(document.body);
-   * clone.childNodes.length;
-   * // => 0
+   * @private
+   * @param {Array} array The array to flatten.
+   * @param {boolean} [isDeep] Specify a deep flatten.
+   * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
+   * @returns {Array} Returns the new flattened array.
    */
-  function clone(value, isDeep, callback, thisArg) {
-    // allows working with "Collections" methods without using their `index`
-    // and `collection` arguments for `isDeep` and `callback`
-    if (typeof isDeep != 'boolean' && isDeep != null) {
-      thisArg = callback;
-      callback = isDeep;
-      isDeep = false;
+  function baseFlatten(array, isDeep, isStrict) {
+    var index = -1,
+        length = array.length,
+        resIndex = -1,
+        result = [];
+
+    while (++index < length) {
+      var value = array[index];
+      if (isObjectLike(value) && isArrayLike(value) &&
+          (isStrict || isArray(value) || isArguments(value))) {
+        if (isDeep) {
+          // Recursively flatten arrays (susceptible to call stack limits).
+          value = baseFlatten(value, isDeep, isStrict);
+        }
+        var valIndex = -1,
+            valLength = value.length;
+
+        while (++valIndex < valLength) {
+          result[++resIndex] = value[valIndex];
+        }
+      } else if (!isStrict) {
+        result[++resIndex] = value;
+      }
     }
-    return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
+    return result;
   }
 
   /**
-   * Creates a deep clone of `value`. If a callback is provided it will be
-   * executed to produce the cloned values. If the callback returns `undefined`
-   * cloning will be handled by the method instead. The callback is bound to
-   * `thisArg` and invoked with one argument; (value).
-   *
-   * Note: This method is loosely based on the structured clone algorithm. Functions
-   * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and
-   * objects created by constructors other than `Object` are cloned to plain `Object` objects.
-   * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to deep clone.
-   * @param {Function} [callback] The function to customize cloning values.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the deep cloned value.
-   * @example
-   *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
-   *
-   * var deep = _.cloneDeep(characters);
-   * deep[0] === characters[0];
-   * // => false
-   *
-   * var view = {
-   *   'label': 'docs',
-   *   'node': element
-   * };
+   * The base implementation of `baseForIn` and `baseForOwn` which iterates
+   * over `object` properties returned by `keysFunc` invoking `iteratee` for
+   * each property. Iteratee functions may exit iteration early by explicitly
+   * returning `false`.
    *
-   * var clone = _.cloneDeep(view, function(value) {
-   *   return _.isElement(value) ? value.cloneNode(true) : undefined;
-   * });
-   *
-   * clone.node == view.node;
-   * // => false
+   * @private
+   * @param {Object} object The object to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {Function} keysFunc The function to get the keys of `object`.
+   * @returns {Object} Returns `object`.
    */
-  function cloneDeep(value, callback, thisArg) {
-    return baseClone(value, true, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
-  }
+  var baseFor = createBaseFor();
 
   /**
-   * Iterates over own and inherited enumerable properties of an object,
-   * executing the callback for each property. The callback is bound to `thisArg`
-   * and invoked with three arguments; (value, key, object). Callbacks may exit
-   * iteration early by explicitly returning `false`.
+   * The base implementation of `_.forIn` without support for callback
+   * shorthands and `this` binding.
    *
-   * @static
-   * @memberOf _
-   * @type Function
-   * @category Objects
+   * @private
    * @param {Object} object The object to iterate over.
-   * @param {Function} [callback=identity] The function called per iteration.
-   * @param {*} [thisArg] The `this` binding of `callback`.
+   * @param {Function} iteratee The function invoked per iteration.
    * @returns {Object} Returns `object`.
-   * @example
-   *
-   * function Shape() {
-   *   this.x = 0;
-   *   this.y = 0;
-   * }
-   *
-   * Shape.prototype.move = function(x, y) {
-   *   this.x += x;
-   *   this.y += y;
-   * };
-   *
-   * _.forIn(new Shape, function(value, key) {
-   *   console.log(key);
-   * });
-   * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
    */
-  var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
-    'useHas': false
-  });
+  function baseForIn(object, iteratee) {
+    return baseFor(object, iteratee, keysIn);
+  }
 
   /**
-   * Iterates over own enumerable properties of an object, executing the callback
-   * for each property. The callback is bound to `thisArg` and invoked with three
-   * arguments; (value, key, object). Callbacks may exit iteration early by
-   * explicitly returning `false`.
+   * The base implementation of `_.forOwn` without support for callback
+   * shorthands and `this` binding.
    *
-   * @static
-   * @memberOf _
-   * @type Function
-   * @category Objects
+   * @private
    * @param {Object} object The object to iterate over.
-   * @param {Function} [callback=identity] The function called per iteration.
-   * @param {*} [thisArg] The `this` binding of `callback`.
+   * @param {Function} iteratee The function invoked per iteration.
    * @returns {Object} Returns `object`.
-   * @example
-   *
-   * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
-   *   console.log(key);
-   * });
-   * // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
    */
-  var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
+  function baseForOwn(object, iteratee) {
+    return baseFor(object, iteratee, keys);
+  }
 
   /**
-   * Creates a sorted array of property names of all enumerable properties,
-   * own and inherited, of `object` that have function values.
+   * The base implementation of `_.functions` which creates an array of
+   * `object` function property names filtered from those provided.
    *
-   * @static
-   * @memberOf _
-   * @alias methods
-   * @category Objects
+   * @private
    * @param {Object} object The object to inspect.
-   * @returns {Array} Returns an array of property names that have function values.
-   * @example
-   *
-   * _.functions(_);
-   * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...]
+   * @param {Array} props The property names to filter.
+   * @returns {Array} Returns the new array of filtered property names.
    */
-  function functions(object) {
-    var result = [];
-    forIn(object, function(value, key) {
-      if (isFunction(value)) {
-        result.push(key);
+  function baseFunctions(object, props) {
+    var index = -1,
+        length = props.length,
+        resIndex = -1,
+        result = [];
+
+    while (++index < length) {
+      var key = props[index];
+      if (isFunction(object[key])) {
+        result[++resIndex] = key;
       }
-    });
-    return result.sort();
+    }
+    return result;
   }
 
   /**
-   * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a
-   * length of `0` and objects with no own enumerable properties are considered
-   * "empty".
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Array|Object|string} value The value to inspect.
-   * @returns {boolean} Returns `true` if the `value` is empty, else `false`.
-   * @example
-   *
-   * _.isEmpty([1, 2, 3]);
-   * // => false
+   * The base implementation of `get` without support for string paths
+   * and default values.
    *
-   * _.isEmpty({});
-   * // => true
-   *
-   * _.isEmpty('');
-   * // => true
+   * @private
+   * @param {Object} object The object to query.
+   * @param {Array} path The path of the property to get.
+   * @param {string} [pathKey] The key representation of path.
+   * @returns {*} Returns the resolved value.
    */
-  function isEmpty(value) {
-    var result = true;
-    if (!value) {
-      return result;
+  function baseGet(object, path, pathKey) {
+    if (object == null) {
+      return;
     }
-    var className = toString.call(value),
-        length = value.length;
+    object = toObject(object);
+    if (pathKey !== undefined && pathKey in object) {
+      path = [pathKey];
+    }
+    var index = 0,
+        length = path.length;
 
-    if ((className == arrayClass || className == stringClass ||
-        (support.argsClass ? className == argsClass : isArguments(value))) ||
-        (className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
-      return !length;
+    while (object != null && index < length) {
+      object = toObject(object)[path[index++]];
     }
-    forOwn(value, function() {
-      return (result = false);
-    });
-    return result;
+    return (index && index == length) ? object : undefined;
   }
 
   /**
-   * Performs a deep comparison between two values to determine if they are
-   * equivalent to each other. If a callback is provided it will be executed
-   * to compare values. If the callback returns `undefined` comparisons will
-   * be handled by the method instead. The callback is bound to `thisArg` and
-   * invoked with two arguments; (a, b).
+   * The base implementation of `_.isEqual` without support for `this` binding
+   * `customizer` functions.
    *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} a The value to compare.
-   * @param {*} b The other value to compare.
-   * @param {Function} [callback] The function to customize comparing values.
-   * @param {*} [thisArg] The `this` binding of `callback`.
+   * @private
+   * @param {*} value The value to compare.
+   * @param {*} other The other value to compare.
+   * @param {Function} [customizer] The function to customize comparing values.
+   * @param {boolean} [isLoose] Specify performing partial comparisons.
+   * @param {Array} [stackA] Tracks traversed `value` objects.
+   * @param {Array} [stackB] Tracks traversed `other` objects.
    * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
-   * @example
-   *
-   * var object = { 'name': 'fred' };
-   * var copy = { 'name': 'fred' };
-   *
-   * object == copy;
-   * // => false
-   *
-   * _.isEqual(object, copy);
-   * // => true
-   *
-   * var words = ['hello', 'goodbye'];
-   * var otherWords = ['hi', 'goodbye'];
-   *
-   * _.isEqual(words, otherWords, function(a, b) {
-   *   var reGreet = /^(?:hello|hi)$/i,
-   *       aGreet = _.isString(a) && reGreet.test(a),
-   *       bGreet = _.isString(b) && reGreet.test(b);
-   *
-   *   return (aGreet || bGreet) ? (aGreet == bGreet) : undefined;
-   * });
-   * // => true
    */
-  function isEqual(a, b, callback, thisArg) {
-    return baseIsEqual(a, b, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 2));
+  function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+    if (value === other) {
+      return true;
+    }
+    if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+      return value !== value && other !== other;
+    }
+    return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
   }
 
   /**
-   * Checks if `value` is a function.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is a function, else `false`.
-   * @example
+   * A specialized version of `baseIsEqual` for arrays and objects which performs
+   * deep comparisons and tracks traversed objects enabling objects with circular
+   * references to be compared.
    *
-   * _.isFunction(_);
-   * // => true
+   * @private
+   * @param {Object} object The object to compare.
+   * @param {Object} other The other object to compare.
+   * @param {Function} equalFunc The function to determine equivalents of values.
+   * @param {Function} [customizer] The function to customize comparing objects.
+   * @param {boolean} [isLoose] Specify performing partial comparisons.
+   * @param {Array} [stackA=[]] Tracks traversed `value` objects.
+   * @param {Array} [stackB=[]] Tracks traversed `other` objects.
+   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
    */
-  function isFunction(value) {
-    return typeof value == 'function';
-  }
-  // fallback for older versions of Chrome and Safari
-  if (isFunction(/x/)) {
-    isFunction = function(value) {
-      return typeof value == 'function' && toString.call(value) == funcClass;
-    };
+  function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+    var objIsArr = isArray(object),
+        othIsArr = isArray(other),
+        objTag = arrayTag,
+        othTag = arrayTag;
+
+    if (!objIsArr) {
+      objTag = objToString.call(object);
+      if (objTag == argsTag) {
+        objTag = objectTag;
+      } else if (objTag != objectTag) {
+        objIsArr = isTypedArray(object);
+      }
+    }
+    if (!othIsArr) {
+      othTag = objToString.call(other);
+      if (othTag == argsTag) {
+        othTag = objectTag;
+      } else if (othTag != objectTag) {
+        othIsArr = isTypedArray(other);
+      }
+    }
+    var objIsObj = objTag == objectTag && !isHostObject(object),
+        othIsObj = othTag == objectTag && !isHostObject(other),
+        isSameTag = objTag == othTag;
+
+    if (isSameTag && !(objIsArr || objIsObj)) {
+      return equalByTag(object, other, objTag);
+    }
+    if (!isLoose) {
+      var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+          othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+      if (objIsWrapped || othIsWrapped) {
+        return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+      }
+    }
+    if (!isSameTag) {
+      return false;
+    }
+    // Assume cyclic values are equal.
+    // For more information on detecting circular references see https://es5.github.io/#JO.
+    stackA || (stackA = []);
+    stackB || (stackB = []);
+
+    var length = stackA.length;
+    while (length--) {
+      if (stackA[length] == object) {
+        return stackB[length] == other;
+      }
+    }
+    // Add `object` and `other` to the stack of traversed objects.
+    stackA.push(object);
+    stackB.push(other);
+
+    var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+    stackA.pop();
+    stackB.pop();
+
+    return result;
   }
 
   /**
-   * Checks if `value` is the language type of Object.
-   * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is an object, else `false`.
-   * @example
-   *
-   * _.isObject({});
-   * // => true
-   *
-   * _.isObject([1, 2, 3]);
-   * // => true
+   * The base implementation of `_.isMatch` without support for callback
+   * shorthands and `this` binding.
    *
-   * _.isObject(1);
-   * // => false
+   * @private
+   * @param {Object} object The object to inspect.
+   * @param {Array} matchData The propery names, values, and compare flags to match.
+   * @param {Function} [customizer] The function to customize comparing objects.
+   * @returns {boolean} Returns `true` if `object` is a match, else `false`.
    */
-  function isObject(value) {
-    // check if the value is the ECMAScript language type of Object
-    // http://es5.github.io/#x8
-    // and avoid a V8 bug
-    // http://code.google.com/p/v8/issues/detail?id=2291
-    return !!(value && objectTypes[typeof value]);
+  function baseIsMatch(object, matchData, customizer) {
+    var index = matchData.length,
+        length = index,
+        noCustomizer = !customizer;
+
+    if (object == null) {
+      return !length;
+    }
+    object = toObject(object);
+    while (index--) {
+      var data = matchData[index];
+      if ((noCustomizer && data[2])
+            ? data[1] !== object[data[0]]
+            : !(data[0] in object)
+          ) {
+        return false;
+      }
+    }
+    while (++index < length) {
+      data = matchData[index];
+      var key = data[0],
+          objValue = object[key],
+          srcValue = data[1];
+
+      if (noCustomizer && data[2]) {
+        if (objValue === undefined && !(key in object)) {
+          return false;
+        }
+      } else {
+        var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+        if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+          return false;
+        }
+      }
+    }
+    return true;
   }
 
   /**
-   * Checks if `value` is an object created by the `Object` constructor.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
-   * @example
+   * The base implementation of `_.map` without support for callback shorthands
+   * and `this` binding.
    *
-   * function Shape() {
-   *   this.x = 0;
-   *   this.y = 0;
-   * }
-   *
-   * _.isPlainObject(new Shape);
-   * // => false
-   *
-   * _.isPlainObject([1, 2, 3]);
-   * // => false
-   *
-   * _.isPlainObject({ 'x': 0, 'y': 0 });
-   * // => true
+   * @private
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @returns {Array} Returns the new mapped array.
    */
-  var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
-    if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {
-      return false;
-    }
-    var valueOf = value.valueOf,
-        objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
+  function baseMap(collection, iteratee) {
+    var index = -1,
+        result = isArrayLike(collection) ? Array(collection.length) : [];
 
-    return objProto
-      ? (value == objProto || getPrototypeOf(value) == objProto)
-      : shimIsPlainObject(value);
-  };
+    baseEach(collection, function(value, key, collection) {
+      result[++index] = iteratee(value, key, collection);
+    });
+    return result;
+  }
 
   /**
-   * Checks if `value` is a string.
+   * The base implementation of `_.matches` which does not clone `source`.
    *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {*} value The value to check.
-   * @returns {boolean} Returns `true` if the `value` is a string, else `false`.
-   * @example
+   * @private
+   * @param {Object} source The object of property values to match.
+   * @returns {Function} Returns the new function.
+   */
+  function baseMatches(source) {
+    var matchData = getMatchData(source);
+    if (matchData.length == 1 && matchData[0][2]) {
+      var key = matchData[0][0],
+          value = matchData[0][1];
+
+      return function(object) {
+        if (object == null) {
+          return false;
+        }
+        object = toObject(object);
+        return object[key] === value && (value !== undefined || (key in object));
+      };
+    }
+    return function(object) {
+      return baseIsMatch(object, matchData);
+    };
+  }
+
+  /**
+   * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
    *
-   * _.isString('fred');
-   * // => true
+   * @private
+   * @param {string} path The path of the property to get.
+   * @param {*} srcValue The value to compare.
+   * @returns {Function} Returns the new function.
    */
-  function isString(value) {
-    return typeof value == 'string' ||
-      value && typeof value == 'object' && toString.call(value) == stringClass || false;
+  function baseMatchesProperty(path, srcValue) {
+    var isArr = isArray(path),
+        isCommon = isKey(path) && isStrictComparable(srcValue),
+        pathKey = (path + '');
+
+    path = toPath(path);
+    return function(object) {
+      if (object == null) {
+        return false;
+      }
+      var key = pathKey;
+      object = toObject(object);
+      if ((isArr || !isCommon) && !(key in object)) {
+        object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+        if (object == null) {
+          return false;
+        }
+        key = last(path);
+        object = toObject(object);
+      }
+      return object[key] === srcValue
+        ? (srcValue !== undefined || (key in object))
+        : baseIsEqual(srcValue, object[key], undefined, true);
+    };
   }
 
   /**
-   * Recursively merges own enumerable properties of the source object(s), that
-   * don't resolve to `undefined` into the destination object. Subsequent sources
-   * will overwrite property assignments of previous sources. If a callback is
-   * provided it will be executed to produce the merged values of the destination
-   * and source properties. If the callback returns `undefined` merging will
-   * be handled by the method instead. The callback is bound to `thisArg` and
-   * invoked with two arguments; (objectValue, sourceValue).
+   * The base implementation of `_.merge` without support for argument juggling,
+   * multiple sources, and `this` binding `customizer` functions.
    *
-   * @static
-   * @memberOf _
-   * @category Objects
+   * @private
    * @param {Object} object The destination object.
-   * @param {...Object} [source] The source objects.
-   * @param {Function} [callback] The function to customize merging properties.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Object} Returns the destination object.
-   * @example
-   *
-   * var names = {
-   *   'characters': [
-   *     { 'name': 'barney' },
-   *     { 'name': 'fred' }
-   *   ]
-   * };
-   *
-   * var ages = {
-   *   'characters': [
-   *     { 'age': 36 },
-   *     { 'age': 40 }
-   *   ]
-   * };
-   *
-   * _.merge(names, ages);
-   * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] }
-   *
-   * var food = {
-   *   'fruits': ['apple'],
-   *   'vegetables': ['beet']
-   * };
-   *
-   * var otherFood = {
-   *   'fruits': ['banana'],
-   *   'vegetables': ['carrot']
-   * };
-   *
-   * _.merge(food, otherFood, function(a, b) {
-   *   return _.isArray(a) ? a.concat(b) : undefined;
-   * });
-   * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] }
+   * @param {Object} source The source object.
+   * @param {Function} [customizer] The function to customize merging properties.
+   * @param {Array} [stackA=[]] Tracks traversed source objects.
+   * @param {Array} [stackB=[]] Associates values with source counterparts.
+   * @returns {Object} Returns `object`.
    */
-  function merge(object) {
-    var args = arguments,
-        length = 2;
-
+  function baseMerge(object, source, customizer, stackA, stackB) {
     if (!isObject(object)) {
       return object;
     }
+    var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
+        props = isSrcArr ? null : keys(source);
 
-    // allows working with `_.reduce` and `_.reduceRight` without using
-    // their `index` and `collection` arguments
-    if (typeof args[2] != 'number') {
-      length = args.length;
-    }
-    if (length > 3 && typeof args[length - 2] == 'function') {
-      var callback = baseCreateCallback(args[--length - 1], args[length--], 2);
-    } else if (length > 2 && typeof args[length - 1] == 'function') {
-      callback = args[--length];
-    }
-    var sources = slice(arguments, 1, length),
-        index = -1,
-        stackA = getArray(),
-        stackB = getArray();
+    arrayEach(props || source, function(srcValue, key) {
+      if (props) {
+        key = srcValue;
+        srcValue = source[key];
+      }
+      if (isObjectLike(srcValue)) {
+        stackA || (stackA = []);
+        stackB || (stackB = []);
+        baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
+      }
+      else {
+        var value = object[key],
+            result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+            isCommon = result === undefined;
 
-    while (++index < length) {
-      baseMerge(object, sources[index], callback, stackA, stackB);
-    }
-    releaseArray(stackA);
-    releaseArray(stackB);
+        if (isCommon) {
+          result = srcValue;
+        }
+        if ((result !== undefined || (isSrcArr && !(key in object))) &&
+            (isCommon || (result === result ? (result !== value) : (value === value)))) {
+          object[key] = result;
+        }
+      }
+    });
     return object;
   }
 
   /**
-   * Creates a shallow clone of `object` excluding the specified properties.
-   * Property names may be specified as individual arguments or as arrays of
-   * property names. If a callback is provided it will be executed for each
-   * property of `object` omitting the properties the callback returns truey
-   * for. The callback is bound to `thisArg` and invoked with three arguments;
-   * (value, key, object).
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Object} object The source object.
-   * @param {Function|...string|string[]} [callback] The properties to omit or the
-   *  function called per iteration.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Object} Returns an object without the omitted properties.
-   * @example
+   * A specialized version of `baseMerge` for arrays and objects which performs
+   * deep merges and tracks traversed objects enabling objects with circular
+   * references to be merged.
    *
-   * _.omit({ 'name': 'fred', 'age': 40 }, 'age');
-   * // => { 'name': 'fred' }
-   *
-   * _.omit({ 'name': 'fred', 'age': 40 }, function(value) {
-   *   return typeof value == 'number';
-   * });
-   * // => { 'name': 'fred' }
+   * @private
+   * @param {Object} object The destination object.
+   * @param {Object} source The source object.
+   * @param {string} key The key of the value to merge.
+   * @param {Function} mergeFunc The function to merge values.
+   * @param {Function} [customizer] The function to customize merging properties.
+   * @param {Array} [stackA=[]] Tracks traversed source objects.
+   * @param {Array} [stackB=[]] Associates values with source counterparts.
+   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
    */
-  function omit(object, callback, thisArg) {
-    var result = {};
-    if (typeof callback != 'function') {
-      var props = [];
-      forIn(object, function(value, key) {
-        props.push(key);
-      });
-      props = baseDifference(props, baseFlatten(arguments, true, false, 1));
+  function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
+    var length = stackA.length,
+        srcValue = source[key];
 
-      var index = -1,
-          length = props.length;
+    while (length--) {
+      if (stackA[length] == srcValue) {
+        object[key] = stackB[length];
+        return;
+      }
+    }
+    var value = object[key],
+        result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+        isCommon = result === undefined;
 
-      while (++index < length) {
-        var key = props[index];
-        result[key] = object[key];
+    if (isCommon) {
+      result = srcValue;
+      if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
+        result = isArray(value)
+          ? value
+          : (isArrayLike(value) ? arrayCopy(value) : []);
+      }
+      else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+        result = isArguments(value)
+          ? toPlainObject(value)
+          : (isPlainObject(value) ? value : {});
+      }
+      else {
+        isCommon = false;
       }
-    } else {
-      callback = lodash.createCallback(callback, thisArg, 3);
-      forIn(object, function(value, key, object) {
-        if (!callback(value, key, object)) {
-          result[key] = value;
-        }
-      });
     }
-    return result;
+    // Add the source value to the stack of traversed objects and associate
+    // it with its merged value.
+    stackA.push(srcValue);
+    stackB.push(result);
+
+    if (isCommon) {
+      // Recursively merge objects and arrays (susceptible to call stack limits).
+      object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
+    } else if (result === result ? (result !== value) : (value === value)) {
+      object[key] = result;
+    }
   }
 
   /**
-   * Creates a two dimensional array of an object's key-value pairs,
-   * i.e. `[[key1, value1], [key2, value2]]`.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Object} object The object to inspect.
-   * @returns {Array} Returns new array of key-value pairs.
-   * @example
+   * The base implementation of `_.property` without support for deep paths.
    *
-   * _.pairs({ 'barney': 36, 'fred': 40 });
-   * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments)
+   * @private
+   * @param {string} key The key of the property to get.
+   * @returns {Function} Returns the new function.
    */
-  function pairs(object) {
-    var index = -1,
-        props = keys(object),
-        length = props.length,
-        result = Array(length);
+  function baseProperty(key) {
+    return function(object) {
+      return object == null ? undefined : toObject(object)[key];
+    };
+  }
 
-    while (++index < length) {
-      var key = props[index];
-      result[index] = [key, object[key]];
-    }
-    return result;
+  /**
+   * A specialized version of `baseProperty` which supports deep paths.
+   *
+   * @private
+   * @param {Array|string} path The path of the property to get.
+   * @returns {Function} Returns the new function.
+   */
+  function basePropertyDeep(path) {
+    var pathKey = (path + '');
+    path = toPath(path);
+    return function(object) {
+      return baseGet(object, path, pathKey);
+    };
   }
 
   /**
-   * Creates a shallow clone of `object` composed of the specified properties.
-   * Property names may be specified as individual arguments or as arrays of
-   * property names. If a callback is provided it will be executed for each
-   * property of `object` picking the properties the callback returns truey
-   * for. The callback is bound to `thisArg` and invoked with three arguments;
-   * (value, key, object).
+   * The base implementation of `_.reduce` and `_.reduceRight` without support
+   * for callback shorthands and `this` binding, which iterates over `collection`
+   * using the provided `eachFunc`.
    *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Object} object The source object.
-   * @param {Function|...string|string[]} [callback] The function called per
-   *  iteration or property names to pick, specified as individual property
-   *  names or arrays of property names.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Object} Returns an object composed of the picked properties.
-   * @example
+   * @private
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {*} accumulator The initial value.
+   * @param {boolean} initFromCollection Specify using the first or last element
+   *  of `collection` as the initial value.
+   * @param {Function} eachFunc The function to iterate over `collection`.
+   * @returns {*} Returns the accumulated value.
+   */
+  function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
+    eachFunc(collection, function(value, index, collection) {
+      accumulator = initFromCollection
+        ? (initFromCollection = false, value)
+        : iteratee(accumulator, value, index, collection);
+    });
+    return accumulator;
+  }
+
+  /**
+   * The base implementation of `setData` without support for hot loop detection.
    *
-   * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name');
-   * // => { 'name': 'fred' }
+   * @private
+   * @param {Function} func The function to associate metadata with.
+   * @param {*} data The metadata.
+   * @returns {Function} Returns `func`.
+   */
+  var baseSetData = !metaMap ? identity : function(func, data) {
+    metaMap.set(func, data);
+    return func;
+  };
+
+  /**
+   * The base implementation of `_.slice` without an iteratee call guard.
    *
-   * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) {
-   *   return key.charAt(0) != '_';
-   * });
-   * // => { 'name': 'fred' }
+   * @private
+   * @param {Array} array The array to slice.
+   * @param {number} [start=0] The start position.
+   * @param {number} [end=array.length] The end position.
+   * @returns {Array} Returns the slice of `array`.
    */
-  function pick(object, callback, thisArg) {
-    var result = {};
-    if (typeof callback != 'function') {
-      var index = -1,
-          props = baseFlatten(arguments, true, false, 1),
-          length = isObject(object) ? props.length : 0;
+  function baseSlice(array, start, end) {
+    var index = -1,
+        length = array.length;
 
-      while (++index < length) {
-        var key = props[index];
-        if (key in object) {
-          result[key] = object[key];
-        }
-      }
-    } else {
-      callback = lodash.createCallback(callback, thisArg, 3);
-      forIn(object, function(value, key, object) {
-        if (callback(value, key, object)) {
-          result[key] = value;
-        }
-      });
+    start = start == null ? 0 : (+start || 0);
+    if (start < 0) {
+      start = -start > length ? 0 : (length + start);
+    }
+    end = (end === undefined || end > length) ? length : (+end || 0);
+    if (end < 0) {
+      end += length;
+    }
+    length = start > end ? 0 : ((end - start) >>> 0);
+    start >>>= 0;
+
+    var result = Array(length);
+    while (++index < length) {
+      result[index] = array[index + start];
     }
     return result;
   }
 
   /**
-   * Creates an array composed of the own enumerable property values of `object`.
-   *
-   * @static
-   * @memberOf _
-   * @category Objects
-   * @param {Object} object The object to inspect.
-   * @returns {Array} Returns an array of property values.
-   * @example
+   * The base implementation of `_.some` without support for callback shorthands
+   * and `this` binding.
    *
-   * _.values({ 'one': 1, 'two': 2, 'three': 3 });
-   * // => [1, 2, 3] (property order is not guaranteed across environments)
+   * @private
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {boolean} Returns `true` if any element passes the predicate check,
+   *  else `false`.
    */
-  function values(object) {
-    var index = -1,
-        props = keys(object),
-        length = props.length,
-        result = Array(length);
+  function baseSome(collection, predicate) {
+    var result;
 
-    while (++index < length) {
-      result[index] = object[props[index]];
-    }
-    return result;
+    baseEach(collection, function(value, index, collection) {
+      result = predicate(value, index, collection);
+      return !result;
+    });
+    return !!result;
   }
 
-  /*--------------------------------------------------------------------------*/
-
   /**
-   * Checks if a given value is present in a collection using strict equality
-   * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the
-   * offset from the end of the collection.
-   *
-   * @static
-   * @memberOf _
-   * @alias include
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {*} target The value to check for.
-   * @param {number} [fromIndex=0] The index to search from.
-   * @returns {boolean} Returns `true` if the `target` element is found, else `false`.
-   * @example
-   *
-   * _.contains([1, 2, 3], 1);
-   * // => true
-   *
-   * _.contains([1, 2, 3], 1, 2);
-   * // => false
-   *
-   * _.contains({ 'name': 'fred', 'age': 40 }, 'fred');
-   * // => true
+   * The base implementation of `_.uniq` without support for callback shorthands
+   * and `this` binding.
    *
-   * _.contains('pebbles', 'eb');
-   * // => true
+   * @private
+   * @param {Array} array The array to inspect.
+   * @param {Function} [iteratee] The function invoked per iteration.
+   * @returns {Array} Returns the new duplicate-value-free array.
    */
-  function contains(collection, target, fromIndex) {
+  function baseUniq(array, iteratee) {
     var index = -1,
         indexOf = getIndexOf(),
-        length = collection ? collection.length : 0,
-        result = false;
-
-    fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0;
-    if (isArray(collection)) {
-      result = indexOf(collection, target, fromIndex) > -1;
-    } else if (typeof length == 'number') {
-      result = (isString(collection) ? collection.indexOf(target, fromIndex) : indexOf(collection, target, fromIndex)) > -1;
+        length = array.length,
+        isCommon = indexOf == baseIndexOf,
+        isLarge = isCommon && length >= 200,
+        seen = isLarge ? createCache() : null,
+        result = [];
+
+    if (seen) {
+      indexOf = cacheIndexOf;
+      isCommon = false;
     } else {
-      baseEach(collection, function(value) {
-        if (++index >= fromIndex) {
-          return !(result = value === target);
+      isLarge = false;
+      seen = iteratee ? [] : result;
+    }
+    outer:
+    while (++index < length) {
+      var value = array[index],
+          computed = iteratee ? iteratee(value, index, array) : value;
+
+      if (isCommon && value === value) {
+        var seenIndex = seen.length;
+        while (seenIndex--) {
+          if (seen[seenIndex] === computed) {
+            continue outer;
+          }
         }
-      });
+        if (iteratee) {
+          seen.push(computed);
+        }
+        result.push(value);
+      }
+      else if (indexOf(seen, computed, 0) < 0) {
+        if (iteratee || isLarge) {
+          seen.push(computed);
+        }
+        result.push(value);
+      }
     }
     return result;
   }
 
   /**
-   * Checks if the given callback returns truey value for **all** elements of
-   * a collection. The callback is bound to `thisArg` and invoked with three
-   * arguments; (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias all
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {boolean} Returns `true` if all elements passed the callback check,
-   *  else `false`.
-   * @example
-   *
-   * _.every([true, 1, null, 'yes']);
-   * // => false
-   *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.every(characters, 'age');
-   * // => true
+   * The base implementation of `_.values` and `_.valuesIn` which creates an
+   * array of `object` property values corresponding to the property names
+   * of `props`.
    *
-   * // using "_.where" callback shorthand
-   * _.every(characters, { 'age': 36 });
-   * // => false
+   * @private
+   * @param {Object} object The object to query.
+   * @param {Array} props The property names to get values for.
+   * @returns {Object} Returns the array of property values.
    */
-  function every(collection, callback, thisArg) {
-    var result = true;
-    callback = lodash.createCallback(callback, thisArg, 3);
-
-    if (isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+  function baseValues(object, props) {
+    var index = -1,
+        length = props.length,
+        result = Array(length);
 
-      while (++index < length) {
-        if (!(result = !!callback(collection[index], index, collection))) {
-          break;
-        }
-      }
-    } else {
-      baseEach(collection, function(value, index, collection) {
-        return (result = !!callback(value, index, collection));
-      });
+    while (++index < length) {
+      result[index] = object[props[index]];
     }
     return result;
   }
 
   /**
-   * Iterates over elements of a collection, returning an array of all elements
-   * the callback returns truey for. The callback is bound to `thisArg` and
-   * invoked with three arguments; (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias select
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array} Returns a new array of elements that passed the callback check.
-   * @example
-   *
-   * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
-   * // => [2, 4, 6]
+   * The base implementation of `wrapperValue` which returns the result of
+   * performing a sequence of actions on the unwrapped `value`, where each
+   * successive action is supplied the return value of the previous.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36, 'blocked': false },
-   *   { 'name': 'fred',   'age': 40, 'blocked': true }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.filter(characters, 'blocked');
-   * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }]
-   *
-   * // using "_.where" callback shorthand
-   * _.filter(characters, { 'age': 36 });
-   * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }]
+   * @private
+   * @param {*} value The unwrapped value.
+   * @param {Array} actions Actions to peform to resolve the unwrapped value.
+   * @returns {*} Returns the resolved value.
    */
-  function filter(collection, callback, thisArg) {
-    var result = [];
-    callback = lodash.createCallback(callback, thisArg, 3);
+  function baseWrapperValue(value, actions) {
+    var result = value;
+    if (result instanceof LazyWrapper) {
+      result = result.value();
+    }
+    var index = -1,
+        length = actions.length;
 
-    if (isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+    while (++index < length) {
+      var args = [result],
+          action = actions[index];
 
-      while (++index < length) {
-        var value = collection[index];
-        if (callback(value, index, collection)) {
-          result.push(value);
-        }
-      }
-    } else {
-      baseEach(collection, function(value, index, collection) {
-        if (callback(value, index, collection)) {
-          result.push(value);
-        }
-      });
+      push.apply(args, action.args);
+      result = action.func.apply(action.thisArg, args);
     }
     return result;
   }
 
   /**
-   * Iterates over elements of a collection, returning the first element that
-   * the callback returns truey for. The callback is bound to `thisArg` and
-   * invoked with three arguments; (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias detect, findWhere
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the found element, else `undefined`.
-   * @example
-   *
-   * var characters = [
-   *   { 'name': 'barney',  'age': 36, 'blocked': false },
-   *   { 'name': 'fred',    'age': 40, 'blocked': true },
-   *   { 'name': 'pebbles', 'age': 1,  'blocked': false }
-   * ];
-   *
-   * _.find(characters, function(chr) {
-   *   return chr.age < 40;
-   * });
-   * // => { 'name': 'barney', 'age': 36, 'blocked': false }
-   *
-   * // using "_.where" callback shorthand
-   * _.find(characters, { 'age': 1 });
-   * // =>  { 'name': 'pebbles', 'age': 1, 'blocked': false }
+   * Performs a binary search of `array` to determine the index at which `value`
+   * should be inserted into `array` in order to maintain its sort order.
    *
-   * // using "_.pluck" callback shorthand
-   * _.find(characters, 'blocked');
-   * // => { 'name': 'fred', 'age': 40, 'blocked': true }
+   * @private
+   * @param {Array} array The sorted array to inspect.
+   * @param {*} value The value to evaluate.
+   * @param {boolean} [retHighest] Specify returning the highest qualified index.
+   * @returns {number} Returns the index at which `value` should be inserted
+   *  into `array`.
    */
-  function find(collection, callback, thisArg) {
-    callback = lodash.createCallback(callback, thisArg, 3);
+  function binaryIndex(array, value, retHighest) {
+    var low = 0,
+        high = array ? array.length : low;
 
-    if (isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+    if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+      while (low < high) {
+        var mid = (low + high) >>> 1,
+            computed = array[mid];
 
-      while (++index < length) {
-        var value = collection[index];
-        if (callback(value, index, collection)) {
-          return value;
+        if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+          low = mid + 1;
+        } else {
+          high = mid;
         }
       }
-    } else {
-      var result;
-      baseEach(collection, function(value, index, collection) {
-        if (callback(value, index, collection)) {
-          result = value;
-          return false;
-        }
-      });
-      return result;
+      return high;
     }
+    return binaryIndexBy(array, value, identity, retHighest);
   }
 
   /**
-   * Iterates over elements of a collection, executing the callback for each
-   * element. The callback is bound to `thisArg` and invoked with three arguments;
-   * (value, index|key, collection). Callbacks may exit iteration early by
-   * explicitly returning `false`.
-   *
-   * Note: As with other "Collections" methods, objects with a `length` property
-   * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
-   * may be used for object iteration.
-   *
-   * @static
-   * @memberOf _
-   * @alias each
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function} [callback=identity] The function called per iteration.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array|Object|string} Returns `collection`.
-   * @example
-   *
-   * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(',');
-   * // => logs each number and returns '1,2,3'
+   * This function is like `binaryIndex` except that it invokes `iteratee` for
+   * `value` and each element of `array` to compute their sort ranking. The
+   * iteratee is invoked with one argument; (value).
    *
-   * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); });
-   * // => logs each number and returns the object (property order is not guaranteed across environments)
+   * @private
+   * @param {Array} array The sorted array to inspect.
+   * @param {*} value The value to evaluate.
+   * @param {Function} iteratee The function invoked per iteration.
+   * @param {boolean} [retHighest] Specify returning the highest qualified index.
+   * @returns {number} Returns the index at which `value` should be inserted
+   *  into `array`.
    */
-  function forEach(collection, callback, thisArg) {
-    if (callback && typeof thisArg == 'undefined' && isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+  function binaryIndexBy(array, value, iteratee, retHighest) {
+    value = iteratee(value);
 
-      while (++index < length) {
-        if (callback(collection[index], index, collection) === false) {
-          break;
-        }
+    var low = 0,
+        high = array ? array.length : 0,
+        valIsNaN = value !== value,
+        valIsNull = value === null,
+        valIsUndef = value === undefined;
+
+    while (low < high) {
+      var mid = floor((low + high) / 2),
+          computed = iteratee(array[mid]),
+          isDef = computed !== undefined,
+          isReflexive = computed === computed;
+
+      if (valIsNaN) {
+        var setLow = isReflexive || retHighest;
+      } else if (valIsNull) {
+        setLow = isReflexive && isDef && (retHighest || computed != null);
+      } else if (valIsUndef) {
+        setLow = isReflexive && (retHighest || isDef);
+      } else if (computed == null) {
+        setLow = false;
+      } else {
+        setLow = retHighest ? (computed <= value) : (computed < value);
+      }
+      if (setLow) {
+        low = mid + 1;
+      } else {
+        high = mid;
       }
-    } else {
-      baseEach(collection, callback, thisArg);
     }
-    return collection;
+    return nativeMin(high, MAX_ARRAY_INDEX);
   }
 
   /**
-   * Creates an object composed of keys generated from the results of running
-   * each element of a collection through the callback. The corresponding value
-   * of each key is an array of the elements responsible for generating the key.
-   * The callback is bound to `thisArg` and invoked with three arguments;
-   * (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`
-   *
-   * @static
-   * @memberOf _
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Object} Returns the composed aggregate object.
-   * @example
-   *
-   * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); });
-   * // => { '4': [4.2], '6': [6.1, 6.4] }
-   *
-   * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math);
-   * // => { '4': [4.2], '6': [6.1, 6.4] }
+   * A specialized version of `baseCallback` which only supports `this` binding
+   * and specifying the number of arguments to provide to `func`.
    *
-   * // using "_.pluck" callback shorthand
-   * _.groupBy(['one', 'two', 'three'], 'length');
-   * // => { '3': ['one', 'two'], '5': ['three'] }
+   * @private
+   * @param {Function} func The function to bind.
+   * @param {*} thisArg The `this` binding of `func`.
+   * @param {number} [argCount] The number of arguments to provide to `func`.
+   * @returns {Function} Returns the callback.
    */
-  var groupBy = createAggregator(function(result, value, key) {
-    (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value);
-  });
+  function bindCallback(func, thisArg, argCount) {
+    if (typeof func != 'function') {
+      return identity;
+    }
+    if (thisArg === undefined) {
+      return func;
+    }
+    switch (argCount) {
+      case 1: return function(value) {
+        return func.call(thisArg, value);
+      };
+      case 3: return function(value, index, collection) {
+        return func.call(thisArg, value, index, collection);
+      };
+      case 4: return function(accumulator, value, index, collection) {
+        return func.call(thisArg, accumulator, value, index, collection);
+      };
+      case 5: return function(value, other, key, object, source) {
+        return func.call(thisArg, value, other, key, object, source);
+      };
+    }
+    return function() {
+      return func.apply(thisArg, arguments);
+    };
+  }
 
   /**
-   * Creates an array of values by running each element in the collection
-   * through the callback. The callback is bound to `thisArg` and invoked with
-   * three arguments; (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias collect
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array} Returns a new array of the results of each `callback` execution.
-   * @example
-   *
-   * _.map([1, 2, 3], function(num) { return num * 3; });
-   * // => [3, 6, 9]
-   *
-   * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; });
-   * // => [3, 6, 9] (property order is not guaranteed across environments)
+   * Creates a clone of the given array buffer.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
+   * @private
+   * @param {ArrayBuffer} buffer The array buffer to clone.
+   * @returns {ArrayBuffer} Returns the cloned array buffer.
+   */
+  function bufferClone(buffer) {
+    return bufferSlice.call(buffer, 0);
+  }
+  if (!bufferSlice) {
+    // PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`.
+    bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) {
+      var byteLength = buffer.byteLength,
+          floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0,
+          offset = floatLength * FLOAT64_BYTES_PER_ELEMENT,
+          result = new ArrayBuffer(byteLength);
+
+      if (floatLength) {
+        var view = new Float64Array(result, 0, floatLength);
+        view.set(new Float64Array(buffer, 0, floatLength));
+      }
+      if (byteLength != offset) {
+        view = new Uint8Array(result, offset);
+        view.set(new Uint8Array(buffer, offset));
+      }
+      return result;
+    };
+  }
+
+  /**
+   * Creates an array that is the composition of partially applied arguments,
+   * placeholders, and provided arguments into a single array of arguments.
    *
-   * // using "_.pluck" callback shorthand
-   * _.map(characters, 'name');
-   * // => ['barney', 'fred']
+   * @private
+   * @param {Array|Object} args The provided arguments.
+   * @param {Array} partials The arguments to prepend to those provided.
+   * @param {Array} holders The `partials` placeholder indexes.
+   * @returns {Array} Returns the new array of composed arguments.
    */
-  function map(collection, callback, thisArg) {
-    var index = -1,
-        length = collection ? collection.length : 0,
-        result = Array(typeof length == 'number' ? length : 0);
+  function composeArgs(args, partials, holders) {
+    var holdersLength = holders.length,
+        argsIndex = -1,
+        argsLength = nativeMax(args.length - holdersLength, 0),
+        leftIndex = -1,
+        leftLength = partials.length,
+        result = Array(argsLength + leftLength);
 
-    callback = lodash.createCallback(callback, thisArg, 3);
-    if (isArray(collection)) {
-      while (++index < length) {
-        result[index] = callback(collection[index], index, collection);
-      }
-    } else {
-      baseEach(collection, function(value, key, collection) {
-        result[++index] = callback(value, key, collection);
-      });
+    while (++leftIndex < leftLength) {
+      result[leftIndex] = partials[leftIndex];
+    }
+    while (++argsIndex < holdersLength) {
+      result[holders[argsIndex]] = args[argsIndex];
+    }
+    while (argsLength--) {
+      result[leftIndex++] = args[argsIndex++];
     }
     return result;
   }
 
   /**
-   * Retrieves the value of a specified property from all elements in the collection.
-   *
-   * @static
-   * @memberOf _
-   * @type Function
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {string} property The property to pluck.
-   * @returns {Array} Returns a new array of property values.
-   * @example
-   *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
+   * This function is like `composeArgs` except that the arguments composition
+   * is tailored for `_.partialRight`.
    *
-   * _.pluck(characters, 'name');
-   * // => ['barney', 'fred']
+   * @private
+   * @param {Array|Object} args The provided arguments.
+   * @param {Array} partials The arguments to append to those provided.
+   * @param {Array} holders The `partials` placeholder indexes.
+   * @returns {Array} Returns the new array of composed arguments.
    */
-  var pluck = map;
+  function composeArgsRight(args, partials, holders) {
+    var holdersIndex = -1,
+        holdersLength = holders.length,
+        argsIndex = -1,
+        argsLength = nativeMax(args.length - holdersLength, 0),
+        rightIndex = -1,
+        rightLength = partials.length,
+        result = Array(argsLength + rightLength);
+
+    while (++argsIndex < argsLength) {
+      result[argsIndex] = args[argsIndex];
+    }
+    var offset = argsIndex;
+    while (++rightIndex < rightLength) {
+      result[offset + rightIndex] = partials[rightIndex];
+    }
+    while (++holdersIndex < holdersLength) {
+      result[offset + holders[holdersIndex]] = args[argsIndex++];
+    }
+    return result;
+  }
 
   /**
-   * Reduces a collection to a value which is the accumulated result of running
-   * each element in the collection through the callback, where each successive
-   * callback execution consumes the return value of the previous execution. If
-   * `accumulator` is not provided the first element of the collection will be
-   * used as the initial `accumulator` value. The callback is bound to `thisArg`
-   * and invoked with four arguments; (accumulator, value, index|key, collection).
-   *
-   * @static
-   * @memberOf _
-   * @alias foldl, inject
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function} [callback=identity] The function called per iteration.
-   * @param {*} [accumulator] Initial value of the accumulator.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the accumulated value.
-   * @example
+   * Creates a function that aggregates a collection, creating an accumulator
+   * object composed from the results of running each element in the collection
+   * through an iteratee.
    *
-   * var sum = _.reduce([1, 2, 3], function(sum, num) {
-   *   return sum + num;
-   * });
-   * // => 6
+   * **Note:** This function is used to create `_.countBy`, `_.groupBy`, `_.indexBy`,
+   * and `_.partition`.
    *
-   * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
-   *   result[key] = num * 3;
-   *   return result;
-   * }, {});
-   * // => { 'a': 3, 'b': 6, 'c': 9 }
+   * @private
+   * @param {Function} setter The function to set keys and values of the accumulator object.
+   * @param {Function} [initializer] The function to initialize the accumulator object.
+   * @returns {Function} Returns the new aggregator function.
    */
-  function reduce(collection, callback, accumulator, thisArg) {
-    var noaccum = arguments.length < 3;
-    callback = lodash.createCallback(callback, thisArg, 4);
+  function createAggregator(setter, initializer) {
+    return function(collection, iteratee, thisArg) {
+      var result = initializer ? initializer() : {};
+      iteratee = getCallback(iteratee, thisArg, 3);
 
-    if (isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+      if (isArray(collection)) {
+        var index = -1,
+            length = collection.length;
 
-      if (noaccum) {
-        accumulator = collection[++index];
-      }
-      while (++index < length) {
-        accumulator = callback(accumulator, collection[index], index, collection);
+        while (++index < length) {
+          var value = collection[index];
+          setter(result, value, iteratee(value, index, collection), collection);
+        }
+      } else {
+        baseEach(collection, function(value, key, collection) {
+          setter(result, value, iteratee(value, key, collection), collection);
+        });
       }
-    } else {
-      baseEach(collection, function(value, index, collection) {
-        accumulator = noaccum
-          ? (noaccum = false, value)
-          : callback(accumulator, value, index, collection)
-      });
-    }
-    return accumulator;
+      return result;
+    };
   }
 
   /**
-   * The opposite of `_.filter` this method returns the elements of a
-   * collection that the callback does **not** return truey for.
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array} Returns a new array of elements that failed the callback check.
-   * @example
+   * Creates a function that assigns properties of source object(s) to a given
+   * destination object.
    *
-   * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; });
-   * // => [1, 3, 5]
+   * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36, 'blocked': false },
-   *   { 'name': 'fred',   'age': 40, 'blocked': true }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.reject(characters, 'blocked');
-   * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }]
-   *
-   * // using "_.where" callback shorthand
-   * _.reject(characters, { 'age': 36 });
-   * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }]
+   * @private
+   * @param {Function} assigner The function to assign values.
+   * @returns {Function} Returns the new assigner function.
    */
-  function reject(collection, callback, thisArg) {
-    callback = lodash.createCallback(callback, thisArg, 3);
-    return filter(collection, function(value, index, collection) {
-      return !callback(value, index, collection);
+  function createAssigner(assigner) {
+    return restParam(function(object, sources) {
+      var index = -1,
+          length = object == null ? 0 : sources.length,
+          customizer = length > 2 ? sources[length - 2] : undefined,
+          guard = length > 2 ? sources[2] : undefined,
+          thisArg = length > 1 ? sources[length - 1] : undefined;
+
+      if (typeof customizer == 'function') {
+        customizer = bindCallback(customizer, thisArg, 5);
+        length -= 2;
+      } else {
+        customizer = typeof thisArg == 'function' ? thisArg : undefined;
+        length -= (customizer ? 1 : 0);
+      }
+      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+        customizer = length < 3 ? undefined : customizer;
+        length = 1;
+      }
+      while (++index < length) {
+        var source = sources[index];
+        if (source) {
+          assigner(object, source, customizer);
+        }
+      }
+      return object;
     });
   }
 
   /**
-   * Checks if the callback returns a truey value for **any** element of a
-   * collection. The function returns as soon as it finds a passing value and
-   * does not iterate over the entire collection. The callback is bound to
-   * `thisArg` and invoked with three arguments; (value, index|key, collection).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias any
-   * @category Collections
-   * @param {Array|Object|string} collection The collection to iterate over.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {boolean} Returns `true` if any element passed the callback check,
-   *  else `false`.
-   * @example
-   *
-   * _.some([null, 0, 'yes', false], Boolean);
-   * // => true
+   * Creates a `baseEach` or `baseEachRight` function.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36, 'blocked': false },
-   *   { 'name': 'fred',   'age': 40, 'blocked': true }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.some(characters, 'blocked');
-   * // => true
-   *
-   * // using "_.where" callback shorthand
-   * _.some(characters, { 'age': 1 });
-   * // => false
+   * @private
+   * @param {Function} eachFunc The function to iterate over a collection.
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {Function} Returns the new base function.
    */
-  function some(collection, callback, thisArg) {
-    var result;
-    callback = lodash.createCallback(callback, thisArg, 3);
-
-    if (isArray(collection)) {
-      var index = -1,
-          length = collection.length;
+  function createBaseEach(eachFunc, fromRight) {
+    return function(collection, iteratee) {
+      var length = collection ? getLength(collection) : 0;
+      if (!isLength(length)) {
+        return eachFunc(collection, iteratee);
+      }
+      var index = fromRight ? length : -1,
+          iterable = toObject(collection);
 
-      while (++index < length) {
-        if ((result = callback(collection[index], index, collection))) {
+      while ((fromRight ? index-- : ++index < length)) {
+        if (iteratee(iterable[index], index, iterable) === false) {
           break;
         }
       }
-    } else {
-      baseEach(collection, function(value, index, collection) {
-        return !(result = callback(value, index, collection));
-      });
-    }
-    return !!result;
+      return collection;
+    };
   }
 
-  /*--------------------------------------------------------------------------*/
-
   /**
-   * Creates an array with all falsey values removed. The values `false`, `null`,
-   * `0`, `""`, `undefined`, and `NaN` are all falsey.
+   * Creates a base function for `_.forIn` or `_.forInRight`.
    *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to compact.
-   * @returns {Array} Returns a new array of filtered values.
-   * @example
+   * @private
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {Function} Returns the new base function.
+   */
+  function createBaseFor(fromRight) {
+    return function(object, iteratee, keysFunc) {
+      var iterable = toObject(object),
+          props = keysFunc(object),
+          length = props.length,
+          index = fromRight ? length : -1;
+
+      while ((fromRight ? index-- : ++index < length)) {
+        var key = props[index];
+        if (iteratee(iterable[key], key, iterable) === false) {
+          break;
+        }
+      }
+      return object;
+    };
+  }
+
+  /**
+   * Creates a function that wraps `func` and invokes it with the `this`
+   * binding of `thisArg`.
    *
-   * _.compact([0, 1, false, 2, '', 3]);
-   * // => [1, 2, 3]
+   * @private
+   * @param {Function} func The function to bind.
+   * @param {*} [thisArg] The `this` binding of `func`.
+   * @returns {Function} Returns the new bound function.
    */
-  function compact(array) {
-    var index = -1,
-        length = array ? array.length : 0,
-        result = [];
+  function createBindWrapper(func, thisArg) {
+    var Ctor = createCtorWrapper(func);
 
-    while (++index < length) {
-      var value = array[index];
-      if (value) {
-        result.push(value);
-      }
+    function wrapper() {
+      var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+      return fn.apply(thisArg, arguments);
     }
-    return result;
+    return wrapper;
   }
 
   /**
-   * Creates an array excluding all values of the provided arrays using strict
-   * equality for comparisons, i.e. `===`.
+   * Creates a `Set` cache object to optimize linear searches of large arrays.
    *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to process.
-   * @param {...Array} [values] The arrays of values to exclude.
-   * @returns {Array} Returns a new array of filtered values.
-   * @example
+   * @private
+   * @param {Array} [values] The values to cache.
+   * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
+   */
+  var createCache = !(nativeCreate && Set) ? constant(null) : function(values) {
+    return new SetCache(values);
+  };
+
+  /**
+   * Creates a function that produces an instance of `Ctor` regardless of
+   * whether it was invoked as part of a `new` expression or by `call` or `apply`.
    *
-   * _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
-   * // => [1, 3, 4]
+   * @private
+   * @param {Function} Ctor The constructor to wrap.
+   * @returns {Function} Returns the new wrapped function.
    */
-  function difference(array) {
-    return baseDifference(array, baseFlatten(arguments, true, true, 1));
+  function createCtorWrapper(Ctor) {
+    return function() {
+      // Use a `switch` statement to work with class constructors.
+      // See https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist
+      // for more details.
+      var args = arguments;
+      switch (args.length) {
+        case 0: return new Ctor;
+        case 1: return new Ctor(args[0]);
+        case 2: return new Ctor(args[0], args[1]);
+        case 3: return new Ctor(args[0], args[1], args[2]);
+        case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+        case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+      }
+      var thisBinding = baseCreate(Ctor.prototype),
+          result = Ctor.apply(thisBinding, args);
+
+      // Mimic the constructor's `return` behavior.
+      // See https://es5.github.io/#x13.2.2 for more details.
+      return isObject(result) ? result : thisBinding;
+    };
   }
 
   /**
-   * Gets the first element or first `n` elements of an array. If a callback
-   * is provided elements at the beginning of the array are returned as long
-   * as the callback returns truey. The callback is bound to `thisArg` and
-   * invoked with three arguments; (value, index, array).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @alias head, take
-   * @category Arrays
-   * @param {Array} array The array to query.
-   * @param {Function|Object|number|string} [callback] The function called
-   *  per element or the number of elements to return. If a property name or
-   *  object is provided it will be used to create a "_.pluck" or "_.where"
-   *  style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the first element(s) of `array`.
-   * @example
+   * Creates a `_.find` or `_.findLast` function.
    *
-   * _.first([1, 2, 3]);
-   * // => 1
-   *
-   * _.first([1, 2, 3], 2);
-   * // => [1, 2]
+   * @private
+   * @param {Function} eachFunc The function to iterate over a collection.
+   * @param {boolean} [fromRight] Specify iterating from right to left.
+   * @returns {Function} Returns the new find function.
+   */
+  function createFind(eachFunc, fromRight) {
+    return function(collection, predicate, thisArg) {
+      predicate = getCallback(predicate, thisArg, 3);
+      if (isArray(collection)) {
+        var index = baseFindIndex(collection, predicate, fromRight);
+        return index > -1 ? collection[index] : undefined;
+      }
+      return baseFind(collection, predicate, eachFunc);
+    };
+  }
+
+  /**
+   * Creates a function for `_.forEach` or `_.forEachRight`.
    *
-   * _.first([1, 2, 3], function(num) {
-   *   return num < 3;
-   * });
-   * // => [1, 2]
+   * @private
+   * @param {Function} arrayFunc The function to iterate over an array.
+   * @param {Function} eachFunc The function to iterate over a collection.
+   * @returns {Function} Returns the new each function.
+   */
+  function createForEach(arrayFunc, eachFunc) {
+    return function(collection, iteratee, thisArg) {
+      return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+        ? arrayFunc(collection, iteratee)
+        : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+    };
+  }
+
+  /**
+   * Creates a function for `_.forOwn` or `_.forOwnRight`.
    *
-   * var characters = [
-   *   { 'name': 'barney',  'blocked': true,  'employer': 'slate' },
-   *   { 'name': 'fred',    'blocked': false, 'employer': 'slate' },
-   *   { 'name': 'pebbles', 'blocked': true,  'employer': 'na' }
-   * ];
+   * @private
+   * @param {Function} objectFunc The function to iterate over an object.
+   * @returns {Function} Returns the new each function.
+   */
+  function createForOwn(objectFunc) {
+    return function(object, iteratee, thisArg) {
+      if (typeof iteratee != 'function' || thisArg !== undefined) {
+        iteratee = bindCallback(iteratee, thisArg, 3);
+      }
+      return objectFunc(object, iteratee);
+    };
+  }
+
+  /**
+   * Creates a function for `_.reduce` or `_.reduceRight`.
    *
-   * // using "_.pluck" callback shorthand
-   * _.first(characters, 'blocked');
-   * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }]
+   * @private
+   * @param {Function} arrayFunc The function to iterate over an array.
+   * @param {Function} eachFunc The function to iterate over a collection.
+   * @returns {Function} Returns the new each function.
+   */
+  function createReduce(arrayFunc, eachFunc) {
+    return function(collection, iteratee, accumulator, thisArg) {
+      var initFromArray = arguments.length < 3;
+      return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+        ? arrayFunc(collection, iteratee, accumulator, initFromArray)
+        : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
+    };
+  }
+
+  /**
+   * Creates a function that wraps `func` and invokes it with optional `this`
+   * binding of, partial application, and currying.
    *
-   * // using "_.where" callback shorthand
-   * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name');
-   * // => ['barney', 'fred']
+   * @private
+   * @param {Function|string} func The function or method name to reference.
+   * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+   * @param {*} [thisArg] The `this` binding of `func`.
+   * @param {Array} [partials] The arguments to prepend to those provided to the new function.
+   * @param {Array} [holders] The `partials` placeholder indexes.
+   * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
+   * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+   * @param {Array} [argPos] The argument positions of the new function.
+   * @param {number} [ary] The arity cap of `func`.
+   * @param {number} [arity] The arity of `func`.
+   * @returns {Function} Returns the new wrapped function.
    */
-  function first(array, callback, thisArg) {
-    var n = 0,
-        length = array ? array.length : 0;
+  function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+    var isAry = bitmask & ARY_FLAG,
+        isBind = bitmask & BIND_FLAG,
+        isBindKey = bitmask & BIND_KEY_FLAG,
+        isCurry = bitmask & CURRY_FLAG,
+        isCurryBound = bitmask & CURRY_BOUND_FLAG,
+        isCurryRight = bitmask & CURRY_RIGHT_FLAG,
+        Ctor = isBindKey ? null : createCtorWrapper(func);
+
+    function wrapper() {
+      // Avoid `arguments` object use disqualifying optimizations by
+      // converting it to an array before providing it to other functions.
+      var length = arguments.length,
+          index = length,
+          args = Array(length);
+
+      while (index--) {
+        args[index] = arguments[index];
+      }
+      if (partials) {
+        args = composeArgs(args, partials, holders);
+      }
+      if (partialsRight) {
+        args = composeArgsRight(args, partialsRight, holdersRight);
+      }
+      if (isCurry || isCurryRight) {
+        var placeholder = wrapper.placeholder,
+            argsHolders = replaceHolders(args, placeholder);
+
+        length -= argsHolders.length;
+        if (length < arity) {
+          var newArgPos = argPos ? arrayCopy(argPos) : null,
+              newArity = nativeMax(arity - length, 0),
+              newsHolders = isCurry ? argsHolders : null,
+              newHoldersRight = isCurry ? null : argsHolders,
+              newPartials = isCurry ? args : null,
+              newPartialsRight = isCurry ? null : args;
+
+          bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+          bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+          if (!isCurryBound) {
+            bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+          }
+          var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],
+              result = createHybridWrapper.apply(undefined, newData);
 
-    if (typeof callback != 'number' && callback != null) {
-      var index = -1;
-      callback = lodash.createCallback(callback, thisArg, 3);
-      while (++index < length && callback(array[index], index, array)) {
-        n++;
+          if (isLaziable(func)) {
+            setData(result, newData);
+          }
+          result.placeholder = placeholder;
+          return result;
+        }
       }
-    } else {
-      n = callback;
-      if (n == null || thisArg) {
-        return array ? array[0] : undefined;
+      var thisBinding = isBind ? thisArg : this,
+          fn = isBindKey ? thisBinding[func] : func;
+
+      if (argPos) {
+        args = reorder(args, argPos);
+      }
+      if (isAry && ary < args.length) {
+        args.length = ary;
       }
+      if (this && this !== root && this instanceof wrapper) {
+        fn = Ctor || createCtorWrapper(func);
+      }
+      return fn.apply(thisBinding, args);
     }
-    return slice(array, 0, nativeMin(nativeMax(0, n), length));
+    return wrapper;
   }
 
   /**
-   * Flattens a nested array (the nesting can be to any depth). If `isShallow`
-   * is truey, the array will only be flattened a single level. If a callback
-   * is provided each element of the array is passed through the callback before
-   * flattening. The callback is bound to `thisArg` and invoked with three
-   * arguments; (value, index, array).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
-   *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to flatten.
-   * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array} Returns a new flattened array.
-   * @example
-   *
-   * _.flatten([1, [2], [3, [[4]]]]);
-   * // => [1, 2, 3, 4];
-   *
-   * _.flatten([1, [2], [3, [[4]]]], true);
-   * // => [1, 2, 3, [[4]]];
+   * Creates a function that wraps `func` and invokes it with the optional `this`
+   * binding of `thisArg` and the `partials` prepended to those provided to
+   * the wrapper.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] },
-   *   { 'name': 'fred',   'age': 40, 'pets': ['baby puss', 'dino'] }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.flatten(characters, 'pets');
-   * // => ['hoppy', 'baby puss', 'dino']
+   * @private
+   * @param {Function} func The function to partially apply arguments to.
+   * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
+   * @param {*} thisArg The `this` binding of `func`.
+   * @param {Array} partials The arguments to prepend to those provided to the new function.
+   * @returns {Function} Returns the new bound function.
    */
-  function flatten(array, isShallow, callback, thisArg) {
-    // juggle arguments
-    if (typeof isShallow != 'boolean' && isShallow != null) {
-      thisArg = callback;
-      callback = (typeof isShallow != 'function' && thisArg && thisArg[isShallow] === array) ? null : isShallow;
-      isShallow = false;
-    }
-    if (callback != null) {
-      array = map(array, callback, thisArg);
+  function createPartialWrapper(func, bitmask, thisArg, partials) {
+    var isBind = bitmask & BIND_FLAG,
+        Ctor = createCtorWrapper(func);
+
+    function wrapper() {
+      // Avoid `arguments` object use disqualifying optimizations by
+      // converting it to an array before providing it `func`.
+      var argsIndex = -1,
+          argsLength = arguments.length,
+          leftIndex = -1,
+          leftLength = partials.length,
+          args = Array(argsLength + leftLength);
+
+      while (++leftIndex < leftLength) {
+        args[leftIndex] = partials[leftIndex];
+      }
+      while (argsLength--) {
+        args[leftIndex++] = arguments[++argsIndex];
+      }
+      var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+      return fn.apply(isBind ? thisArg : this, args);
     }
-    return baseFlatten(array, isShallow);
+    return wrapper;
   }
 
   /**
-   * Gets the index at which the first occurrence of `value` is found using
-   * strict equality for comparisons, i.e. `===`. If the array is already sorted
-   * providing `true` for `fromIndex` will run a faster binary search.
-   *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to search.
-   * @param {*} value The value to search for.
-   * @param {boolean|number} [fromIndex=0] The index to search from or `true`
-   *  to perform a binary search on a sorted array.
-   * @returns {number} Returns the index of the matched value or `-1`.
-   * @example
-   *
-   * _.indexOf([1, 2, 3, 1, 2, 3], 2);
-   * // => 1
-   *
-   * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3);
-   * // => 4
+   * Creates a function that either curries or invokes `func` with optional
+   * `this` binding and partially applied arguments.
    *
-   * _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
-   * // => 2
+   * @private
+   * @param {Function|string} func The function or method name to reference.
+   * @param {number} bitmask The bitmask of flags.
+   *  The bitmask may be composed of the following flags:
+   *     1 - `_.bind`
+   *     2 - `_.bindKey`
+   *     4 - `_.curry` or `_.curryRight` of a bound function
+   *     8 - `_.curry`
+   *    16 - `_.curryRight`
+   *    32 - `_.partial`
+   *    64 - `_.partialRight`
+   *   128 - `_.rearg`
+   *   256 - `_.ary`
+   * @param {*} [thisArg] The `this` binding of `func`.
+   * @param {Array} [partials] The arguments to be partially applied.
+   * @param {Array} [holders] The `partials` placeholder indexes.
+   * @param {Array} [argPos] The argument positions of the new function.
+   * @param {number} [ary] The arity cap of `func`.
+   * @param {number} [arity] The arity of `func`.
+   * @returns {Function} Returns the new wrapped function.
    */
-  function indexOf(array, value, fromIndex) {
-    if (typeof fromIndex == 'number') {
-      var length = array ? array.length : 0;
-      fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0);
-    } else if (fromIndex) {
-      var index = sortedIndex(array, value);
-      return array[index] === value ? index : -1;
+  function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+    var isBindKey = bitmask & BIND_KEY_FLAG;
+    if (!isBindKey && typeof func != 'function') {
+      throw new TypeError(FUNC_ERROR_TEXT);
+    }
+    var length = partials ? partials.length : 0;
+    if (!length) {
+      bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
+      partials = holders = null;
+    }
+    length -= (holders ? holders.length : 0);
+    if (bitmask & PARTIAL_RIGHT_FLAG) {
+      var partialsRight = partials,
+          holdersRight = holders;
+
+      partials = holders = null;
+    }
+    var data = isBindKey ? null : getData(func),
+        newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
+
+    if (data) {
+      mergeData(newData, data);
+      bitmask = newData[1];
+      arity = newData[9];
+    }
+    newData[9] = arity == null
+      ? (isBindKey ? 0 : func.length)
+      : (nativeMax(arity - length, 0) || 0);
+
+    if (bitmask == BIND_FLAG) {
+      var result = createBindWrapper(newData[0], newData[2]);
+    } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
+      result = createPartialWrapper.apply(undefined, newData);
+    } else {
+      result = createHybridWrapper.apply(undefined, newData);
     }
-    return baseIndexOf(array, value, fromIndex);
+    var setter = data ? baseSetData : setData;
+    return setter(result, newData);
   }
 
   /**
-   * Creates an array of unique values present in all provided arrays using
-   * strict equality for comparisons, i.e. `===`.
+   * A specialized version of `baseIsEqualDeep` for arrays with support for
+   * partial deep comparisons.
    *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {...Array} [array] The arrays to inspect.
-   * @returns {Array} Returns an array of composite values.
-   * @example
-   *
-   * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
-   * // => [1, 2]
+   * @private
+   * @param {Array} array The array to compare.
+   * @param {Array} other The other array to compare.
+   * @param {Function} equalFunc The function to determine equivalents of values.
+   * @param {Function} [customizer] The function to customize comparing arrays.
+   * @param {boolean} [isLoose] Specify performing partial comparisons.
+   * @param {Array} [stackA] Tracks traversed `value` objects.
+   * @param {Array} [stackB] Tracks traversed `other` objects.
+   * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
    */
-  function intersection(array) {
-    var args = arguments,
-        argsLength = args.length,
-        argsIndex = -1,
-        caches = getArray(),
-        index = -1,
-        indexOf = getIndexOf(),
-        length = array ? array.length : 0,
-        result = [],
-        seen = getArray();
+  function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+    var index = -1,
+        arrLength = array.length,
+        othLength = other.length;
 
-    while (++argsIndex < argsLength) {
-      var value = args[argsIndex];
-      caches[argsIndex] = indexOf === baseIndexOf &&
-        (value ? value.length : 0) >= largeArraySize &&
-        createCache(argsIndex ? args[argsIndex] : seen);
+    if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+      return false;
     }
-    outer:
-    while (++index < length) {
-      var cache = caches[0];
-      value = array[index];
+    // Ignore non-index properties.
+    while (++index < arrLength) {
+      var arrValue = array[index],
+          othValue = other[index],
+          result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
 
-      if ((cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0) {
-        argsIndex = argsLength;
-        (cache || seen).push(value);
-        while (--argsIndex) {
-          cache = caches[argsIndex];
-          if ((cache ? cacheIndexOf(cache, value) : indexOf(args[argsIndex], value)) < 0) {
-            continue outer;
-          }
+      if (result !== undefined) {
+        if (result) {
+          continue;
         }
-        result.push(value);
+        return false;
       }
-    }
-    while (argsLength--) {
-      cache = caches[argsLength];
-      if (cache) {
-        releaseObject(cache);
+      // Recursively compare arrays (susceptible to call stack limits).
+      if (isLoose) {
+        if (!arraySome(other, function(othValue) {
+              return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+            })) {
+          return false;
+        }
+      } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
+        return false;
       }
     }
-    releaseArray(caches);
-    releaseArray(seen);
-    return result;
+    return true;
   }
 
   /**
-   * Gets the last element or last `n` elements of an array. If a callback is
-   * provided elements at the end of the array are returned as long as the
-   * callback returns truey. The callback is bound to `thisArg` and invoked
-   * with three arguments; (value, index, array).
+   * A specialized version of `baseIsEqualDeep` for comparing objects of
+   * the same `toStringTag`.
    *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
+   * **Note:** This function only supports comparing values with tags of
+   * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
    *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
+   * @private
+   * @param {Object} value The object to compare.
+   * @param {Object} other The other object to compare.
+   * @param {string} tag The `toStringTag` of the objects to compare.
+   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+   */
+  function equalByTag(object, other, tag) {
+    switch (tag) {
+      case boolTag:
+      case dateTag:
+        // Coerce dates and booleans to numbers, dates to milliseconds and booleans
+        // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
+        return +object == +other;
+
+      case errorTag:
+        return object.name == other.name && object.message == other.message;
+
+      case numberTag:
+        // Treat `NaN` vs. `NaN` as equal.
+        return (object != +object)
+          ? other != +other
+          : object == +other;
+
+      case regexpTag:
+      case stringTag:
+        // Coerce regexes to strings and treat strings primitives and string
+        // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
+        return object == (other + '');
+    }
+    return false;
+  }
+
+  /**
+   * A specialized version of `baseIsEqualDeep` for objects with support for
+   * partial deep comparisons.
    *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to query.
-   * @param {Function|Object|number|string} [callback] The function called
-   *  per element or the number of elements to return. If a property name or
-   *  object is provided it will be used to create a "_.pluck" or "_.where"
-   *  style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {*} Returns the last element(s) of `array`.
-   * @example
-   *
-   * _.last([1, 2, 3]);
-   * // => 3
-   *
-   * _.last([1, 2, 3], 2);
-   * // => [2, 3]
-   *
-   * _.last([1, 2, 3], function(num) {
-   *   return num > 1;
-   * });
-   * // => [2, 3]
-   *
-   * var characters = [
-   *   { 'name': 'barney',  'blocked': false, 'employer': 'slate' },
-   *   { 'name': 'fred',    'blocked': true,  'employer': 'slate' },
-   *   { 'name': 'pebbles', 'blocked': true,  'employer': 'na' }
-   * ];
-   *
-   * // using "_.pluck" callback shorthand
-   * _.pluck(_.last(characters, 'blocked'), 'name');
-   * // => ['fred', 'pebbles']
-   *
-   * // using "_.where" callback shorthand
-   * _.last(characters, { 'employer': 'na' });
-   * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }]
+   * @private
+   * @param {Object} object The object to compare.
+   * @param {Object} other The other object to compare.
+   * @param {Function} equalFunc The function to determine equivalents of values.
+   * @param {Function} [customizer] The function to customize comparing values.
+   * @param {boolean} [isLoose] Specify performing partial comparisons.
+   * @param {Array} [stackA] Tracks traversed `value` objects.
+   * @param {Array} [stackB] Tracks traversed `other` objects.
+   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
    */
-  function last(array, callback, thisArg) {
-    var n = 0,
-        length = array ? array.length : 0;
+  function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+    var objProps = keys(object),
+        objLength = objProps.length,
+        othProps = keys(other),
+        othLength = othProps.length;
 
-    if (typeof callback != 'number' && callback != null) {
-      var index = length;
-      callback = lodash.createCallback(callback, thisArg, 3);
-      while (index-- && callback(array[index], index, array)) {
-        n++;
+    if (objLength != othLength && !isLoose) {
+      return false;
+    }
+    var index = objLength;
+    while (index--) {
+      var key = objProps[index];
+      if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+        return false;
       }
-    } else {
-      n = callback;
-      if (n == null || thisArg) {
-        return array ? array[length - 1] : undefined;
+    }
+    var skipCtor = isLoose;
+    while (++index < objLength) {
+      key = objProps[index];
+      var objValue = object[key],
+          othValue = other[key],
+          result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+
+      // Recursively compare objects (susceptible to call stack limits).
+      if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
+        return false;
+      }
+      skipCtor || (skipCtor = key == 'constructor');
+    }
+    if (!skipCtor) {
+      var objCtor = object.constructor,
+          othCtor = other.constructor;
+
+      // Non `Object` object instances with different constructors are not equal.
+      if (objCtor != othCtor &&
+          ('constructor' in object && 'constructor' in other) &&
+          !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+            typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+        return false;
       }
     }
-    return slice(array, nativeMax(0, length - n));
+    return true;
   }
 
   /**
-   * Uses a binary search to determine the smallest index at which a value
-   * should be inserted into a given sorted array in order to maintain the sort
-   * order of the array. If a callback is provided it will be executed for
-   * `value` and each element of `array` to compute their sort ranking. The
-   * callback is bound to `thisArg` and invoked with one argument; (value).
-   *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
+   * Gets the appropriate "callback" function. If the `_.callback` method is
+   * customized this function returns the custom method, otherwise it returns
+   * the `baseCallback` function. If arguments are provided the chosen function
+   * is invoked with them and its result is returned.
    *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
-   *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to inspect.
-   * @param {*} value The value to evaluate.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {number} Returns the index at which `value` should be inserted
-   *  into `array`.
-   * @example
+   * @private
+   * @returns {Function} Returns the chosen function or its result.
+   */
+  function getCallback(func, thisArg, argCount) {
+    var result = lodash.callback || callback;
+    result = result === callback ? baseCallback : result;
+    return argCount ? result(func, thisArg, argCount) : result;
+  }
+
+  /**
+   * Gets metadata for `func`.
    *
-   * _.sortedIndex([20, 30, 50], 40);
-   * // => 2
+   * @private
+   * @param {Function} func The function to query.
+   * @returns {*} Returns the metadata for `func`.
+   */
+  var getData = !metaMap ? noop : function(func) {
+    return metaMap.get(func);
+  };
+
+  /**
+   * Gets the name of `func`.
    *
-   * // using "_.pluck" callback shorthand
-   * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
-   * // => 2
+   * @private
+   * @param {Function} func The function to query.
+   * @returns {string} Returns the function name.
+   */
+  function getFuncName(func) {
+    var result = func.name,
+        array = realNames[result],
+        length = array ? array.length : 0;
+
+    while (length--) {
+      var data = array[length],
+          otherFunc = data.func;
+      if (otherFunc == null || otherFunc == func) {
+        return data.name;
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
+   * customized this function returns the custom method, otherwise it returns
+   * the `baseIndexOf` function. If arguments are provided the chosen function
+   * is invoked with them and its result is returned.
    *
-   * var dict = {
-   *   'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 }
-   * };
+   * @private
+   * @returns {Function|number} Returns the chosen function or its result.
+   */
+  function getIndexOf(collection, target, fromIndex) {
+    var result = lodash.indexOf || indexOf;
+    result = result === indexOf ? baseIndexOf : result;
+    return collection ? result(collection, target, fromIndex) : result;
+  }
+
+  /**
+   * Gets the "length" property value of `object`.
    *
-   * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
-   *   return dict.wordToNumber[word];
-   * });
-   * // => 2
+   * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+   * that affects Safari on at least iOS 8.1-8.3 ARM64.
    *
-   * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
-   *   return this.wordToNumber[word];
-   * }, dict);
-   * // => 2
+   * @private
+   * @param {Object} object The object to query.
+   * @returns {*} Returns the "length" value.
    */
-  function sortedIndex(array, value, callback, thisArg) {
-    var low = 0,
-        high = array ? array.length : low;
+  var getLength = baseProperty('length');
 
-    // explicitly reference `identity` for better inlining in Firefox
-    callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity;
-    value = callback(value);
+  /**
+   * Gets the propery names, values, and compare flags of `object`.
+   *
+   * @private
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the match data of `object`.
+   */
+  function getMatchData(object) {
+    var result = pairs(object),
+        length = result.length;
 
-    while (low < high) {
-      var mid = (low + high) >>> 1;
-      (callback(array[mid]) < value)
-        ? low = mid + 1
-        : high = mid;
+    while (length--) {
+      result[length][2] = isStrictComparable(result[length][1]);
     }
-    return low;
+    return result;
   }
 
   /**
-   * Creates an array of unique values, in order, of the provided arrays using
-   * strict equality for comparisons, i.e. `===`.
-   *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {...Array} [array] The arrays to inspect.
-   * @returns {Array} Returns an array of composite values.
-   * @example
+   * Gets the native function at `key` of `object`.
    *
-   * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
-   * // => [1, 2, 3, 101, 10]
+   * @private
+   * @param {Object} object The object to query.
+   * @param {string} key The key of the method to get.
+   * @returns {*} Returns the function if it's native, else `undefined`.
    */
-  function union(array) {
-    return baseUniq(baseFlatten(arguments, true, true));
+  function getNative(object, key) {
+    var value = object == null ? undefined : object[key];
+    return isNative(value) ? value : undefined;
   }
 
   /**
-   * Creates a duplicate-value-free version of an array using strict equality
-   * for comparisons, i.e. `===`. If the array is sorted, providing
-   * `true` for `isSorted` will use a faster algorithm. If a callback is provided
-   * each element of `array` is passed through the callback before uniqueness
-   * is computed. The callback is bound to `thisArg` and invoked with three
-   * arguments; (value, index, array).
+   * Gets the view, applying any `transforms` to the `start` and `end` positions.
    *
-   * If a property name is provided for `callback` the created "_.pluck" style
-   * callback will return the property value of the given element.
+   * @private
+   * @param {number} start The start of the view.
+   * @param {number} end The end of the view.
+   * @param {Array} [transforms] The transformations to apply to the view.
+   * @returns {Object} Returns an object containing the `start` and `end`
+   *  positions of the view.
+   */
+  function getView(start, end, transforms) {
+    var index = -1,
+        length = transforms ? transforms.length : 0;
+
+    while (++index < length) {
+      var data = transforms[index],
+          size = data.size;
+
+      switch (data.type) {
+        case 'drop':      start += size; break;
+        case 'dropRight': end -= size; break;
+        case 'take':      end = nativeMin(end, start + size); break;
+        case 'takeRight': start = nativeMax(start, end - size); break;
+      }
+    }
+    return { 'start': start, 'end': end };
+  }
+
+  /**
+   * Initializes an array clone.
    *
-   * If an object is provided for `callback` the created "_.where" style callback
-   * will return `true` for elements that have the properties of the given object,
-   * else `false`.
+   * @private
+   * @param {Array} array The array to clone.
+   * @returns {Array} Returns the initialized clone.
+   */
+  function initCloneArray(array) {
+    var length = array.length,
+        result = new array.constructor(length);
+
+    // Add array properties assigned by `RegExp#exec`.
+    if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+      result.index = array.index;
+      result.input = array.input;
+    }
+    return result;
+  }
+
+  /**
+   * Initializes an object clone.
    *
-   * @static
-   * @memberOf _
-   * @alias unique
-   * @category Arrays
-   * @param {Array} array The array to process.
-   * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted.
-   * @param {Function|Object|string} [callback=identity] The function called
-   *  per iteration. If a property name or object is provided it will be used
-   *  to create a "_.pluck" or "_.where" style callback, respectively.
-   * @param {*} [thisArg] The `this` binding of `callback`.
-   * @returns {Array} Returns a duplicate-value-free array.
-   * @example
+   * @private
+   * @param {Object} object The object to clone.
+   * @returns {Object} Returns the initialized clone.
+   */
+  function initCloneObject(object) {
+    var Ctor = object.constructor;
+    if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
+      Ctor = Object;
+    }
+    return new Ctor;
+  }
+
+  /**
+   * Initializes an object clone based on its `toStringTag`.
    *
-   * _.uniq([1, 2, 1, 3, 1]);
-   * // => [1, 2, 3]
+   * **Note:** This function only supports cloning values with tags of
+   * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
    *
-   * _.uniq([1, 1, 2, 2, 3], true);
-   * // => [1, 2, 3]
+   * @private
+   * @param {Object} object The object to clone.
+   * @param {string} tag The `toStringTag` of the object to clone.
+   * @param {boolean} [isDeep] Specify a deep clone.
+   * @returns {Object} Returns the initialized clone.
+   */
+  function initCloneByTag(object, tag, isDeep) {
+    var Ctor = object.constructor;
+    switch (tag) {
+      case arrayBufferTag:
+        return bufferClone(object);
+
+      case boolTag:
+      case dateTag:
+        return new Ctor(+object);
+
+      case float32Tag: case float64Tag:
+      case int8Tag: case int16Tag: case int32Tag:
+      case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+        // Safari 5 mobile incorrectly has `Object` as the constructor of typed arrays.
+        if (Ctor instanceof Ctor) {
+          Ctor = ctorByTag[tag];
+        }
+        var buffer = object.buffer;
+        return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
+
+      case numberTag:
+      case stringTag:
+        return new Ctor(object);
+
+      case regexpTag:
+        var result = new Ctor(object.source, reFlags.exec(object));
+        result.lastIndex = object.lastIndex;
+    }
+    return result;
+  }
+
+  /**
+   * Checks if `value` is array-like.
    *
-   * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
-   * // => ['A', 'b', 'C']
+   * @private
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+   */
+  function isArrayLike(value) {
+    return value != null && isLength(getLength(value));
+  }
+
+  /**
+   * Checks if `value` is a valid array-like index.
    *
-   * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
-   * // => [1, 2.5, 3]
+   * @private
+   * @param {*} value The value to check.
+   * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+   * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+   */
+  function isIndex(value, length) {
+    value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+    length = length == null ? MAX_SAFE_INTEGER : length;
+    return value > -1 && value % 1 == 0 && value < length;
+  }
+
+  /**
+   * Checks if the provided arguments are from an iteratee call.
    *
-   * // using "_.pluck" callback shorthand
-   * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
-   * // => [{ 'x': 1 }, { 'x': 2 }]
+   * @private
+   * @param {*} value The potential iteratee value argument.
+   * @param {*} index The potential iteratee index or key argument.
+   * @param {*} object The potential iteratee object argument.
+   * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
    */
-  function uniq(array, isSorted, callback, thisArg) {
-    // juggle arguments
-    if (typeof isSorted != 'boolean' && isSorted != null) {
-      thisArg = callback;
-      callback = (typeof isSorted != 'function' && thisArg && thisArg[isSorted] === array) ? null : isSorted;
-      isSorted = false;
+  function isIterateeCall(value, index, object) {
+    if (!isObject(object)) {
+      return false;
     }
-    if (callback != null) {
-      callback = lodash.createCallback(callback, thisArg, 3);
+    var type = typeof index;
+    if (type == 'number'
+        ? (isArrayLike(object) && isIndex(index, object.length))
+        : (type == 'string' && index in object)) {
+      var other = object[index];
+      return value === value ? (value === other) : (other !== other);
     }
-    return baseUniq(array, isSorted, callback);
+    return false;
   }
 
   /**
-   * Creates an array excluding all provided values using strict equality for
-   * comparisons, i.e. `===`.
-   *
-   * @static
-   * @memberOf _
-   * @category Arrays
-   * @param {Array} array The array to filter.
-   * @param {...*} [value] The values to exclude.
-   * @returns {Array} Returns a new array of filtered values.
-   * @example
+   * Checks if `value` is a property name and not a property path.
    *
-   * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
-   * // => [2, 3, 4]
+   * @private
+   * @param {*} value The value to check.
+   * @param {Object} [object] The object to query keys on.
+   * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
    */
-  function without(array) {
-    return baseDifference(array, slice(arguments, 1));
+  function isKey(value, object) {
+    var type = typeof value;
+    if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+      return true;
+    }
+    if (isArray(value)) {
+      return false;
+    }
+    var result = !reIsDeepProp.test(value);
+    return result || (object != null && value in toObject(object));
   }
 
-  /*--------------------------------------------------------------------------*/
-
   /**
-   * Creates a function that, when called, invokes `func` with the `this`
-   * binding of `thisArg` and prepends any additional `bind` arguments to those
-   * provided to the bound function.
+   * Checks if `func` has a lazy counterpart.
    *
-   * @static
-   * @memberOf _
-   * @category Functions
-   * @param {Function} func The function to bind.
-   * @param {*} [thisArg] The `this` binding of `func`.
-   * @param {...*} [arg] Arguments to be partially applied.
-   * @returns {Function} Returns the new bound function.
-   * @example
+   * @private
+   * @param {Function} func The function to check.
+   * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
+   */
+  function isLaziable(func) {
+    var funcName = getFuncName(func);
+    if (!(funcName in LazyWrapper.prototype)) {
+      return false;
+    }
+    var other = lodash[funcName];
+    if (func === other) {
+      return true;
+    }
+    var data = getData(other);
+    return !!data && func === data[0];
+  }
+
+  /**
+   * Checks if `value` is a valid array-like length.
    *
-   * var func = function(greeting) {
-   *   return greeting + ' ' + this.name;
-   * };
+   * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
    *
-   * func = _.bind(func, { 'name': 'fred' }, 'hi');
-   * func();
-   * // => 'hi fred'
+   * @private
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
    */
-  function bind(func, thisArg) {
-    return arguments.length > 2
-      ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
-      : createWrapper(func, 1, null, null, thisArg);
+  function isLength(value) {
+    return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
   }
 
   /**
-   * Produces a callback bound to an optional `thisArg`. If `func` is a property
-   * name the created callback will return the property value for a given element.
-   * If `func` is an object the created callback will return `true` for elements
-   * that contain the equivalent object properties, otherwise it will return `false`.
-   *
-   * @static
-   * @memberOf _
-   * @category Functions
-   * @param {*} [func=identity] The value to convert to a callback.
-   * @param {*} [thisArg] The `this` binding of the created callback.
-   * @param {number} [argCount] The number of arguments the callback accepts.
-   * @returns {Function} Returns a callback function.
-   * @example
+   * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
+   * @private
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` if suitable for strict
+   *  equality comparisons, else `false`.
+   */
+  function isStrictComparable(value) {
+    return value === value && !isObject(value);
+  }
+
+  /**
+   * Merges the function metadata of `source` into `data`.
    *
-   * // wrap to create custom callback shorthands
-   * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
-   *   var match = /^(.+?)__([gl]t)(.+)$/.exec(callback);
-   *   return !match ? func(callback, thisArg) : function(object) {
-   *     return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
-   *   };
-   * });
+   * Merging metadata reduces the number of wrappers required to invoke a function.
+   * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+   * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
+   * augment function arguments, making the order in which they are executed important,
+   * preventing the merging of metadata. However, we make an exception for a safe
+   * common case where curried functions have `_.ary` and or `_.rearg` applied.
    *
-   * _.filter(characters, 'age__gt38');
-   * // => [{ 'name': 'fred', 'age': 40 }]
+   * @private
+   * @param {Array} data The destination metadata.
+   * @param {Array} source The source metadata.
+   * @returns {Array} Returns `data`.
    */
-  function createCallback(func, thisArg, argCount) {
-    var type = typeof func;
-    if (func == null || type == 'function') {
-      return baseCreateCallback(func, thisArg, argCount);
+  function mergeData(data, source) {
+    var bitmask = data[1],
+        srcBitmask = source[1],
+        newBitmask = bitmask | srcBitmask,
+        isCommon = newBitmask < ARY_FLAG;
+
+    var isCombo =
+      (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
+      (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
+      (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
+
+    // Exit early if metadata can't be merged.
+    if (!(isCommon || isCombo)) {
+      return data;
+    }
+    // Use source `thisArg` if available.
+    if (srcBitmask & BIND_FLAG) {
+      data[2] = source[2];
+      // Set when currying a bound function.
+      newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
+    }
+    // Compose partial arguments.
+    var value = source[3];
+    if (value) {
+      var partials = data[3];
+      data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
+      data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
     }
-    // handle "_.pluck" style callback shorthands
-    if (type != 'object') {
-      return function(object) {
-        return object[func];
-      };
+    // Compose partial right arguments.
+    value = source[5];
+    if (value) {
+      partials = data[5];
+      data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
+      data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
     }
-    var props = keys(func),
-        key = props[0],
-        a = func[key];
-
-    // handle "_.where" style callback shorthands
-    if (props.length == 1 && a === a && !isObject(a)) {
-      // fast path the common case of providing an object with a single
-      // property containing a primitive value
-      return function(object) {
-        var b = object[key];
-        return a === b && (a !== 0 || (1 / a == 1 / b));
-      };
+    // Use source `argPos` if available.
+    value = source[7];
+    if (value) {
+      data[7] = arrayCopy(value);
     }
-    return function(object) {
-      var length = props.length,
-          result = false;
+    // Use source `ary` if it's smaller.
+    if (srcBitmask & ARY_FLAG) {
+      data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+    }
+    // Use source `arity` if one is not provided.
+    if (data[9] == null) {
+      data[9] = source[9];
+    }
+    // Use source `func` and merge bitmasks.
+    data[0] = source[0];
+    data[1] = newBitmask;
 
-      while (length--) {
-        if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) {
-          break;
-        }
-      }
-      return result;
-    };
+    return data;
   }
 
   /**
-   * Creates a function that will delay the execution of `func` until after
-   * `wait` milliseconds have elapsed since the last time it was invoked.
-   * Provide an options object to indicate that `func` should be invoked on
-   * the leading and/or trailing edge of the `wait` timeout. Subsequent calls
-   * to the debounced function will return the result of the last `func` call.
+   * A specialized version of `_.pick` which picks `object` properties specified
+   * by `props`.
    *
-   * Note: If `leading` and `trailing` options are `true` `func` will be called
-   * on the trailing edge of the timeout only if the the debounced function is
-   * invoked more than once during the `wait` timeout.
+   * @private
+   * @param {Object} object The source object.
+   * @param {string[]} props The property names to pick.
+   * @returns {Object} Returns the new object.
+   */
+  function pickByArray(object, props) {
+    object = toObject(object);
+
+    var index = -1,
+        length = props.length,
+        result = {};
+
+    while (++index < length) {
+      var key = props[index];
+      if (key in object) {
+        result[key] = object[key];
+      }
+    }
+    return result;
+  }
+
+  /**
+   * A specialized version of `_.pick` which picks `object` properties `predicate`
+   * returns truthy for.
    *
-   * @static
-   * @memberOf _
-   * @category Functions
-   * @param {Function} func The function to debounce.
-   * @param {number} wait The number of milliseconds to delay.
-   * @param {Object} [options] The options object.
-   * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout.
-   * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called.
-   * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout.
-   * @returns {Function} Returns the new debounced function.
-   * @example
+   * @private
+   * @param {Object} object The source object.
+   * @param {Function} predicate The function invoked per iteration.
+   * @returns {Object} Returns the new object.
+   */
+  function pickByCallback(object, predicate) {
+    var result = {};
+    baseForIn(object, function(value, key, object) {
+      if (predicate(value, key, object)) {
+        result[key] = value;
+      }
+    });
+    return result;
+  }
+
+  /**
+   * Reorder `array` according to the specified indexes where the element at
+   * the first index is assigned as the first element, the element at
+   * the second index is assigned as the second element, and so on.
    *
-   * // avoid costly calculations while the window size is in flux
-   * var lazyLayout = _.debounce(calculateLayout, 150);
-   * jQuery(window).on('resize', lazyLayout);
+   * @private
+   * @param {Array} array The array to reorder.
+   * @param {Array} indexes The arranged array indexes.
+   * @returns {Array} Returns `array`.
+   */
+  function reorder(array, indexes) {
+    var arrLength = array.length,
+        length = nativeMin(indexes.length, arrLength),
+        oldArray = arrayCopy(array);
+
+    while (length--) {
+      var index = indexes[length];
+      array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+    }
+    return array;
+  }
+
+  /**
+   * Sets metadata for `func`.
    *
-   * // execute `sendMail` when the click event is fired, debouncing subsequent calls
-   * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
-   *   'leading': true,
-   *   'trailing': false
-   * });
+   * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+   * period of time, it will trip its breaker and transition to an identity function
+   * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
+   * for more details.
    *
-   * // ensure `batchLog` is executed once after 1 second of debounced calls
-   * var source = new EventSource('/stream');
-   * source.addEventListener('message', _.debounce(batchLog, 250, {
-   *   'maxWait': 1000
-   * }, false);
+   * @private
+   * @param {Function} func The function to associate metadata with.
+   * @param {*} data The metadata.
+   * @returns {Function} Returns `func`.
    */
-  function debounce(func, wait, options) {
-    var args,
-        maxTimeoutId,
-        result,
-        stamp,
-        thisArg,
-        timeoutId,
-        trailingCall,
-        lastCalled = 0,
-        maxWait = false,
-        trailing = true;
+  var setData = (function() {
+    var count = 0,
+        lastCalled = 0;
 
-    if (!isFunction(func)) {
-      throw new TypeError;
-    }
-    wait = nativeMax(0, wait) || 0;
-    if (options === true) {
-      var leading = true;
-      trailing = false;
-    } else if (isObject(options)) {
-      leading = options.leading;
-      maxWait = 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0);
-      trailing = 'trailing' in options ? options.trailing : trailing;
-    }
-    var delayed = function() {
-      var remaining = wait - (now() - stamp);
-      if (remaining <= 0) {
-        if (maxTimeoutId) {
-          clearTimeout(maxTimeoutId);
-        }
-        var isCalled = trailingCall;
-        maxTimeoutId = timeoutId = trailingCall = undefined;
-        if (isCalled) {
-          lastCalled = now();
-          result = func.apply(thisArg, args);
-          if (!timeoutId && !maxTimeoutId) {
-            args = thisArg = null;
-          }
+    return function(key, value) {
+      var stamp = now(),
+          remaining = HOT_SPAN - (stamp - lastCalled);
+
+      lastCalled = stamp;
+      if (remaining > 0) {
+        if (++count >= HOT_COUNT) {
+          return key;
         }
       } else {
-        timeoutId = setTimeout(delayed, remaining);
+        count = 0;
       }
+      return baseSetData(key, value);
     };
+  }());
 
-    var maxDelayed = function() {
-      if (timeoutId) {
-        clearTimeout(timeoutId);
-      }
-      maxTimeoutId = timeoutId = trailingCall = undefined;
-      if (trailing || (maxWait !== wait)) {
-        lastCalled = now();
-        result = func.apply(thisArg, args);
-        if (!timeoutId && !maxTimeoutId) {
-          args = thisArg = null;
-        }
-      }
-    };
+  /**
+   * A fallback implementation of `_.isPlainObject` which checks if `value`
+   * is an object created by the `Object` constructor or has a `[[Prototype]]`
+   * of `null`.
+   *
+   * @private
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+   */
+  function shimIsPlainObject(value) {
+    var Ctor,
+        support = lodash.support;
+
+    // Exit early for non `Object` objects.
+    if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value)) ||
+        (!hasOwnProperty.call(value, 'constructor') &&
+          (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) ||
+        (!support.argsTag && isArguments(value))) {
+      return false;
+    }
+    // IE < 9 iterates inherited properties before own properties. If the first
+    // iterated property is an object's own property then there are no inherited
+    // enumerable properties.
+    var result;
+    if (support.ownLast) {
+      baseForIn(value, function(subValue, key, object) {
+        result = hasOwnProperty.call(object, key);
+        return false;
+      });
+      return result !== false;
+    }
+    // In most environments an object's own properties are iterated before
+    // its inherited properties. If the last iterated property is an object's
+    // own property then there are no inherited enumerable properties.
+    baseForIn(value, function(subValue, key) {
+      result = key;
+    });
+    return result === undefined || hasOwnProperty.call(value, result);
+  }
 
-    return function() {
-      args = arguments;
-      stamp = now();
-      thisArg = this;
-      trailingCall = trailing && (timeoutId || !leading);
+  /**
+   * A fallback implementation of `Object.keys` which creates an array of the
+   * own enumerable property names of `object`.
+   *
+   * @private
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the array of property names.
+   */
+  function shimKeys(object) {
+    var props = keysIn(object),
+        propsLength = props.length,
+        length = propsLength && object.length;
 
-      if (maxWait === false) {
-        var leadingCall = leading && !timeoutId;
-      } else {
-        if (!maxTimeoutId && !leading) {
-          lastCalled = stamp;
-        }
-        var remaining = maxWait - (stamp - lastCalled),
-            isCalled = remaining <= 0;
+    var allowIndexes = !!length && isLength(length) &&
+      (isArray(object) || isArguments(object) || isString(object));
 
-        if (isCalled) {
-          if (maxTimeoutId) {
-            maxTimeoutId = clearTimeout(maxTimeoutId);
-          }
-          lastCalled = stamp;
-          result = func.apply(thisArg, args);
-        }
-        else if (!maxTimeoutId) {
-          maxTimeoutId = setTimeout(maxDelayed, remaining);
-        }
-      }
-      if (isCalled && timeoutId) {
-        timeoutId = clearTimeout(timeoutId);
-      }
-      else if (!timeoutId && wait !== maxWait) {
-        timeoutId = setTimeout(delayed, wait);
-      }
-      if (leadingCall) {
-        isCalled = true;
-        result = func.apply(thisArg, args);
-      }
-      if (isCalled && !timeoutId && !maxTimeoutId) {
-        args = thisArg = null;
+    var index = -1,
+        result = [];
+
+    while (++index < propsLength) {
+      var key = props[index];
+      if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+        result.push(key);
       }
-      return result;
-    };
+    }
+    return result;
   }
 
   /**
-   * Creates a function that, when executed, will only call the `func` function
-   * at most once per every `wait` milliseconds. Provide an options object to
-   * indicate that `func` should be invoked on the leading and/or trailing edge
-   * of the `wait` timeout. Subsequent calls to the throttled function will
-   * return the result of the last `func` call.
-   *
-   * Note: If `leading` and `trailing` options are `true` `func` will be called
-   * on the trailing edge of the timeout only if the the throttled function is
-   * invoked more than once during the `wait` timeout.
-   *
-   * @static
-   * @memberOf _
-   * @category Functions
-   * @param {Function} func The function to throttle.
-   * @param {number} wait The number of milliseconds to throttle executions to.
-   * @param {Object} [options] The options object.
-   * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout.
-   * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout.
-   * @returns {Function} Returns the new throttled function.
-   * @example
-   *
-   * // avoid excessively updating the position while scrolling
-   * var throttled = _.throttle(updatePosition, 100);
-   * jQuery(window).on('scroll', throttled);
+   * Converts `value` to an object if it's not one.
    *
-   * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes
-   * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
-   *   'trailing': false
-   * }));
+   * @private
+   * @param {*} value The value to process.
+   * @returns {Object} Returns the object.
    */
-  function throttle(func, wait, options) {
-    var leading = true,
-        trailing = true;
+  function toObject(value) {
+    if (lodash.support.unindexedChars && isString(value)) {
+      var index = -1,
+          length = value.length,
+          result = Object(value);
 
-    if (!isFunction(func)) {
-      throw new TypeError;
-    }
-    if (options === false) {
-      leading = false;
-    } else if (isObject(options)) {
-      leading = 'leading' in options ? options.leading : leading;
-      trailing = 'trailing' in options ? options.trailing : trailing;
+      while (++index < length) {
+        result[index] = value.charAt(index);
+      }
+      return result;
     }
-    debounceOptions.leading = leading;
-    debounceOptions.maxWait = wait;
-    debounceOptions.trailing = trailing;
-
-    return debounce(func, wait, debounceOptions);
+    return isObject(value) ? value : Object(value);
   }
 
-  /*--------------------------------------------------------------------------*/
-
   /**
-   * This method returns the first argument provided to it.
+   * Converts `value` to property path array if it's not one.
    *
-   * @static
-   * @memberOf _
-   * @category Utilities
-   * @param {*} value Any value.
-   * @returns {*} Returns `value`.
-   * @example
+   * @private
+   * @param {*} value The value to process.
+   * @returns {Array} Returns the property path array.
+   */
+  function toPath(value) {
+    if (isArray(value)) {
+      return value;
+    }
+    var result = [];
+    baseToString(value).replace(rePropName, function(match, number, quote, string) {
+      result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+    });
+    return result;
+  }
+
+  /**
+   * Creates a clone of `wrapper`.
    *
-   * var object = { 'name': 'fred' };
-   * _.identity(object) === object;
-   * // => true
+   * @private
+   * @param {Object} wrapper The wrapper to clone.
+   * @returns {Object} Returns the cloned wrapper.
    */
-  function identity(value) {
-    return value;
+  function wrapperClone(wrapper) {
+    return wrapper instanceof LazyWrapper
+      ? wrapper.clone()
+      : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
   }
 
+  /*------------------------------------------------------------------------*/
+
   /**
-   * Adds function properties of a source object to the `lodash` function and
-   * chainable wrapper.
+   * Creates an array of elements split into groups the length of `size`.
+   * If `collection` can't be split evenly, the final chunk will be the remaining
+   * elements.
    *
    * @static
    * @memberOf _
-   * @category Utilities
-   * @param {Object} object The object of function properties to add to `lodash`.
-   * @param {Object} object The object of function properties to add to `lodash`.
+   * @category Array
+   * @param {Array} array The array to process.
+   * @param {number} [size=1] The length of each chunk.
+   * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+   * @returns {Array} Returns the new array containing chunks.
    * @example
    *
-   * _.mixin({
-   *   'capitalize': function(string) {
-   *     return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
-   *   }
-   * });
-   *
-   * _.capitalize('fred');
-   * // => 'Fred'
+   * _.chunk(['a', 'b', 'c', 'd'], 2);
+   * // => [['a', 'b'], ['c', 'd']]
    *
-   * _('fred').capitalize();
-   * // => 'Fred'
+   * _.chunk(['a', 'b', 'c', 'd'], 3);
+   * // => [['a', 'b', 'c'], ['d']]
    */
-  function mixin(object, source) {
-    var ctor = object,
-        isFunc = !source || isFunction(ctor);
-
-    if (!source) {
-      ctor = lodashWrapper;
-      source = object;
-      object = lodash;
+  function chunk(array, size, guard) {
+    if (guard ? isIterateeCall(array, size, guard) : size == null) {
+      size = 1;
+    } else {
+      size = nativeMax(+size || 1, 1);
     }
-    forEach(functions(source), function(methodName) {
-      var func = object[methodName] = source[methodName];
-      if (isFunc) {
-        ctor.prototype[methodName] = function() {
-          var value = this.__wrapped__,
-              args = [value];
+    var index = 0,
+        length = array ? array.length : 0,
+        resIndex = -1,
+        result = Array(ceil(length / size));
 
-          push.apply(args, arguments);
-          var result = func.apply(object, args);
-          if (value && typeof value == 'object' && value === result) {
-            return this;
-          }
-          result = new ctor(result);
-          result.__chain__ = this.__chain__;
-          return result;
-        };
-      }
-    });
+    while (index < length) {
+      result[++resIndex] = baseSlice(array, index, (index += size));
+    }
+    return result;
   }
 
   /**
-   * A no-operation function.
+   * Creates an array with all falsey values removed. The values `false`, `null`,
+   * `0`, `""`, `undefined`, and `NaN` are falsey.
    *
    * @static
    * @memberOf _
-   * @category Utilities
+   * @category Array
+   * @param {Array} array The array to compact.
+   * @returns {Array} Returns the new array of filtered values.
    * @example
    *
-   * var object = { 'name': 'fred' };
-   * _.noop(object) === undefined;
-   * // => true
+   * _.compact([0, 1, false, 2, '', 3]);
+   * // => [1, 2, 3]
    */
-  function noop() {
-    // no operation performed
-  }
+  function compact(array) {
+    var index = -1,
+        length = array ? array.length : 0,
+        resIndex = -1,
+        result = [];
 
-  /*--------------------------------------------------------------------------*/
+    while (++index < length) {
+      var value = array[index];
+      if (value) {
+        result[++resIndex] = value;
+      }
+    }
+    return result;
+  }
 
   /**
-   * Creates a `lodash` object that wraps the given value with explicit
-   * method chaining enabled.
+   * Creates an array of unique `array` values not included in the other
+   * provided arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons.
    *
    * @static
    * @memberOf _
-   * @category Chaining
-   * @param {*} value The value to wrap.
-   * @returns {Object} Returns the wrapper object.
+   * @category Array
+   * @param {Array} array The array to inspect.
+   * @param {...Array} [values] The arrays of values to exclude.
+   * @returns {Array} Returns the new array of filtered values.
    * @example
    *
-   * var characters = [
-   *   { 'name': 'barney',  'age': 36 },
-   *   { 'name': 'fred',    'age': 40 },
-   *   { 'name': 'pebbles', 'age': 1 }
-   * ];
-   *
-   * var youngest = _.chain(characters)
-   *     .sortBy('age')
-   *     .map(function(chr) { return chr.name + ' is ' + chr.age; })
-   *     .first()
-   *     .value();
-   * // => 'pebbles is 1'
+   * _.difference([1, 2, 3], [4, 2]);
+   * // => [1, 3]
    */
-  function chain(value) {
-    value = new lodashWrapper(value);
-    value.__chain__ = true;
-    return value;
-  }
+  var difference = restParam(function(array, values) {
+    return isArrayLike(array)
+      ? baseDifference(array, baseFlatten(values, false, true))
+      : [];
+  });
 
   /**
-   * Enables explicit method chaining on the wrapper object.
+   * Gets the first element of `array`.
    *
-   * @name chain
+   * @static
    * @memberOf _
-   * @category Chaining
-   * @returns {*} Returns the wrapper object.
+   * @alias head
+   * @category Array
+   * @param {Array} array The array to query.
+   * @returns {*} Returns the first element of `array`.
    * @example
    *
-   * var characters = [
-   *   { 'name': 'barney', 'age': 36 },
-   *   { 'name': 'fred',   'age': 40 }
-   * ];
-   *
-   * // without explicit chaining
-   * _(characters).first();
-   * // => { 'name': 'barney', 'age': 36 }
+   * _.first([1, 2, 3]);
+   * // => 1
    *
-   * // with explicit chaining
-   * _(characters).chain()
-   *   .first()
-   *   .pick('age')
-   *   .value()
-   * // => { 'age': 36 }
+   * _.first([]);
+   * // => undefined
    */
-  function wrapperChain() {
-    this.__chain__ = true;
-    return this;
+  function first(array) {
+    return array ? array[0] : undefined;
   }
 
   /**
-   * Produces the `toString` result of the wrapped value.
+   * Flattens a nested array. If `isDeep` is `true` the array is recursively
+   * flattened, otherwise it is only flattened a single level.
    *
-   * @name toString
+   * @static
    * @memberOf _
-   * @category Chaining
-   * @returns {string} Returns the string result.
+   * @category Array
+   * @param {Array} array The array to flatten.
+   * @param {boolean} [isDeep] Specify a deep flatten.
+   * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+   * @returns {Array} Returns the new flattened array.
    * @example
    *
-   * _([1, 2, 3]).toString();
-   * // => '1,2,3'
+   * _.flatten([1, [2, 3, [4]]]);
+   * // => [1, 2, 3, [4]]
+   *
+   * // using `isDeep`
+   * _.flatten([1, [2, 3, [4]]], true);
+   * // => [1, 2, 3, 4]
    */
-  function wrapperToString() {
-    return String(this.__wrapped__);
+  function flatten(array, isDeep, guard) {
+    var length = array ? array.length : 0;
+    if (guard && isIterateeCall(array, isDeep, guard)) {
+      isDeep = false;
+    }
+    return length ? baseFlatten(array, isDeep) : [];
   }
 
   /**
-   * Extracts the wrapped value.
+   * Gets the index at which the first occurrence of `value` is found in `array`
+   * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons. If `fromIndex` is negative, it is used as the offset
+   * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
+   * performs a faster binary search.
    *
-   * @name valueOf
+   * @static
    * @memberOf _
-   * @alias value
-   * @category Chaining
-   * @returns {*} Returns the wrapped value.
+   * @category Array
+   * @param {Array} array The array to search.
+   * @param {*} value The value to search for.
+   * @param {boolean|number} [fromIndex=0] The index to search from or `true`
+   *  to perform a binary search on a sorted array.
+   * @returns {number} Returns the index of the matched value, else `-1`.
    * @example
    *
-   * _([1, 2, 3]).valueOf();
-   * // => [1, 2, 3]
+   * _.indexOf([1, 2, 1, 2], 2);
+   * // => 1
+   *
+   * // using `fromIndex`
+   * _.indexOf([1, 2, 1, 2], 2, 2);
+   * // => 3
+   *
+   * // performing a binary search
+   * _.indexOf([1, 1, 2, 2], 2, true);
+   * // => 2
    */
-  function wrapperValueOf() {
-    return this.__wrapped__;
-  }
-
-  /*--------------------------------------------------------------------------*/
-
-  lodash.assign = assign;
-  lodash.bind = bind;
-  lodash.chain = chain;
-  lodash.compact = compact;
-  lodash.createCallback = createCallback;
-  lodash.debounce = debounce;
-  lodash.difference = difference;
-  lodash.filter = filter;
-  lodash.flatten = flatten;
-  lodash.forEach = forEach;
-  lodash.forIn = forIn;
-  lodash.forOwn = forOwn;
-  lodash.functions = functions;
-  lodash.groupBy = groupBy;
-  lodash.intersection = intersection;
-  lodash.keys = keys;
-  lodash.map = map;
-  lodash.merge = merge;
-  lodash.omit = omit;
-  lodash.pairs = pairs;
-  lodash.pick = pick;
-  lodash.pluck = pluck;
-  lodash.reject = reject;
-  lodash.throttle = throttle;
-  lodash.union = union;
-  lodash.uniq = uniq;
-  lodash.values = values;
-  lodash.without = without;
-
-  // add aliases
-  lodash.collect = map;
-  lodash.each = forEach;
-  lodash.extend = assign;
-  lodash.methods = functions;
-  lodash.select = filter;
-  lodash.unique = uniq;
-
-  // add functions to `lodash.prototype`
-  mixin(lodash);
-
-  /*--------------------------------------------------------------------------*/
-
-  // add functions that return unwrapped values when chaining
-  lodash.clone = clone;
-  lodash.cloneDeep = cloneDeep;
-  lodash.contains = contains;
-  lodash.every = every;
-  lodash.find = find;
-  lodash.identity = identity;
-  lodash.indexOf = indexOf;
-  lodash.isArguments = isArguments;
-  lodash.isArray = isArray;
-  lodash.isEmpty = isEmpty;
-  lodash.isEqual = isEqual;
-  lodash.isFunction = isFunction;
-  lodash.isObject = isObject;
-  lodash.isPlainObject = isPlainObject;
-  lodash.isString = isString;
-  lodash.mixin = mixin;
-  lodash.noop = noop;
-  lodash.reduce = reduce;
-  lodash.some = some;
-  lodash.sortedIndex = sortedIndex;
-
-  // add aliases
-  lodash.all = every;
-  lodash.any = some;
-  lodash.detect = find;
-  lodash.findWhere = find;
-  lodash.foldl = reduce;
-  lodash.include = contains;
-  lodash.inject = reduce;
-
-  forOwn(lodash, function(func, methodName) {
-    if (!lodash.prototype[methodName]) {
-      lodash.prototype[methodName] = function() {
-        var args = [this.__wrapped__],
-            chainAll = this.__chain__;
-
-        push.apply(args, arguments);
-        var result = func.apply(lodash, args);
-        return chainAll
-          ? new lodashWrapper(result, chainAll)
-          : result;
-      };
+  function indexOf(array, value, fromIndex) {
+    var length = array ? array.length : 0;
+    if (!length) {
+      return -1;
     }
-  });
-
-  /*--------------------------------------------------------------------------*/
+    if (typeof fromIndex == 'number') {
+      fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+    } else if (fromIndex) {
+      var index = binaryIndex(array, value),
+          other = array[index];
 
-  // add functions capable of returning wrapped and unwrapped values when chaining
-  lodash.first = first;
-  lodash.last = last;
+      if (value === value ? (value === other) : (other !== other)) {
+        return index;
+      }
+      return -1;
+    }
+    return baseIndexOf(array, value, fromIndex || 0);
+  }
 
-  // add aliases
-  lodash.take = first;
-  lodash.head = first;
+  /**
+   * Creates an array of unique values that are included in all of the provided
+   * arrays using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons.
+   *
+   * @static
+   * @memberOf _
+   * @category Array
+   * @param {...Array} [arrays] The arrays to inspect.
+   * @returns {Array} Returns the new array of shared values.
+   * @example
+   * _.intersection([1, 2], [4, 2], [2, 1]);
+   * // => [2]
+   */
+  var intersection = restParam(function(arrays) {
+    var othLength = arrays.length,
+        othIndex = othLength,
+        caches = Array(length),
+        indexOf = getIndexOf(),
+        isCommon = indexOf == baseIndexOf,
+        result = [];
 
-  forOwn(lodash, function(func, methodName) {
-    var callbackable = methodName !== 'sample';
-    if (!lodash.prototype[methodName]) {
-      lodash.prototype[methodName]= function(n, guard) {
-        var chainAll = this.__chain__,
-            result = func(this.__wrapped__, n, guard);
+    while (othIndex--) {
+      var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
+      caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
+    }
+    var array = arrays[0],
+        index = -1,
+        length = array ? array.length : 0,
+        seen = caches[0];
 
-        return !chainAll && (n == null || (guard && !(callbackable && typeof n == 'function')))
-          ? result
-          : new lodashWrapper(result, chainAll);
-      };
+    outer:
+    while (++index < length) {
+      value = array[index];
+      if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
+        var othIndex = othLength;
+        while (--othIndex) {
+          var cache = caches[othIndex];
+          if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
+            continue outer;
+          }
+        }
+        if (seen) {
+          seen.push(value);
+        }
+        result.push(value);
+      }
     }
+    return result;
   });
 
-  /*--------------------------------------------------------------------------*/
-
   /**
-   * The semantic version number.
+   * Gets the last element of `array`.
    *
    * @static
    * @memberOf _
-   * @type string
+   * @category Array
+   * @param {Array} array The array to query.
+   * @returns {*} Returns the last element of `array`.
+   * @example
+   *
+   * _.last([1, 2, 3]);
+   * // => 3
    */
-  lodash.VERSION = '2.3.0';
+  function last(array) {
+    var length = array ? array.length : 0;
+    return length ? array[length - 1] : undefined;
+  }
 
-  // add "Chaining" functions to the wrapper
-  lodash.prototype.chain = wrapperChain;
-  lodash.prototype.toString = wrapperToString;
-  lodash.prototype.value = wrapperValueOf;
-  lodash.prototype.valueOf = wrapperValueOf;
+  /**
+   * Creates an array of unique values, in order, from all of the provided arrays
+   * using [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons.
+   *
+   * @static
+   * @memberOf _
+   * @category Array
+   * @param {...Array} [arrays] The arrays to inspect.
+   * @returns {Array} Returns the new array of combined values.
+   * @example
+   *
+   * _.union([1, 2], [4, 2], [2, 1]);
+   * // => [1, 2, 4]
+   */
+  var union = restParam(function(arrays) {
+    return baseUniq(baseFlatten(arrays, false, true));
+  });
 
-  // add `Array` functions that return unwrapped values
-  baseEach(['join', 'pop', 'shift'], function(methodName) {
-    var func = arrayRef[methodName];
-    lodash.prototype[methodName] = function() {
-      var chainAll = this.__chain__,
-          result = func.apply(this.__wrapped__, arguments);
+  /**
+   * Creates a duplicate-free version of an array, using
+   * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons, in which only the first occurence of each element
+   * is kept. Providing `true` for `isSorted` performs a faster search algorithm
+   * for sorted arrays. If an iteratee function is provided it is invoked for
+   * each element in the array to generate the criterion by which uniqueness
+   * is computed. The `iteratee` is bound to `thisArg` and invoked with three
+   * arguments: (value, index, array).
+   *
+   * If a property name is provided for `iteratee` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `iteratee` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias unique
+   * @category Array
+   * @param {Array} array The array to inspect.
+   * @param {boolean} [isSorted] Specify the array is sorted.
+   * @param {Function|Object|string} [iteratee] The function invoked per iteration.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {Array} Returns the new duplicate-value-free array.
+   * @example
+   *
+   * _.uniq([2, 1, 2]);
+   * // => [2, 1]
+   *
+   * // using `isSorted`
+   * _.uniq([1, 1, 2], true);
+   * // => [1, 2]
+   *
+   * // using an iteratee function
+   * _.uniq([1, 2.5, 1.5, 2], function(n) {
+   *   return this.floor(n);
+   * }, Math);
+   * // => [1, 2.5]
+   *
+   * // using the `_.property` callback shorthand
+   * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+   * // => [{ 'x': 1 }, { 'x': 2 }]
+   */
+  function uniq(array, isSorted, iteratee, thisArg) {
+    var length = array ? array.length : 0;
+    if (!length) {
+      return [];
+    }
+    if (isSorted != null && typeof isSorted != 'boolean') {
+      thisArg = iteratee;
+      iteratee = isIterateeCall(array, isSorted, thisArg) ? null : isSorted;
+      isSorted = false;
+    }
+    var callback = getCallback();
+    if (!(iteratee == null && callback === baseCallback)) {
+      iteratee = callback(iteratee, thisArg, 3);
+    }
+    return (isSorted && getIndexOf() == baseIndexOf)
+      ? sortedUniq(array, iteratee)
+      : baseUniq(array, iteratee);
+  }
 
-      return chainAll
-        ? new lodashWrapper(result, chainAll)
-        : result;
-    };
+  /**
+   * Creates an array excluding all provided values using
+   * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons.
+   *
+   * @static
+   * @memberOf _
+   * @category Array
+   * @param {Array} array The array to filter.
+   * @param {...*} [values] The values to exclude.
+   * @returns {Array} Returns the new array of filtered values.
+   * @example
+   *
+   * _.without([1, 2, 1, 3], 1, 2);
+   * // => [3]
+   */
+  var without = restParam(function(array, values) {
+    return isArrayLike(array)
+      ? baseDifference(array, values)
+      : [];
   });
 
-  // add `Array` functions that return the wrapped value
-  baseEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
-    var func = arrayRef[methodName];
-    lodash.prototype[methodName] = function() {
-      func.apply(this.__wrapped__, arguments);
-      return this;
-    };
-  });
+  /*------------------------------------------------------------------------*/
 
-  // add `Array` functions that return new wrapped values
-  baseEach(['concat', 'slice', 'splice'], function(methodName) {
-    var func = arrayRef[methodName];
-    lodash.prototype[methodName] = function() {
-      return new lodashWrapper(func.apply(this.__wrapped__, arguments), this.__chain__);
-    };
-  });
+  /**
+   * Creates a `lodash` object that wraps `value` with explicit method
+   * chaining enabled.
+   *
+   * @static
+   * @memberOf _
+   * @category Chain
+   * @param {*} value The value to wrap.
+   * @returns {Object} Returns the new `lodash` wrapper instance.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney',  'age': 36 },
+   *   { 'user': 'fred',    'age': 40 },
+   *   { 'user': 'pebbles', 'age': 1 }
+   * ];
+   *
+   * var youngest = _.chain(users)
+   *   .sortBy('age')
+   *   .map(function(chr) {
+   *     return chr.user + ' is ' + chr.age;
+   *   })
+   *   .first()
+   *   .value();
+   * // => 'pebbles is 1'
+   */
+  function chain(value) {
+    var result = lodash(value);
+    result.__chain__ = true;
+    return result;
+  }
 
-  // avoid array-like object bugs with `Array#shift` and `Array#splice`
-  // in IE < 9, Firefox < 10, Narwhal, and RingoJS
-  if (!support.spliceObjects) {
-    baseEach(['pop', 'shift', 'splice'], function(methodName) {
-      var func = arrayRef[methodName],
-          isSplice = methodName == 'splice';
+  /**
+   * This method invokes `interceptor` and returns `value`. The interceptor is
+   * bound to `thisArg` and invoked with one argument; (value). The purpose of
+   * this method is to "tap into" a method chain in order to perform operations
+   * on intermediate results within the chain.
+   *
+   * @static
+   * @memberOf _
+   * @category Chain
+   * @param {*} value The value to provide to `interceptor`.
+   * @param {Function} interceptor The function to invoke.
+   * @param {*} [thisArg] The `this` binding of `interceptor`.
+   * @returns {*} Returns `value`.
+   * @example
+   *
+   * _([1, 2, 3])
+   *  .tap(function(array) {
+   *    array.pop();
+   *  })
+   *  .reverse()
+   *  .value();
+   * // => [2, 1]
+   */
+  function tap(value, interceptor, thisArg) {
+    interceptor.call(thisArg, value);
+    return value;
+  }
 
-      lodash.prototype[methodName] = function() {
-        var chainAll = this.__chain__,
-            value = this.__wrapped__,
-            result = func.apply(value, arguments);
+  /**
+   * This method is like `_.tap` except that it returns the result of `interceptor`.
+   *
+   * @static
+   * @memberOf _
+   * @category Chain
+   * @param {*} value The value to provide to `interceptor`.
+   * @param {Function} interceptor The function to invoke.
+   * @param {*} [thisArg] The `this` binding of `interceptor`.
+   * @returns {*} Returns the result of `interceptor`.
+   * @example
+   *
+   * _('  abc  ')
+   *  .chain()
+   *  .trim()
+   *  .thru(function(value) {
+   *    return [value];
+   *  })
+   *  .value();
+   * // => ['abc']
+   */
+  function thru(value, interceptor, thisArg) {
+    return interceptor.call(thisArg, value);
+  }
 
-        if (value.length === 0) {
-          delete value[0];
-        }
-        return (chainAll || isSplice)
-          ? new lodashWrapper(result, chainAll)
-          : result;
-      };
-    });
+  /**
+   * Enables explicit method chaining on the wrapper object.
+   *
+   * @name chain
+   * @memberOf _
+   * @category Chain
+   * @returns {Object} Returns the new `lodash` wrapper instance.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36 },
+   *   { 'user': 'fred',   'age': 40 }
+   * ];
+   *
+   * // without explicit chaining
+   * _(users).first();
+   * // => { 'user': 'barney', 'age': 36 }
+   *
+   * // with explicit chaining
+   * _(users).chain()
+   *   .first()
+   *   .pick('user')
+   *   .value();
+   * // => { 'user': 'barney' }
+   */
+  function wrapperChain() {
+    return chain(this);
   }
 
-  /*--------------------------------------------------------------------------*/
+  /**
+   * Executes the chained sequence and returns the wrapped result.
+   *
+   * @name commit
+   * @memberOf _
+   * @category Chain
+   * @returns {Object} Returns the new `lodash` wrapper instance.
+   * @example
+   *
+   * var array = [1, 2];
+   * var wrapper = _(array).push(3);
+   *
+   * console.log(array);
+   * // => [1, 2]
+   *
+   * wrapper = wrapper.commit();
+   * console.log(array);
+   * // => [1, 2, 3]
+   *
+   * wrapper.last();
+   * // => 3
+   *
+   * console.log(array);
+   * // => [1, 2, 3]
+   */
+  function wrapperCommit() {
+    return new LodashWrapper(this.value(), this.__chain__);
+  }
 
-  if (freeExports && freeModule) {
-    // in Node.js or RingoJS
-    if (moduleExports) {
-      (freeModule.exports = lodash)._ = lodash;
+  /**
+   * Creates a clone of the chained sequence planting `value` as the wrapped value.
+   *
+   * @name plant
+   * @memberOf _
+   * @category Chain
+   * @returns {Object} Returns the new `lodash` wrapper instance.
+   * @example
+   *
+   * var array = [1, 2];
+   * var wrapper = _(array).map(function(value) {
+   *   return Math.pow(value, 2);
+   * });
+   *
+   * var other = [3, 4];
+   * var otherWrapper = wrapper.plant(other);
+   *
+   * otherWrapper.value();
+   * // => [9, 16]
+   *
+   * wrapper.value();
+   * // => [1, 4]
+   */
+  function wrapperPlant(value) {
+    var result,
+        parent = this;
+
+    while (parent instanceof baseLodash) {
+      var clone = wrapperClone(parent);
+      if (result) {
+        previous.__wrapped__ = clone;
+      } else {
+        result = clone;
+      }
+      var previous = clone;
+      parent = parent.__wrapped__;
     }
-
+    previous.__wrapped__ = value;
+    return result;
   }
-  else {
-    // in a browser or Rhino
-    root._ = lodash;
+
+  /**
+   * Reverses the wrapped array so the first element becomes the last, the
+   * second element becomes the second to last, and so on.
+   *
+   * **Note:** This method mutates the wrapped array.
+   *
+   * @name reverse
+   * @memberOf _
+   * @category Chain
+   * @returns {Object} Returns the new reversed `lodash` wrapper instance.
+   * @example
+   *
+   * var array = [1, 2, 3];
+   *
+   * _(array).reverse().value()
+   * // => [3, 2, 1]
+   *
+   * console.log(array);
+   * // => [3, 2, 1]
+   */
+  function wrapperReverse() {
+    var value = this.__wrapped__;
+    if (value instanceof LazyWrapper) {
+      if (this.__actions__.length) {
+        value = new LazyWrapper(this);
+      }
+      return new LodashWrapper(value.reverse(), this.__chain__);
+    }
+    return this.thru(function(value) {
+      return value.reverse();
+    });
   }
-}.call(this));
-(function(e){if("function"==typeof bootstrap)bootstrap("osmauth",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeOsmAuth=e}else"undefined"!=typeof window?window.osmAuth=e():global.osmAuth=e()})(function(){var define,ses,bootstrap,module,exports;
-return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
-'use strict';
 
-var ohauth = require('ohauth'),
-    xtend = require('xtend'),
-    store = require('store');
+  /**
+   * Produces the result of coercing the unwrapped value to a string.
+   *
+   * @name toString
+   * @memberOf _
+   * @category Chain
+   * @returns {string} Returns the coerced string value.
+   * @example
+   *
+   * _([1, 2, 3]).toString();
+   * // => '1,2,3'
+   */
+  function wrapperToString() {
+    return (this.value() + '');
+  }
 
-// # osm-auth
-//
-// This code is only compatible with IE10+ because the [XDomainRequest](http://bit.ly/LfO7xo)
-// object, IE<10's idea of [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing),
-// does not support custom headers, which this uses everywhere.
-module.exports = function(o) {
+  /**
+   * Executes the chained sequence to extract the unwrapped value.
+   *
+   * @name value
+   * @memberOf _
+   * @alias run, toJSON, valueOf
+   * @category Chain
+   * @returns {*} Returns the resolved unwrapped value.
+   * @example
+   *
+   * _([1, 2, 3]).value();
+   * // => [1, 2, 3]
+   */
+  function wrapperValue() {
+    return baseWrapperValue(this.__wrapped__, this.__actions__);
+  }
 
-    var oauth = {};
+  /*------------------------------------------------------------------------*/
 
-    // authenticated users will also have a request token secret, but it's
-    // not used in transactions with the server
-    oauth.authenticated = function() {
-        return !!(token('oauth_token') && token('oauth_token_secret'));
-    };
+  /**
+   * Checks if `predicate` returns truthy for **all** elements of `collection`.
+   * The predicate is bound to `thisArg` and invoked with three arguments:
+   * (value, index|key, collection).
+   *
+   * If a property name is provided for `predicate` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `predicate` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias all
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [predicate=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {boolean} Returns `true` if all elements pass the predicate check,
+   *  else `false`.
+   * @example
+   *
+   * _.every([true, 1, null, 'yes'], Boolean);
+   * // => false
+   *
+   * var users = [
+   *   { 'user': 'barney', 'active': false },
+   *   { 'user': 'fred',   'active': false }
+   * ];
+   *
+   * // using the `_.matches` callback shorthand
+   * _.every(users, { 'user': 'barney', 'active': false });
+   * // => false
+   *
+   * // using the `_.matchesProperty` callback shorthand
+   * _.every(users, 'active', false);
+   * // => true
+   *
+   * // using the `_.property` callback shorthand
+   * _.every(users, 'active');
+   * // => false
+   */
+  function every(collection, predicate, thisArg) {
+    var func = isArray(collection) ? arrayEvery : baseEvery;
+    if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+      predicate = null;
+    }
+    if (typeof predicate != 'function' || thisArg !== undefined) {
+      predicate = getCallback(predicate, thisArg, 3);
+    }
+    return func(collection, predicate);
+  }
 
-    oauth.logout = function() {
-        token('oauth_token', '');
-        token('oauth_token_secret', '');
-        token('oauth_request_token_secret', '');
-        return oauth;
-    };
+  /**
+   * Iterates over elements of `collection`, returning an array of all elements
+   * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+   * invoked with three arguments: (value, index|key, collection).
+   *
+   * If a property name is provided for `predicate` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `predicate` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias select
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [predicate=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {Array} Returns the new filtered array.
+   * @example
+   *
+   * _.filter([4, 5, 6], function(n) {
+   *   return n % 2 == 0;
+   * });
+   * // => [4, 6]
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36, 'active': true },
+   *   { 'user': 'fred',   'age': 40, 'active': false }
+   * ];
+   *
+   * // using the `_.matches` callback shorthand
+   * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
+   * // => ['barney']
+   *
+   * // using the `_.matchesProperty` callback shorthand
+   * _.pluck(_.filter(users, 'active', false), 'user');
+   * // => ['fred']
+   *
+   * // using the `_.property` callback shorthand
+   * _.pluck(_.filter(users, 'active'), 'user');
+   * // => ['barney']
+   */
+  function filter(collection, predicate, thisArg) {
+    var func = isArray(collection) ? arrayFilter : baseFilter;
+    predicate = getCallback(predicate, thisArg, 3);
+    return func(collection, predicate);
+  }
 
-    // TODO: detect lack of click event
-    oauth.authenticate = function(callback) {
-        if (oauth.authenticated()) return callback();
+  /**
+   * Iterates over elements of `collection`, returning the first element
+   * `predicate` returns truthy for. The predicate is bound to `thisArg` and
+   * invoked with three arguments: (value, index|key, collection).
+   *
+   * If a property name is provided for `predicate` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `predicate` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias detect
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to search.
+   * @param {Function|Object|string} [predicate=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {*} Returns the matched element, else `undefined`.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney',  'age': 36, 'active': true },
+   *   { 'user': 'fred',    'age': 40, 'active': false },
+   *   { 'user': 'pebbles', 'age': 1,  'active': true }
+   * ];
+   *
+   * _.result(_.find(users, function(chr) {
+   *   return chr.age < 40;
+   * }), 'user');
+   * // => 'barney'
+   *
+   * // using the `_.matches` callback shorthand
+   * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
+   * // => 'pebbles'
+   *
+   * // using the `_.matchesProperty` callback shorthand
+   * _.result(_.find(users, 'active', false), 'user');
+   * // => 'fred'
+   *
+   * // using the `_.property` callback shorthand
+   * _.result(_.find(users, 'active'), 'user');
+   * // => 'barney'
+   */
+  var find = createFind(baseEach);
 
-        oauth.logout();
+  /**
+   * Iterates over elements of `collection` invoking `iteratee` for each element.
+   * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+   * (value, index|key, collection). Iteratee functions may exit iteration early
+   * by explicitly returning `false`.
+   *
+   * **Note:** As with other "Collections" methods, objects with a "length" property
+   * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
+   * may be used for object iteration.
+   *
+   * @static
+   * @memberOf _
+   * @alias each
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {Array|Object|string} Returns `collection`.
+   * @example
+   *
+   * _([1, 2]).forEach(function(n) {
+   *   console.log(n);
+   * }).value();
+   * // => logs each value from left to right and returns the array
+   *
+   * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
+   *   console.log(n, key);
+   * });
+   * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
+   */
+  var forEach = createForEach(arrayEach, baseEach);
 
-        // ## Getting a request token
-        var params = timenonce(getAuth(o)),
-            url = o.url + '/oauth/request_token';
+  /**
+   * Creates an object composed of keys generated from the results of running
+   * each element of `collection` through `iteratee`. The corresponding value
+   * of each key is an array of the elements responsible for generating the key.
+   * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+   * (value, index|key, collection).
+   *
+   * If a property name is provided for `iteratee` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `iteratee` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {Object} Returns the composed aggregate object.
+   * @example
+   *
+   * _.groupBy([4.2, 6.1, 6.4], function(n) {
+   *   return Math.floor(n);
+   * });
+   * // => { '4': [4.2], '6': [6.1, 6.4] }
+   *
+   * _.groupBy([4.2, 6.1, 6.4], function(n) {
+   *   return this.floor(n);
+   * }, Math);
+   * // => { '4': [4.2], '6': [6.1, 6.4] }
+   *
+   * // using the `_.property` callback shorthand
+   * _.groupBy(['one', 'two', 'three'], 'length');
+   * // => { '3': ['one', 'two'], '5': ['three'] }
+   */
+  var groupBy = createAggregator(function(result, value, key) {
+    if (hasOwnProperty.call(result, key)) {
+      result[key].push(value);
+    } else {
+      result[key] = [value];
+    }
+  });
 
-        params.oauth_signature = ohauth.signature(
-            o.oauth_secret, '',
-            ohauth.baseString('POST', url, params));
+  /**
+   * Checks if `value` is in `collection` using
+   * [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero)
+   * for equality comparisons. If `fromIndex` is negative, it is used as the offset
+   * from the end of `collection`.
+   *
+   * @static
+   * @memberOf _
+   * @alias contains, include
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to search.
+   * @param {*} target The value to search for.
+   * @param {number} [fromIndex=0] The index to search from.
+   * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
+   * @returns {boolean} Returns `true` if a matching element is found, else `false`.
+   * @example
+   *
+   * _.includes([1, 2, 3], 1);
+   * // => true
+   *
+   * _.includes([1, 2, 3], 1, 2);
+   * // => false
+   *
+   * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+   * // => true
+   *
+   * _.includes('pebbles', 'eb');
+   * // => true
+   */
+  function includes(collection, target, fromIndex, guard) {
+    var length = collection ? getLength(collection) : 0;
+    if (!isLength(length)) {
+      collection = values(collection);
+      length = collection.length;
+    }
+    if (!length) {
+      return false;
+    }
+    if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
+      fromIndex = 0;
+    } else {
+      fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
+    }
+    return (typeof collection == 'string' || !isArray(collection) && isString(collection))
+      ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1)
+      : (getIndexOf(collection, target, fromIndex) > -1);
+  }
 
-        if (!o.singlepage) {
-            // Create a 600x550 popup window in the center of the screen
-            var w = 600, h = 550,
-                settings = [
-                    ['width', w], ['height', h],
-                    ['left', screen.width / 2 - w / 2],
-                    ['top', screen.height / 2 - h / 2]].map(function(x) {
-                        return x.join('=');
-                    }).join(','),
-                popup = window.open('about:blank', 'oauth_window', settings);
-        }
+  /**
+   * Creates an array of values by running each element in `collection` through
+   * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
+   * arguments: (value, index|key, collection).
+   *
+   * If a property name is provided for `iteratee` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `iteratee` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * Many lodash methods are guarded to work as iteratees for methods like
+   * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+   *
+   * The guarded methods are:
+   * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
+   * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
+   * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
+   * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
+   * `sum`, `uniq`, and `words`
+   *
+   * @static
+   * @memberOf _
+   * @alias collect
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {Array} Returns the new mapped array.
+   * @example
+   *
+   * function timesThree(n) {
+   *   return n * 3;
+   * }
+   *
+   * _.map([1, 2], timesThree);
+   * // => [3, 6]
+   *
+   * _.map({ 'a': 1, 'b': 2 }, timesThree);
+   * // => [3, 6] (iteration order is not guaranteed)
+   *
+   * var users = [
+   *   { 'user': 'barney' },
+   *   { 'user': 'fred' }
+   * ];
+   *
+   * // using the `_.property` callback shorthand
+   * _.map(users, 'user');
+   * // => ['barney', 'fred']
+   */
+  function map(collection, iteratee, thisArg) {
+    var func = isArray(collection) ? arrayMap : baseMap;
+    iteratee = getCallback(iteratee, thisArg, 3);
+    return func(collection, iteratee);
+  }
 
-        // Request a request token. When this is complete, the popup
-        // window is redirected to OSM's authorization page.
-        ohauth.xhr('POST', url, params, null, {}, reqTokenDone);
-        o.loading();
+  /**
+   * Gets the property value of `path` from all elements in `collection`.
+   *
+   * @static
+   * @memberOf _
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Array|string} path The path of the property to pluck.
+   * @returns {Array} Returns the property values.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36 },
+   *   { 'user': 'fred',   'age': 40 }
+   * ];
+   *
+   * _.pluck(users, 'user');
+   * // => ['barney', 'fred']
+   *
+   * var userIndex = _.indexBy(users, 'user');
+   * _.pluck(userIndex, 'age');
+   * // => [36, 40] (iteration order is not guaranteed)
+   */
+  function pluck(collection, path) {
+    return map(collection, property(path));
+  }
 
-        function reqTokenDone(err, xhr) {
-            o.done();
-            if (err) return callback(err);
-            var resp = ohauth.stringQs(xhr.response);
-            token('oauth_request_token_secret', resp.oauth_token_secret);
-            var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
-                oauth_token: resp.oauth_token,
-                oauth_callback: location.href.replace('index.html', '')
-                    .replace(/#.*/, '') + o.landing
-            });
+  /**
+   * Reduces `collection` to a value which is the accumulated result of running
+   * each element in `collection` through `iteratee`, where each successive
+   * invocation is supplied the return value of the previous. If `accumulator`
+   * is not provided the first element of `collection` is used as the initial
+   * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
+   * (accumulator, value, index|key, collection).
+   *
+   * Many lodash methods are guarded to work as iteratees for methods like
+   * `_.reduce`, `_.reduceRight`, and `_.transform`.
+   *
+   * The guarded methods are:
+   * `assign`, `defaults`, `includes`, `merge`, `sortByAll`, and `sortByOrder`
+   *
+   * @static
+   * @memberOf _
+   * @alias foldl, inject
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+   * @param {*} [accumulator] The initial value.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {*} Returns the accumulated value.
+   * @example
+   *
+   * _.reduce([1, 2], function(total, n) {
+   *   return total + n;
+   * });
+   * // => 3
+   *
+   * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
+   *   result[key] = n * 3;
+   *   return result;
+   * }, {});
+   * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
+   */
+  var reduce = createReduce(arrayReduce, baseEach);
 
-            if (o.singlepage) {
-                location.href = authorize_url;
-            } else {
-                popup.location = authorize_url;
-            }
-        }
-
-        // Called by a function in a landing page, in the popup window. The
-        // window closes itself.
-        window.authComplete = function(token) {
-            var oauth_token = ohauth.stringQs(token.split('?')[1]);
-            get_access_token(oauth_token.oauth_token);
-            delete window.authComplete;
-        };
+  /**
+   * The opposite of `_.filter`; this method returns the elements of `collection`
+   * that `predicate` does **not** return truthy for.
+   *
+   * @static
+   * @memberOf _
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [predicate=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {Array} Returns the new filtered array.
+   * @example
+   *
+   * _.reject([1, 2, 3, 4], function(n) {
+   *   return n % 2 == 0;
+   * });
+   * // => [1, 3]
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36, 'active': false },
+   *   { 'user': 'fred',   'age': 40, 'active': true }
+   * ];
+   *
+   * // using the `_.matches` callback shorthand
+   * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
+   * // => ['barney']
+   *
+   * // using the `_.matchesProperty` callback shorthand
+   * _.pluck(_.reject(users, 'active', false), 'user');
+   * // => ['fred']
+   *
+   * // using the `_.property` callback shorthand
+   * _.pluck(_.reject(users, 'active'), 'user');
+   * // => ['barney']
+   */
+  function reject(collection, predicate, thisArg) {
+    var func = isArray(collection) ? arrayFilter : baseFilter;
+    predicate = getCallback(predicate, thisArg, 3);
+    return func(collection, function(value, index, collection) {
+      return !predicate(value, index, collection);
+    });
+  }
 
-        // ## Getting an request token
-        //
-        // At this point we have an `oauth_token`, brought in from a function
-        // call on a landing page popup.
-        function get_access_token(oauth_token) {
-            var url = o.url + '/oauth/access_token',
-                params = timenonce(getAuth(o)),
-                request_token_secret = token('oauth_request_token_secret');
-            params.oauth_token = oauth_token;
-            params.oauth_signature = ohauth.signature(
-                o.oauth_secret,
-                request_token_secret,
-                ohauth.baseString('POST', url, params));
+  /**
+   * Checks if `predicate` returns truthy for **any** element of `collection`.
+   * The function returns as soon as it finds a passing value and does not iterate
+   * over the entire collection. The predicate is bound to `thisArg` and invoked
+   * with three arguments: (value, index|key, collection).
+   *
+   * If a property name is provided for `predicate` the created `_.property`
+   * style callback returns the property value of the given element.
+   *
+   * If a value is also provided for `thisArg` the created `_.matchesProperty`
+   * style callback returns `true` for elements that have a matching property
+   * value, else `false`.
+   *
+   * If an object is provided for `predicate` the created `_.matches` style
+   * callback returns `true` for elements that have the properties of the given
+   * object, else `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias any
+   * @category Collection
+   * @param {Array|Object|string} collection The collection to iterate over.
+   * @param {Function|Object|string} [predicate=_.identity] The function invoked
+   *  per iteration.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {boolean} Returns `true` if any element passes the predicate check,
+   *  else `false`.
+   * @example
+   *
+   * _.some([null, 0, 'yes', false], Boolean);
+   * // => true
+   *
+   * var users = [
+   *   { 'user': 'barney', 'active': true },
+   *   { 'user': 'fred',   'active': false }
+   * ];
+   *
+   * // using the `_.matches` callback shorthand
+   * _.some(users, { 'user': 'barney', 'active': false });
+   * // => false
+   *
+   * // using the `_.matchesProperty` callback shorthand
+   * _.some(users, 'active', false);
+   * // => true
+   *
+   * // using the `_.property` callback shorthand
+   * _.some(users, 'active');
+   * // => true
+   */
+  function some(collection, predicate, thisArg) {
+    var func = isArray(collection) ? arraySome : baseSome;
+    if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+      predicate = null;
+    }
+    if (typeof predicate != 'function' || thisArg !== undefined) {
+      predicate = getCallback(predicate, thisArg, 3);
+    }
+    return func(collection, predicate);
+  }
 
-            // ## Getting an access token
-            //
-            // The final token required for authentication. At this point
-            // we have a `request token secret`
-            ohauth.xhr('POST', url, params, null, {}, accessTokenDone);
-            o.loading();
-        }
+  /*------------------------------------------------------------------------*/
 
-        function accessTokenDone(err, xhr) {
-            o.done();
-            if (err) return callback(err);
-            var access_token = ohauth.stringQs(xhr.response);
-            token('oauth_token', access_token.oauth_token);
-            token('oauth_token_secret', access_token.oauth_token_secret);
-            callback(null, oauth);
-        }
-    };
+  /**
+   * Gets the number of milliseconds that have elapsed since the Unix epoch
+   * (1 January 1970 00:00:00 UTC).
+   *
+   * @static
+   * @memberOf _
+   * @category Date
+   * @example
+   *
+   * _.defer(function(stamp) {
+   *   console.log(_.now() - stamp);
+   * }, _.now());
+   * // => logs the number of milliseconds it took for the deferred function to be invoked
+   */
+  var now = nativeNow || function() {
+    return new Date().getTime();
+  };
 
-    oauth.bootstrapToken = function(oauth_token, callback) {
-        // ## Getting an request token
-        // At this point we have an `oauth_token`, brought in from a function
-        // call on a landing page popup.
-        function get_access_token(oauth_token) {
-            var url = o.url + '/oauth/access_token',
-                params = timenonce(getAuth(o)),
-                request_token_secret = token('oauth_request_token_secret');
-            params.oauth_token = oauth_token;
-            params.oauth_signature = ohauth.signature(
-                o.oauth_secret,
-                request_token_secret,
-                ohauth.baseString('POST', url, params));
+  /*------------------------------------------------------------------------*/
 
-            // ## Getting an access token
-            // The final token required for authentication. At this point
-            // we have a `request token secret`
-            ohauth.xhr('POST', url, params, null, {}, accessTokenDone);
-            o.loading();
-        }
+  /**
+   * Creates a function that invokes `func` with the `this` binding of `thisArg`
+   * and prepends any additional `_.bind` arguments to those provided to the
+   * bound function.
+   *
+   * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+   * may be used as a placeholder for partially applied arguments.
+   *
+   * **Note:** Unlike native `Function#bind` this method does not set the "length"
+   * property of bound functions.
+   *
+   * @static
+   * @memberOf _
+   * @category Function
+   * @param {Function} func The function to bind.
+   * @param {*} thisArg The `this` binding of `func`.
+   * @param {...*} [partials] The arguments to be partially applied.
+   * @returns {Function} Returns the new bound function.
+   * @example
+   *
+   * var greet = function(greeting, punctuation) {
+   *   return greeting + ' ' + this.user + punctuation;
+   * };
+   *
+   * var object = { 'user': 'fred' };
+   *
+   * var bound = _.bind(greet, object, 'hi');
+   * bound('!');
+   * // => 'hi fred!'
+   *
+   * // using placeholders
+   * var bound = _.bind(greet, object, _, '!');
+   * bound('hi');
+   * // => 'hi fred!'
+   */
+  var bind = restParam(function(func, thisArg, partials) {
+    var bitmask = BIND_FLAG;
+    if (partials.length) {
+      var holders = replaceHolders(partials, bind.placeholder);
+      bitmask |= PARTIAL_FLAG;
+    }
+    return createWrapper(func, bitmask, thisArg, partials, holders);
+  });
 
-        function accessTokenDone(err, xhr) {
-            o.done();
-            if (err) return callback(err);
-            var access_token = ohauth.stringQs(xhr.response);
-            token('oauth_token', access_token.oauth_token);
-            token('oauth_token_secret', access_token.oauth_token_secret);
-            callback(null, oauth);
-        }
+  /**
+   * Creates a debounced function that delays invoking `func` until after `wait`
+   * milliseconds have elapsed since the last time the debounced function was
+   * invoked. The debounced function comes with a `cancel` method to cancel
+   * delayed invocations. Provide an options object to indicate that `func`
+   * should be invoked on the leading and/or trailing edge of the `wait` timeout.
+   * Subsequent calls to the debounced function return the result of the last
+   * `func` invocation.
+   *
+   * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+   * on the trailing edge of the timeout only if the the debounced function is
+   * invoked more than once during the `wait` timeout.
+   *
+   * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+   * for details over the differences between `_.debounce` and `_.throttle`.
+   *
+   * @static
+   * @memberOf _
+   * @category Function
+   * @param {Function} func The function to debounce.
+   * @param {number} [wait=0] The number of milliseconds to delay.
+   * @param {Object} [options] The options object.
+   * @param {boolean} [options.leading=false] Specify invoking on the leading
+   *  edge of the timeout.
+   * @param {number} [options.maxWait] The maximum time `func` is allowed to be
+   *  delayed before it is invoked.
+   * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+   *  edge of the timeout.
+   * @returns {Function} Returns the new debounced function.
+   * @example
+   *
+   * // avoid costly calculations while the window size is in flux
+   * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+   *
+   * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
+   * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
+   *   'leading': true,
+   *   'trailing': false
+   * }));
+   *
+   * // ensure `batchLog` is invoked once after 1 second of debounced calls
+   * var source = new EventSource('/stream');
+   * jQuery(source).on('message', _.debounce(batchLog, 250, {
+   *   'maxWait': 1000
+   * }));
+   *
+   * // cancel a debounced call
+   * var todoChanges = _.debounce(batchLog, 1000);
+   * Object.observe(models.todo, todoChanges);
+   *
+   * Object.observe(models, function(changes) {
+   *   if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
+   *     todoChanges.cancel();
+   *   }
+   * }, ['delete']);
+   *
+   * // ...at some point `models.todo` is changed
+   * models.todo.completed = true;
+   *
+   * // ...before 1 second has passed `models.todo` is deleted
+   * // which cancels the debounced `todoChanges` call
+   * delete models.todo;
+   */
+  function debounce(func, wait, options) {
+    var args,
+        maxTimeoutId,
+        result,
+        stamp,
+        thisArg,
+        timeoutId,
+        trailingCall,
+        lastCalled = 0,
+        maxWait = false,
+        trailing = true;
 
-        get_access_token(oauth_token);
-    };
+    if (typeof func != 'function') {
+      throw new TypeError(FUNC_ERROR_TEXT);
+    }
+    wait = wait < 0 ? 0 : (+wait || 0);
+    if (options === true) {
+      var leading = true;
+      trailing = false;
+    } else if (isObject(options)) {
+      leading = options.leading;
+      maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
+      trailing = 'trailing' in options ? options.trailing : trailing;
+    }
 
-    // # xhr
-    //
-    // A single XMLHttpRequest wrapper that does authenticated calls if the
-    // user has logged in.
-    oauth.xhr = function(options, callback) {
-        if (!oauth.authenticated()) {
-            if (o.auto) return oauth.authenticate(run);
-            else return callback('not authenticated', null);
-        } else return run();
+    function cancel() {
+      if (timeoutId) {
+        clearTimeout(timeoutId);
+      }
+      if (maxTimeoutId) {
+        clearTimeout(maxTimeoutId);
+      }
+      maxTimeoutId = timeoutId = trailingCall = undefined;
+    }
 
-        function run() {
-            var params = timenonce(getAuth(o)),
-                url = o.url + options.path,
-                oauth_token_secret = token('oauth_token_secret');
+    function delayed() {
+      var remaining = wait - (now() - stamp);
+      if (remaining <= 0 || remaining > wait) {
+        if (maxTimeoutId) {
+          clearTimeout(maxTimeoutId);
+        }
+        var isCalled = trailingCall;
+        maxTimeoutId = timeoutId = trailingCall = undefined;
+        if (isCalled) {
+          lastCalled = now();
+          result = func.apply(thisArg, args);
+          if (!timeoutId && !maxTimeoutId) {
+            args = thisArg = null;
+          }
+        }
+      } else {
+        timeoutId = setTimeout(delayed, remaining);
+      }
+    }
 
-            // https://tools.ietf.org/html/rfc5849#section-3.4.1.3.1
-            if ((!options.options || !options.options.header ||
-                options.options.header['Content-Type'] === 'application/x-www-form-urlencoded') &&
-                options.content) {
-                params = xtend(params, ohauth.stringQs(options.content));
-            }
+    function maxDelayed() {
+      if (timeoutId) {
+        clearTimeout(timeoutId);
+      }
+      maxTimeoutId = timeoutId = trailingCall = undefined;
+      if (trailing || (maxWait !== wait)) {
+        lastCalled = now();
+        result = func.apply(thisArg, args);
+        if (!timeoutId && !maxTimeoutId) {
+          args = thisArg = null;
+        }
+      }
+    }
 
-            params.oauth_token = token('oauth_token');
-            params.oauth_signature = ohauth.signature(
-                o.oauth_secret,
-                oauth_token_secret,
-                ohauth.baseString(options.method, url, params));
+    function debounced() {
+      args = arguments;
+      stamp = now();
+      thisArg = this;
+      trailingCall = trailing && (timeoutId || !leading);
 
-            ohauth.xhr(options.method,
-                url, params, options.content, options.options, done);
+      if (maxWait === false) {
+        var leadingCall = leading && !timeoutId;
+      } else {
+        if (!maxTimeoutId && !leading) {
+          lastCalled = stamp;
         }
+        var remaining = maxWait - (stamp - lastCalled),
+            isCalled = remaining <= 0 || remaining > maxWait;
 
-        function done(err, xhr) {
-            if (err) return callback(err);
-            else if (xhr.responseXML) return callback(err, xhr.responseXML);
-            else return callback(err, xhr.response);
+        if (isCalled) {
+          if (maxTimeoutId) {
+            maxTimeoutId = clearTimeout(maxTimeoutId);
+          }
+          lastCalled = stamp;
+          result = func.apply(thisArg, args);
         }
-    };
+        else if (!maxTimeoutId) {
+          maxTimeoutId = setTimeout(maxDelayed, remaining);
+        }
+      }
+      if (isCalled && timeoutId) {
+        timeoutId = clearTimeout(timeoutId);
+      }
+      else if (!timeoutId && wait !== maxWait) {
+        timeoutId = setTimeout(delayed, wait);
+      }
+      if (leadingCall) {
+        isCalled = true;
+        result = func.apply(thisArg, args);
+      }
+      if (isCalled && !timeoutId && !maxTimeoutId) {
+        args = thisArg = null;
+      }
+      return result;
+    }
+    debounced.cancel = cancel;
+    return debounced;
+  }
 
-    // pre-authorize this object, if we can just get a token and token_secret
-    // from the start
-    oauth.preauth = function(c) {
-        if (!c) return;
-        if (c.oauth_token) token('oauth_token', c.oauth_token);
-        if (c.oauth_token_secret) token('oauth_token_secret', c.oauth_token_secret);
-        return oauth;
+  /**
+   * Creates a function that invokes `func` with the `this` binding of the
+   * created function and arguments from `start` and beyond provided as an array.
+   *
+   * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
+   *
+   * @static
+   * @memberOf _
+   * @category Function
+   * @param {Function} func The function to apply a rest parameter to.
+   * @param {number} [start=func.length-1] The start position of the rest parameter.
+   * @returns {Function} Returns the new function.
+   * @example
+   *
+   * var say = _.restParam(function(what, names) {
+   *   return what + ' ' + _.initial(names).join(', ') +
+   *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+   * });
+   *
+   * say('hello', 'fred', 'barney', 'pebbles');
+   * // => 'hello fred, barney, & pebbles'
+   */
+  function restParam(func, start) {
+    if (typeof func != 'function') {
+      throw new TypeError(FUNC_ERROR_TEXT);
+    }
+    start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+    return function() {
+      var args = arguments,
+          index = -1,
+          length = nativeMax(args.length - start, 0),
+          rest = Array(length);
+
+      while (++index < length) {
+        rest[index] = args[start + index];
+      }
+      switch (start) {
+        case 0: return func.call(this, rest);
+        case 1: return func.call(this, args[0], rest);
+        case 2: return func.call(this, args[0], args[1], rest);
+      }
+      var otherArgs = Array(start + 1);
+      index = -1;
+      while (++index < start) {
+        otherArgs[index] = args[index];
+      }
+      otherArgs[start] = rest;
+      return func.apply(this, otherArgs);
     };
+  }
 
-    oauth.options = function(_) {
-        if (!arguments.length) return o;
+  /**
+   * Creates a throttled function that only invokes `func` at most once per
+   * every `wait` milliseconds. The throttled function comes with a `cancel`
+   * method to cancel delayed invocations. Provide an options object to indicate
+   * that `func` should be invoked on the leading and/or trailing edge of the
+   * `wait` timeout. Subsequent calls to the throttled function return the
+   * result of the last `func` call.
+   *
+   * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+   * on the trailing edge of the timeout only if the the throttled function is
+   * invoked more than once during the `wait` timeout.
+   *
+   * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
+   * for details over the differences between `_.throttle` and `_.debounce`.
+   *
+   * @static
+   * @memberOf _
+   * @category Function
+   * @param {Function} func The function to throttle.
+   * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+   * @param {Object} [options] The options object.
+   * @param {boolean} [options.leading=true] Specify invoking on the leading
+   *  edge of the timeout.
+   * @param {boolean} [options.trailing=true] Specify invoking on the trailing
+   *  edge of the timeout.
+   * @returns {Function} Returns the new throttled function.
+   * @example
+   *
+   * // avoid excessively updating the position while scrolling
+   * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+   *
+   * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
+   * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
+   *   'trailing': false
+   * }));
+   *
+   * // cancel a trailing throttled call
+   * jQuery(window).on('popstate', throttled.cancel);
+   */
+  function throttle(func, wait, options) {
+    var leading = true,
+        trailing = true;
 
-        o = _;
+    if (typeof func != 'function') {
+      throw new TypeError(FUNC_ERROR_TEXT);
+    }
+    if (options === false) {
+      leading = false;
+    } else if (isObject(options)) {
+      leading = 'leading' in options ? !!options.leading : leading;
+      trailing = 'trailing' in options ? !!options.trailing : trailing;
+    }
+    debounceOptions.leading = leading;
+    debounceOptions.maxWait = +wait;
+    debounceOptions.trailing = trailing;
+    return debounce(func, wait, debounceOptions);
+  }
 
-        o.url = o.url || 'http://www.openstreetmap.org';
-        o.landing = o.landing || 'land.html';
+  /*------------------------------------------------------------------------*/
 
-        o.singlepage = o.singlepage || false;
+  /**
+   * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
+   * otherwise they are assigned by reference. If `customizer` is provided it is
+   * invoked to produce the cloned values. If `customizer` returns `undefined`
+   * cloning is handled by the method instead. The `customizer` is bound to
+   * `thisArg` and invoked with two argument; (value [, index|key, object]).
+   *
+   * **Note:** This method is loosely based on the
+   * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
+   * The enumerable properties of `arguments` objects and objects created by
+   * constructors other than `Object` are cloned to plain `Object` objects. An
+   * empty object is returned for uncloneable values such as functions, DOM nodes,
+   * Maps, Sets, and WeakMaps.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to clone.
+   * @param {boolean} [isDeep] Specify a deep clone.
+   * @param {Function} [customizer] The function to customize cloning values.
+   * @param {*} [thisArg] The `this` binding of `customizer`.
+   * @returns {*} Returns the cloned value.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney' },
+   *   { 'user': 'fred' }
+   * ];
+   *
+   * var shallow = _.clone(users);
+   * shallow[0] === users[0];
+   * // => true
+   *
+   * var deep = _.clone(users, true);
+   * deep[0] === users[0];
+   * // => false
+   *
+   * // using a customizer callback
+   * var el = _.clone(document.body, function(value) {
+   *   if (_.isElement(value)) {
+   *     return value.cloneNode(false);
+   *   }
+   * });
+   *
+   * el === document.body
+   * // => false
+   * el.nodeName
+   * // => BODY
+   * el.childNodes.length;
+   * // => 0
+   */
+  function clone(value, isDeep, customizer, thisArg) {
+    if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
+      isDeep = false;
+    }
+    else if (typeof isDeep == 'function') {
+      thisArg = customizer;
+      customizer = isDeep;
+      isDeep = false;
+    }
+    return typeof customizer == 'function'
+      ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
+      : baseClone(value, isDeep);
+  }
 
-        // Optional loading and loading-done functions for nice UI feedback.
-        // by default, no-ops
-        o.loading = o.loading || function() {};
-        o.done = o.done || function() {};
+  /**
+   * Creates a deep clone of `value`. If `customizer` is provided it is invoked
+   * to produce the cloned values. If `customizer` returns `undefined` cloning
+   * is handled by the method instead. The `customizer` is bound to `thisArg`
+   * and invoked with two argument; (value [, index|key, object]).
+   *
+   * **Note:** This method is loosely based on the
+   * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
+   * The enumerable properties of `arguments` objects and objects created by
+   * constructors other than `Object` are cloned to plain `Object` objects. An
+   * empty object is returned for uncloneable values such as functions, DOM nodes,
+   * Maps, Sets, and WeakMaps.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to deep clone.
+   * @param {Function} [customizer] The function to customize cloning values.
+   * @param {*} [thisArg] The `this` binding of `customizer`.
+   * @returns {*} Returns the deep cloned value.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney' },
+   *   { 'user': 'fred' }
+   * ];
+   *
+   * var deep = _.cloneDeep(users);
+   * deep[0] === users[0];
+   * // => false
+   *
+   * // using a customizer callback
+   * var el = _.cloneDeep(document.body, function(value) {
+   *   if (_.isElement(value)) {
+   *     return value.cloneNode(true);
+   *   }
+   * });
+   *
+   * el === document.body
+   * // => false
+   * el.nodeName
+   * // => BODY
+   * el.childNodes.length;
+   * // => 20
+   */
+  function cloneDeep(value, customizer, thisArg) {
+    return typeof customizer == 'function'
+      ? baseClone(value, true, bindCallback(customizer, thisArg, 1))
+      : baseClone(value, true);
+  }
 
-        return oauth.preauth(o);
+  /**
+   * Checks if `value` is classified as an `arguments` object.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+   * @example
+   *
+   * _.isArguments(function() { return arguments; }());
+   * // => true
+   *
+   * _.isArguments([1, 2, 3]);
+   * // => false
+   */
+  function isArguments(value) {
+    return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;
+  }
+  // Fallback for environments without a `toStringTag` for `arguments` objects.
+  if (!support.argsTag) {
+    isArguments = function(value) {
+      return isObjectLike(value) && isArrayLike(value) &&
+        hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
     };
+  }
 
-    // 'stamp' an authentication object from `getAuth()`
-    // with a [nonce](http://en.wikipedia.org/wiki/Cryptographic_nonce)
-    // and timestamp
-    function timenonce(o) {
-        o.oauth_timestamp = ohauth.timestamp();
-        o.oauth_nonce = ohauth.nonce();
-        return o;
-    }
-
-    // get/set tokens. These are prefixed with the base URL so that `osm-auth`
-    // can be used with multiple APIs and the keys in `localStorage`
-    // will not clash
-    var token;
+  /**
+   * Checks if `value` is classified as an `Array` object.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+   * @example
+   *
+   * _.isArray([1, 2, 3]);
+   * // => true
+   *
+   * _.isArray(function() { return arguments; }());
+   * // => false
+   */
+  var isArray = nativeIsArray || function(value) {
+    return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+  };
 
-    if (store.enabled) {
-        token = function (x, y) {
-            if (arguments.length === 1) return store.get(o.url + x);
-            else if (arguments.length === 2) return store.set(o.url + x, y);
-        };
-    } else {
-        var storage = {};
-        token = function (x, y) {
-            if (arguments.length === 1) return storage[o.url + x];
-            else if (arguments.length === 2) return storage[o.url + x] = y;
-        };
+  /**
+   * Checks if `value` is empty. A value is considered empty unless it is an
+   * `arguments` object, array, string, or jQuery-like collection with a length
+   * greater than `0` or an object with own enumerable properties.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {Array|Object|string} value The value to inspect.
+   * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+   * @example
+   *
+   * _.isEmpty(null);
+   * // => true
+   *
+   * _.isEmpty(true);
+   * // => true
+   *
+   * _.isEmpty(1);
+   * // => true
+   *
+   * _.isEmpty([1, 2, 3]);
+   * // => false
+   *
+   * _.isEmpty({ 'a': 1 });
+   * // => false
+   */
+  function isEmpty(value) {
+    if (value == null) {
+      return true;
     }
-
-    // Get an authentication object. If you just add and remove properties
-    // from a single object, you'll need to use `delete` to make sure that
-    // it doesn't contain undesired properties for authentication
-    function getAuth(o) {
-        return {
-            oauth_consumer_key: o.oauth_consumer_key,
-            oauth_signature_method: "HMAC-SHA1"
-        };
+    if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
+        (isObjectLike(value) && isFunction(value.splice)))) {
+      return !value.length;
     }
+    return !keys(value).length;
+  }
 
-    // potentially pre-authorize
-    oauth.options(o);
-
-    return oauth;
-};
+  /**
+   * Performs a deep comparison between two values to determine if they are
+   * equivalent. If `customizer` is provided it is invoked to compare values.
+   * If `customizer` returns `undefined` comparisons are handled by the method
+   * instead. The `customizer` is bound to `thisArg` and invoked with three
+   * arguments: (value, other [, index|key]).
+   *
+   * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+   * numbers, `Object` objects, regexes, and strings. Objects are compared by
+   * their own, not inherited, enumerable properties. Functions and DOM nodes
+   * are **not** supported. Provide a customizer function to extend support
+   * for comparing other values.
+   *
+   * @static
+   * @memberOf _
+   * @alias eq
+   * @category Lang
+   * @param {*} value The value to compare.
+   * @param {*} other The other value to compare.
+   * @param {Function} [customizer] The function to customize value comparisons.
+   * @param {*} [thisArg] The `this` binding of `customizer`.
+   * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+   * @example
+   *
+   * var object = { 'user': 'fred' };
+   * var other = { 'user': 'fred' };
+   *
+   * object == other;
+   * // => false
+   *
+   * _.isEqual(object, other);
+   * // => true
+   *
+   * // using a customizer callback
+   * var array = ['hello', 'goodbye'];
+   * var other = ['hi', 'goodbye'];
+   *
+   * _.isEqual(array, other, function(value, other) {
+   *   if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
+   *     return true;
+   *   }
+   * });
+   * // => true
+   */
+  function isEqual(value, other, customizer, thisArg) {
+    customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
+    var result = customizer ? customizer(value, other) : undefined;
+    return  result === undefined ? baseIsEqual(value, other, customizer) : !!result;
+  }
 
-},{"ohauth":2,"store":3,"xtend":4}],3:[function(require,module,exports){
-(function(global){;(function(win){
-       var store = {},
-               doc = win.document,
-               localStorageName = 'localStorage',
-               storage
-
-       store.disabled = false
-       store.set = function(key, value) {}
-       store.get = function(key) {}
-       store.remove = function(key) {}
-       store.clear = function() {}
-       store.transact = function(key, defaultVal, transactionFn) {
-               var val = store.get(key)
-               if (transactionFn == null) {
-                       transactionFn = defaultVal
-                       defaultVal = null
-               }
-               if (typeof val == 'undefined') { val = defaultVal || {} }
-               transactionFn(val)
-               store.set(key, val)
-       }
-       store.getAll = function() {}
-       store.forEach = function() {}
-
-       store.serialize = function(value) {
-               return JSON.stringify(value)
-       }
-       store.deserialize = function(value) {
-               if (typeof value != 'string') { return undefined }
-               try { return JSON.parse(value) }
-               catch(e) { return value || undefined }
-       }
-
-       // Functions to encapsulate questionable FireFox 3.6.13 behavior
-       // when about.config::dom.storage.enabled === false
-       // See https://github.com/marcuswestin/store.js/issues#issue/13
-       function isLocalStorageNameSupported() {
-               try { return (localStorageName in win && win[localStorageName]) }
-               catch(err) { return false }
-       }
-
-       if (isLocalStorageNameSupported()) {
-               storage = win[localStorageName]
-               store.set = function(key, val) {
-                       if (val === undefined) { return store.remove(key) }
-                       storage.setItem(key, store.serialize(val))
-                       return val
-               }
-               store.get = function(key) { return store.deserialize(storage.getItem(key)) }
-               store.remove = function(key) { storage.removeItem(key) }
-               store.clear = function() { storage.clear() }
-               store.getAll = function() {
-                       var ret = {}
-                       store.forEach(function(key, val) {
-                               ret[key] = val
-                       })
-                       return ret
-               }
-               store.forEach = function(callback) {
-                       for (var i=0; i<storage.length; i++) {
-                               var key = storage.key(i)
-                               callback(key, store.get(key))
-                       }
-               }
-       } else if (doc.documentElement.addBehavior) {
-               var storageOwner,
-                       storageContainer
-               // Since #userData storage applies only to specific paths, we need to
-               // somehow link our data to a specific path.  We choose /favicon.ico
-               // as a pretty safe option, since all browsers already make a request to
-               // this URL anyway and being a 404 will not hurt us here.  We wrap an
-               // iframe pointing to the favicon in an ActiveXObject(htmlfile) object
-               // (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)
-               // since the iframe access rules appear to allow direct access and
-               // manipulation of the document element, even for a 404 page.  This
-               // document can be used instead of the current document (which would
-               // have been limited to the current path) to perform #userData storage.
-               try {
-                       storageContainer = new ActiveXObject('htmlfile')
-                       storageContainer.open()
-                       storageContainer.write('<s' + 'cript>document.w=window</s' + 'cript><iframe src="/favicon.ico"></iframe>')
-                       storageContainer.close()
-                       storageOwner = storageContainer.w.frames[0].document
-                       storage = storageOwner.createElement('div')
-               } catch(e) {
-                       // somehow ActiveXObject instantiation failed (perhaps some special
-                       // security settings or otherwse), fall back to per-path storage
-                       storage = doc.createElement('div')
-                       storageOwner = doc.body
-               }
-               function withIEStorage(storeFunction) {
-                       return function() {
-                               var args = Array.prototype.slice.call(arguments, 0)
-                               args.unshift(storage)
-                               // See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx
-                               // and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx
-                               storageOwner.appendChild(storage)
-                               storage.addBehavior('#default#userData')
-                               storage.load(localStorageName)
-                               var result = storeFunction.apply(store, args)
-                               storageOwner.removeChild(storage)
-                               return result
-                       }
-               }
-
-               // In IE7, keys may not contain special chars. See all of https://github.com/marcuswestin/store.js/issues/40
-               var forbiddenCharsRegex = new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g")
-               function ieKeyFix(key) {
-                       return key.replace(forbiddenCharsRegex, '___')
-               }
-               store.set = withIEStorage(function(storage, key, val) {
-                       key = ieKeyFix(key)
-                       if (val === undefined) { return store.remove(key) }
-                       storage.setAttribute(key, store.serialize(val))
-                       storage.save(localStorageName)
-                       return val
-               })
-               store.get = withIEStorage(function(storage, key) {
-                       key = ieKeyFix(key)
-                       return store.deserialize(storage.getAttribute(key))
-               })
-               store.remove = withIEStorage(function(storage, key) {
-                       key = ieKeyFix(key)
-                       storage.removeAttribute(key)
-                       storage.save(localStorageName)
-               })
-               store.clear = withIEStorage(function(storage) {
-                       var attributes = storage.XMLDocument.documentElement.attributes
-                       storage.load(localStorageName)
-                       for (var i=0, attr; attr=attributes[i]; i++) {
-                               storage.removeAttribute(attr.name)
-                       }
-                       storage.save(localStorageName)
-               })
-               store.getAll = function(storage) {
-                       var ret = {}
-                       store.forEach(function(key, val) {
-                               ret[key] = val
-                       })
-                       return ret
-               }
-               store.forEach = withIEStorage(function(storage, callback) {
-                       var attributes = storage.XMLDocument.documentElement.attributes
-                       for (var i=0, attr; attr=attributes[i]; ++i) {
-                               callback(attr.name, store.deserialize(storage.getAttribute(attr.name)))
-                       }
-               })
-       }
-
-       try {
-               var testKey = '__storejs__'
-               store.set(testKey, testKey)
-               if (store.get(testKey) != testKey) { store.disabled = true }
-               store.remove(testKey)
-       } catch(e) {
-               store.disabled = true
-       }
-       store.enabled = !store.disabled
-       
-       if (typeof module != 'undefined' && module.exports) { module.exports = store }
-       else if (typeof define === 'function' && define.amd) { define(store) }
-       else { win.store = store }
-       
-})(this.window || global);
-
-})(window)
-},{}],5:[function(require,module,exports){
-module.exports = hasKeys
-
-function hasKeys(source) {
-    return source !== null &&
-        (typeof source === "object" ||
-        typeof source === "function")
-}
-
-},{}],4:[function(require,module,exports){
-var Keys = require("object-keys")
-var hasKeys = require("./has-keys")
-
-module.exports = extend
-
-function extend() {
-    var target = {}
-
-    for (var i = 0; i < arguments.length; i++) {
-        var source = arguments[i]
-
-        if (!hasKeys(source)) {
-            continue
-        }
-
-        var keys = Keys(source)
-
-        for (var j = 0; j < keys.length; j++) {
-            var name = keys[j]
-            target[name] = source[name]
-        }
-    }
+  /**
+   * Checks if `value` is classified as a `Function` object.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+   * @example
+   *
+   * _.isFunction(_);
+   * // => true
+   *
+   * _.isFunction(/abc/);
+   * // => false
+   */
+  var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) {
+    // The use of `Object#toString` avoids issues with the `typeof` operator
+    // in older versions of Chrome and Safari which return 'function' for regexes
+    // and Safari 8 equivalents which return 'object' for typed array constructors.
+    return objToString.call(value) == funcTag;
+  };
 
-    return target
-}
+  /**
+   * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+   * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+   * @example
+   *
+   * _.isObject({});
+   * // => true
+   *
+   * _.isObject([1, 2, 3]);
+   * // => true
+   *
+   * _.isObject(1);
+   * // => false
+   */
+  function isObject(value) {
+    // Avoid a V8 JIT bug in Chrome 19-20.
+    // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+    var type = typeof value;
+    return !!value && (type == 'object' || type == 'function');
+  }
 
-},{"./has-keys":5,"object-keys":6}],7:[function(require,module,exports){
-(function(global){/**
- * jsHashes - A fast and independent hashing library pure JavaScript implemented (ES3 compliant) for both server and client side
- * 
- * @class Hashes
- * @author Tomas Aparicio <tomas@rijndael-project.com>
- * @license New BSD (see LICENSE file)
- * @version 1.0.4
- *
- * Algorithms specification:
- *
- * MD5 <http://www.ietf.org/rfc/rfc1321.txt>
- * RIPEMD-160 <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
- * SHA1   <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
- * SHA256 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
- * SHA512 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
- * HMAC <http://www.ietf.org/rfc/rfc2104.txt>
- *
- */
-(function(){
-  var Hashes;
-  
-  // private helper methods
-  function utf8Encode(str) {
-    var  x, y, output = '', i = -1, l;
-    
-    if (str && str.length) {
-      l = str.length;
-      while ((i+=1) < l) {
-        /* Decode utf-16 surrogate pairs */
-        x = str.charCodeAt(i);
-        y = i + 1 < l ? str.charCodeAt(i + 1) : 0;
-        if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
-            x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
-            i += 1;
-        }
-        /* Encode output as utf-8 */
-        if (x <= 0x7F) {
-            output += String.fromCharCode(x);
-        } else if (x <= 0x7FF) {
-            output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
-                        0x80 | ( x & 0x3F));
-        } else if (x <= 0xFFFF) {
-            output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
-                        0x80 | ((x >>> 6 ) & 0x3F),
-                        0x80 | ( x & 0x3F));
-        } else if (x <= 0x1FFFFF) {
-            output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
-                        0x80 | ((x >>> 12) & 0x3F),
-                        0x80 | ((x >>> 6 ) & 0x3F),
-                        0x80 | ( x & 0x3F));
-        }
-      }
+  /**
+   * Checks if `value` is a native function.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+   * @example
+   *
+   * _.isNative(Array.prototype.push);
+   * // => true
+   *
+   * _.isNative(_);
+   * // => false
+   */
+  function isNative(value) {
+    if (value == null) {
+      return false;
     }
-    return output;
-  }
-  
-  function utf8Decode(str) {
-    var i, ac, c1, c2, c3, arr = [], l;
-    i = ac = c1 = c2 = c3 = 0;
-    
-    if (str && str.length) {
-      l = str.length;
-      str += '';
-    
-      while (i < l) {
-          c1 = str.charCodeAt(i);
-          ac += 1;
-          if (c1 < 128) {
-              arr[ac] = String.fromCharCode(c1);
-              i+=1;
-          } else if (c1 > 191 && c1 < 224) {
-              c2 = str.charCodeAt(i + 1);
-              arr[ac] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
-              i += 2;
-          } else {
-              c2 = str.charCodeAt(i + 1);
-              c3 = str.charCodeAt(i + 2);
-              arr[ac] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
-              i += 3;
-          }
-      }
+    if (objToString.call(value) == funcTag) {
+      return reIsNative.test(fnToString.call(value));
     }
-    return arr.join('');
+    return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
   }
 
   /**
-   * Add integers, wrapping at 2^32. This uses 16-bit operations internally
-   * to work around bugs in some JS interpreters.
+   * Checks if `value` is a plain object, that is, an object created by the
+   * `Object` constructor or one with a `[[Prototype]]` of `null`.
+   *
+   * **Note:** This method assumes objects created by the `Object` constructor
+   * have no inherited enumerable properties.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+   * @example
+   *
+   * function Foo() {
+   *   this.a = 1;
+   * }
+   *
+   * _.isPlainObject(new Foo);
+   * // => false
+   *
+   * _.isPlainObject([1, 2, 3]);
+   * // => false
+   *
+   * _.isPlainObject({ 'x': 0, 'y': 0 });
+   * // => true
+   *
+   * _.isPlainObject(Object.create(null));
+   * // => true
    */
-  function safe_add(x, y) {
-    var lsw = (x & 0xFFFF) + (y & 0xFFFF),
-        msw = (x >> 16) + (y >> 16) + (lsw >> 16);
-    return (msw << 16) | (lsw & 0xFFFF);
-  }
+  var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
+    if (!(value && objToString.call(value) == objectTag) || (!lodash.support.argsTag && isArguments(value))) {
+      return false;
+    }
+    var valueOf = getNative(value, 'valueOf'),
+        objProto = valueOf && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
+
+    return objProto
+      ? (value == objProto || getPrototypeOf(value) == objProto)
+      : shimIsPlainObject(value);
+  };
 
   /**
-   * Bitwise rotate a 32-bit number to the left.
+   * Checks if `value` is classified as a `String` primitive or object.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+   * @example
+   *
+   * _.isString('abc');
+   * // => true
+   *
+   * _.isString(1);
+   * // => false
    */
-  function bit_rol(num, cnt) {
-    return (num << cnt) | (num >>> (32 - cnt));
+  function isString(value) {
+    return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
   }
 
   /**
-   * Convert a raw string to a hex string
+   * Checks if `value` is classified as a typed array.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to check.
+   * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+   * @example
+   *
+   * _.isTypedArray(new Uint8Array);
+   * // => true
+   *
+   * _.isTypedArray([]);
+   * // => false
    */
-  function rstr2hex(input, hexcase) {
-    var hex_tab = hexcase ? '0123456789ABCDEF' : '0123456789abcdef',
-        output = '', x, i = 0, l = input.length;
-    for (; i < l; i+=1) {
-      x = input.charCodeAt(i);
-      output += hex_tab.charAt((x >>> 4) & 0x0F) + hex_tab.charAt(x & 0x0F);
-    }
-    return output;
+  function isTypedArray(value) {
+    return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
   }
 
   /**
-   * Encode a string as utf-16
+   * Converts `value` to a plain object flattening inherited enumerable
+   * properties of `value` to own properties of the plain object.
+   *
+   * @static
+   * @memberOf _
+   * @category Lang
+   * @param {*} value The value to convert.
+   * @returns {Object} Returns the converted plain object.
+   * @example
+   *
+   * function Foo() {
+   *   this.b = 2;
+   * }
+   *
+   * Foo.prototype.c = 3;
+   *
+   * _.assign({ 'a': 1 }, new Foo);
+   * // => { 'a': 1, 'b': 2 }
+   *
+   * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+   * // => { 'a': 1, 'b': 2, 'c': 3 }
    */
-  function str2rstr_utf16le(input) {
-    var i, l = input.length, output = '';
-    for (i = 0; i < l; i+=1) {
-      output += String.fromCharCode( input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF);
-    }
-    return output;
+  function toPlainObject(value) {
+    return baseCopy(value, keysIn(value));
   }
 
-  function str2rstr_utf16be(input) {
-    var i, l = input.length, output = '';
-    for (i = 0; i < l; i+=1) {
-      output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, input.charCodeAt(i) & 0xFF);
-    }
-    return output;
-  }
+  /*------------------------------------------------------------------------*/
 
   /**
-   * Convert an array of big-endian words to a string
+   * Assigns own enumerable properties of source object(s) to the destination
+   * object. Subsequent sources overwrite property assignments of previous sources.
+   * If `customizer` is provided it is invoked to produce the assigned values.
+   * The `customizer` is bound to `thisArg` and invoked with five arguments:
+   * (objectValue, sourceValue, key, object, source).
+   *
+   * **Note:** This method mutates `object` and is based on
+   * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+   *
+   * @static
+   * @memberOf _
+   * @alias extend
+   * @category Object
+   * @param {Object} object The destination object.
+   * @param {...Object} [sources] The source objects.
+   * @param {Function} [customizer] The function to customize assigned values.
+   * @param {*} [thisArg] The `this` binding of `customizer`.
+   * @returns {Object} Returns `object`.
+   * @example
+   *
+   * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
+   * // => { 'user': 'fred', 'age': 40 }
+   *
+   * // using a customizer callback
+   * var defaults = _.partialRight(_.assign, function(value, other) {
+   *   return _.isUndefined(value) ? other : value;
+   * });
+   *
+   * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+   * // => { 'user': 'barney', 'age': 36 }
    */
-  function binb2rstr(input) {
-    var i, l = input.length * 32, output = '';
-    for (i = 0; i < l; i += 8) {
-        output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);
-    }
-    return output;
-  }
+  var assign = createAssigner(function(object, source, customizer) {
+    return customizer
+      ? assignWith(object, source, customizer)
+      : baseAssign(object, source);
+  });
 
   /**
-   * Convert an array of little-endian words to a string
+   * Iterates over own enumerable properties of an object invoking `iteratee`
+   * for each property. The `iteratee` is bound to `thisArg` and invoked with
+   * three arguments: (value, key, object). Iteratee functions may exit iteration
+   * early by explicitly returning `false`.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The object to iterate over.
+   * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+   * @param {*} [thisArg] The `this` binding of `iteratee`.
+   * @returns {Object} Returns `object`.
+   * @example
+   *
+   * function Foo() {
+   *   this.a = 1;
+   *   this.b = 2;
+   * }
+   *
+   * Foo.prototype.c = 3;
+   *
+   * _.forOwn(new Foo, function(value, key) {
+   *   console.log(key);
+   * });
+   * // => logs 'a' and 'b' (iteration order is not guaranteed)
    */
-  function binl2rstr(input) {
-    var i, l = input.length * 32, output = '';
-    for (i = 0;i < l; i += 8) {
-      output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
+  var forOwn = createForOwn(baseForOwn);
+
+  /**
+   * Creates an array of the own enumerable property names of `object`.
+   *
+   * **Note:** Non-object values are coerced to objects. See the
+   * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
+   * for more details.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the array of property names.
+   * @example
+   *
+   * function Foo() {
+   *   this.a = 1;
+   *   this.b = 2;
+   * }
+   *
+   * Foo.prototype.c = 3;
+   *
+   * _.keys(new Foo);
+   * // => ['a', 'b'] (iteration order is not guaranteed)
+   *
+   * _.keys('hi');
+   * // => ['0', '1']
+   */
+  var keys = !nativeKeys ? shimKeys : function(object) {
+    var Ctor = object == null ? null : object.constructor;
+    if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+        (typeof object == 'function' ? lodash.support.enumPrototypes : isArrayLike(object))) {
+      return shimKeys(object);
     }
-    return output;
-  }
+    return isObject(object) ? nativeKeys(object) : [];
+  };
 
   /**
-   * Convert a raw string to an array of little-endian words
-   * Characters >255 have their high-byte silently ignored.
+   * Creates an array of the own and inherited enumerable property names of `object`.
+   *
+   * **Note:** Non-object values are coerced to objects.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the array of property names.
+   * @example
+   *
+   * function Foo() {
+   *   this.a = 1;
+   *   this.b = 2;
+   * }
+   *
+   * Foo.prototype.c = 3;
+   *
+   * _.keysIn(new Foo);
+   * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
    */
-  function rstr2binl(input) {
-    var i, l = input.length * 8, output = Array(input.length >> 2), lo = output.length;
-    for (i = 0; i < lo; i+=1) {
-      output[i] = 0;
+  function keysIn(object) {
+    if (object == null) {
+      return [];
     }
-    for (i = 0; i < l; i += 8) {
-      output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
+    if (!isObject(object)) {
+      object = Object(object);
     }
-    return output;
+    var length = object.length,
+        support = lodash.support;
+
+    length = (length && isLength(length) &&
+      (isArray(object) || isArguments(object) || isString(object)) && length) || 0;
+
+    var Ctor = object.constructor,
+        index = -1,
+        proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,
+        isProto = proto === object,
+        result = Array(length),
+        skipIndexes = length > 0,
+        skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),
+        skipProto = support.enumPrototypes && isFunction(object);
+
+    while (++index < length) {
+      result[index] = (index + '');
+    }
+    // lodash skips the `constructor` property when it infers it is iterating
+    // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`
+    // attribute of an existing property and the `constructor` property of a
+    // prototype defaults to non-enumerable.
+    for (var key in object) {
+      if (!(skipProto && key == 'prototype') &&
+          !(skipErrorProps && (key == 'message' || key == 'name')) &&
+          !(skipIndexes && isIndex(key, length)) &&
+          !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+        result.push(key);
+      }
+    }
+    if (support.nonEnumShadows && object !== objectProto) {
+      var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),
+          nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];
+
+      if (tag == objectTag) {
+        proto = objectProto;
+      }
+      length = shadowProps.length;
+      while (length--) {
+        key = shadowProps[length];
+        var nonEnum = nonEnums[key];
+        if (!(isProto && nonEnum) &&
+            (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {
+          result.push(key);
+        }
+      }
+    }
+    return result;
   }
-  
+
   /**
-   * Convert a raw string to an array of big-endian words 
-   * Characters >255 have their high-byte silently ignored.
-   */
-   function rstr2binb(input) {
-      var i, l = input.length * 8, output = Array(input.length >> 2), lo = output.length;
-      for (i = 0; i < lo; i+=1) {
-            output[i] = 0;
-        }
-      for (i = 0; i < l; i += 8) {
-            output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
-        }
-      return output;
-   }
+   * Recursively merges own enumerable properties of the source object(s), that
+   * don't resolve to `undefined` into the destination object. Subsequent sources
+   * overwrite property assignments of previous sources. If `customizer` is
+   * provided it is invoked to produce the merged values of the destination and
+   * source properties. If `customizer` returns `undefined` merging is handled
+   * by the method instead. The `customizer` is bound to `thisArg` and invoked
+   * with five arguments: (objectValue, sourceValue, key, object, source).
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The destination object.
+   * @param {...Object} [sources] The source objects.
+   * @param {Function} [customizer] The function to customize assigned values.
+   * @param {*} [thisArg] The `this` binding of `customizer`.
+   * @returns {Object} Returns `object`.
+   * @example
+   *
+   * var users = {
+   *   'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+   * };
+   *
+   * var ages = {
+   *   'data': [{ 'age': 36 }, { 'age': 40 }]
+   * };
+   *
+   * _.merge(users, ages);
+   * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+   *
+   * // using a customizer callback
+   * var object = {
+   *   'fruits': ['apple'],
+   *   'vegetables': ['beet']
+   * };
+   *
+   * var other = {
+   *   'fruits': ['banana'],
+   *   'vegetables': ['carrot']
+   * };
+   *
+   * _.merge(object, other, function(a, b) {
+   *   if (_.isArray(a)) {
+   *     return a.concat(b);
+   *   }
+   * });
+   * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+   */
+  var merge = createAssigner(baseMerge);
 
   /**
-   * Convert a raw string to an arbitrary string encoding
+   * The opposite of `_.pick`; this method creates an object composed of the
+   * own and inherited enumerable properties of `object` that are not omitted.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The source object.
+   * @param {Function|...(string|string[])} [predicate] The function invoked per
+   *  iteration or property names to omit, specified as individual property
+   *  names or arrays of property names.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {Object} Returns the new object.
+   * @example
+   *
+   * var object = { 'user': 'fred', 'age': 40 };
+   *
+   * _.omit(object, 'age');
+   * // => { 'user': 'fred' }
+   *
+   * _.omit(object, _.isNumber);
+   * // => { 'user': 'fred' }
    */
-  function rstr2any(input, encoding) {
-    var divisor = encoding.length,
-        remainders = Array(),
-        i, q, x, ld, quotient, dividend, output, full_length;
-  
-    /* Convert to an array of 16-bit big-endian values, forming the dividend */
-    dividend = Array(Math.ceil(input.length / 2));
-    ld = dividend.length;
-    for (i = 0; i < ld; i+=1) {
-      dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
+  var omit = restParam(function(object, props) {
+    if (object == null) {
+      return {};
     }
-  
-    /**
-     * Repeatedly perform a long division. The binary array forms the dividend,
-     * the length of the encoding is the divisor. Once computed, the quotient
-     * forms the dividend for the next step. We stop when the dividend is zerHashes.
-     * All remainders are stored for later use.
-     */
-    while(dividend.length > 0) {
-      quotient = Array();
-      x = 0;
-      for (i = 0; i < dividend.length; i+=1) {
-        x = (x << 16) + dividend[i];
-        q = Math.floor(x / divisor);
-        x -= q * divisor;
-        if (quotient.length > 0 || q > 0) {
-          quotient[quotient.length] = q;
-        }
-      }
-      remainders[remainders.length] = x;
-      dividend = quotient;
+    if (typeof props[0] != 'function') {
+      var props = arrayMap(baseFlatten(props), String);
+      return pickByArray(object, baseDifference(keysIn(object), props));
     }
-  
-    /* Convert the remainders to the output string */
-    output = '';
-    for (i = remainders.length - 1; i >= 0; i--) {
-      output += encoding.charAt(remainders[i]);
+    var predicate = bindCallback(props[0], props[1], 3);
+    return pickByCallback(object, function(value, key, object) {
+      return !predicate(value, key, object);
+    });
+  });
+
+  /**
+   * Creates a two dimensional array of the key-value pairs for `object`,
+   * e.g. `[[key1, value1], [key2, value2]]`.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the new array of key-value pairs.
+   * @example
+   *
+   * _.pairs({ 'barney': 36, 'fred': 40 });
+   * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
+   */
+  function pairs(object) {
+    object = toObject(object);
+
+    var index = -1,
+        props = keys(object),
+        length = props.length,
+        result = Array(length);
+
+    while (++index < length) {
+      var key = props[index];
+      result[index] = [key, object[key]];
     }
-  
-    /* Append leading zero equivalents */
-    full_length = Math.ceil(input.length * 8 / (Math.log(encoding.length) / Math.log(2)));
-    for (i = output.length; i < full_length; i+=1) {
-      output = encoding[0] + output;
+    return result;
+  }
+
+  /**
+   * Creates an object composed of the picked `object` properties. Property
+   * names may be specified as individual arguments or as arrays of property
+   * names. If `predicate` is provided it is invoked for each property of `object`
+   * picking the properties `predicate` returns truthy for. The predicate is
+   * bound to `thisArg` and invoked with three arguments: (value, key, object).
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The source object.
+   * @param {Function|...(string|string[])} [predicate] The function invoked per
+   *  iteration or property names to pick, specified as individual property
+   *  names or arrays of property names.
+   * @param {*} [thisArg] The `this` binding of `predicate`.
+   * @returns {Object} Returns the new object.
+   * @example
+   *
+   * var object = { 'user': 'fred', 'age': 40 };
+   *
+   * _.pick(object, 'user');
+   * // => { 'user': 'fred' }
+   *
+   * _.pick(object, _.isString);
+   * // => { 'user': 'fred' }
+   */
+  var pick = restParam(function(object, props) {
+    if (object == null) {
+      return {};
     }
-    return output;
+    return typeof props[0] == 'function'
+      ? pickByCallback(object, bindCallback(props[0], props[1], 3))
+      : pickByArray(object, baseFlatten(props));
+  });
+
+  /**
+   * Creates an array of the own enumerable property values of `object`.
+   *
+   * **Note:** Non-object values are coerced to objects.
+   *
+   * @static
+   * @memberOf _
+   * @category Object
+   * @param {Object} object The object to query.
+   * @returns {Array} Returns the array of property values.
+   * @example
+   *
+   * function Foo() {
+   *   this.a = 1;
+   *   this.b = 2;
+   * }
+   *
+   * Foo.prototype.c = 3;
+   *
+   * _.values(new Foo);
+   * // => [1, 2] (iteration order is not guaranteed)
+   *
+   * _.values('hi');
+   * // => ['h', 'i']
+   */
+  function values(object) {
+    return baseValues(object, keys(object));
   }
 
+  /*------------------------------------------------------------------------*/
+
   /**
-   * Convert a raw string to a base-64 string
+   * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+   * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+   *
+   * @static
+   * @memberOf _
+   * @category String
+   * @param {string} [string=''] The string to escape.
+   * @returns {string} Returns the escaped string.
+   * @example
+   *
+   * _.escapeRegExp('[lodash](https://lodash.com/)');
+   * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
    */
-  function rstr2b64(input, b64pad) {
-    var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
-        output = '',
-        len = input.length, i, j, triplet;
-    b64pad= b64pad || '=';
-    for (i = 0; i < len; i += 3) {
-      triplet = (input.charCodeAt(i) << 16)
-            | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
-            | (i + 2 < len ? input.charCodeAt(i+2)      : 0);
-      for (j = 0; j < 4; j+=1) {
-        if (i * 8 + j * 6 > input.length * 8) { 
-          output += b64pad; 
-        } else { 
-          output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); 
-        }
-       }
+  function escapeRegExp(string) {
+    string = baseToString(string);
+    return (string && reHasRegExpChars.test(string))
+      ? string.replace(reRegExpChars, '\\$&')
+      : string;
+  }
+
+  /*------------------------------------------------------------------------*/
+
+  /**
+   * Creates a function that invokes `func` with the `this` binding of `thisArg`
+   * and arguments of the created function. If `func` is a property name the
+   * created callback returns the property value for a given element. If `func`
+   * is an object the created callback returns `true` for elements that contain
+   * the equivalent object properties, otherwise it returns `false`.
+   *
+   * @static
+   * @memberOf _
+   * @alias iteratee
+   * @category Utility
+   * @param {*} [func=_.identity] The value to convert to a callback.
+   * @param {*} [thisArg] The `this` binding of `func`.
+   * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
+   * @returns {Function} Returns the callback.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36 },
+   *   { 'user': 'fred',   'age': 40 }
+   * ];
+   *
+   * // wrap to create custom callback shorthands
+   * _.callback = _.wrap(_.callback, function(callback, func, thisArg) {
+   *   var match = /^(.+?)__([gl]t)(.+)$/.exec(func);
+   *   if (!match) {
+   *     return callback(func, thisArg);
+   *   }
+   *   return function(object) {
+   *     return match[2] == 'gt'
+   *       ? object[match[1]] > match[3]
+   *       : object[match[1]] < match[3];
+   *   };
+   * });
+   *
+   * _.filter(users, 'age__gt36');
+   * // => [{ 'user': 'fred', 'age': 40 }]
+   */
+  function callback(func, thisArg, guard) {
+    if (guard && isIterateeCall(func, thisArg, guard)) {
+      thisArg = null;
     }
-    return output;
+    return isObjectLike(func)
+      ? matches(func)
+      : baseCallback(func, thisArg);
   }
 
-  Hashes = {
-  /**  
-   * @property {String} version
-   * @readonly
+  /**
+   * Creates a function that returns `value`.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @param {*} value The value to return from the new function.
+   * @returns {Function} Returns the new function.
+   * @example
+   *
+   * var object = { 'user': 'fred' };
+   * var getter = _.constant(object);
+   *
+   * getter() === object;
+   * // => true
    */
-  VERSION : '1.0.3',
+  function constant(value) {
+    return function() {
+      return value;
+    };
+  }
+
   /**
-   * @member Hashes
-   * @class Base64
-   * @constructor
+   * This method returns the first argument provided to it.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @param {*} value Any value.
+   * @returns {*} Returns `value`.
+   * @example
+   *
+   * var object = { 'user': 'fred' };
+   *
+   * _.identity(object) === object;
+   * // => true
    */
-  Base64 : function () {
-    // private properties
-    var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
-        pad = '=', // default pad according with the RFC standard
-        url = false, // URL encoding support @todo
-        utf8 = true; // by default enable UTF-8 support encoding
+  function identity(value) {
+    return value;
+  }
 
-    // public method for encoding
-    this.encode = function (input) {
-      var i, j, triplet,
-          output = '', 
-          len = input.length;
+  /**
+   * Creates a function that performs a deep comparison between a given object
+   * and `source`, returning `true` if the given object has equivalent property
+   * values, else `false`.
+   *
+   * **Note:** This method supports comparing arrays, booleans, `Date` objects,
+   * numbers, `Object` objects, regexes, and strings. Objects are compared by
+   * their own, not inherited, enumerable properties. For comparing a single
+   * own or inherited property value see `_.matchesProperty`.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @param {Object} source The object of property values to match.
+   * @returns {Function} Returns the new function.
+   * @example
+   *
+   * var users = [
+   *   { 'user': 'barney', 'age': 36, 'active': true },
+   *   { 'user': 'fred',   'age': 40, 'active': false }
+   * ];
+   *
+   * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+   * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
+   */
+  function matches(source) {
+    return baseMatches(baseClone(source, true));
+  }
 
-      pad = pad || '=';
-      input = (utf8) ? utf8Encode(input) : input;
+  /**
+   * Adds all own enumerable function properties of a source object to the
+   * destination object. If `object` is a function then methods are added to
+   * its prototype as well.
+   *
+   * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+   * avoid conflicts caused by modifying the original.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @param {Function|Object} [object=lodash] The destination object.
+   * @param {Object} source The object of functions to add.
+   * @param {Object} [options] The options object.
+   * @param {boolean} [options.chain=true] Specify whether the functions added
+   *  are chainable.
+   * @returns {Function|Object} Returns `object`.
+   * @example
+   *
+   * function vowels(string) {
+   *   return _.filter(string, function(v) {
+   *     return /[aeiou]/i.test(v);
+   *   });
+   * }
+   *
+   * _.mixin({ 'vowels': vowels });
+   * _.vowels('fred');
+   * // => ['e']
+   *
+   * _('fred').vowels().value();
+   * // => ['e']
+   *
+   * _.mixin({ 'vowels': vowels }, { 'chain': false });
+   * _('fred').vowels();
+   * // => ['e']
+   */
+  function mixin(object, source, options) {
+    if (options == null) {
+      var isObj = isObject(source),
+          props = isObj ? keys(source) : null,
+          methodNames = (props && props.length) ? baseFunctions(source, props) : null;
+
+      if (!(methodNames ? methodNames.length : isObj)) {
+        methodNames = false;
+        options = source;
+        source = object;
+        object = this;
+      }
+    }
+    if (!methodNames) {
+      methodNames = baseFunctions(source, keys(source));
+    }
+    var chain = true,
+        index = -1,
+        isFunc = isFunction(object),
+        length = methodNames.length;
 
-      for (i = 0; i < len; i += 3) {
-        triplet = (input.charCodeAt(i) << 16)
-              | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
-              | (i + 2 < len ? input.charCodeAt(i+2) : 0);
-        for (j = 0; j < 4; j+=1) {
-          if (i * 8 + j * 6 > len * 8) {
-              output += pad;
-          } else {
-              output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
-          }
-        }
+    if (options === false) {
+      chain = false;
+    } else if (isObject(options) && 'chain' in options) {
+      chain = options.chain;
+    }
+    while (++index < length) {
+      var methodName = methodNames[index],
+          func = source[methodName];
+
+      object[methodName] = func;
+      if (isFunc) {
+        object.prototype[methodName] = (function(func) {
+          return function() {
+            var chainAll = this.__chain__;
+            if (chain || chainAll) {
+              var result = object(this.__wrapped__),
+                  actions = result.__actions__ = arrayCopy(this.__actions__);
+
+              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+              result.__chain__ = chainAll;
+              return result;
+            }
+            var args = [this.value()];
+            push.apply(args, arguments);
+            return func.apply(object, args);
+          };
+        }(func));
       }
-      return output;    
-    };
+    }
+    return object;
+  }
 
-    // public method for decoding
-    this.decode = function (input) {
-      // var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-      var i, o1, o2, o3, h1, h2, h3, h4, bits, ac,
-        dec = '',
-        arr = [];
-      if (!input) { return input; }
+  /**
+   * A no-operation function that returns `undefined` regardless of the
+   * arguments it receives.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @example
+   *
+   * var object = { 'user': 'fred' };
+   *
+   * _.noop(object) === undefined;
+   * // => true
+   */
+  function noop() {
+    // No operation performed.
+  }
 
-      i = ac = 0;
-      input = input.replace(new RegExp('\\'+pad,'gi'),''); // use '='
-      //input += '';
+  /**
+   * Creates a function that returns the property value at `path` on a
+   * given object.
+   *
+   * @static
+   * @memberOf _
+   * @category Utility
+   * @param {Array|string} path The path of the property to get.
+   * @returns {Function} Returns the new function.
+   * @example
+   *
+   * var objects = [
+   *   { 'a': { 'b': { 'c': 2 } } },
+   *   { 'a': { 'b': { 'c': 1 } } }
+   * ];
+   *
+   * _.map(objects, _.property('a.b.c'));
+   * // => [2, 1]
+   *
+   * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+   * // => [1, 2]
+   */
+  function property(path) {
+    return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+  }
 
-      do { // unpack four hexets into three octets using index points in b64
-        h1 = tab.indexOf(input.charAt(i+=1));
-        h2 = tab.indexOf(input.charAt(i+=1));
-        h3 = tab.indexOf(input.charAt(i+=1));
-        h4 = tab.indexOf(input.charAt(i+=1));
+  /*------------------------------------------------------------------------*/
 
-        bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
+  // Ensure wrappers are instances of `baseLodash`.
+  lodash.prototype = baseLodash.prototype;
 
-        o1 = bits >> 16 & 0xff;
-        o2 = bits >> 8 & 0xff;
-        o3 = bits & 0xff;
-        ac += 1;
+  LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+  LodashWrapper.prototype.constructor = LodashWrapper;
 
-        if (h3 === 64) {
-          arr[ac] = String.fromCharCode(o1);
-        } else if (h4 === 64) {
-          arr[ac] = String.fromCharCode(o1, o2);
+  LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+  LazyWrapper.prototype.constructor = LazyWrapper;
+
+  // Add functions to the `Set` cache.
+  SetCache.prototype.push = cachePush;
+
+  // Add functions that return wrapped values when chaining.
+  lodash.assign = assign;
+  lodash.bind = bind;
+  lodash.callback = callback;
+  lodash.chain = chain;
+  lodash.chunk = chunk;
+  lodash.compact = compact;
+  lodash.constant = constant;
+  lodash.debounce = debounce;
+  lodash.difference = difference;
+  lodash.filter = filter;
+  lodash.flatten = flatten;
+  lodash.forEach = forEach;
+  lodash.forOwn = forOwn;
+  lodash.groupBy = groupBy;
+  lodash.intersection = intersection;
+  lodash.keys = keys;
+  lodash.keysIn = keysIn;
+  lodash.map = map;
+  lodash.matches = matches;
+  lodash.merge = merge;
+  lodash.mixin = mixin;
+  lodash.omit = omit;
+  lodash.pairs = pairs;
+  lodash.pick = pick;
+  lodash.pluck = pluck;
+  lodash.property = property;
+  lodash.reject = reject;
+  lodash.restParam = restParam;
+  lodash.tap = tap;
+  lodash.throttle = throttle;
+  lodash.thru = thru;
+  lodash.toPlainObject = toPlainObject;
+  lodash.union = union;
+  lodash.uniq = uniq;
+  lodash.values = values;
+  lodash.without = without;
+
+  // Add aliases.
+  lodash.collect = map;
+  lodash.each = forEach;
+  lodash.extend = assign;
+  lodash.iteratee = callback;
+  lodash.select = filter;
+  lodash.unique = uniq;
+
+  // Add functions to `lodash.prototype`.
+  mixin(lodash, lodash);
+
+  /*------------------------------------------------------------------------*/
+
+  // Add functions that return unwrapped values when chaining.
+  lodash.clone = clone;
+  lodash.cloneDeep = cloneDeep;
+  lodash.escapeRegExp = escapeRegExp;
+  lodash.every = every;
+  lodash.find = find;
+  lodash.first = first;
+  lodash.identity = identity;
+  lodash.includes = includes;
+  lodash.indexOf = indexOf;
+  lodash.isArguments = isArguments;
+  lodash.isArray = isArray;
+  lodash.isEmpty = isEmpty;
+  lodash.isEqual = isEqual;
+  lodash.isFunction = isFunction;
+  lodash.isNative = isNative;
+  lodash.isObject = isObject;
+  lodash.isPlainObject = isPlainObject;
+  lodash.isString = isString;
+  lodash.isTypedArray = isTypedArray;
+  lodash.last = last;
+  lodash.noop = noop;
+  lodash.now = now;
+  lodash.reduce = reduce;
+  lodash.some = some;
+
+  // Add aliases.
+  lodash.all = every;
+  lodash.any = some;
+  lodash.contains = includes;
+  lodash.eq = isEqual;
+  lodash.detect = find;
+  lodash.foldl = reduce;
+  lodash.head = first;
+  lodash.include = includes;
+  lodash.inject = reduce;
+
+  mixin(lodash, (function() {
+    var source = {};
+    baseForOwn(lodash, function(func, methodName) {
+      if (!lodash.prototype[methodName]) {
+        source[methodName] = func;
+      }
+    });
+    return source;
+  }()), false);
+
+  /*------------------------------------------------------------------------*/
+
+  lodash.prototype.sample = function(n) {
+    if (!this.__chain__ && n == null) {
+      return sample(this.value());
+    }
+    return this.thru(function(value) {
+      return sample(value, n);
+    });
+  };
+
+  /*------------------------------------------------------------------------*/
+
+  /**
+   * The semantic version number.
+   *
+   * @static
+   * @memberOf _
+   * @type string
+   */
+  lodash.VERSION = VERSION;
+
+  // Assign default placeholders.
+  bind.placeholder = lodash;
+
+  // Add `LazyWrapper` methods that accept an `iteratee` value.
+  arrayEach(['dropWhile', 'filter', 'map', 'takeWhile'], function(methodName, type) {
+    var isFilter = type != LAZY_MAP_FLAG,
+        isDropWhile = type == LAZY_DROP_WHILE_FLAG;
+
+    LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
+      var filtered = this.__filtered__,
+          result = (filtered && isDropWhile) ? new LazyWrapper(this) : this.clone(),
+          iteratees = result.__iteratees__ || (result.__iteratees__ = []);
+
+      iteratees.push({
+        'done': false,
+        'count': 0,
+        'index': 0,
+        'iteratee': getCallback(iteratee, thisArg, 1),
+        'limit': -1,
+        'type': type
+      });
+
+      result.__filtered__ = filtered || isFilter;
+      return result;
+    };
+  });
+
+  // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+  arrayEach(['drop', 'take'], function(methodName, index) {
+    var whileName = methodName + 'While';
+
+    LazyWrapper.prototype[methodName] = function(n) {
+      var filtered = this.__filtered__,
+          result = (filtered && !index) ? this.dropWhile() : this.clone();
+
+      n = n == null ? 1 : nativeMax(floor(n) || 0, 0);
+      if (filtered) {
+        if (index) {
+          result.__takeCount__ = nativeMin(result.__takeCount__, n);
         } else {
-          arr[ac] = String.fromCharCode(o1, o2, o3);
+          last(result.__iteratees__).limit = n;
         }
-      } while (i < input.length);
+      } else {
+        var views = result.__views__ || (result.__views__ = []);
+        views.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });
+      }
+      return result;
+    };
 
-      dec = arr.join('');
-      dec = (utf8) ? utf8Decode(dec) : dec;
+    LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+      return this.reverse()[methodName](n).reverse();
+    };
 
-      return dec;
+    LazyWrapper.prototype[methodName + 'RightWhile'] = function(predicate, thisArg) {
+      return this.reverse()[whileName](predicate, thisArg).reverse();
     };
+  });
 
-    // set custom pad string
-    this.setPad = function (str) {
-        pad = str || pad;
-        return this;
+  // Add `LazyWrapper` methods for `_.first` and `_.last`.
+  arrayEach(['first', 'last'], function(methodName, index) {
+    var takeName = 'take' + (index ? 'Right' : '');
+
+    LazyWrapper.prototype[methodName] = function() {
+      return this[takeName](1).value()[0];
     };
-    // set custom tab string characters
-    this.setTab = function (str) {
-        tab = str || tab;
-        return this;
+  });
+
+  // Add `LazyWrapper` methods for `_.initial` and `_.rest`.
+  arrayEach(['initial', 'rest'], function(methodName, index) {
+    var dropName = 'drop' + (index ? '' : 'Right');
+
+    LazyWrapper.prototype[methodName] = function() {
+      return this[dropName](1);
     };
-    this.setUTF8 = function (bool) {
-        if (typeof bool === 'boolean') {
-          utf8 = bool;
-        }
-        return this;
+  });
+
+  // Add `LazyWrapper` methods for `_.pluck` and `_.where`.
+  arrayEach(['pluck', 'where'], function(methodName, index) {
+    var operationName = index ? 'filter' : 'map',
+        createCallback = index ? baseMatches : property;
+
+    LazyWrapper.prototype[methodName] = function(value) {
+      return this[operationName](createCallback(value));
     };
-  },
+  });
 
-  /**
-   * CRC-32 calculation
-   * @member Hashes
-   * @method CRC32
-   * @static
-   * @param {String} str Input String
-   * @return {String}
-   */
-  CRC32 : function (str) {
-    var crc = 0, x = 0, y = 0, table, i, iTop;
-    str = utf8Encode(str);
-        
-    table = [ 
-        '00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 ',
-        '79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 ',
-        '84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F ',
-        '63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD ',
-        'A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC ',
-        '51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 ',
-        'B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 ',
-        '06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 ',
-        'E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 ',
-        '12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 ',
-        'D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 ',
-        '33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 ',
-        'CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 ',
-        '9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E ',
-        '7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D ',
-        '806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 ',
-        '60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA ',
-        'AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 ', 
-        '5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 ',
-        'B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 ',
-        '05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 ',
-        'F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA ',
-        '11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 ',
-        'D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F ',
-        '30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E ',
-        'C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D'
-    ].join('');
+  LazyWrapper.prototype.compact = function() {
+    return this.filter(identity);
+  };
 
-    crc = crc ^ (-1);
-    for (i = 0, iTop = str.length; i < iTop; i+=1 ) {
-        y = ( crc ^ str.charCodeAt( i ) ) & 0xFF;
-        x = '0x' + table.substr( y * 9, 8 );
-        crc = ( crc >>> 8 ) ^ x;
+  LazyWrapper.prototype.reject = function(predicate, thisArg) {
+    predicate = getCallback(predicate, thisArg, 1);
+    return this.filter(function(value) {
+      return !predicate(value);
+    });
+  };
+
+  LazyWrapper.prototype.slice = function(start, end) {
+    start = start == null ? 0 : (+start || 0);
+
+    var result = this;
+    if (start < 0) {
+      result = this.takeRight(-start);
+    } else if (start) {
+      result = this.drop(start);
     }
-    // always return a positive number (that's what >>> 0 does)
-    return (crc ^ (-1)) >>> 0;
-  },
-  /**
-   * @member Hashes
-   * @class MD5
-   * @constructor
-   * @param {Object} [config]
-   * 
-   * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
-   * Digest Algorithm, as defined in RFC 1321.
-   * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
-   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
-   * See <http://pajhome.org.uk/crypt/md5> for more infHashes.
-   */
-  MD5 : function (options) {  
-    /**
-     * Private config properties. You may need to tweak these to be compatible with
-     * the server-side, but the defaults work in most cases.
-     * See {@link Hashes.MD5#method-setUpperCase} and {@link Hashes.SHA1#method-setUpperCase}
-     */
-    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase
-        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', // base-64 pad character. Defaults to '=' for strict RFC compliance
-        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true; // enable/disable utf8 encoding
+    if (end !== undefined) {
+      end = (+end || 0);
+      result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+    }
+    return result;
+  };
 
-    // privileged (public) methods 
-    this.hex = function (s) { 
-      return rstr2hex(rstr(s, utf8), hexcase);
-    };
-    this.b64 = function (s) { 
-      return rstr2b64(rstr(s), b64pad);
-    };
-    this.any = function(s, e) { 
-      return rstr2any(rstr(s, utf8), e); 
-    };
-    this.hex_hmac = function (k, d) { 
-      return rstr2hex(rstr_hmac(k, d), hexcase); 
-    };
-    this.b64_hmac = function (k, d) { 
-      return rstr2b64(rstr_hmac(k,d), b64pad); 
-    };
-    this.any_hmac = function (k, d, e) { 
-      return rstr2any(rstr_hmac(k, d), e); 
-    };
-    /**
-     * Perform a simple self-test to see if the VM is working
-     * @return {String} Hexadecimal hash sample
-     */
-    this.vm_test = function () {
-      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
-    };
-    /** 
-     * Enable/disable uppercase hexadecimal returned string 
-     * @param {Boolean} 
-     * @return {Object} this
-     */ 
-    this.setUpperCase = function (a) {
-      if (typeof a === 'boolean' ) {
-        hexcase = a;
+  LazyWrapper.prototype.toArray = function() {
+    return this.drop(0);
+  };
+
+  // Add `LazyWrapper` methods to `lodash.prototype`.
+  baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+    var lodashFunc = lodash[methodName];
+    if (!lodashFunc) {
+      return;
+    }
+    var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
+        retUnwrapped = /^(?:first|last)$/.test(methodName);
+
+    lodash.prototype[methodName] = function() {
+      var args = arguments,
+          chainAll = this.__chain__,
+          value = this.__wrapped__,
+          isHybrid = !!this.__actions__.length,
+          isLazy = value instanceof LazyWrapper,
+          iteratee = args[0],
+          useLazy = isLazy || isArray(value);
+
+      if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+        // avoid lazy use if the iteratee has a "length" value other than `1`
+        isLazy = useLazy = false;
       }
-      return this;
+      var onlyLazy = isLazy && !isHybrid;
+      if (retUnwrapped && !chainAll) {
+        return onlyLazy
+          ? func.call(value)
+          : lodashFunc.call(lodash, this.value());
+      }
+      var interceptor = function(value) {
+        var otherArgs = [value];
+        push.apply(otherArgs, args);
+        return lodashFunc.apply(lodash, otherArgs);
+      };
+      if (useLazy) {
+        var wrapper = onlyLazy ? value : new LazyWrapper(this),
+            result = func.apply(wrapper, args);
+
+        if (!retUnwrapped && (isHybrid || result.__actions__)) {
+          var actions = result.__actions__ || (result.__actions__ = []);
+          actions.push({ 'func': thru, 'args': [interceptor], 'thisArg': lodash });
+        }
+        return new LodashWrapper(result, chainAll);
+      }
+      return this.thru(interceptor);
     };
-    /** 
-     * Defines a base64 pad string 
-     * @param {String} Pad
-     * @return {Object} this
-     */ 
-    this.setPad = function (a) {
-      b64pad = a || b64pad;
-      return this;
+  });
+
+  // Add `Array` and `String` methods to `lodash.prototype`.
+  arrayEach(['concat', 'join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) {
+    var protoFunc = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName],
+        chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+        fixObjects = !support.spliceObjects && /^(?:pop|shift|splice)$/.test(methodName),
+        retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);
+
+    // Avoid array-like object bugs with `Array#shift` and `Array#splice` in
+    // IE < 9, Firefox < 10, and RingoJS.
+    var func = !fixObjects ? protoFunc : function() {
+      var result = protoFunc.apply(this, arguments);
+      if (this.length === 0) {
+        delete this[0];
+      }
+      return result;
     };
-    /** 
-     * Defines a base64 pad string 
-     * @param {Boolean} 
-     * @return {Object} [this]
-     */ 
-    this.setUTF8 = function (a) {
-      if (typeof a === 'boolean') { 
-        utf8 = a;
+
+    lodash.prototype[methodName] = function() {
+      var args = arguments;
+      if (retUnwrapped && !this.__chain__) {
+        return func.apply(this.value(), args);
       }
-      return this;
+      return this[chainName](function(value) {
+        return func.apply(value, args);
+      });
     };
+  });
 
-    // private methods
+  // Map minified function names to their real names.
+  baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+    var lodashFunc = lodash[methodName];
+    if (lodashFunc) {
+      var key = lodashFunc.name,
+          names = realNames[key] || (realNames[key] = []);
 
-    /**
-     * Calculate the MD5 of a raw string
-     */
-    function rstr(s) {
-      s = (utf8) ? utf8Encode(s): s;
-      return binl2rstr(binl(rstr2binl(s), s.length * 8));
+      names.push({ 'name': methodName, 'func': lodashFunc });
     }
-    
-    /**
-     * Calculate the HMAC-MD5, of a key and some data (raw strings)
-     */
-    function rstr_hmac(key, data) {
-      var bkey, ipad, opad, hash, i;
-
-      key = (utf8) ? utf8Encode(key) : key;
-      data = (utf8) ? utf8Encode(data) : data;
-      bkey = rstr2binl(key);
-      if (bkey.length > 16) { 
-        bkey = binl(bkey, key.length * 8); 
-      }
+  });
 
-      ipad = Array(16), opad = Array(16); 
-      for (i = 0; i < 16; i+=1) {
-          ipad[i] = bkey[i] ^ 0x36363636;
-          opad[i] = bkey[i] ^ 0x5C5C5C5C;
-      }
-      hash = binl(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
-      return binl2rstr(binl(opad.concat(hash), 512 + 128));
-    }
+  realNames[createHybridWrapper(null, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': null }];
 
-    /**
-     * Calculate the MD5 of an array of little-endian words, and a bit length.
-     */
-    function binl(x, len) {
-      var i, olda, oldb, oldc, oldd,
-          a =  1732584193,
-          b = -271733879,
-          c = -1732584194,
-          d =  271733878;
-        
-      /* append padding */
-      x[len >> 5] |= 0x80 << ((len) % 32);
-      x[(((len + 64) >>> 9) << 4) + 14] = len;
+  // Add functions to the lazy wrapper.
+  LazyWrapper.prototype.clone = lazyClone;
+  LazyWrapper.prototype.reverse = lazyReverse;
+  LazyWrapper.prototype.value = lazyValue;
 
-      for (i = 0; i < x.length; i += 16) {
-        olda = a;
-        oldb = b;
-        oldc = c;
-        oldd = d;
+  // Add chaining functions to the `lodash` wrapper.
+  lodash.prototype.chain = wrapperChain;
+  lodash.prototype.commit = wrapperCommit;
+  lodash.prototype.plant = wrapperPlant;
+  lodash.prototype.reverse = wrapperReverse;
+  lodash.prototype.toString = wrapperToString;
+  lodash.prototype.run = lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
 
-        a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
-        d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
-        c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
-        b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
-        a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
-        d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
-        c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
-        b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
-        a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
-        d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
-        c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
-        b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
-        a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
-        d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
-        c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
-        b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
+  // Add function aliases to the `lodash` wrapper.
+  lodash.prototype.collect = lodash.prototype.map;
+  lodash.prototype.head = lodash.prototype.first;
+  lodash.prototype.select = lodash.prototype.filter;
+  lodash.prototype.tail = lodash.prototype.rest;
 
-        a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
-        d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
-        c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
-        b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
-        a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
-        d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
-        c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
-        b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
-        a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
-        d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
-        c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
-        b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
-        a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
-        d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
-        c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
-        b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+  /*--------------------------------------------------------------------------*/
 
-        a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
-        d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
-        c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
-        b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
-        a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
-        d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
-        c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
-        b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
-        a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
-        d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
-        c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
-        b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
-        a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
-        d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
-        c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
-        b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+  if (freeExports && freeModule) {
+    // Export for Node.js or RingoJS.
+    if (moduleExports) {
+      (freeModule.exports = lodash)._ = lodash;
+    }
+  }
+  else {
+    // Export for a browser or Rhino.
+    root._ = lodash;
+  }
+}.call(this));
+(function(e){if("function"==typeof bootstrap)bootstrap("osmauth",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeOsmAuth=e}else"undefined"!=typeof window?window.osmAuth=e():global.osmAuth=e()})(function(){var define,ses,bootstrap,module,exports;
+return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
+'use strict';
 
-        a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
-        d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
-        c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
-        b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
-        a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
-        d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
-        c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
-        b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
-        a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
-        d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
-        c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
-        b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
-        a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
-        d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
-        c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
-        b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+var ohauth = require('ohauth'),
+    xtend = require('xtend'),
+    store = require('store');
 
-        a = safe_add(a, olda);
-        b = safe_add(b, oldb);
-        c = safe_add(c, oldc);
-        d = safe_add(d, oldd);
-      }
-      return Array(a, b, c, d);
-    }
+// # osm-auth
+//
+// This code is only compatible with IE10+ because the [XDomainRequest](http://bit.ly/LfO7xo)
+// object, IE<10's idea of [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing),
+// does not support custom headers, which this uses everywhere.
+module.exports = function(o) {
 
-    /**
-     * These functions implement the four basic operations the algorithm uses.
-     */
-    function md5_cmn(q, a, b, x, s, t) {
-      return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
-    }
-    function md5_ff(a, b, c, d, x, s, t) {
-      return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-    }
-    function md5_gg(a, b, c, d, x, s, t) {
-      return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-    }
-    function md5_hh(a, b, c, d, x, s, t) {
-      return md5_cmn(b ^ c ^ d, a, b, x, s, t);
-    }
-    function md5_ii(a, b, c, d, x, s, t) {
-      return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-    }
-  },
-  /**
-   * @member Hashes
-   * @class Hashes.SHA1
-   * @param {Object} [config]
-   * @constructor
-   * 
-   * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined in FIPS 180-1
-   * Version 2.2 Copyright Paul Johnston 2000 - 2009.
-   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
-   * See http://pajhome.org.uk/crypt/md5 for details.
-   */
-  SHA1 : function (options) {
-   /**
-     * Private config properties. You may need to tweak these to be compatible with
-     * the server-side, but the defaults work in most cases.
-     * See {@link Hashes.MD5#method-setUpperCase} and {@link Hashes.SHA1#method-setUpperCase}
-     */
-    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase
-        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', // base-64 pad character. Defaults to '=' for strict RFC compliance
-        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true; // enable/disable utf8 encoding
+    var oauth = {};
 
-    // public methods
-    this.hex = function (s) { 
-       return rstr2hex(rstr(s, utf8), hexcase); 
-    };
-    this.b64 = function (s) { 
-       return rstr2b64(rstr(s, utf8), b64pad);
-    };
-    this.any = function (s, e) { 
-       return rstr2any(rstr(s, utf8), e);
-    };
-    this.hex_hmac = function (k, d) {
-       return rstr2hex(rstr_hmac(k, d));
-    };
-    this.b64_hmac = function (k, d) { 
-       return rstr2b64(rstr_hmac(k, d), b64pad); 
-    };
-    this.any_hmac = function (k, d, e) { 
-       return rstr2any(rstr_hmac(k, d), e);
-    };
-    /**
-     * Perform a simple self-test to see if the VM is working
-     * @return {String} Hexadecimal hash sample
-     * @public
-     */
-    this.vm_test = function () {
-      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
-    };
-    /** 
-     * @description Enable/disable uppercase hexadecimal returned string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUpperCase = function (a) {
-       if (typeof a === 'boolean') {
-        hexcase = a;
-      }
-       return this;
-    };
-    /** 
-     * @description Defines a base64 pad string 
-     * @param {string} Pad
-     * @return {Object} this
-     * @public
-     */ 
-    this.setPad = function (a) {
-      b64pad = a || b64pad;
-       return this;
+    // authenticated users will also have a request token secret, but it's
+    // not used in transactions with the server
+    oauth.authenticated = function() {
+        return !!(token('oauth_token') && token('oauth_token_secret'));
     };
-    /** 
-     * @description Defines a base64 pad string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUTF8 = function (a) {
-       if (typeof a === 'boolean') {
-        utf8 = a;
-      }
-       return this;
+
+    oauth.logout = function() {
+        token('oauth_token', '');
+        token('oauth_token_secret', '');
+        token('oauth_request_token_secret', '');
+        return oauth;
     };
 
-    // private methods
+    // TODO: detect lack of click event
+    oauth.authenticate = function(callback) {
+        if (oauth.authenticated()) return callback();
 
-    /**
-        * Calculate the SHA-512 of a raw string
-        */
-       function rstr(s) {
-      s = (utf8) ? utf8Encode(s) : s;
-      return binb2rstr(binb(rstr2binb(s), s.length * 8));
-       }
+        oauth.logout();
 
-    /**
-     * Calculate the HMAC-SHA1 of a key and some data (raw strings)
-     */
-    function rstr_hmac(key, data) {
-       var bkey, ipad, opad, i, hash;
-       key = (utf8) ? utf8Encode(key) : key;
-       data = (utf8) ? utf8Encode(data) : data;
-       bkey = rstr2binb(key);
+        // ## Getting a request token
+        var params = timenonce(getAuth(o)),
+            url = o.url + '/oauth/request_token';
 
-       if (bkey.length > 16) {
-        bkey = binb(bkey, key.length * 8);
-      }
-       ipad = Array(16), opad = Array(16);
-       for (i = 0; i < 16; i+=1) {
-               ipad[i] = bkey[i] ^ 0x36363636;
-               opad[i] = bkey[i] ^ 0x5C5C5C5C;
-       }
-       hash = binb(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
-       return binb2rstr(binb(opad.concat(hash), 512 + 160));
-    }
+        params.oauth_signature = ohauth.signature(
+            o.oauth_secret, '',
+            ohauth.baseString('POST', url, params));
 
-    /**
-     * Calculate the SHA-1 of an array of big-endian words, and a bit length
-     */
-    function binb(x, len) {
-      var i, j, t, olda, oldb, oldc, oldd, olde,
-          w = Array(80),
-          a =  1732584193,
-          b = -271733879,
-          c = -1732584194,
-          d =  271733878,
-          e = -1009589776;
+        if (!o.singlepage) {
+            // Create a 600x550 popup window in the center of the screen
+            var w = 600, h = 550,
+                settings = [
+                    ['width', w], ['height', h],
+                    ['left', screen.width / 2 - w / 2],
+                    ['top', screen.height / 2 - h / 2]].map(function(x) {
+                        return x.join('=');
+                    }).join(','),
+                popup = window.open('about:blank', 'oauth_window', settings);
+        }
 
-      /* append padding */
-      x[len >> 5] |= 0x80 << (24 - len % 32);
-      x[((len + 64 >> 9) << 4) + 15] = len;
+        // Request a request token. When this is complete, the popup
+        // window is redirected to OSM's authorization page.
+        ohauth.xhr('POST', url, params, null, {}, reqTokenDone);
+        o.loading();
 
-      for (i = 0; i < x.length; i += 16) {
-        olda = a,
-        oldb = b;
-        oldc = c;
-        oldd = d;
-        olde = e;
-      
-       for (j = 0; j < 80; j+=1)       {
-         if (j < 16) { 
-            w[j] = x[i + j]; 
-          } else { 
-            w[j] = bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); 
-          }
-         t = safe_add(safe_add(bit_rol(a, 5), sha1_ft(j, b, c, d)),
-                                          safe_add(safe_add(e, w[j]), sha1_kt(j)));
-         e = d;
-         d = c;
-         c = bit_rol(b, 30);
-         b = a;
-         a = t;
-       }
+        function reqTokenDone(err, xhr) {
+            o.done();
+            if (err) return callback(err);
+            var resp = ohauth.stringQs(xhr.response);
+            token('oauth_request_token_secret', resp.oauth_token_secret);
+            var authorize_url = o.url + '/oauth/authorize?' + ohauth.qsString({
+                oauth_token: resp.oauth_token,
+                oauth_callback: location.href.replace('index.html', '')
+                    .replace(/#.*/, '') + o.landing
+            });
 
-       a = safe_add(a, olda);
-       b = safe_add(b, oldb);
-       c = safe_add(c, oldc);
-       d = safe_add(d, oldd);
-       e = safe_add(e, olde);
-      }
-      return Array(a, b, c, d, e);
-    }
+            if (o.singlepage) {
+                location.href = authorize_url;
+            } else {
+                popup.location = authorize_url;
+            }
+        }
 
-    /**
-     * Perform the appropriate triplet combination function for the current
-     * iteration
-     */
-    function sha1_ft(t, b, c, d) {
-      if (t < 20) { return (b & c) | ((~b) & d); }
-      if (t < 40) { return b ^ c ^ d; }
-      if (t < 60) { return (b & c) | (b & d) | (c & d); }
-      return b ^ c ^ d;
-    }
+        // Called by a function in a landing page, in the popup window. The
+        // window closes itself.
+        window.authComplete = function(token) {
+            var oauth_token = ohauth.stringQs(token.split('?')[1]);
+            get_access_token(oauth_token.oauth_token);
+            delete window.authComplete;
+        };
 
-    /**
-     * Determine the appropriate additive constant for the current iteration
-     */
-    function sha1_kt(t) {
-      return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
-                (t < 60) ? -1894007588 : -899497514;
-    }
-  },
-  /**
-   * @class Hashes.SHA256
-   * @param {config}
-   * 
-   * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined in FIPS 180-2
-   * Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.
-   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
-   * See http://pajhome.org.uk/crypt/md5 for details.
-   * Also http://anmar.eu.org/projects/jssha2/
-   */
-  SHA256 : function (options) {
-    /**
-     * Private properties configuration variables. You may need to tweak these to be compatible with
-     * the server-side, but the defaults work in most cases.
-     * @see this.setUpperCase() method
-     * @see this.setPad() method
-     */
-    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase  */
-              b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', /* base-64 pad character. Default '=' for strict RFC compliance   */
-              utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
-              sha256_K;
+        // ## Getting an request token
+        //
+        // At this point we have an `oauth_token`, brought in from a function
+        // call on a landing page popup.
+        function get_access_token(oauth_token) {
+            var url = o.url + '/oauth/access_token',
+                params = timenonce(getAuth(o)),
+                request_token_secret = token('oauth_request_token_secret');
+            params.oauth_token = oauth_token;
+            params.oauth_signature = ohauth.signature(
+                o.oauth_secret,
+                request_token_secret,
+                ohauth.baseString('POST', url, params));
 
-    /* privileged (public) methods */
-    this.hex = function (s) { 
-      return rstr2hex(rstr(s, utf8)); 
-    };
-    this.b64 = function (s) { 
-      return rstr2b64(rstr(s, utf8), b64pad);
-    };
-    this.any = function (s, e) { 
-      return rstr2any(rstr(s, utf8), e); 
-    };
-    this.hex_hmac = function (k, d) { 
-      return rstr2hex(rstr_hmac(k, d)); 
-    };
-    this.b64_hmac = function (k, d) { 
-      return rstr2b64(rstr_hmac(k, d), b64pad);
-    };
-    this.any_hmac = function (k, d, e) { 
-      return rstr2any(rstr_hmac(k, d), e); 
+            // ## Getting an access token
+            //
+            // The final token required for authentication. At this point
+            // we have a `request token secret`
+            ohauth.xhr('POST', url, params, null, {}, accessTokenDone);
+            o.loading();
+        }
+
+        function accessTokenDone(err, xhr) {
+            o.done();
+            if (err) return callback(err);
+            var access_token = ohauth.stringQs(xhr.response);
+            token('oauth_token', access_token.oauth_token);
+            token('oauth_token_secret', access_token.oauth_token_secret);
+            callback(null, oauth);
+        }
     };
-    /**
-     * Perform a simple self-test to see if the VM is working
-     * @return {String} Hexadecimal hash sample
-     * @public
-     */
-    this.vm_test = function () {
-      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
+
+    oauth.bootstrapToken = function(oauth_token, callback) {
+        // ## Getting an request token
+        // At this point we have an `oauth_token`, brought in from a function
+        // call on a landing page popup.
+        function get_access_token(oauth_token) {
+            var url = o.url + '/oauth/access_token',
+                params = timenonce(getAuth(o)),
+                request_token_secret = token('oauth_request_token_secret');
+            params.oauth_token = oauth_token;
+            params.oauth_signature = ohauth.signature(
+                o.oauth_secret,
+                request_token_secret,
+                ohauth.baseString('POST', url, params));
+
+            // ## Getting an access token
+            // The final token required for authentication. At this point
+            // we have a `request token secret`
+            ohauth.xhr('POST', url, params, null, {}, accessTokenDone);
+            o.loading();
+        }
+
+        function accessTokenDone(err, xhr) {
+            o.done();
+            if (err) return callback(err);
+            var access_token = ohauth.stringQs(xhr.response);
+            token('oauth_token', access_token.oauth_token);
+            token('oauth_token_secret', access_token.oauth_token_secret);
+            callback(null, oauth);
+        }
+
+        get_access_token(oauth_token);
     };
-    /** 
-     * Enable/disable uppercase hexadecimal returned string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUpperCase = function (a) {
-      if (typeof a === 'boolean') { 
-        hexcase = a;
-      }
-      return this;
+
+    // # xhr
+    //
+    // A single XMLHttpRequest wrapper that does authenticated calls if the
+    // user has logged in.
+    oauth.xhr = function(options, callback) {
+        if (!oauth.authenticated()) {
+            if (o.auto) return oauth.authenticate(run);
+            else return callback('not authenticated', null);
+        } else return run();
+
+        function run() {
+            var params = timenonce(getAuth(o)),
+                url = o.url + options.path,
+                oauth_token_secret = token('oauth_token_secret');
+
+            // https://tools.ietf.org/html/rfc5849#section-3.4.1.3.1
+            if ((!options.options || !options.options.header ||
+                options.options.header['Content-Type'] === 'application/x-www-form-urlencoded') &&
+                options.content) {
+                params = xtend(params, ohauth.stringQs(options.content));
+            }
+
+            params.oauth_token = token('oauth_token');
+            params.oauth_signature = ohauth.signature(
+                o.oauth_secret,
+                oauth_token_secret,
+                ohauth.baseString(options.method, url, params));
+
+            ohauth.xhr(options.method,
+                url, params, options.content, options.options, done);
+        }
+
+        function done(err, xhr) {
+            if (err) return callback(err);
+            else if (xhr.responseXML) return callback(err, xhr.responseXML);
+            else return callback(err, xhr.response);
+        }
     };
-    /** 
-     * @description Defines a base64 pad string 
-     * @param {string} Pad
-     * @return {Object} this
-     * @public
-     */ 
-    this.setPad = function (a) {
-      b64pad = a || b64pad;
-      return this;
+
+    // pre-authorize this object, if we can just get a token and token_secret
+    // from the start
+    oauth.preauth = function(c) {
+        if (!c) return;
+        if (c.oauth_token) token('oauth_token', c.oauth_token);
+        if (c.oauth_token_secret) token('oauth_token_secret', c.oauth_token_secret);
+        return oauth;
     };
-    /** 
-     * Defines a base64 pad string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUTF8 = function (a) {
-      if (typeof a === 'boolean') {
-        utf8 = a;
-      }
-      return this;
+
+    oauth.options = function(_) {
+        if (!arguments.length) return o;
+
+        o = _;
+
+        o.url = o.url || 'http://www.openstreetmap.org';
+        o.landing = o.landing || 'land.html';
+
+        o.singlepage = o.singlepage || false;
+
+        // Optional loading and loading-done functions for nice UI feedback.
+        // by default, no-ops
+        o.loading = o.loading || function() {};
+        o.done = o.done || function() {};
+
+        return oauth.preauth(o);
     };
-    
-    // private methods
 
-    /**
-     * Calculate the SHA-512 of a raw string
-     */
-    function rstr(s, utf8) {
-      s = (utf8) ? utf8Encode(s) : s;
-      return binb2rstr(binb(rstr2binb(s), s.length * 8));
+    // 'stamp' an authentication object from `getAuth()`
+    // with a [nonce](http://en.wikipedia.org/wiki/Cryptographic_nonce)
+    // and timestamp
+    function timenonce(o) {
+        o.oauth_timestamp = ohauth.timestamp();
+        o.oauth_nonce = ohauth.nonce();
+        return o;
     }
 
-    /**
-     * Calculate the HMAC-sha256 of a key and some data (raw strings)
-     */
-    function rstr_hmac(key, data) {
-      key = (utf8) ? utf8Encode(key) : key;
-      data = (utf8) ? utf8Encode(data) : data;
-      var hash, i = 0,
-          bkey = rstr2binb(key), 
-          ipad = Array(16), 
-          opad = Array(16);
+    // get/set tokens. These are prefixed with the base URL so that `osm-auth`
+    // can be used with multiple APIs and the keys in `localStorage`
+    // will not clash
+    var token;
 
-      if (bkey.length > 16) { bkey = binb(bkey, key.length * 8); }
-      
-      for (; i < 16; i+=1) {
-        ipad[i] = bkey[i] ^ 0x36363636;
-        opad[i] = bkey[i] ^ 0x5C5C5C5C;
-      }
-      
-      hash = binb(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
-      return binb2rstr(binb(opad.concat(hash), 512 + 256));
+    if (store.enabled) {
+        token = function (x, y) {
+            if (arguments.length === 1) return store.get(o.url + x);
+            else if (arguments.length === 2) return store.set(o.url + x, y);
+        };
+    } else {
+        var storage = {};
+        token = function (x, y) {
+            if (arguments.length === 1) return storage[o.url + x];
+            else if (arguments.length === 2) return storage[o.url + x] = y;
+        };
     }
-    
-    /*
-     * Main sha256 function, with its support functions
-     */
-    function sha256_S (X, n) {return ( X >>> n ) | (X << (32 - n));}
-    function sha256_R (X, n) {return ( X >>> n );}
-    function sha256_Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}
-    function sha256_Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}
-    function sha256_Sigma0256(x) {return (sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22));}
-    function sha256_Sigma1256(x) {return (sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25));}
-    function sha256_Gamma0256(x) {return (sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3));}
-    function sha256_Gamma1256(x) {return (sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10));}
-    function sha256_Sigma0512(x) {return (sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39));}
-    function sha256_Sigma1512(x) {return (sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41));}
-    function sha256_Gamma0512(x) {return (sha256_S(x, 1)  ^ sha256_S(x, 8) ^ sha256_R(x, 7));}
-    function sha256_Gamma1512(x) {return (sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6));}
-    
-    sha256_K = [
-      1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993,
-      -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987,
-      1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522,
-      264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986,
-      -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585,
-      113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291,
-      1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885,
-      -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344,
-      430227734, 506948616, 659060556, 883997877, 958139571, 1322822218,
-      1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872,
-      -1866530822, -1538233109, -1090935817, -965641998
-    ];
-    
-    function binb(m, l) {
-      var HASH = [1779033703, -1150833019, 1013904242, -1521486534,
-                 1359893119, -1694144372, 528734635, 1541459225];
-      var W = new Array(64);
-      var a, b, c, d, e, f, g, h;
-      var i, j, T1, T2;
-    
-      /* append padding */
-      m[l >> 5] |= 0x80 << (24 - l % 32);
-      m[((l + 64 >> 9) << 4) + 15] = l;
-    
-      for (i = 0; i < m.length; i += 16)
-      {
-      a = HASH[0];
-      b = HASH[1];
-      c = HASH[2];
-      d = HASH[3];
-      e = HASH[4];
-      f = HASH[5];
-      g = HASH[6];
-      h = HASH[7];
-    
-      for (j = 0; j < 64; j+=1)
-      {
-        if (j < 16) { 
-          W[j] = m[j + i];
-        } else { 
-          W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]),
-                          sha256_Gamma0256(W[j - 15])), W[j - 16]);
-        }
-    
-        T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)),
-                                  sha256_K[j]), W[j]);
-        T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c));
-        h = g;
-        g = f;
-        f = e;
-        e = safe_add(d, T1);
-        d = c;
-        c = b;
-        b = a;
-        a = safe_add(T1, T2);
-      }
-    
-      HASH[0] = safe_add(a, HASH[0]);
-      HASH[1] = safe_add(b, HASH[1]);
-      HASH[2] = safe_add(c, HASH[2]);
-      HASH[3] = safe_add(d, HASH[3]);
-      HASH[4] = safe_add(e, HASH[4]);
-      HASH[5] = safe_add(f, HASH[5]);
-      HASH[6] = safe_add(g, HASH[6]);
-      HASH[7] = safe_add(h, HASH[7]);
-      }
-      return HASH;
+
+    // Get an authentication object. If you just add and remove properties
+    // from a single object, you'll need to use `delete` to make sure that
+    // it doesn't contain undesired properties for authentication
+    function getAuth(o) {
+        return {
+            oauth_consumer_key: o.oauth_consumer_key,
+            oauth_signature_method: "HMAC-SHA1"
+        };
     }
 
-  },
+    // potentially pre-authorize
+    oauth.options(o);
 
-  /**
-   * @class Hashes.SHA512
-   * @param {config}
-   * 
-   * A JavaScript implementation of the Secure Hash Algorithm, SHA-512, as defined in FIPS 180-2
-   * Version 2.2 Copyright Anonymous Contributor, Paul Johnston 2000 - 2009.
-   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
-   * See http://pajhome.org.uk/crypt/md5 for details. 
-   */
-  SHA512 : function (options) {
-    /**
-     * Private properties configuration variables. You may need to tweak these to be compatible with
-     * the server-side, but the defaults work in most cases.
-     * @see this.setUpperCase() method
-     * @see this.setPad() method
-     */
-    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false , /* hexadecimal output case format. false - lowercase; true - uppercase  */
-        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=',  /* base-64 pad character. Default '=' for strict RFC compliance   */
-        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
-        sha512_k;
+    return oauth;
+};
 
-    /* privileged (public) methods */
-    this.hex = function (s) { 
-      return rstr2hex(rstr(s)); 
-    };
-    this.b64 = function (s) { 
-      return rstr2b64(rstr(s), b64pad);  
-    };
-    this.any = function (s, e) { 
-      return rstr2any(rstr(s), e);
-    };
-    this.hex_hmac = function (k, d) {
-      return rstr2hex(rstr_hmac(k, d));
-    };
-    this.b64_hmac = function (k, d) { 
-      return rstr2b64(rstr_hmac(k, d), b64pad);
-    };
-    this.any_hmac = function (k, d, e) { 
-      return rstr2any(rstr_hmac(k, d), e);
-    };
-    /**
-     * Perform a simple self-test to see if the VM is working
-     * @return {String} Hexadecimal hash sample
-     * @public
-     */
-    this.vm_test = function () {
-      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
-    };
-    /** 
-     * @description Enable/disable uppercase hexadecimal returned string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUpperCase = function (a) {
-      if (typeof a === 'boolean') {
-        hexcase = a;
-      }
-      return this;
-    };
-    /** 
-     * @description Defines a base64 pad string 
-     * @param {string} Pad
-     * @return {Object} this
-     * @public
-     */ 
-    this.setPad = function (a) {
-      b64pad = a || b64pad;
-      return this;
-    };
-    /** 
-     * @description Defines a base64 pad string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
-     */ 
-    this.setUTF8 = function (a) {
-      if (typeof a === 'boolean') {
-        utf8 = a;
-      }
-      return this;
-    };
+},{"ohauth":2,"store":3,"xtend":4}],3:[function(require,module,exports){
+(function(global){;(function(win){
+       var store = {},
+               doc = win.document,
+               localStorageName = 'localStorage',
+               storage
 
-    /* private methods */
-    
-    /**
-     * Calculate the SHA-512 of a raw string
-     */
-    function rstr(s) {
-      s = (utf8) ? utf8Encode(s) : s;
-      return binb2rstr(binb(rstr2binb(s), s.length * 8));
-    }
-    /*
-     * Calculate the HMAC-SHA-512 of a key and some data (raw strings)
-     */
-    function rstr_hmac(key, data) {
-      key = (utf8) ? utf8Encode(key) : key;
-      data = (utf8) ? utf8Encode(data) : data;
-      
-      var hash, i = 0, 
-          bkey = rstr2binb(key),
-          ipad = Array(32), opad = Array(32);
+       store.disabled = false
+       store.set = function(key, value) {}
+       store.get = function(key) {}
+       store.remove = function(key) {}
+       store.clear = function() {}
+       store.transact = function(key, defaultVal, transactionFn) {
+               var val = store.get(key)
+               if (transactionFn == null) {
+                       transactionFn = defaultVal
+                       defaultVal = null
+               }
+               if (typeof val == 'undefined') { val = defaultVal || {} }
+               transactionFn(val)
+               store.set(key, val)
+       }
+       store.getAll = function() {}
+       store.forEach = function() {}
 
-      if (bkey.length > 32) { bkey = binb(bkey, key.length * 8); }
-      
-      for (; i < 32; i+=1) {
-        ipad[i] = bkey[i] ^ 0x36363636;
-        opad[i] = bkey[i] ^ 0x5C5C5C5C;
-      }
-      
-      hash = binb(ipad.concat(rstr2binb(data)), 1024 + data.length * 8);
-      return binb2rstr(binb(opad.concat(hash), 1024 + 512));
-    }
-            
-    /**
-     * Calculate the SHA-512 of an array of big-endian dwords, and a bit length
-     */
-    function binb(x, len) {
-      var j, i, l,
-          W = new Array(80),
-          hash = new Array(16),
-          //Initial hash values
-          H = [
-            new int64(0x6a09e667, -205731576),
-            new int64(-1150833019, -2067093701),
-            new int64(0x3c6ef372, -23791573),
-            new int64(-1521486534, 0x5f1d36f1),
-            new int64(0x510e527f, -1377402159),
-            new int64(-1694144372, 0x2b3e6c1f),
-            new int64(0x1f83d9ab, -79577749),
-            new int64(0x5be0cd19, 0x137e2179)
-          ],
-          T1 = new int64(0, 0),
-          T2 = new int64(0, 0),
-          a = new int64(0,0),
-          b = new int64(0,0),
-          c = new int64(0,0),
-          d = new int64(0,0),
-          e = new int64(0,0),
-          f = new int64(0,0),
-          g = new int64(0,0),
-          h = new int64(0,0),
-          //Temporary variables not specified by the document
-          s0 = new int64(0, 0),
-          s1 = new int64(0, 0),
-          Ch = new int64(0, 0),
-          Maj = new int64(0, 0),
-          r1 = new int64(0, 0),
-          r2 = new int64(0, 0),
-          r3 = new int64(0, 0);
+       store.serialize = function(value) {
+               return JSON.stringify(value)
+       }
+       store.deserialize = function(value) {
+               if (typeof value != 'string') { return undefined }
+               try { return JSON.parse(value) }
+               catch(e) { return value || undefined }
+       }
 
-      if (sha512_k === undefined) {
-          //SHA512 constants
-          sha512_k = [
-            new int64(0x428a2f98, -685199838), new int64(0x71374491, 0x23ef65cd),
-            new int64(-1245643825, -330482897), new int64(-373957723, -2121671748),
-            new int64(0x3956c25b, -213338824), new int64(0x59f111f1, -1241133031),
-            new int64(-1841331548, -1357295717), new int64(-1424204075, -630357736),
-            new int64(-670586216, -1560083902), new int64(0x12835b01, 0x45706fbe),
-            new int64(0x243185be, 0x4ee4b28c), new int64(0x550c7dc3, -704662302),
-            new int64(0x72be5d74, -226784913), new int64(-2132889090, 0x3b1696b1),
-            new int64(-1680079193, 0x25c71235), new int64(-1046744716, -815192428),
-            new int64(-459576895, -1628353838), new int64(-272742522, 0x384f25e3),
-            new int64(0xfc19dc6, -1953704523), new int64(0x240ca1cc, 0x77ac9c65),
-            new int64(0x2de92c6f, 0x592b0275), new int64(0x4a7484aa, 0x6ea6e483),
-            new int64(0x5cb0a9dc, -1119749164), new int64(0x76f988da, -2096016459),
-            new int64(-1740746414, -295247957), new int64(-1473132947, 0x2db43210),
-            new int64(-1341970488, -1728372417), new int64(-1084653625, -1091629340),
-            new int64(-958395405, 0x3da88fc2), new int64(-710438585, -1828018395),
-            new int64(0x6ca6351, -536640913), new int64(0x14292967, 0xa0e6e70),
-            new int64(0x27b70a85, 0x46d22ffc), new int64(0x2e1b2138, 0x5c26c926),
-            new int64(0x4d2c6dfc, 0x5ac42aed), new int64(0x53380d13, -1651133473),
-            new int64(0x650a7354, -1951439906), new int64(0x766a0abb, 0x3c77b2a8),
-            new int64(-2117940946, 0x47edaee6), new int64(-1838011259, 0x1482353b),
-            new int64(-1564481375, 0x4cf10364), new int64(-1474664885, -1136513023),
-            new int64(-1035236496, -789014639), new int64(-949202525, 0x654be30),
-            new int64(-778901479, -688958952), new int64(-694614492, 0x5565a910),
-            new int64(-200395387, 0x5771202a), new int64(0x106aa070, 0x32bbd1b8),
-            new int64(0x19a4c116, -1194143544), new int64(0x1e376c08, 0x5141ab53),
-            new int64(0x2748774c, -544281703), new int64(0x34b0bcb5, -509917016),
-            new int64(0x391c0cb3, -976659869), new int64(0x4ed8aa4a, -482243893),
-            new int64(0x5b9cca4f, 0x7763e373), new int64(0x682e6ff3, -692930397),
-            new int64(0x748f82ee, 0x5defb2fc), new int64(0x78a5636f, 0x43172f60),
-            new int64(-2067236844, -1578062990), new int64(-1933114872, 0x1a6439ec),
-            new int64(-1866530822, 0x23631e28), new int64(-1538233109, -561857047),
-            new int64(-1090935817, -1295615723), new int64(-965641998, -479046869),
-            new int64(-903397682, -366583396), new int64(-779700025, 0x21c0c207),
-            new int64(-354779690, -840897762), new int64(-176337025, -294727304),
-            new int64(0x6f067aa, 0x72176fba), new int64(0xa637dc5, -1563912026),
-            new int64(0x113f9804, -1090974290), new int64(0x1b710b35, 0x131c471b),
-            new int64(0x28db77f5, 0x23047d84), new int64(0x32caab7b, 0x40c72493),
-            new int64(0x3c9ebe0a, 0x15c9bebc), new int64(0x431d67c4, -1676669620),
-            new int64(0x4cc5d4be, -885112138), new int64(0x597f299c, -60457430),
-            new int64(0x5fcb6fab, 0x3ad6faec), new int64(0x6c44198c, 0x4a475817)
-          ];
-      }
+       // Functions to encapsulate questionable FireFox 3.6.13 behavior
+       // when about.config::dom.storage.enabled === false
+       // See https://github.com/marcuswestin/store.js/issues#issue/13
+       function isLocalStorageNameSupported() {
+               try { return (localStorageName in win && win[localStorageName]) }
+               catch(err) { return false }
+       }
+
+       if (isLocalStorageNameSupported()) {
+               storage = win[localStorageName]
+               store.set = function(key, val) {
+                       if (val === undefined) { return store.remove(key) }
+                       storage.setItem(key, store.serialize(val))
+                       return val
+               }
+               store.get = function(key) { return store.deserialize(storage.getItem(key)) }
+               store.remove = function(key) { storage.removeItem(key) }
+               store.clear = function() { storage.clear() }
+               store.getAll = function() {
+                       var ret = {}
+                       store.forEach(function(key, val) {
+                               ret[key] = val
+                       })
+                       return ret
+               }
+               store.forEach = function(callback) {
+                       for (var i=0; i<storage.length; i++) {
+                               var key = storage.key(i)
+                               callback(key, store.get(key))
+                       }
+               }
+       } else if (doc.documentElement.addBehavior) {
+               var storageOwner,
+                       storageContainer
+               // Since #userData storage applies only to specific paths, we need to
+               // somehow link our data to a specific path.  We choose /favicon.ico
+               // as a pretty safe option, since all browsers already make a request to
+               // this URL anyway and being a 404 will not hurt us here.  We wrap an
+               // iframe pointing to the favicon in an ActiveXObject(htmlfile) object
+               // (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)
+               // since the iframe access rules appear to allow direct access and
+               // manipulation of the document element, even for a 404 page.  This
+               // document can be used instead of the current document (which would
+               // have been limited to the current path) to perform #userData storage.
+               try {
+                       storageContainer = new ActiveXObject('htmlfile')
+                       storageContainer.open()
+                       storageContainer.write('<s' + 'cript>document.w=window</s' + 'cript><iframe src="/favicon.ico"></iframe>')
+                       storageContainer.close()
+                       storageOwner = storageContainer.w.frames[0].document
+                       storage = storageOwner.createElement('div')
+               } catch(e) {
+                       // somehow ActiveXObject instantiation failed (perhaps some special
+                       // security settings or otherwse), fall back to per-path storage
+                       storage = doc.createElement('div')
+                       storageOwner = doc.body
+               }
+               function withIEStorage(storeFunction) {
+                       return function() {
+                               var args = Array.prototype.slice.call(arguments, 0)
+                               args.unshift(storage)
+                               // See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx
+                               // and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx
+                               storageOwner.appendChild(storage)
+                               storage.addBehavior('#default#userData')
+                               storage.load(localStorageName)
+                               var result = storeFunction.apply(store, args)
+                               storageOwner.removeChild(storage)
+                               return result
+                       }
+               }
+
+               // In IE7, keys may not contain special chars. See all of https://github.com/marcuswestin/store.js/issues/40
+               var forbiddenCharsRegex = new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g")
+               function ieKeyFix(key) {
+                       return key.replace(forbiddenCharsRegex, '___')
+               }
+               store.set = withIEStorage(function(storage, key, val) {
+                       key = ieKeyFix(key)
+                       if (val === undefined) { return store.remove(key) }
+                       storage.setAttribute(key, store.serialize(val))
+                       storage.save(localStorageName)
+                       return val
+               })
+               store.get = withIEStorage(function(storage, key) {
+                       key = ieKeyFix(key)
+                       return store.deserialize(storage.getAttribute(key))
+               })
+               store.remove = withIEStorage(function(storage, key) {
+                       key = ieKeyFix(key)
+                       storage.removeAttribute(key)
+                       storage.save(localStorageName)
+               })
+               store.clear = withIEStorage(function(storage) {
+                       var attributes = storage.XMLDocument.documentElement.attributes
+                       storage.load(localStorageName)
+                       for (var i=0, attr; attr=attributes[i]; i++) {
+                               storage.removeAttribute(attr.name)
+                       }
+                       storage.save(localStorageName)
+               })
+               store.getAll = function(storage) {
+                       var ret = {}
+                       store.forEach(function(key, val) {
+                               ret[key] = val
+                       })
+                       return ret
+               }
+               store.forEach = withIEStorage(function(storage, callback) {
+                       var attributes = storage.XMLDocument.documentElement.attributes
+                       for (var i=0, attr; attr=attributes[i]; ++i) {
+                               callback(attr.name, store.deserialize(storage.getAttribute(attr.name)))
+                       }
+               })
+       }
+
+       try {
+               var testKey = '__storejs__'
+               store.set(testKey, testKey)
+               if (store.get(testKey) != testKey) { store.disabled = true }
+               store.remove(testKey)
+       } catch(e) {
+               store.disabled = true
+       }
+       store.enabled = !store.disabled
+       
+       if (typeof module != 'undefined' && module.exports) { module.exports = store }
+       else if (typeof define === 'function' && define.amd) { define(store) }
+       else { win.store = store }
+       
+})(this.window || global);
+
+})(window)
+},{}],5:[function(require,module,exports){
+module.exports = hasKeys
+
+function hasKeys(source) {
+    return source !== null &&
+        (typeof source === "object" ||
+        typeof source === "function")
+}
+
+},{}],4:[function(require,module,exports){
+var Keys = require("object-keys")
+var hasKeys = require("./has-keys")
+
+module.exports = extend
+
+function extend() {
+    var target = {}
+
+    for (var i = 0; i < arguments.length; i++) {
+        var source = arguments[i]
+
+        if (!hasKeys(source)) {
+            continue
+        }
+
+        var keys = Keys(source)
+
+        for (var j = 0; j < keys.length; j++) {
+            var name = keys[j]
+            target[name] = source[name]
+        }
+    }
+
+    return target
+}
+
+},{"./has-keys":5,"object-keys":6}],7:[function(require,module,exports){
+(function(global){/**
+ * jsHashes - A fast and independent hashing library pure JavaScript implemented (ES3 compliant) for both server and client side
+ * 
+ * @class Hashes
+ * @author Tomas Aparicio <tomas@rijndael-project.com>
+ * @license New BSD (see LICENSE file)
+ * @version 1.0.4
+ *
+ * Algorithms specification:
+ *
+ * MD5 <http://www.ietf.org/rfc/rfc1321.txt>
+ * RIPEMD-160 <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
+ * SHA1   <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
+ * SHA256 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
+ * SHA512 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
+ * HMAC <http://www.ietf.org/rfc/rfc2104.txt>
+ *
+ */
+(function(){
+  var Hashes;
   
-      for (i=0; i<80; i+=1) {
-        W[i] = new int64(0, 0);
-      }
+  // private helper methods
+  function utf8Encode(str) {
+    var  x, y, output = '', i = -1, l;
     
-      // append padding to the source string. The format is described in the FIPS.
-      x[len >> 5] |= 0x80 << (24 - (len & 0x1f));
-      x[((len + 128 >> 10)<< 5) + 31] = len;
-      l = x.length;
-      for (i = 0; i<l; i+=32) { //32 dwords is the block size
-        int64copy(a, H[0]);
-        int64copy(b, H[1]);
-        int64copy(c, H[2]);
-        int64copy(d, H[3]);
-        int64copy(e, H[4]);
-        int64copy(f, H[5]);
-        int64copy(g, H[6]);
-        int64copy(h, H[7]);
-      
-        for (j=0; j<16; j+=1) {
-          W[j].h = x[i + 2*j];
-          W[j].l = x[i + 2*j + 1];
-        }
-      
-        for (j=16; j<80; j+=1) {
-          //sigma1
-          int64rrot(r1, W[j-2], 19);
-          int64revrrot(r2, W[j-2], 29);
-          int64shr(r3, W[j-2], 6);
-          s1.l = r1.l ^ r2.l ^ r3.l;
-          s1.h = r1.h ^ r2.h ^ r3.h;
-          //sigma0
-          int64rrot(r1, W[j-15], 1);
-          int64rrot(r2, W[j-15], 8);
-          int64shr(r3, W[j-15], 7);
-          s0.l = r1.l ^ r2.l ^ r3.l;
-          s0.h = r1.h ^ r2.h ^ r3.h;
-      
-          int64add4(W[j], s1, W[j-7], s0, W[j-16]);
+    if (str && str.length) {
+      l = str.length;
+      while ((i+=1) < l) {
+        /* Decode utf-16 surrogate pairs */
+        x = str.charCodeAt(i);
+        y = i + 1 < l ? str.charCodeAt(i + 1) : 0;
+        if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
+            x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
+            i += 1;
         }
-      
-        for (j = 0; j < 80; j+=1) {
-          //Ch
-          Ch.l = (e.l & f.l) ^ (~e.l & g.l);
-          Ch.h = (e.h & f.h) ^ (~e.h & g.h);
-      
-          //Sigma1
-          int64rrot(r1, e, 14);
-          int64rrot(r2, e, 18);
-          int64revrrot(r3, e, 9);
-          s1.l = r1.l ^ r2.l ^ r3.l;
-          s1.h = r1.h ^ r2.h ^ r3.h;
-      
-          //Sigma0
-          int64rrot(r1, a, 28);
-          int64revrrot(r2, a, 2);
-          int64revrrot(r3, a, 7);
-          s0.l = r1.l ^ r2.l ^ r3.l;
-          s0.h = r1.h ^ r2.h ^ r3.h;
-      
-          //Maj
-          Maj.l = (a.l & b.l) ^ (a.l & c.l) ^ (b.l & c.l);
-          Maj.h = (a.h & b.h) ^ (a.h & c.h) ^ (b.h & c.h);
-      
-          int64add5(T1, h, s1, Ch, sha512_k[j], W[j]);
-          int64add(T2, s0, Maj);
-      
-          int64copy(h, g);
-          int64copy(g, f);
-          int64copy(f, e);
-          int64add(e, d, T1);
-          int64copy(d, c);
-          int64copy(c, b);
-          int64copy(b, a);
-          int64add(a, T1, T2);
+        /* Encode output as utf-8 */
+        if (x <= 0x7F) {
+            output += String.fromCharCode(x);
+        } else if (x <= 0x7FF) {
+            output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
+                        0x80 | ( x & 0x3F));
+        } else if (x <= 0xFFFF) {
+            output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
+                        0x80 | ((x >>> 6 ) & 0x3F),
+                        0x80 | ( x & 0x3F));
+        } else if (x <= 0x1FFFFF) {
+            output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
+                        0x80 | ((x >>> 12) & 0x3F),
+                        0x80 | ((x >>> 6 ) & 0x3F),
+                        0x80 | ( x & 0x3F));
         }
-        int64add(H[0], H[0], a);
-        int64add(H[1], H[1], b);
-        int64add(H[2], H[2], c);
-        int64add(H[3], H[3], d);
-        int64add(H[4], H[4], e);
-        int64add(H[5], H[5], f);
-        int64add(H[6], H[6], g);
-        int64add(H[7], H[7], h);
       }
-    
-      //represent the hash as an array of 32-bit dwords
-      for (i=0; i<8; i+=1) {
-        hash[2*i] = H[i].h;
-        hash[2*i + 1] = H[i].l;
-      }
-      return hash;
     }
+    return output;
+  }
+  
+  function utf8Decode(str) {
+    var i, ac, c1, c2, c3, arr = [], l;
+    i = ac = c1 = c2 = c3 = 0;
     
-    //A constructor for 64-bit numbers
-    function int64(h, l) {
-      this.h = h;
-      this.l = l;
-      //this.toString = int64toString;
-    }
+    if (str && str.length) {
+      l = str.length;
+      str += '';
     
-    //Copies src into dst, assuming both are 64-bit numbers
-    function int64copy(dst, src) {
-      dst.h = src.h;
-      dst.l = src.l;
+      while (i < l) {
+          c1 = str.charCodeAt(i);
+          ac += 1;
+          if (c1 < 128) {
+              arr[ac] = String.fromCharCode(c1);
+              i+=1;
+          } else if (c1 > 191 && c1 < 224) {
+              c2 = str.charCodeAt(i + 1);
+              arr[ac] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
+              i += 2;
+          } else {
+              c2 = str.charCodeAt(i + 1);
+              c3 = str.charCodeAt(i + 2);
+              arr[ac] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
+              i += 3;
+          }
+      }
     }
-    
-    //Right-rotates a 64-bit number by shift
-    //Won't handle cases of shift>=32
-    //The function revrrot() is for that
-    function int64rrot(dst, x, shift) {
-      dst.l = (x.l >>> shift) | (x.h << (32-shift));
-      dst.h = (x.h >>> shift) | (x.l << (32-shift));
+    return arr.join('');
+  }
+
+  /**
+   * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+   * to work around bugs in some JS interpreters.
+   */
+  function safe_add(x, y) {
+    var lsw = (x & 0xFFFF) + (y & 0xFFFF),
+        msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+    return (msw << 16) | (lsw & 0xFFFF);
+  }
+
+  /**
+   * Bitwise rotate a 32-bit number to the left.
+   */
+  function bit_rol(num, cnt) {
+    return (num << cnt) | (num >>> (32 - cnt));
+  }
+
+  /**
+   * Convert a raw string to a hex string
+   */
+  function rstr2hex(input, hexcase) {
+    var hex_tab = hexcase ? '0123456789ABCDEF' : '0123456789abcdef',
+        output = '', x, i = 0, l = input.length;
+    for (; i < l; i+=1) {
+      x = input.charCodeAt(i);
+      output += hex_tab.charAt((x >>> 4) & 0x0F) + hex_tab.charAt(x & 0x0F);
     }
-    
-    //Reverses the dwords of the source and then rotates right by shift.
-    //This is equivalent to rotation by 32+shift
-    function int64revrrot(dst, x, shift) {
-      dst.l = (x.h >>> shift) | (x.l << (32-shift));
-      dst.h = (x.l >>> shift) | (x.h << (32-shift));
+    return output;
+  }
+
+  /**
+   * Encode a string as utf-16
+   */
+  function str2rstr_utf16le(input) {
+    var i, l = input.length, output = '';
+    for (i = 0; i < l; i+=1) {
+      output += String.fromCharCode( input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF);
     }
-    
-    //Bitwise-shifts right a 64-bit number by shift
-    //Won't handle shift>=32, but it's never needed in SHA512
-    function int64shr(dst, x, shift) {
-      dst.l = (x.l >>> shift) | (x.h << (32-shift));
-      dst.h = (x.h >>> shift);
+    return output;
+  }
+
+  function str2rstr_utf16be(input) {
+    var i, l = input.length, output = '';
+    for (i = 0; i < l; i+=1) {
+      output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, input.charCodeAt(i) & 0xFF);
     }
-    
-    //Adds two 64-bit numbers
-    //Like the original implementation, does not rely on 32-bit operations
-    function int64add(dst, x, y) {
-       var w0 = (x.l & 0xffff) + (y.l & 0xffff);
-       var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);
-       var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);
-       var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);
-       dst.l = (w0 & 0xffff) | (w1 << 16);
-       dst.h = (w2 & 0xffff) | (w3 << 16);
+    return output;
+  }
+
+  /**
+   * Convert an array of big-endian words to a string
+   */
+  function binb2rstr(input) {
+    var i, l = input.length * 32, output = '';
+    for (i = 0; i < l; i += 8) {
+        output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);
     }
-    
-    //Same, except with 4 addends. Works faster than adding them one by one.
-    function int64add4(dst, a, b, c, d) {
-       var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);
-       var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);
-       var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);
-       var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);
-       dst.l = (w0 & 0xffff) | (w1 << 16);
-       dst.h = (w2 & 0xffff) | (w3 << 16);
+    return output;
+  }
+
+  /**
+   * Convert an array of little-endian words to a string
+   */
+  function binl2rstr(input) {
+    var i, l = input.length * 32, output = '';
+    for (i = 0;i < l; i += 8) {
+      output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
     }
-    
-    //Same, except with 5 addends
-    function int64add5(dst, a, b, c, d, e) {
-      var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),
-          w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),
-          w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),
-          w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);
-       dst.l = (w0 & 0xffff) | (w1 << 16);
-       dst.h = (w2 & 0xffff) | (w3 << 16);
+    return output;
+  }
+
+  /**
+   * Convert a raw string to an array of little-endian words
+   * Characters >255 have their high-byte silently ignored.
+   */
+  function rstr2binl(input) {
+    var i, l = input.length * 8, output = Array(input.length >> 2), lo = output.length;
+    for (i = 0; i < lo; i+=1) {
+      output[i] = 0;
     }
-  },
+    for (i = 0; i < l; i += 8) {
+      output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
+    }
+    return output;
+  }
+  
   /**
-   * @class Hashes.RMD160
-   * @constructor
-   * @param {Object} [config]
-   * 
-   * A JavaScript implementation of the RIPEMD-160 Algorithm
-   * Version 2.2 Copyright Jeremy Lin, Paul Johnston 2000 - 2009.
-   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
-   * See http://pajhome.org.uk/crypt/md5 for details.
-   * Also http://www.ocf.berkeley.edu/~jjlin/jsotp/
+   * Convert a raw string to an array of big-endian words 
+   * Characters >255 have their high-byte silently ignored.
    */
-  RMD160 : function (options) {
-    /**
-     * Private properties configuration variables. You may need to tweak these to be compatible with
-     * the server-side, but the defaults work in most cases.
-     * @see this.setUpperCase() method
-     * @see this.setPad() method
-     */
-    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false,   /* hexadecimal output case format. false - lowercase; true - uppercase  */
-        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=',  /* base-64 pad character. Default '=' for strict RFC compliance   */
-        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
-        rmd160_r1 = [
-           0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
-           7,  4, 13,  1, 10,  6, 15,  3, 12,  0,  9,  5,  2, 14, 11,  8,
-           3, 10, 14,  4,  9, 15,  8,  1,  2,  7,  0,  6, 13, 11,  5, 12,
-           1,  9, 11, 10,  0,  8, 12,  4, 13,  3,  7, 15, 14,  5,  6,  2,
-           4,  0,  5,  9,  7, 12,  2, 10, 14,  1,  3,  8, 11,  6, 15, 13
-        ],
-        rmd160_r2 = [
-           5, 14,  7,  0,  9,  2, 11,  4, 13,  6, 15,  8,  1, 10,  3, 12,
-           6, 11,  3,  7,  0, 13,  5, 10, 14, 15,  8, 12,  4,  9,  1,  2,
-          15,  5,  1,  3,  7, 14,  6,  9, 11,  8, 12,  2, 10,  0,  4, 13,
-           8,  6,  4,  1,  3, 11, 15,  0,  5, 12,  2, 13,  9,  7, 10, 14,
-          12, 15, 10,  4,  1,  5,  8,  7,  6,  2, 13, 14,  0,  3,  9, 11
-        ],
-        rmd160_s1 = [
-          11, 14, 15, 12,  5,  8,  7,  9, 11, 13, 14, 15,  6,  7,  9,  8,
-           7,  6,  8, 13, 11,  9,  7, 15,  7, 12, 15,  9, 11,  7, 13, 12,
-          11, 13,  6,  7, 14,  9, 13, 15, 14,  8, 13,  6,  5, 12,  7,  5,
-          11, 12, 14, 15, 14, 15,  9,  8,  9, 14,  5,  6,  8,  6,  5, 12,
-           9, 15,  5, 11,  6,  8, 13, 12,  5, 12, 13, 14, 11,  8,  5,  6
-        ],
-        rmd160_s2 = [
-           8,  9,  9, 11, 13, 15, 15,  5,  7,  7,  8, 11, 14, 14, 12,  6,
-           9, 13, 15,  7, 12,  8,  9, 11,  7,  7, 12,  7,  6, 15, 13, 11,
-           9,  7, 15, 11,  8,  6,  6, 14, 12, 13,  5, 14, 13, 13,  7,  5,
-          15,  5,  8, 11, 14, 14,  6, 14,  6,  9, 12,  9, 12,  5, 15,  8,
-           8,  5, 12,  9, 12,  5, 14,  6,  8, 13,  6,  5, 15, 13, 11, 11
-        ];
+   function rstr2binb(input) {
+      var i, l = input.length * 8, output = Array(input.length >> 2), lo = output.length;
+      for (i = 0; i < lo; i+=1) {
+            output[i] = 0;
+        }
+      for (i = 0; i < l; i += 8) {
+            output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
+        }
+      return output;
+   }
 
-    /* privileged (public) methods */
-    this.hex = function (s) {
-      return rstr2hex(rstr(s, utf8)); 
+  /**
+   * Convert a raw string to an arbitrary string encoding
+   */
+  function rstr2any(input, encoding) {
+    var divisor = encoding.length,
+        remainders = Array(),
+        i, q, x, ld, quotient, dividend, output, full_length;
+  
+    /* Convert to an array of 16-bit big-endian values, forming the dividend */
+    dividend = Array(Math.ceil(input.length / 2));
+    ld = dividend.length;
+    for (i = 0; i < ld; i+=1) {
+      dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
+    }
+  
+    /**
+     * Repeatedly perform a long division. The binary array forms the dividend,
+     * the length of the encoding is the divisor. Once computed, the quotient
+     * forms the dividend for the next step. We stop when the dividend is zerHashes.
+     * All remainders are stored for later use.
+     */
+    while(dividend.length > 0) {
+      quotient = Array();
+      x = 0;
+      for (i = 0; i < dividend.length; i+=1) {
+        x = (x << 16) + dividend[i];
+        q = Math.floor(x / divisor);
+        x -= q * divisor;
+        if (quotient.length > 0 || q > 0) {
+          quotient[quotient.length] = q;
+        }
+      }
+      remainders[remainders.length] = x;
+      dividend = quotient;
+    }
+  
+    /* Convert the remainders to the output string */
+    output = '';
+    for (i = remainders.length - 1; i >= 0; i--) {
+      output += encoding.charAt(remainders[i]);
+    }
+  
+    /* Append leading zero equivalents */
+    full_length = Math.ceil(input.length * 8 / (Math.log(encoding.length) / Math.log(2)));
+    for (i = output.length; i < full_length; i+=1) {
+      output = encoding[0] + output;
+    }
+    return output;
+  }
+
+  /**
+   * Convert a raw string to a base-64 string
+   */
+  function rstr2b64(input, b64pad) {
+    var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+        output = '',
+        len = input.length, i, j, triplet;
+    b64pad= b64pad || '=';
+    for (i = 0; i < len; i += 3) {
+      triplet = (input.charCodeAt(i) << 16)
+            | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
+            | (i + 2 < len ? input.charCodeAt(i+2)      : 0);
+      for (j = 0; j < 4; j+=1) {
+        if (i * 8 + j * 6 > input.length * 8) { 
+          output += b64pad; 
+        } else { 
+          output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); 
+        }
+       }
+    }
+    return output;
+  }
+
+  Hashes = {
+  /**  
+   * @property {String} version
+   * @readonly
+   */
+  VERSION : '1.0.3',
+  /**
+   * @member Hashes
+   * @class Base64
+   * @constructor
+   */
+  Base64 : function () {
+    // private properties
+    var tab = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+        pad = '=', // default pad according with the RFC standard
+        url = false, // URL encoding support @todo
+        utf8 = true; // by default enable UTF-8 support encoding
+
+    // public method for encoding
+    this.encode = function (input) {
+      var i, j, triplet,
+          output = '', 
+          len = input.length;
+
+      pad = pad || '=';
+      input = (utf8) ? utf8Encode(input) : input;
+
+      for (i = 0; i < len; i += 3) {
+        triplet = (input.charCodeAt(i) << 16)
+              | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
+              | (i + 2 < len ? input.charCodeAt(i+2) : 0);
+        for (j = 0; j < 4; j+=1) {
+          if (i * 8 + j * 6 > len * 8) {
+              output += pad;
+          } else {
+              output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
+          }
+        }
+      }
+      return output;    
     };
-    this.b64 = function (s) {
-      return rstr2b64(rstr(s, utf8), b64pad);
+
+    // public method for decoding
+    this.decode = function (input) {
+      // var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+      var i, o1, o2, o3, h1, h2, h3, h4, bits, ac,
+        dec = '',
+        arr = [];
+      if (!input) { return input; }
+
+      i = ac = 0;
+      input = input.replace(new RegExp('\\'+pad,'gi'),''); // use '='
+      //input += '';
+
+      do { // unpack four hexets into three octets using index points in b64
+        h1 = tab.indexOf(input.charAt(i+=1));
+        h2 = tab.indexOf(input.charAt(i+=1));
+        h3 = tab.indexOf(input.charAt(i+=1));
+        h4 = tab.indexOf(input.charAt(i+=1));
+
+        bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
+
+        o1 = bits >> 16 & 0xff;
+        o2 = bits >> 8 & 0xff;
+        o3 = bits & 0xff;
+        ac += 1;
+
+        if (h3 === 64) {
+          arr[ac] = String.fromCharCode(o1);
+        } else if (h4 === 64) {
+          arr[ac] = String.fromCharCode(o1, o2);
+        } else {
+          arr[ac] = String.fromCharCode(o1, o2, o3);
+        }
+      } while (i < input.length);
+
+      dec = arr.join('');
+      dec = (utf8) ? utf8Decode(dec) : dec;
+
+      return dec;
     };
-    this.any = function (s, e) { 
-      return rstr2any(rstr(s, utf8), e);
+
+    // set custom pad string
+    this.setPad = function (str) {
+        pad = str || pad;
+        return this;
+    };
+    // set custom tab string characters
+    this.setTab = function (str) {
+        tab = str || tab;
+        return this;
+    };
+    this.setUTF8 = function (bool) {
+        if (typeof bool === 'boolean') {
+          utf8 = bool;
+        }
+        return this;
+    };
+  },
+
+  /**
+   * CRC-32 calculation
+   * @member Hashes
+   * @method CRC32
+   * @static
+   * @param {String} str Input String
+   * @return {String}
+   */
+  CRC32 : function (str) {
+    var crc = 0, x = 0, y = 0, table, i, iTop;
+    str = utf8Encode(str);
+        
+    table = [ 
+        '00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 ',
+        '79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 ',
+        '84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F ',
+        '63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD ',
+        'A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC ',
+        '51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 ',
+        'B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 ',
+        '06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 ',
+        'E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 ',
+        '12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 ',
+        'D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 ',
+        '33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 ',
+        'CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 ',
+        '9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E ',
+        '7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D ',
+        '806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 ',
+        '60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA ',
+        'AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 ', 
+        '5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 ',
+        'B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 ',
+        '05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 ',
+        'F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA ',
+        '11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 ',
+        'D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F ',
+        '30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E ',
+        'C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D'
+    ].join('');
+
+    crc = crc ^ (-1);
+    for (i = 0, iTop = str.length; i < iTop; i+=1 ) {
+        y = ( crc ^ str.charCodeAt( i ) ) & 0xFF;
+        x = '0x' + table.substr( y * 9, 8 );
+        crc = ( crc >>> 8 ) ^ x;
+    }
+    // always return a positive number (that's what >>> 0 does)
+    return (crc ^ (-1)) >>> 0;
+  },
+  /**
+   * @member Hashes
+   * @class MD5
+   * @constructor
+   * @param {Object} [config]
+   * 
+   * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+   * Digest Algorithm, as defined in RFC 1321.
+   * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+   * See <http://pajhome.org.uk/crypt/md5> for more infHashes.
+   */
+  MD5 : function (options) {  
+    /**
+     * Private config properties. You may need to tweak these to be compatible with
+     * the server-side, but the defaults work in most cases.
+     * See {@link Hashes.MD5#method-setUpperCase} and {@link Hashes.SHA1#method-setUpperCase}
+     */
+    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase
+        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', // base-64 pad character. Defaults to '=' for strict RFC compliance
+        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true; // enable/disable utf8 encoding
+
+    // privileged (public) methods 
+    this.hex = function (s) { 
+      return rstr2hex(rstr(s, utf8), hexcase);
+    };
+    this.b64 = function (s) { 
+      return rstr2b64(rstr(s), b64pad);
+    };
+    this.any = function(s, e) { 
+      return rstr2any(rstr(s, utf8), e); 
     };
     this.hex_hmac = function (k, d) { 
-      return rstr2hex(rstr_hmac(k, d));
+      return rstr2hex(rstr_hmac(k, d), hexcase); 
     };
     this.b64_hmac = function (k, d) { 
-      return rstr2b64(rstr_hmac(k, d), b64pad);
+      return rstr2b64(rstr_hmac(k,d), b64pad); 
     };
     this.any_hmac = function (k, d, e) { 
       return rstr2any(rstr_hmac(k, d), e); 
@@ -13082,1082 +14925,2077 @@ function extend() {
     /**
      * Perform a simple self-test to see if the VM is working
      * @return {String} Hexadecimal hash sample
-     * @public
      */
     this.vm_test = function () {
       return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
     };
     /** 
-     * @description Enable/disable uppercase hexadecimal returned string 
-     * @param {boolean} 
+     * Enable/disable uppercase hexadecimal returned string 
+     * @param {Boolean} 
      * @return {Object} this
-     * @public
      */ 
     this.setUpperCase = function (a) {
-      if (typeof a === 'boolean' ) { hexcase = a; }
+      if (typeof a === 'boolean' ) {
+        hexcase = a;
+      }
       return this;
     };
     /** 
-     * @description Defines a base64 pad string 
-     * @param {string} Pad
+     * Defines a base64 pad string 
+     * @param {String} Pad
      * @return {Object} this
-     * @public
      */ 
     this.setPad = function (a) {
-      if (typeof a !== 'undefined' ) { b64pad = a; }
+      b64pad = a || b64pad;
       return this;
     };
     /** 
-     * @description Defines a base64 pad string 
-     * @param {boolean} 
-     * @return {Object} this
-     * @public
+     * Defines a base64 pad string 
+     * @param {Boolean} 
+     * @return {Object} [this]
      */ 
     this.setUTF8 = function (a) {
-      if (typeof a === 'boolean') { utf8 = a; }
+      if (typeof a === 'boolean') { 
+        utf8 = a;
+      }
       return this;
     };
 
-    /* private methods */
+    // private methods
 
     /**
-     * Calculate the rmd160 of a raw string
+     * Calculate the MD5 of a raw string
      */
     function rstr(s) {
-      s = (utf8) ? utf8Encode(s) : s;
+      s = (utf8) ? utf8Encode(s): s;
       return binl2rstr(binl(rstr2binl(s), s.length * 8));
     }
-
+    
     /**
-     * Calculate the HMAC-rmd160 of a key and some data (raw strings)
+     * Calculate the HMAC-MD5, of a key and some data (raw strings)
      */
     function rstr_hmac(key, data) {
+      var bkey, ipad, opad, hash, i;
+
       key = (utf8) ? utf8Encode(key) : key;
       data = (utf8) ? utf8Encode(data) : data;
-      var i, hash,
-          bkey = rstr2binl(key),
-          ipad = Array(16), opad = Array(16);
-
+      bkey = rstr2binl(key);
       if (bkey.length > 16) { 
         bkey = binl(bkey, key.length * 8); 
       }
-      
+
+      ipad = Array(16), opad = Array(16); 
       for (i = 0; i < 16; i+=1) {
-        ipad[i] = bkey[i] ^ 0x36363636;
-        opad[i] = bkey[i] ^ 0x5C5C5C5C;
+          ipad[i] = bkey[i] ^ 0x36363636;
+          opad[i] = bkey[i] ^ 0x5C5C5C5C;
       }
       hash = binl(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
-      return binl2rstr(binl(opad.concat(hash), 512 + 160));
-    }
-
-    /**
-     * Convert an array of little-endian words to a string
-     */
-    function binl2rstr(input) {
-      var i, output = '', l = input.length * 32;
-      for (i = 0; i < l; i += 8) {
-        output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
-      }
-      return output;
+      return binl2rstr(binl(opad.concat(hash), 512 + 128));
     }
 
     /**
-     * Calculate the RIPE-MD160 of an array of little-endian words, and a bit length.
+     * Calculate the MD5 of an array of little-endian words, and a bit length.
      */
     function binl(x, len) {
-      var T, j, i, l,
-          h0 = 0x67452301,
-          h1 = 0xefcdab89,
-          h2 = 0x98badcfe,
-          h3 = 0x10325476,
-          h4 = 0xc3d2e1f0,
-          A1, B1, C1, D1, E1,
-          A2, B2, C2, D2, E2;
-
+      var i, olda, oldb, oldc, oldd,
+          a =  1732584193,
+          b = -271733879,
+          c = -1732584194,
+          d =  271733878;
+        
       /* append padding */
-      x[len >> 5] |= 0x80 << (len % 32);
+      x[len >> 5] |= 0x80 << ((len) % 32);
       x[(((len + 64) >>> 9) << 4) + 14] = len;
-      l = x.length;
-      
-      for (i = 0; i < l; i+=16) {
-        A1 = A2 = h0; B1 = B2 = h1; C1 = C2 = h2; D1 = D2 = h3; E1 = E2 = h4;
-        for (j = 0; j <= 79; j+=1) {
-          T = safe_add(A1, rmd160_f(j, B1, C1, D1));
-          T = safe_add(T, x[i + rmd160_r1[j]]);
-          T = safe_add(T, rmd160_K1(j));
-          T = safe_add(bit_rol(T, rmd160_s1[j]), E1);
-          A1 = E1; E1 = D1; D1 = bit_rol(C1, 10); C1 = B1; B1 = T;
-          T = safe_add(A2, rmd160_f(79-j, B2, C2, D2));
-          T = safe_add(T, x[i + rmd160_r2[j]]);
-          T = safe_add(T, rmd160_K2(j));
-          T = safe_add(bit_rol(T, rmd160_s2[j]), E2);
-          A2 = E2; E2 = D2; D2 = bit_rol(C2, 10); C2 = B2; B2 = T;
-        }
-
-        T = safe_add(h1, safe_add(C1, D2));
-        h1 = safe_add(h2, safe_add(D1, E2));
-        h2 = safe_add(h3, safe_add(E1, A2));
-        h3 = safe_add(h4, safe_add(A1, B2));
-        h4 = safe_add(h0, safe_add(B1, C2));
-        h0 = T;
-      }
-      return [h0, h1, h2, h3, h4];
-    }
 
-    // specific algorithm methods 
-    function rmd160_f(j, x, y, z) {
-      return ( 0 <= j && j <= 15) ? (x ^ y ^ z) :
-         (16 <= j && j <= 31) ? (x & y) | (~x & z) :
-         (32 <= j && j <= 47) ? (x | ~y) ^ z :
-         (48 <= j && j <= 63) ? (x & z) | (y & ~z) :
-         (64 <= j && j <= 79) ? x ^ (y | ~z) :
-         'rmd160_f: j out of range';
-    }
+      for (i = 0; i < x.length; i += 16) {
+        olda = a;
+        oldb = b;
+        oldc = c;
+        oldd = d;
 
-    function rmd160_K1(j) {
-      return ( 0 <= j && j <= 15) ? 0x00000000 :
-         (16 <= j && j <= 31) ? 0x5a827999 :
-         (32 <= j && j <= 47) ? 0x6ed9eba1 :
-         (48 <= j && j <= 63) ? 0x8f1bbcdc :
-         (64 <= j && j <= 79) ? 0xa953fd4e :
-         'rmd160_K1: j out of range';
-    }
+        a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+        d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+        c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
+        b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+        a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+        d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
+        c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+        b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+        a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
+        d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+        c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+        b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+        a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
+        d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+        c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+        b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
 
-    function rmd160_K2(j){
-      return ( 0 <= j && j <= 15) ? 0x50a28be6 :
-         (16 <= j && j <= 31) ? 0x5c4dd124 :
-         (32 <= j && j <= 47) ? 0x6d703ef3 :
-         (48 <= j && j <= 63) ? 0x7a6d76e9 :
-         (64 <= j && j <= 79) ? 0x00000000 :
-         'rmd160_K2: j out of range';
-    }
-  }
-};
+        a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+        d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+        c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
+        b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+        a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+        d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
+        c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+        b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+        a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
+        d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+        c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+        b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
+        a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+        d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+        c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
+        b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
 
-  // exposes Hashes
-  (function( window, undefined ) {
-    var freeExports = false;
-    if (typeof exports === 'object' ) {
-      freeExports = exports;
-      if (exports && typeof global === 'object' && global && global === global.global ) { window = global; }
-    }
+        a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+        d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+        c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
+        b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+        a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+        d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
+        c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+        b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+        a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
+        d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+        c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+        b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
+        a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+        d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+        c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
+        b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
 
-    if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
-      // define as an anonymous module, so, through path mapping, it can be aliased
-      define(function () { return Hashes; });
-    }
-    else if ( freeExports ) {
-      // in Node.js or RingoJS v0.8.0+
-      if ( typeof module === 'object' && module && module.exports === freeExports ) {
-        module.exports = Hashes;
-      }
-      // in Narwhal or RingoJS v0.7.0-
-      else {
-        freeExports.Hashes = Hashes;
+        a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+        d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
+        c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+        b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+        a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
+        d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+        c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+        b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+        a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
+        d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+        c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+        b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
+        a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+        d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+        c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
+        b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+        a = safe_add(a, olda);
+        b = safe_add(b, oldb);
+        c = safe_add(c, oldc);
+        d = safe_add(d, oldd);
       }
+      return Array(a, b, c, d);
     }
-    else {
-      // in a browser or Rhino
-      window.Hashes = Hashes;
-    }
-  }( this ));
-}()); // IIFE
-
-})(window)
-},{}],2:[function(require,module,exports){
-'use strict';
-
-var hashes = require('jshashes'),
-    xtend = require('xtend'),
-    sha1 = new hashes.SHA1();
-
-var ohauth = {};
-
-ohauth.qsString = function(obj) {
-    return Object.keys(obj).sort().map(function(key) {
-        return ohauth.percentEncode(key) + '=' +
-            ohauth.percentEncode(obj[key]);
-    }).join('&');
-};
 
-ohauth.stringQs = function(str) {
-    return str.split('&').reduce(function(obj, pair){
-        var parts = pair.split('=');
-        obj[decodeURIComponent(parts[0])] = (null === parts[1]) ?
-            '' : decodeURIComponent(parts[1]);
-        return obj;
-    }, {});
-};
+    /**
+     * These functions implement the four basic operations the algorithm uses.
+     */
+    function md5_cmn(q, a, b, x, s, t) {
+      return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+    }
+    function md5_ff(a, b, c, d, x, s, t) {
+      return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+    }
+    function md5_gg(a, b, c, d, x, s, t) {
+      return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+    }
+    function md5_hh(a, b, c, d, x, s, t) {
+      return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+    }
+    function md5_ii(a, b, c, d, x, s, t) {
+      return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+    }
+  },
+  /**
+   * @member Hashes
+   * @class Hashes.SHA1
+   * @param {Object} [config]
+   * @constructor
+   * 
+   * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined in FIPS 180-1
+   * Version 2.2 Copyright Paul Johnston 2000 - 2009.
+   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+   * See http://pajhome.org.uk/crypt/md5 for details.
+   */
+  SHA1 : function (options) {
+   /**
+     * Private config properties. You may need to tweak these to be compatible with
+     * the server-side, but the defaults work in most cases.
+     * See {@link Hashes.MD5#method-setUpperCase} and {@link Hashes.SHA1#method-setUpperCase}
+     */
+    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase
+        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', // base-64 pad character. Defaults to '=' for strict RFC compliance
+        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true; // enable/disable utf8 encoding
 
-ohauth.rawxhr = function(method, url, data, headers, callback) {
-    var xhr = new XMLHttpRequest(),
-        twoHundred = /^20\d$/;
-    xhr.onreadystatechange = function() {
-        if (4 == xhr.readyState && 0 !== xhr.status) {
-            if (twoHundred.test(xhr.status)) callback(null, xhr);
-            else return callback(xhr, null);
-        }
+    // public methods
+    this.hex = function (s) { 
+       return rstr2hex(rstr(s, utf8), hexcase); 
     };
-    xhr.onerror = function(e) { return callback(e, null); };
-    xhr.open(method, url, true);
-    for (var h in headers) xhr.setRequestHeader(h, headers[h]);
-    xhr.send(data);
-};
-
-ohauth.xhr = function(method, url, auth, data, options, callback) {
-    var headers = (options && options.header) || {
-        'Content-Type': 'application/x-www-form-urlencoded'
+    this.b64 = function (s) { 
+       return rstr2b64(rstr(s, utf8), b64pad);
     };
-    headers.Authorization = 'OAuth ' + ohauth.authHeader(auth);
-    ohauth.rawxhr(method, url, data, headers, callback);
-};
-
-ohauth.nonce = function() {
-    for (var o = ''; o.length < 6;) {
-        o += '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'[Math.floor(Math.random() * 61)];
-    }
-    return o;
-};
-
-ohauth.authHeader = function(obj) {
-    return Object.keys(obj).sort().map(function(key) {
-        return encodeURIComponent(key) + '="' + encodeURIComponent(obj[key]) + '"';
-    }).join(', ');
-};
-
-ohauth.timestamp = function() { return ~~((+new Date()) / 1000); };
-
-ohauth.percentEncode = function(s) {
-    return encodeURIComponent(s)
-        .replace(/\!/g, '%21').replace(/\'/g, '%27')
-        .replace(/\*/g, '%2A').replace(/\(/g, '%28').replace(/\)/g, '%29');
-};
-
-ohauth.baseString = function(method, url, params) {
-    if (params.oauth_signature) delete params.oauth_signature;
-    return [
-        method,
-        ohauth.percentEncode(url),
-        ohauth.percentEncode(ohauth.qsString(params))].join('&');
-};
-
-ohauth.signature = function(oauth_secret, token_secret, baseString) {
-    return sha1.b64_hmac(
-        ohauth.percentEncode(oauth_secret) + '&' +
-        ohauth.percentEncode(token_secret),
-        baseString);
-};
-
-/**
- * Takes an options object for configuration (consumer_key,
- * consumer_secret, version, signature_method, token) and returns a
- * function that generates the Authorization header for given data.
- *
- * The returned function takes these parameters:
- * - method: GET/POST/...
- * - uri: full URI with protocol, port, path and query string
- * - extra_params: any extra parameters (that are passed in the POST data),
- *   can be an object or a from-urlencoded string.
- *
- * Returned function returns full OAuth header with "OAuth" string in it.
- */
-
-ohauth.headerGenerator = function(options) {
-    options = options || {};
-    var consumer_key = options.consumer_key || '',
-        consumer_secret = options.consumer_secret || '',
-        signature_method = options.signature_method || 'HMAC-SHA1',
-        version = options.version || '1.0',
-        token = options.token || '';
-
-    return function(method, uri, extra_params) {
-        method = method.toUpperCase();
-        if (typeof extra_params === 'string' && extra_params.length > 0) {
-            extra_params = ohauth.stringQs(extra_params);
-        }
-
-        var uri_parts = uri.split('?', 2),
-        base_uri = uri_parts[0];
-
-        var query_params = uri_parts.length === 2 ?
-            ohauth.stringQs(uri_parts[1]) : {};
-
-        var oauth_params = {
-            oauth_consumer_key: consumer_key,
-            oauth_signature_method: signature_method,
-            oauth_version: version,
-            oauth_timestamp: ohauth.timestamp(),
-            oauth_nonce: ohauth.nonce()
-        };
-
-        if (token) oauth_params.oauth_token = token;
-
-        var all_params = xtend({}, oauth_params, query_params, extra_params),
-            base_str = ohauth.baseString(method, base_uri, all_params);
-
-        oauth_params.oauth_signature = ohauth.signature(consumer_secret, token, base_str);
-
-        return 'OAuth ' + ohauth.authHeader(oauth_params);
+    this.any = function (s, e) { 
+       return rstr2any(rstr(s, utf8), e);
+    };
+    this.hex_hmac = function (k, d) {
+       return rstr2hex(rstr_hmac(k, d));
+    };
+    this.b64_hmac = function (k, d) { 
+       return rstr2b64(rstr_hmac(k, d), b64pad); 
+    };
+    this.any_hmac = function (k, d, e) { 
+       return rstr2any(rstr_hmac(k, d), e);
+    };
+    /**
+     * Perform a simple self-test to see if the VM is working
+     * @return {String} Hexadecimal hash sample
+     * @public
+     */
+    this.vm_test = function () {
+      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
+    };
+    /** 
+     * @description Enable/disable uppercase hexadecimal returned string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUpperCase = function (a) {
+       if (typeof a === 'boolean') {
+        hexcase = a;
+      }
+       return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {string} Pad
+     * @return {Object} this
+     * @public
+     */ 
+    this.setPad = function (a) {
+      b64pad = a || b64pad;
+       return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUTF8 = function (a) {
+       if (typeof a === 'boolean') {
+        utf8 = a;
+      }
+       return this;
     };
-};
 
-module.exports = ohauth;
+    // private methods
 
-},{"jshashes":7,"xtend":4}],6:[function(require,module,exports){
-module.exports = Object.keys || require('./shim');
+    /**
+        * Calculate the SHA-512 of a raw string
+        */
+       function rstr(s) {
+      s = (utf8) ? utf8Encode(s) : s;
+      return binb2rstr(binb(rstr2binb(s), s.length * 8));
+       }
 
+    /**
+     * Calculate the HMAC-SHA1 of a key and some data (raw strings)
+     */
+    function rstr_hmac(key, data) {
+       var bkey, ipad, opad, i, hash;
+       key = (utf8) ? utf8Encode(key) : key;
+       data = (utf8) ? utf8Encode(data) : data;
+       bkey = rstr2binb(key);
 
-},{"./shim":8}],8:[function(require,module,exports){
-(function () {
-       "use strict";
+       if (bkey.length > 16) {
+        bkey = binb(bkey, key.length * 8);
+      }
+       ipad = Array(16), opad = Array(16);
+       for (i = 0; i < 16; i+=1) {
+               ipad[i] = bkey[i] ^ 0x36363636;
+               opad[i] = bkey[i] ^ 0x5C5C5C5C;
+       }
+       hash = binb(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
+       return binb2rstr(binb(opad.concat(hash), 512 + 160));
+    }
 
-       // modified from https://github.com/kriskowal/es5-shim
-       var has = Object.prototype.hasOwnProperty,
-               is = require('is'),
-               forEach = require('foreach'),
-               hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
-               dontEnums = [
-                       "toString",
-                       "toLocaleString",
-                       "valueOf",
-                       "hasOwnProperty",
-                       "isPrototypeOf",
-                       "propertyIsEnumerable",
-                       "constructor"
-               ],
-               keysShim;
+    /**
+     * Calculate the SHA-1 of an array of big-endian words, and a bit length
+     */
+    function binb(x, len) {
+      var i, j, t, olda, oldb, oldc, oldd, olde,
+          w = Array(80),
+          a =  1732584193,
+          b = -271733879,
+          c = -1732584194,
+          d =  271733878,
+          e = -1009589776;
 
-       keysShim = function keys(object) {
-               if (!is.object(object) && !is.array(object)) {
-                       throw new TypeError("Object.keys called on a non-object");
-               }
+      /* append padding */
+      x[len >> 5] |= 0x80 << (24 - len % 32);
+      x[((len + 64 >> 9) << 4) + 15] = len;
 
-               var name, theKeys = [];
-               for (name in object) {
-                       if (has.call(object, name)) {
-                               theKeys.push(name);
-                       }
-               }
+      for (i = 0; i < x.length; i += 16) {
+        olda = a,
+        oldb = b;
+        oldc = c;
+        oldd = d;
+        olde = e;
+      
+       for (j = 0; j < 80; j+=1)       {
+         if (j < 16) { 
+            w[j] = x[i + j]; 
+          } else { 
+            w[j] = bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); 
+          }
+         t = safe_add(safe_add(bit_rol(a, 5), sha1_ft(j, b, c, d)),
+                                          safe_add(safe_add(e, w[j]), sha1_kt(j)));
+         e = d;
+         d = c;
+         c = bit_rol(b, 30);
+         b = a;
+         a = t;
+       }
 
-               if (hasDontEnumBug) {
-                       forEach(dontEnums, function (dontEnum) {
-                               if (has.call(object, dontEnum)) {
-                                       theKeys.push(dontEnum);
-                               }
-                       });
-               }
-               return theKeys;
-       };
+       a = safe_add(a, olda);
+       b = safe_add(b, oldb);
+       c = safe_add(c, oldc);
+       d = safe_add(d, oldd);
+       e = safe_add(e, olde);
+      }
+      return Array(a, b, c, d, e);
+    }
 
-       module.exports = keysShim;
-}());
+    /**
+     * Perform the appropriate triplet combination function for the current
+     * iteration
+     */
+    function sha1_ft(t, b, c, d) {
+      if (t < 20) { return (b & c) | ((~b) & d); }
+      if (t < 40) { return b ^ c ^ d; }
+      if (t < 60) { return (b & c) | (b & d) | (c & d); }
+      return b ^ c ^ d;
+    }
 
+    /**
+     * Determine the appropriate additive constant for the current iteration
+     */
+    function sha1_kt(t) {
+      return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
+                (t < 60) ? -1894007588 : -899497514;
+    }
+  },
+  /**
+   * @class Hashes.SHA256
+   * @param {config}
+   * 
+   * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined in FIPS 180-2
+   * Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.
+   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+   * See http://pajhome.org.uk/crypt/md5 for details.
+   * Also http://anmar.eu.org/projects/jssha2/
+   */
+  SHA256 : function (options) {
+    /**
+     * Private properties configuration variables. You may need to tweak these to be compatible with
+     * the server-side, but the defaults work in most cases.
+     * @see this.setUpperCase() method
+     * @see this.setPad() method
+     */
+    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false, // hexadecimal output case format. false - lowercase; true - uppercase  */
+              b64pad = (options && typeof options.pad === 'string') ? options.pda : '=', /* base-64 pad character. Default '=' for strict RFC compliance   */
+              utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
+              sha256_K;
 
-},{"is":9,"foreach":10}],9:[function(require,module,exports){
+    /* privileged (public) methods */
+    this.hex = function (s) { 
+      return rstr2hex(rstr(s, utf8)); 
+    };
+    this.b64 = function (s) { 
+      return rstr2b64(rstr(s, utf8), b64pad);
+    };
+    this.any = function (s, e) { 
+      return rstr2any(rstr(s, utf8), e); 
+    };
+    this.hex_hmac = function (k, d) { 
+      return rstr2hex(rstr_hmac(k, d)); 
+    };
+    this.b64_hmac = function (k, d) { 
+      return rstr2b64(rstr_hmac(k, d), b64pad);
+    };
+    this.any_hmac = function (k, d, e) { 
+      return rstr2any(rstr_hmac(k, d), e); 
+    };
+    /**
+     * Perform a simple self-test to see if the VM is working
+     * @return {String} Hexadecimal hash sample
+     * @public
+     */
+    this.vm_test = function () {
+      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
+    };
+    /** 
+     * Enable/disable uppercase hexadecimal returned string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUpperCase = function (a) {
+      if (typeof a === 'boolean') { 
+        hexcase = a;
+      }
+      return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {string} Pad
+     * @return {Object} this
+     * @public
+     */ 
+    this.setPad = function (a) {
+      b64pad = a || b64pad;
+      return this;
+    };
+    /** 
+     * Defines a base64 pad string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUTF8 = function (a) {
+      if (typeof a === 'boolean') {
+        utf8 = a;
+      }
+      return this;
+    };
+    
+    // private methods
 
-/**!
- * is
- * the definitive JavaScript type testing library
- * 
- * @copyright 2013 Enrico Marino
- * @license MIT
- */
+    /**
+     * Calculate the SHA-512 of a raw string
+     */
+    function rstr(s, utf8) {
+      s = (utf8) ? utf8Encode(s) : s;
+      return binb2rstr(binb(rstr2binb(s), s.length * 8));
+    }
 
-var objProto = Object.prototype;
-var owns = objProto.hasOwnProperty;
-var toString = objProto.toString;
-var isActualNaN = function (value) {
-  return value !== value;
-};
-var NON_HOST_TYPES = {
-  "boolean": 1,
-  "number": 1,
-  "string": 1,
-  "undefined": 1
-};
+    /**
+     * Calculate the HMAC-sha256 of a key and some data (raw strings)
+     */
+    function rstr_hmac(key, data) {
+      key = (utf8) ? utf8Encode(key) : key;
+      data = (utf8) ? utf8Encode(data) : data;
+      var hash, i = 0,
+          bkey = rstr2binb(key), 
+          ipad = Array(16), 
+          opad = Array(16);
 
-/**
- * Expose `is`
- */
-
-var is = module.exports = {};
-
-/**
- * Test general.
- */
-
-/**
- * is.type
- * Test if `value` is a type of `type`.
- *
- * @param {Mixed} value value to test
- * @param {String} type type
- * @return {Boolean} true if `value` is a type of `type`, false otherwise
- * @api public
- */
-
-is.a =
-is.type = function (value, type) {
-  return typeof value === type;
-};
-
-/**
- * is.defined
- * Test if `value` is defined.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if 'value' is defined, false otherwise
- * @api public
- */
-
-is.defined = function (value) {
-  return value !== undefined;
-};
-
-/**
- * is.empty
- * Test if `value` is empty.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is empty, false otherwise
- * @api public
- */
-
-is.empty = function (value) {
-  var type = toString.call(value);
-  var key;
-
-  if ('[object Array]' === type || '[object Arguments]' === type) {
-    return value.length === 0;
-  }
-
-  if ('[object Object]' === type) {
-    for (key in value) if (owns.call(value, key)) return false;
-    return true;
-  }
-
-  if ('[object String]' === type) {
-    return '' === value;
-  }
-
-  return false;
-};
-
-/**
- * is.equal
- * Test if `value` is equal to `other`.
- *
- * @param {Mixed} value value to test
- * @param {Mixed} other value to compare with
- * @return {Boolean} true if `value` is equal to `other`, false otherwise
- */
-
-is.equal = function (value, other) {
-  var type = toString.call(value)
-  var key;
-
-  if (type !== toString.call(other)) {
-    return false;
-  }
-
-  if ('[object Object]' === type) {
-    for (key in value) {
-      if (!is.equal(value[key], other[key])) {
-        return false;
+      if (bkey.length > 16) { bkey = binb(bkey, key.length * 8); }
+      
+      for (; i < 16; i+=1) {
+        ipad[i] = bkey[i] ^ 0x36363636;
+        opad[i] = bkey[i] ^ 0x5C5C5C5C;
       }
+      
+      hash = binb(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
+      return binb2rstr(binb(opad.concat(hash), 512 + 256));
     }
-    return true;
-  }
-
-  if ('[object Array]' === type) {
-    key = value.length;
-    if (key !== other.length) {
-      return false;
-    }
-    while (--key) {
-      if (!is.equal(value[key], other[key])) {
-        return false;
+    
+    /*
+     * Main sha256 function, with its support functions
+     */
+    function sha256_S (X, n) {return ( X >>> n ) | (X << (32 - n));}
+    function sha256_R (X, n) {return ( X >>> n );}
+    function sha256_Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}
+    function sha256_Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}
+    function sha256_Sigma0256(x) {return (sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22));}
+    function sha256_Sigma1256(x) {return (sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25));}
+    function sha256_Gamma0256(x) {return (sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3));}
+    function sha256_Gamma1256(x) {return (sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10));}
+    function sha256_Sigma0512(x) {return (sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39));}
+    function sha256_Sigma1512(x) {return (sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41));}
+    function sha256_Gamma0512(x) {return (sha256_S(x, 1)  ^ sha256_S(x, 8) ^ sha256_R(x, 7));}
+    function sha256_Gamma1512(x) {return (sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6));}
+    
+    sha256_K = [
+      1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993,
+      -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987,
+      1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522,
+      264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986,
+      -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585,
+      113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291,
+      1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885,
+      -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344,
+      430227734, 506948616, 659060556, 883997877, 958139571, 1322822218,
+      1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872,
+      -1866530822, -1538233109, -1090935817, -965641998
+    ];
+    
+    function binb(m, l) {
+      var HASH = [1779033703, -1150833019, 1013904242, -1521486534,
+                 1359893119, -1694144372, 528734635, 1541459225];
+      var W = new Array(64);
+      var a, b, c, d, e, f, g, h;
+      var i, j, T1, T2;
+    
+      /* append padding */
+      m[l >> 5] |= 0x80 << (24 - l % 32);
+      m[((l + 64 >> 9) << 4) + 15] = l;
+    
+      for (i = 0; i < m.length; i += 16)
+      {
+      a = HASH[0];
+      b = HASH[1];
+      c = HASH[2];
+      d = HASH[3];
+      e = HASH[4];
+      f = HASH[5];
+      g = HASH[6];
+      h = HASH[7];
+    
+      for (j = 0; j < 64; j+=1)
+      {
+        if (j < 16) { 
+          W[j] = m[j + i];
+        } else { 
+          W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]),
+                          sha256_Gamma0256(W[j - 15])), W[j - 16]);
+        }
+    
+        T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)),
+                                  sha256_K[j]), W[j]);
+        T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c));
+        h = g;
+        g = f;
+        f = e;
+        e = safe_add(d, T1);
+        d = c;
+        c = b;
+        b = a;
+        a = safe_add(T1, T2);
+      }
+    
+      HASH[0] = safe_add(a, HASH[0]);
+      HASH[1] = safe_add(b, HASH[1]);
+      HASH[2] = safe_add(c, HASH[2]);
+      HASH[3] = safe_add(d, HASH[3]);
+      HASH[4] = safe_add(e, HASH[4]);
+      HASH[5] = safe_add(f, HASH[5]);
+      HASH[6] = safe_add(g, HASH[6]);
+      HASH[7] = safe_add(h, HASH[7]);
       }
+      return HASH;
     }
-    return true;
-  }
-
-  if ('[object Function]' === type) {
-    return value.prototype === other.prototype;
-  }
-
-  if ('[object Date]' === type) {
-    return value.getTime() === other.getTime();
-  }
-
-  return value === other;
-};
-
-/**
- * is.hosted
- * Test if `value` is hosted by `host`.
- *
- * @param {Mixed} value to test
- * @param {Mixed} host host to test with
- * @return {Boolean} true if `value` is hosted by `host`, false otherwise
- * @api public
- */
-
-is.hosted = function (value, host) {
-  var type = typeof host[value];
-  return type === 'object' ? !!host[value] : !NON_HOST_TYPES[type];
-};
-
-/**
- * is.instance
- * Test if `value` is an instance of `constructor`.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an instance of `constructor`
- * @api public
- */
-
-is.instance = is['instanceof'] = function (value, constructor) {
-  return value instanceof constructor;
-};
-
-/**
- * is.null
- * Test if `value` is null.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is null, false otherwise
- * @api public
- */
-
-is['null'] = function (value) {
-  return value === null;
-};
-
-/**
- * is.undefined
- * Test if `value` is undefined.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is undefined, false otherwise
- * @api public
- */
-
-is.undefined = function (value) {
-  return value === undefined;
-};
 
-/**
- * Test arguments.
- */
-
-/**
- * is.arguments
- * Test if `value` is an arguments object.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an arguments object, false otherwise
- * @api public
- */
-
-is.arguments = function (value) {
-  var isStandardArguments = '[object Arguments]' === toString.call(value);
-  var isOldArguments = !is.array(value) && is.arraylike(value) && is.object(value) && is.fn(value.callee);
-  return isStandardArguments || isOldArguments;
-};
-
-/**
- * Test array.
- */
-
-/**
- * is.array
- * Test if 'value' is an array.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an array, false otherwise
- * @api public
- */
-
-is.array = function (value) {
-  return '[object Array]' === toString.call(value);
-};
-
-/**
- * is.arguments.empty
- * Test if `value` is an empty arguments object.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an empty arguments object, false otherwise
- * @api public
- */
-is.arguments.empty = function (value) {
-  return is.arguments(value) && value.length === 0;
-};
-
-/**
- * is.array.empty
- * Test if `value` is an empty array.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an empty array, false otherwise
- * @api public
- */
-is.array.empty = function (value) {
-  return is.array(value) && value.length === 0;
-};
-
-/**
- * is.arraylike
- * Test if `value` is an arraylike object.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an arguments object, false otherwise
- * @api public
- */
-
-is.arraylike = function (value) {
-  return !!value && !is.boolean(value)
-    && owns.call(value, 'length')
-    && isFinite(value.length)
-    && is.number(value.length)
-    && value.length >= 0;
-};
-
-/**
- * Test boolean.
- */
+  },
 
-/**
- * is.boolean
- * Test if `value` is a boolean.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a boolean, false otherwise
- * @api public
- */
+  /**
+   * @class Hashes.SHA512
+   * @param {config}
+   * 
+   * A JavaScript implementation of the Secure Hash Algorithm, SHA-512, as defined in FIPS 180-2
+   * Version 2.2 Copyright Anonymous Contributor, Paul Johnston 2000 - 2009.
+   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+   * See http://pajhome.org.uk/crypt/md5 for details. 
+   */
+  SHA512 : function (options) {
+    /**
+     * Private properties configuration variables. You may need to tweak these to be compatible with
+     * the server-side, but the defaults work in most cases.
+     * @see this.setUpperCase() method
+     * @see this.setPad() method
+     */
+    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false , /* hexadecimal output case format. false - lowercase; true - uppercase  */
+        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=',  /* base-64 pad character. Default '=' for strict RFC compliance   */
+        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
+        sha512_k;
 
-is.boolean = function (value) {
-  return '[object Boolean]' === toString.call(value);
-};
+    /* privileged (public) methods */
+    this.hex = function (s) { 
+      return rstr2hex(rstr(s)); 
+    };
+    this.b64 = function (s) { 
+      return rstr2b64(rstr(s), b64pad);  
+    };
+    this.any = function (s, e) { 
+      return rstr2any(rstr(s), e);
+    };
+    this.hex_hmac = function (k, d) {
+      return rstr2hex(rstr_hmac(k, d));
+    };
+    this.b64_hmac = function (k, d) { 
+      return rstr2b64(rstr_hmac(k, d), b64pad);
+    };
+    this.any_hmac = function (k, d, e) { 
+      return rstr2any(rstr_hmac(k, d), e);
+    };
+    /**
+     * Perform a simple self-test to see if the VM is working
+     * @return {String} Hexadecimal hash sample
+     * @public
+     */
+    this.vm_test = function () {
+      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
+    };
+    /** 
+     * @description Enable/disable uppercase hexadecimal returned string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUpperCase = function (a) {
+      if (typeof a === 'boolean') {
+        hexcase = a;
+      }
+      return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {string} Pad
+     * @return {Object} this
+     * @public
+     */ 
+    this.setPad = function (a) {
+      b64pad = a || b64pad;
+      return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUTF8 = function (a) {
+      if (typeof a === 'boolean') {
+        utf8 = a;
+      }
+      return this;
+    };
 
-/**
- * is.false
- * Test if `value` is false.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is false, false otherwise
- * @api public
- */
+    /* private methods */
+    
+    /**
+     * Calculate the SHA-512 of a raw string
+     */
+    function rstr(s) {
+      s = (utf8) ? utf8Encode(s) : s;
+      return binb2rstr(binb(rstr2binb(s), s.length * 8));
+    }
+    /*
+     * Calculate the HMAC-SHA-512 of a key and some data (raw strings)
+     */
+    function rstr_hmac(key, data) {
+      key = (utf8) ? utf8Encode(key) : key;
+      data = (utf8) ? utf8Encode(data) : data;
+      
+      var hash, i = 0, 
+          bkey = rstr2binb(key),
+          ipad = Array(32), opad = Array(32);
 
-is['false'] = function (value) {
-  return is.boolean(value) && (value === false || value.valueOf() === false);
-};
+      if (bkey.length > 32) { bkey = binb(bkey, key.length * 8); }
+      
+      for (; i < 32; i+=1) {
+        ipad[i] = bkey[i] ^ 0x36363636;
+        opad[i] = bkey[i] ^ 0x5C5C5C5C;
+      }
+      
+      hash = binb(ipad.concat(rstr2binb(data)), 1024 + data.length * 8);
+      return binb2rstr(binb(opad.concat(hash), 1024 + 512));
+    }
+            
+    /**
+     * Calculate the SHA-512 of an array of big-endian dwords, and a bit length
+     */
+    function binb(x, len) {
+      var j, i, l,
+          W = new Array(80),
+          hash = new Array(16),
+          //Initial hash values
+          H = [
+            new int64(0x6a09e667, -205731576),
+            new int64(-1150833019, -2067093701),
+            new int64(0x3c6ef372, -23791573),
+            new int64(-1521486534, 0x5f1d36f1),
+            new int64(0x510e527f, -1377402159),
+            new int64(-1694144372, 0x2b3e6c1f),
+            new int64(0x1f83d9ab, -79577749),
+            new int64(0x5be0cd19, 0x137e2179)
+          ],
+          T1 = new int64(0, 0),
+          T2 = new int64(0, 0),
+          a = new int64(0,0),
+          b = new int64(0,0),
+          c = new int64(0,0),
+          d = new int64(0,0),
+          e = new int64(0,0),
+          f = new int64(0,0),
+          g = new int64(0,0),
+          h = new int64(0,0),
+          //Temporary variables not specified by the document
+          s0 = new int64(0, 0),
+          s1 = new int64(0, 0),
+          Ch = new int64(0, 0),
+          Maj = new int64(0, 0),
+          r1 = new int64(0, 0),
+          r2 = new int64(0, 0),
+          r3 = new int64(0, 0);
 
-/**
- * is.true
- * Test if `value` is true.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is true, false otherwise
- * @api public
- */
-
-is['true'] = function (value) {
-  return is.boolean(value) && (value === true || value.valueOf() === true);
-};
+      if (sha512_k === undefined) {
+          //SHA512 constants
+          sha512_k = [
+            new int64(0x428a2f98, -685199838), new int64(0x71374491, 0x23ef65cd),
+            new int64(-1245643825, -330482897), new int64(-373957723, -2121671748),
+            new int64(0x3956c25b, -213338824), new int64(0x59f111f1, -1241133031),
+            new int64(-1841331548, -1357295717), new int64(-1424204075, -630357736),
+            new int64(-670586216, -1560083902), new int64(0x12835b01, 0x45706fbe),
+            new int64(0x243185be, 0x4ee4b28c), new int64(0x550c7dc3, -704662302),
+            new int64(0x72be5d74, -226784913), new int64(-2132889090, 0x3b1696b1),
+            new int64(-1680079193, 0x25c71235), new int64(-1046744716, -815192428),
+            new int64(-459576895, -1628353838), new int64(-272742522, 0x384f25e3),
+            new int64(0xfc19dc6, -1953704523), new int64(0x240ca1cc, 0x77ac9c65),
+            new int64(0x2de92c6f, 0x592b0275), new int64(0x4a7484aa, 0x6ea6e483),
+            new int64(0x5cb0a9dc, -1119749164), new int64(0x76f988da, -2096016459),
+            new int64(-1740746414, -295247957), new int64(-1473132947, 0x2db43210),
+            new int64(-1341970488, -1728372417), new int64(-1084653625, -1091629340),
+            new int64(-958395405, 0x3da88fc2), new int64(-710438585, -1828018395),
+            new int64(0x6ca6351, -536640913), new int64(0x14292967, 0xa0e6e70),
+            new int64(0x27b70a85, 0x46d22ffc), new int64(0x2e1b2138, 0x5c26c926),
+            new int64(0x4d2c6dfc, 0x5ac42aed), new int64(0x53380d13, -1651133473),
+            new int64(0x650a7354, -1951439906), new int64(0x766a0abb, 0x3c77b2a8),
+            new int64(-2117940946, 0x47edaee6), new int64(-1838011259, 0x1482353b),
+            new int64(-1564481375, 0x4cf10364), new int64(-1474664885, -1136513023),
+            new int64(-1035236496, -789014639), new int64(-949202525, 0x654be30),
+            new int64(-778901479, -688958952), new int64(-694614492, 0x5565a910),
+            new int64(-200395387, 0x5771202a), new int64(0x106aa070, 0x32bbd1b8),
+            new int64(0x19a4c116, -1194143544), new int64(0x1e376c08, 0x5141ab53),
+            new int64(0x2748774c, -544281703), new int64(0x34b0bcb5, -509917016),
+            new int64(0x391c0cb3, -976659869), new int64(0x4ed8aa4a, -482243893),
+            new int64(0x5b9cca4f, 0x7763e373), new int64(0x682e6ff3, -692930397),
+            new int64(0x748f82ee, 0x5defb2fc), new int64(0x78a5636f, 0x43172f60),
+            new int64(-2067236844, -1578062990), new int64(-1933114872, 0x1a6439ec),
+            new int64(-1866530822, 0x23631e28), new int64(-1538233109, -561857047),
+            new int64(-1090935817, -1295615723), new int64(-965641998, -479046869),
+            new int64(-903397682, -366583396), new int64(-779700025, 0x21c0c207),
+            new int64(-354779690, -840897762), new int64(-176337025, -294727304),
+            new int64(0x6f067aa, 0x72176fba), new int64(0xa637dc5, -1563912026),
+            new int64(0x113f9804, -1090974290), new int64(0x1b710b35, 0x131c471b),
+            new int64(0x28db77f5, 0x23047d84), new int64(0x32caab7b, 0x40c72493),
+            new int64(0x3c9ebe0a, 0x15c9bebc), new int64(0x431d67c4, -1676669620),
+            new int64(0x4cc5d4be, -885112138), new int64(0x597f299c, -60457430),
+            new int64(0x5fcb6fab, 0x3ad6faec), new int64(0x6c44198c, 0x4a475817)
+          ];
+      }
+  
+      for (i=0; i<80; i+=1) {
+        W[i] = new int64(0, 0);
+      }
+    
+      // append padding to the source string. The format is described in the FIPS.
+      x[len >> 5] |= 0x80 << (24 - (len & 0x1f));
+      x[((len + 128 >> 10)<< 5) + 31] = len;
+      l = x.length;
+      for (i = 0; i<l; i+=32) { //32 dwords is the block size
+        int64copy(a, H[0]);
+        int64copy(b, H[1]);
+        int64copy(c, H[2]);
+        int64copy(d, H[3]);
+        int64copy(e, H[4]);
+        int64copy(f, H[5]);
+        int64copy(g, H[6]);
+        int64copy(h, H[7]);
+      
+        for (j=0; j<16; j+=1) {
+          W[j].h = x[i + 2*j];
+          W[j].l = x[i + 2*j + 1];
+        }
+      
+        for (j=16; j<80; j+=1) {
+          //sigma1
+          int64rrot(r1, W[j-2], 19);
+          int64revrrot(r2, W[j-2], 29);
+          int64shr(r3, W[j-2], 6);
+          s1.l = r1.l ^ r2.l ^ r3.l;
+          s1.h = r1.h ^ r2.h ^ r3.h;
+          //sigma0
+          int64rrot(r1, W[j-15], 1);
+          int64rrot(r2, W[j-15], 8);
+          int64shr(r3, W[j-15], 7);
+          s0.l = r1.l ^ r2.l ^ r3.l;
+          s0.h = r1.h ^ r2.h ^ r3.h;
+      
+          int64add4(W[j], s1, W[j-7], s0, W[j-16]);
+        }
+      
+        for (j = 0; j < 80; j+=1) {
+          //Ch
+          Ch.l = (e.l & f.l) ^ (~e.l & g.l);
+          Ch.h = (e.h & f.h) ^ (~e.h & g.h);
+      
+          //Sigma1
+          int64rrot(r1, e, 14);
+          int64rrot(r2, e, 18);
+          int64revrrot(r3, e, 9);
+          s1.l = r1.l ^ r2.l ^ r3.l;
+          s1.h = r1.h ^ r2.h ^ r3.h;
+      
+          //Sigma0
+          int64rrot(r1, a, 28);
+          int64revrrot(r2, a, 2);
+          int64revrrot(r3, a, 7);
+          s0.l = r1.l ^ r2.l ^ r3.l;
+          s0.h = r1.h ^ r2.h ^ r3.h;
+      
+          //Maj
+          Maj.l = (a.l & b.l) ^ (a.l & c.l) ^ (b.l & c.l);
+          Maj.h = (a.h & b.h) ^ (a.h & c.h) ^ (b.h & c.h);
+      
+          int64add5(T1, h, s1, Ch, sha512_k[j], W[j]);
+          int64add(T2, s0, Maj);
+      
+          int64copy(h, g);
+          int64copy(g, f);
+          int64copy(f, e);
+          int64add(e, d, T1);
+          int64copy(d, c);
+          int64copy(c, b);
+          int64copy(b, a);
+          int64add(a, T1, T2);
+        }
+        int64add(H[0], H[0], a);
+        int64add(H[1], H[1], b);
+        int64add(H[2], H[2], c);
+        int64add(H[3], H[3], d);
+        int64add(H[4], H[4], e);
+        int64add(H[5], H[5], f);
+        int64add(H[6], H[6], g);
+        int64add(H[7], H[7], h);
+      }
+    
+      //represent the hash as an array of 32-bit dwords
+      for (i=0; i<8; i+=1) {
+        hash[2*i] = H[i].h;
+        hash[2*i + 1] = H[i].l;
+      }
+      return hash;
+    }
+    
+    //A constructor for 64-bit numbers
+    function int64(h, l) {
+      this.h = h;
+      this.l = l;
+      //this.toString = int64toString;
+    }
+    
+    //Copies src into dst, assuming both are 64-bit numbers
+    function int64copy(dst, src) {
+      dst.h = src.h;
+      dst.l = src.l;
+    }
+    
+    //Right-rotates a 64-bit number by shift
+    //Won't handle cases of shift>=32
+    //The function revrrot() is for that
+    function int64rrot(dst, x, shift) {
+      dst.l = (x.l >>> shift) | (x.h << (32-shift));
+      dst.h = (x.h >>> shift) | (x.l << (32-shift));
+    }
+    
+    //Reverses the dwords of the source and then rotates right by shift.
+    //This is equivalent to rotation by 32+shift
+    function int64revrrot(dst, x, shift) {
+      dst.l = (x.h >>> shift) | (x.l << (32-shift));
+      dst.h = (x.l >>> shift) | (x.h << (32-shift));
+    }
+    
+    //Bitwise-shifts right a 64-bit number by shift
+    //Won't handle shift>=32, but it's never needed in SHA512
+    function int64shr(dst, x, shift) {
+      dst.l = (x.l >>> shift) | (x.h << (32-shift));
+      dst.h = (x.h >>> shift);
+    }
+    
+    //Adds two 64-bit numbers
+    //Like the original implementation, does not rely on 32-bit operations
+    function int64add(dst, x, y) {
+       var w0 = (x.l & 0xffff) + (y.l & 0xffff);
+       var w1 = (x.l >>> 16) + (y.l >>> 16) + (w0 >>> 16);
+       var w2 = (x.h & 0xffff) + (y.h & 0xffff) + (w1 >>> 16);
+       var w3 = (x.h >>> 16) + (y.h >>> 16) + (w2 >>> 16);
+       dst.l = (w0 & 0xffff) | (w1 << 16);
+       dst.h = (w2 & 0xffff) | (w3 << 16);
+    }
+    
+    //Same, except with 4 addends. Works faster than adding them one by one.
+    function int64add4(dst, a, b, c, d) {
+       var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff);
+       var w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (w0 >>> 16);
+       var w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (w1 >>> 16);
+       var w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (w2 >>> 16);
+       dst.l = (w0 & 0xffff) | (w1 << 16);
+       dst.h = (w2 & 0xffff) | (w3 << 16);
+    }
+    
+    //Same, except with 5 addends
+    function int64add5(dst, a, b, c, d, e) {
+      var w0 = (a.l & 0xffff) + (b.l & 0xffff) + (c.l & 0xffff) + (d.l & 0xffff) + (e.l & 0xffff),
+          w1 = (a.l >>> 16) + (b.l >>> 16) + (c.l >>> 16) + (d.l >>> 16) + (e.l >>> 16) + (w0 >>> 16),
+          w2 = (a.h & 0xffff) + (b.h & 0xffff) + (c.h & 0xffff) + (d.h & 0xffff) + (e.h & 0xffff) + (w1 >>> 16),
+          w3 = (a.h >>> 16) + (b.h >>> 16) + (c.h >>> 16) + (d.h >>> 16) + (e.h >>> 16) + (w2 >>> 16);
+       dst.l = (w0 & 0xffff) | (w1 << 16);
+       dst.h = (w2 & 0xffff) | (w3 << 16);
+    }
+  },
+  /**
+   * @class Hashes.RMD160
+   * @constructor
+   * @param {Object} [config]
+   * 
+   * A JavaScript implementation of the RIPEMD-160 Algorithm
+   * Version 2.2 Copyright Jeremy Lin, Paul Johnston 2000 - 2009.
+   * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+   * See http://pajhome.org.uk/crypt/md5 for details.
+   * Also http://www.ocf.berkeley.edu/~jjlin/jsotp/
+   */
+  RMD160 : function (options) {
+    /**
+     * Private properties configuration variables. You may need to tweak these to be compatible with
+     * the server-side, but the defaults work in most cases.
+     * @see this.setUpperCase() method
+     * @see this.setPad() method
+     */
+    var hexcase = (options && typeof options.uppercase === 'boolean') ? options.uppercase : false,   /* hexadecimal output case format. false - lowercase; true - uppercase  */
+        b64pad = (options && typeof options.pad === 'string') ? options.pda : '=',  /* base-64 pad character. Default '=' for strict RFC compliance   */
+        utf8 = (options && typeof options.utf8 === 'boolean') ? options.utf8 : true, /* enable/disable utf8 encoding */
+        rmd160_r1 = [
+           0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
+           7,  4, 13,  1, 10,  6, 15,  3, 12,  0,  9,  5,  2, 14, 11,  8,
+           3, 10, 14,  4,  9, 15,  8,  1,  2,  7,  0,  6, 13, 11,  5, 12,
+           1,  9, 11, 10,  0,  8, 12,  4, 13,  3,  7, 15, 14,  5,  6,  2,
+           4,  0,  5,  9,  7, 12,  2, 10, 14,  1,  3,  8, 11,  6, 15, 13
+        ],
+        rmd160_r2 = [
+           5, 14,  7,  0,  9,  2, 11,  4, 13,  6, 15,  8,  1, 10,  3, 12,
+           6, 11,  3,  7,  0, 13,  5, 10, 14, 15,  8, 12,  4,  9,  1,  2,
+          15,  5,  1,  3,  7, 14,  6,  9, 11,  8, 12,  2, 10,  0,  4, 13,
+           8,  6,  4,  1,  3, 11, 15,  0,  5, 12,  2, 13,  9,  7, 10, 14,
+          12, 15, 10,  4,  1,  5,  8,  7,  6,  2, 13, 14,  0,  3,  9, 11
+        ],
+        rmd160_s1 = [
+          11, 14, 15, 12,  5,  8,  7,  9, 11, 13, 14, 15,  6,  7,  9,  8,
+           7,  6,  8, 13, 11,  9,  7, 15,  7, 12, 15,  9, 11,  7, 13, 12,
+          11, 13,  6,  7, 14,  9, 13, 15, 14,  8, 13,  6,  5, 12,  7,  5,
+          11, 12, 14, 15, 14, 15,  9,  8,  9, 14,  5,  6,  8,  6,  5, 12,
+           9, 15,  5, 11,  6,  8, 13, 12,  5, 12, 13, 14, 11,  8,  5,  6
+        ],
+        rmd160_s2 = [
+           8,  9,  9, 11, 13, 15, 15,  5,  7,  7,  8, 11, 14, 14, 12,  6,
+           9, 13, 15,  7, 12,  8,  9, 11,  7,  7, 12,  7,  6, 15, 13, 11,
+           9,  7, 15, 11,  8,  6,  6, 14, 12, 13,  5, 14, 13, 13,  7,  5,
+          15,  5,  8, 11, 14, 14,  6, 14,  6,  9, 12,  9, 12,  5, 15,  8,
+           8,  5, 12,  9, 12,  5, 14,  6,  8, 13,  6,  5, 15, 13, 11, 11
+        ];
 
-/**
- * Test date.
- */
+    /* privileged (public) methods */
+    this.hex = function (s) {
+      return rstr2hex(rstr(s, utf8)); 
+    };
+    this.b64 = function (s) {
+      return rstr2b64(rstr(s, utf8), b64pad);
+    };
+    this.any = function (s, e) { 
+      return rstr2any(rstr(s, utf8), e);
+    };
+    this.hex_hmac = function (k, d) { 
+      return rstr2hex(rstr_hmac(k, d));
+    };
+    this.b64_hmac = function (k, d) { 
+      return rstr2b64(rstr_hmac(k, d), b64pad);
+    };
+    this.any_hmac = function (k, d, e) { 
+      return rstr2any(rstr_hmac(k, d), e); 
+    };
+    /**
+     * Perform a simple self-test to see if the VM is working
+     * @return {String} Hexadecimal hash sample
+     * @public
+     */
+    this.vm_test = function () {
+      return hex('abc').toLowerCase() === '900150983cd24fb0d6963f7d28e17f72';
+    };
+    /** 
+     * @description Enable/disable uppercase hexadecimal returned string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUpperCase = function (a) {
+      if (typeof a === 'boolean' ) { hexcase = a; }
+      return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {string} Pad
+     * @return {Object} this
+     * @public
+     */ 
+    this.setPad = function (a) {
+      if (typeof a !== 'undefined' ) { b64pad = a; }
+      return this;
+    };
+    /** 
+     * @description Defines a base64 pad string 
+     * @param {boolean} 
+     * @return {Object} this
+     * @public
+     */ 
+    this.setUTF8 = function (a) {
+      if (typeof a === 'boolean') { utf8 = a; }
+      return this;
+    };
 
-/**
- * is.date
- * Test if `value` is a date.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a date, false otherwise
- * @api public
- */
+    /* private methods */
 
-is.date = function (value) {
-  return '[object Date]' === toString.call(value);
-};
+    /**
+     * Calculate the rmd160 of a raw string
+     */
+    function rstr(s) {
+      s = (utf8) ? utf8Encode(s) : s;
+      return binl2rstr(binl(rstr2binl(s), s.length * 8));
+    }
 
-/**
- * Test element.
- */
+    /**
+     * Calculate the HMAC-rmd160 of a key and some data (raw strings)
+     */
+    function rstr_hmac(key, data) {
+      key = (utf8) ? utf8Encode(key) : key;
+      data = (utf8) ? utf8Encode(data) : data;
+      var i, hash,
+          bkey = rstr2binl(key),
+          ipad = Array(16), opad = Array(16);
 
-/**
- * is.element
- * Test if `value` is an html element.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an HTML Element, false otherwise
- * @api public
- */
+      if (bkey.length > 16) { 
+        bkey = binl(bkey, key.length * 8); 
+      }
+      
+      for (i = 0; i < 16; i+=1) {
+        ipad[i] = bkey[i] ^ 0x36363636;
+        opad[i] = bkey[i] ^ 0x5C5C5C5C;
+      }
+      hash = binl(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
+      return binl2rstr(binl(opad.concat(hash), 512 + 160));
+    }
 
-is.element = function (value) {
-  return value !== undefined
-    && typeof HTMLElement !== 'undefined'
-    && value instanceof HTMLElement
-    && value.nodeType === 1;
-};
+    /**
+     * Convert an array of little-endian words to a string
+     */
+    function binl2rstr(input) {
+      var i, output = '', l = input.length * 32;
+      for (i = 0; i < l; i += 8) {
+        output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
+      }
+      return output;
+    }
 
-/**
- * Test error.
- */
+    /**
+     * Calculate the RIPE-MD160 of an array of little-endian words, and a bit length.
+     */
+    function binl(x, len) {
+      var T, j, i, l,
+          h0 = 0x67452301,
+          h1 = 0xefcdab89,
+          h2 = 0x98badcfe,
+          h3 = 0x10325476,
+          h4 = 0xc3d2e1f0,
+          A1, B1, C1, D1, E1,
+          A2, B2, C2, D2, E2;
 
-/**
- * is.error
- * Test if `value` is an error object.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an error object, false otherwise
- * @api public
- */
+      /* append padding */
+      x[len >> 5] |= 0x80 << (len % 32);
+      x[(((len + 64) >>> 9) << 4) + 14] = len;
+      l = x.length;
+      
+      for (i = 0; i < l; i+=16) {
+        A1 = A2 = h0; B1 = B2 = h1; C1 = C2 = h2; D1 = D2 = h3; E1 = E2 = h4;
+        for (j = 0; j <= 79; j+=1) {
+          T = safe_add(A1, rmd160_f(j, B1, C1, D1));
+          T = safe_add(T, x[i + rmd160_r1[j]]);
+          T = safe_add(T, rmd160_K1(j));
+          T = safe_add(bit_rol(T, rmd160_s1[j]), E1);
+          A1 = E1; E1 = D1; D1 = bit_rol(C1, 10); C1 = B1; B1 = T;
+          T = safe_add(A2, rmd160_f(79-j, B2, C2, D2));
+          T = safe_add(T, x[i + rmd160_r2[j]]);
+          T = safe_add(T, rmd160_K2(j));
+          T = safe_add(bit_rol(T, rmd160_s2[j]), E2);
+          A2 = E2; E2 = D2; D2 = bit_rol(C2, 10); C2 = B2; B2 = T;
+        }
 
-is.error = function (value) {
-  return '[object Error]' === toString.call(value);
-};
+        T = safe_add(h1, safe_add(C1, D2));
+        h1 = safe_add(h2, safe_add(D1, E2));
+        h2 = safe_add(h3, safe_add(E1, A2));
+        h3 = safe_add(h4, safe_add(A1, B2));
+        h4 = safe_add(h0, safe_add(B1, C2));
+        h0 = T;
+      }
+      return [h0, h1, h2, h3, h4];
+    }
 
-/**
- * Test function.
- */
+    // specific algorithm methods 
+    function rmd160_f(j, x, y, z) {
+      return ( 0 <= j && j <= 15) ? (x ^ y ^ z) :
+         (16 <= j && j <= 31) ? (x & y) | (~x & z) :
+         (32 <= j && j <= 47) ? (x | ~y) ^ z :
+         (48 <= j && j <= 63) ? (x & z) | (y & ~z) :
+         (64 <= j && j <= 79) ? x ^ (y | ~z) :
+         'rmd160_f: j out of range';
+    }
 
-/**
- * is.fn / is.function (deprecated)
- * Test if `value` is a function.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a function, false otherwise
- * @api public
- */
+    function rmd160_K1(j) {
+      return ( 0 <= j && j <= 15) ? 0x00000000 :
+         (16 <= j && j <= 31) ? 0x5a827999 :
+         (32 <= j && j <= 47) ? 0x6ed9eba1 :
+         (48 <= j && j <= 63) ? 0x8f1bbcdc :
+         (64 <= j && j <= 79) ? 0xa953fd4e :
+         'rmd160_K1: j out of range';
+    }
 
-is.fn = is['function'] = function (value) {
-  var isAlert = typeof window !== 'undefined' && value === window.alert;
-  return isAlert || '[object Function]' === toString.call(value);
+    function rmd160_K2(j){
+      return ( 0 <= j && j <= 15) ? 0x50a28be6 :
+         (16 <= j && j <= 31) ? 0x5c4dd124 :
+         (32 <= j && j <= 47) ? 0x6d703ef3 :
+         (48 <= j && j <= 63) ? 0x7a6d76e9 :
+         (64 <= j && j <= 79) ? 0x00000000 :
+         'rmd160_K2: j out of range';
+    }
+  }
 };
 
-/**
- * Test number.
- */
-
-/**
- * is.number
- * Test if `value` is a number.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a number, false otherwise
- * @api public
- */
-
-is.number = function (value) {
-  return '[object Number]' === toString.call(value);
-};
+  // exposes Hashes
+  (function( window, undefined ) {
+    var freeExports = false;
+    if (typeof exports === 'object' ) {
+      freeExports = exports;
+      if (exports && typeof global === 'object' && global && global === global.global ) { window = global; }
+    }
 
-/**
- * is.infinite
- * Test if `value` is positive or negative infinity.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is positive or negative Infinity, false otherwise
- * @api public
- */
-is.infinite = function (value) {
-  return value === Infinity || value === -Infinity;
-};
+    if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
+      // define as an anonymous module, so, through path mapping, it can be aliased
+      define(function () { return Hashes; });
+    }
+    else if ( freeExports ) {
+      // in Node.js or RingoJS v0.8.0+
+      if ( typeof module === 'object' && module && module.exports === freeExports ) {
+        module.exports = Hashes;
+      }
+      // in Narwhal or RingoJS v0.7.0-
+      else {
+        freeExports.Hashes = Hashes;
+      }
+    }
+    else {
+      // in a browser or Rhino
+      window.Hashes = Hashes;
+    }
+  }( this ));
+}()); // IIFE
 
-/**
- * is.decimal
- * Test if `value` is a decimal number.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a decimal number, false otherwise
- * @api public
- */
+})(window)
+},{}],2:[function(require,module,exports){
+'use strict';
 
-is.decimal = function (value) {
-  return is.number(value) && !isActualNaN(value) && value % 1 !== 0;
+var hashes = require('jshashes'),
+    xtend = require('xtend'),
+    sha1 = new hashes.SHA1();
+
+var ohauth = {};
+
+ohauth.qsString = function(obj) {
+    return Object.keys(obj).sort().map(function(key) {
+        return ohauth.percentEncode(key) + '=' +
+            ohauth.percentEncode(obj[key]);
+    }).join('&');
 };
 
-/**
- * is.divisibleBy
- * Test if `value` is divisible by `n`.
- *
- * @param {Number} value value to test
- * @param {Number} n dividend
- * @return {Boolean} true if `value` is divisible by `n`, false otherwise
- * @api public
- */
+ohauth.stringQs = function(str) {
+    return str.split('&').reduce(function(obj, pair){
+        var parts = pair.split('=');
+        obj[decodeURIComponent(parts[0])] = (null === parts[1]) ?
+            '' : decodeURIComponent(parts[1]);
+        return obj;
+    }, {});
+};
 
-is.divisibleBy = function (value, n) {
-  var isDividendInfinite = is.infinite(value);
-  var isDivisorInfinite = is.infinite(n);
-  var isNonZeroNumber = is.number(value) && !isActualNaN(value) && is.number(n) && !isActualNaN(n) && n !== 0;
-  return isDividendInfinite || isDivisorInfinite || (isNonZeroNumber && value % n === 0);
+ohauth.rawxhr = function(method, url, data, headers, callback) {
+    var xhr = new XMLHttpRequest(),
+        twoHundred = /^20\d$/;
+    xhr.onreadystatechange = function() {
+        if (4 == xhr.readyState && 0 !== xhr.status) {
+            if (twoHundred.test(xhr.status)) callback(null, xhr);
+            else return callback(xhr, null);
+        }
+    };
+    xhr.onerror = function(e) { return callback(e, null); };
+    xhr.open(method, url, true);
+    for (var h in headers) xhr.setRequestHeader(h, headers[h]);
+    xhr.send(data);
 };
 
-/**
- * is.int
- * Test if `value` is an integer.
- *
- * @param value to test
- * @return {Boolean} true if `value` is an integer, false otherwise
- * @api public
- */
+ohauth.xhr = function(method, url, auth, data, options, callback) {
+    var headers = (options && options.header) || {
+        'Content-Type': 'application/x-www-form-urlencoded'
+    };
+    headers.Authorization = 'OAuth ' + ohauth.authHeader(auth);
+    ohauth.rawxhr(method, url, data, headers, callback);
+};
 
-is.int = function (value) {
-  return is.number(value) && !isActualNaN(value) && value % 1 === 0;
+ohauth.nonce = function() {
+    for (var o = ''; o.length < 6;) {
+        o += '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'[Math.floor(Math.random() * 61)];
+    }
+    return o;
 };
 
-/**
- * is.maximum
- * Test if `value` is greater than 'others' values.
- *
- * @param {Number} value value to test
- * @param {Array} others values to compare with
- * @return {Boolean} true if `value` is greater than `others` values
- * @api public
- */
+ohauth.authHeader = function(obj) {
+    return Object.keys(obj).sort().map(function(key) {
+        return encodeURIComponent(key) + '="' + encodeURIComponent(obj[key]) + '"';
+    }).join(', ');
+};
 
-is.maximum = function (value, others) {
-  if (isActualNaN(value)) {
-    throw new TypeError('NaN is not a valid value');
-  } else if (!is.arraylike(others)) {
-    throw new TypeError('second argument must be array-like');
-  }
-  var len = others.length;
+ohauth.timestamp = function() { return ~~((+new Date()) / 1000); };
 
-  while (--len >= 0) {
-    if (value < others[len]) {
-      return false;
-    }
-  }
+ohauth.percentEncode = function(s) {
+    return encodeURIComponent(s)
+        .replace(/\!/g, '%21').replace(/\'/g, '%27')
+        .replace(/\*/g, '%2A').replace(/\(/g, '%28').replace(/\)/g, '%29');
+};
 
-  return true;
+ohauth.baseString = function(method, url, params) {
+    if (params.oauth_signature) delete params.oauth_signature;
+    return [
+        method,
+        ohauth.percentEncode(url),
+        ohauth.percentEncode(ohauth.qsString(params))].join('&');
+};
+
+ohauth.signature = function(oauth_secret, token_secret, baseString) {
+    return sha1.b64_hmac(
+        ohauth.percentEncode(oauth_secret) + '&' +
+        ohauth.percentEncode(token_secret),
+        baseString);
 };
 
 /**
- * is.minimum
- * Test if `value` is less than `others` values.
+ * Takes an options object for configuration (consumer_key,
+ * consumer_secret, version, signature_method, token) and returns a
+ * function that generates the Authorization header for given data.
  *
- * @param {Number} value value to test
- * @param {Array} others values to compare with
- * @return {Boolean} true if `value` is less than `others` values
- * @api public
+ * The returned function takes these parameters:
+ * - method: GET/POST/...
+ * - uri: full URI with protocol, port, path and query string
+ * - extra_params: any extra parameters (that are passed in the POST data),
+ *   can be an object or a from-urlencoded string.
+ *
+ * Returned function returns full OAuth header with "OAuth" string in it.
  */
 
-is.minimum = function (value, others) {
-  if (isActualNaN(value)) {
-    throw new TypeError('NaN is not a valid value');
-  } else if (!is.arraylike(others)) {
-    throw new TypeError('second argument must be array-like');
-  }
-  var len = others.length;
+ohauth.headerGenerator = function(options) {
+    options = options || {};
+    var consumer_key = options.consumer_key || '',
+        consumer_secret = options.consumer_secret || '',
+        signature_method = options.signature_method || 'HMAC-SHA1',
+        version = options.version || '1.0',
+        token = options.token || '';
 
-  while (--len >= 0) {
-    if (value > others[len]) {
-      return false;
-    }
-  }
+    return function(method, uri, extra_params) {
+        method = method.toUpperCase();
+        if (typeof extra_params === 'string' && extra_params.length > 0) {
+            extra_params = ohauth.stringQs(extra_params);
+        }
 
-  return true;
+        var uri_parts = uri.split('?', 2),
+        base_uri = uri_parts[0];
+
+        var query_params = uri_parts.length === 2 ?
+            ohauth.stringQs(uri_parts[1]) : {};
+
+        var oauth_params = {
+            oauth_consumer_key: consumer_key,
+            oauth_signature_method: signature_method,
+            oauth_version: version,
+            oauth_timestamp: ohauth.timestamp(),
+            oauth_nonce: ohauth.nonce()
+        };
+
+        if (token) oauth_params.oauth_token = token;
+
+        var all_params = xtend({}, oauth_params, query_params, extra_params),
+            base_str = ohauth.baseString(method, base_uri, all_params);
+
+        oauth_params.oauth_signature = ohauth.signature(consumer_secret, token, base_str);
+
+        return 'OAuth ' + ohauth.authHeader(oauth_params);
+    };
 };
 
-/**
- * is.nan
- * Test if `value` is not a number.
- *
- * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is not a number, false otherwise
- * @api public
+module.exports = ohauth;
+
+},{"jshashes":7,"xtend":4}],6:[function(require,module,exports){
+module.exports = Object.keys || require('./shim');
+
+
+},{"./shim":8}],8:[function(require,module,exports){
+(function () {
+       "use strict";
+
+       // modified from https://github.com/kriskowal/es5-shim
+       var has = Object.prototype.hasOwnProperty,
+               is = require('is'),
+               forEach = require('foreach'),
+               hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
+               dontEnums = [
+                       "toString",
+                       "toLocaleString",
+                       "valueOf",
+                       "hasOwnProperty",
+                       "isPrototypeOf",
+                       "propertyIsEnumerable",
+                       "constructor"
+               ],
+               keysShim;
+
+       keysShim = function keys(object) {
+               if (!is.object(object) && !is.array(object)) {
+                       throw new TypeError("Object.keys called on a non-object");
+               }
+
+               var name, theKeys = [];
+               for (name in object) {
+                       if (has.call(object, name)) {
+                               theKeys.push(name);
+                       }
+               }
+
+               if (hasDontEnumBug) {
+                       forEach(dontEnums, function (dontEnum) {
+                               if (has.call(object, dontEnum)) {
+                                       theKeys.push(dontEnum);
+                               }
+                       });
+               }
+               return theKeys;
+       };
+
+       module.exports = keysShim;
+}());
+
+
+},{"is":9,"foreach":10}],9:[function(require,module,exports){
+
+/**!
+ * is
+ * the definitive JavaScript type testing library
+ * 
+ * @copyright 2013 Enrico Marino
+ * @license MIT
  */
 
-is.nan = function (value) {
-  return !is.number(value) || value !== value;
+var objProto = Object.prototype;
+var owns = objProto.hasOwnProperty;
+var toString = objProto.toString;
+var isActualNaN = function (value) {
+  return value !== value;
+};
+var NON_HOST_TYPES = {
+  "boolean": 1,
+  "number": 1,
+  "string": 1,
+  "undefined": 1
 };
 
 /**
- * is.even
- * Test if `value` is an even number.
- *
- * @param {Number} value value to test
- * @return {Boolean} true if `value` is an even number, false otherwise
- * @api public
+ * Expose `is`
  */
 
-is.even = function (value) {
-  return is.infinite(value) || (is.number(value) && value === value && value % 2 === 0);
-};
+var is = module.exports = {};
 
 /**
- * is.odd
- * Test if `value` is an odd number.
+ * Test general.
+ */
+
+/**
+ * is.type
+ * Test if `value` is a type of `type`.
  *
- * @param {Number} value value to test
- * @return {Boolean} true if `value` is an odd number, false otherwise
+ * @param {Mixed} value value to test
+ * @param {String} type type
+ * @return {Boolean} true if `value` is a type of `type`, false otherwise
  * @api public
  */
 
-is.odd = function (value) {
-  return is.infinite(value) || (is.number(value) && value === value && value % 2 !== 0);
+is.a =
+is.type = function (value, type) {
+  return typeof value === type;
 };
 
 /**
- * is.ge
- * Test if `value` is greater than or equal to `other`.
+ * is.defined
+ * Test if `value` is defined.
  *
- * @param {Number} value value to test
- * @param {Number} other value to compare with
- * @return {Boolean}
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if 'value' is defined, false otherwise
  * @api public
  */
 
-is.ge = function (value, other) {
-  if (isActualNaN(value) || isActualNaN(other)) {
-    throw new TypeError('NaN is not a valid value');
-  }
-  return !is.infinite(value) && !is.infinite(other) && value >= other;
+is.defined = function (value) {
+  return value !== undefined;
 };
 
 /**
- * is.gt
- * Test if `value` is greater than `other`.
+ * is.empty
+ * Test if `value` is empty.
  *
- * @param {Number} value value to test
- * @param {Number} other value to compare with
- * @return {Boolean}
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is empty, false otherwise
  * @api public
  */
 
-is.gt = function (value, other) {
-  if (isActualNaN(value) || isActualNaN(other)) {
-    throw new TypeError('NaN is not a valid value');
+is.empty = function (value) {
+  var type = toString.call(value);
+  var key;
+
+  if ('[object Array]' === type || '[object Arguments]' === type) {
+    return value.length === 0;
   }
-  return !is.infinite(value) && !is.infinite(other) && value > other;
+
+  if ('[object Object]' === type) {
+    for (key in value) if (owns.call(value, key)) return false;
+    return true;
+  }
+
+  if ('[object String]' === type) {
+    return '' === value;
+  }
+
+  return false;
 };
 
 /**
- * is.le
- * Test if `value` is less than or equal to `other`.
+ * is.equal
+ * Test if `value` is equal to `other`.
  *
- * @param {Number} value value to test
- * @param {Number} other value to compare with
- * @return {Boolean} if 'value' is less than or equal to 'other'
- * @api public
+ * @param {Mixed} value value to test
+ * @param {Mixed} other value to compare with
+ * @return {Boolean} true if `value` is equal to `other`, false otherwise
  */
 
-is.le = function (value, other) {
-  if (isActualNaN(value) || isActualNaN(other)) {
-    throw new TypeError('NaN is not a valid value');
+is.equal = function (value, other) {
+  var type = toString.call(value)
+  var key;
+
+  if (type !== toString.call(other)) {
+    return false;
   }
-  return !is.infinite(value) && !is.infinite(other) && value <= other;
+
+  if ('[object Object]' === type) {
+    for (key in value) {
+      if (!is.equal(value[key], other[key])) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  if ('[object Array]' === type) {
+    key = value.length;
+    if (key !== other.length) {
+      return false;
+    }
+    while (--key) {
+      if (!is.equal(value[key], other[key])) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  if ('[object Function]' === type) {
+    return value.prototype === other.prototype;
+  }
+
+  if ('[object Date]' === type) {
+    return value.getTime() === other.getTime();
+  }
+
+  return value === other;
 };
 
 /**
- * is.lt
- * Test if `value` is less than `other`.
+ * is.hosted
+ * Test if `value` is hosted by `host`.
  *
- * @param {Number} value value to test
- * @param {Number} other value to compare with
- * @return {Boolean} if `value` is less than `other`
+ * @param {Mixed} value to test
+ * @param {Mixed} host host to test with
+ * @return {Boolean} true if `value` is hosted by `host`, false otherwise
  * @api public
  */
 
-is.lt = function (value, other) {
-  if (isActualNaN(value) || isActualNaN(other)) {
-    throw new TypeError('NaN is not a valid value');
-  }
-  return !is.infinite(value) && !is.infinite(other) && value < other;
+is.hosted = function (value, host) {
+  var type = typeof host[value];
+  return type === 'object' ? !!host[value] : !NON_HOST_TYPES[type];
 };
 
 /**
- * is.within
- * Test if `value` is within `start` and `finish`.
+ * is.instance
+ * Test if `value` is an instance of `constructor`.
  *
- * @param {Number} value value to test
- * @param {Number} start lower bound
- * @param {Number} finish upper bound
- * @return {Boolean} true if 'value' is is within 'start' and 'finish'
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an instance of `constructor`
  * @api public
  */
-is.within = function (value, start, finish) {
-  if (isActualNaN(value) || isActualNaN(start) || isActualNaN(finish)) {
-    throw new TypeError('NaN is not a valid value');
-  } else if (!is.number(value) || !is.number(start) || !is.number(finish)) {
-    throw new TypeError('all arguments must be numbers');
-  }
-  var isAnyInfinite = is.infinite(value) || is.infinite(start) || is.infinite(finish);
-  return isAnyInfinite || (value >= start && value <= finish);
-};
 
-/**
- * Test object.
- */
+is.instance = is['instanceof'] = function (value, constructor) {
+  return value instanceof constructor;
+};
 
 /**
- * is.object
- * Test if `value` is an object.
+ * is.null
+ * Test if `value` is null.
  *
  * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is an object, false otherwise
+ * @return {Boolean} true if `value` is null, false otherwise
  * @api public
  */
 
-is.object = function (value) {
-  return value && '[object Object]' === toString.call(value);
+is['null'] = function (value) {
+  return value === null;
 };
 
 /**
- * is.hash
- * Test if `value` is a hash - a plain object literal.
+ * is.undefined
+ * Test if `value` is undefined.
  *
  * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a hash, false otherwise
+ * @return {Boolean} true if `value` is undefined, false otherwise
  * @api public
  */
 
-is.hash = function (value) {
-  return is.object(value) && value.constructor === Object && !value.nodeType && !value.setInterval;
+is.undefined = function (value) {
+  return value === undefined;
 };
 
 /**
- * Test regexp.
+ * Test arguments.
  */
 
 /**
- * is.regexp
- * Test if `value` is a regular expression.
+ * is.arguments
+ * Test if `value` is an arguments object.
  *
  * @param {Mixed} value value to test
- * @return {Boolean} true if `value` is a regexp, false otherwise
+ * @return {Boolean} true if `value` is an arguments object, false otherwise
  * @api public
  */
 
-is.regexp = function (value) {
-  return '[object RegExp]' === toString.call(value);
+is.arguments = function (value) {
+  var isStandardArguments = '[object Arguments]' === toString.call(value);
+  var isOldArguments = !is.array(value) && is.arraylike(value) && is.object(value) && is.fn(value.callee);
+  return isStandardArguments || isOldArguments;
 };
 
 /**
- * Test string.
+ * Test array.
  */
 
 /**
- * is.string
- * Test if `value` is a string.
+ * is.array
+ * Test if 'value' is an array.
  *
  * @param {Mixed} value value to test
- * @return {Boolean} true if 'value' is a string, false otherwise
+ * @return {Boolean} true if `value` is an array, false otherwise
  * @api public
  */
 
-is.string = function (value) {
-  return '[object String]' === toString.call(value);
+is.array = function (value) {
+  return '[object Array]' === toString.call(value);
 };
 
-
-},{}],10:[function(require,module,exports){
+/**
+ * is.arguments.empty
+ * Test if `value` is an empty arguments object.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an empty arguments object, false otherwise
+ * @api public
+ */
+is.arguments.empty = function (value) {
+  return is.arguments(value) && value.length === 0;
+};
+
+/**
+ * is.array.empty
+ * Test if `value` is an empty array.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an empty array, false otherwise
+ * @api public
+ */
+is.array.empty = function (value) {
+  return is.array(value) && value.length === 0;
+};
+
+/**
+ * is.arraylike
+ * Test if `value` is an arraylike object.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an arguments object, false otherwise
+ * @api public
+ */
+
+is.arraylike = function (value) {
+  return !!value && !is.boolean(value)
+    && owns.call(value, 'length')
+    && isFinite(value.length)
+    && is.number(value.length)
+    && value.length >= 0;
+};
+
+/**
+ * Test boolean.
+ */
+
+/**
+ * is.boolean
+ * Test if `value` is a boolean.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a boolean, false otherwise
+ * @api public
+ */
+
+is.boolean = function (value) {
+  return '[object Boolean]' === toString.call(value);
+};
+
+/**
+ * is.false
+ * Test if `value` is false.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is false, false otherwise
+ * @api public
+ */
+
+is['false'] = function (value) {
+  return is.boolean(value) && (value === false || value.valueOf() === false);
+};
+
+/**
+ * is.true
+ * Test if `value` is true.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is true, false otherwise
+ * @api public
+ */
+
+is['true'] = function (value) {
+  return is.boolean(value) && (value === true || value.valueOf() === true);
+};
+
+/**
+ * Test date.
+ */
+
+/**
+ * is.date
+ * Test if `value` is a date.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a date, false otherwise
+ * @api public
+ */
+
+is.date = function (value) {
+  return '[object Date]' === toString.call(value);
+};
+
+/**
+ * Test element.
+ */
+
+/**
+ * is.element
+ * Test if `value` is an html element.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an HTML Element, false otherwise
+ * @api public
+ */
+
+is.element = function (value) {
+  return value !== undefined
+    && typeof HTMLElement !== 'undefined'
+    && value instanceof HTMLElement
+    && value.nodeType === 1;
+};
+
+/**
+ * Test error.
+ */
+
+/**
+ * is.error
+ * Test if `value` is an error object.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an error object, false otherwise
+ * @api public
+ */
+
+is.error = function (value) {
+  return '[object Error]' === toString.call(value);
+};
+
+/**
+ * Test function.
+ */
+
+/**
+ * is.fn / is.function (deprecated)
+ * Test if `value` is a function.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a function, false otherwise
+ * @api public
+ */
+
+is.fn = is['function'] = function (value) {
+  var isAlert = typeof window !== 'undefined' && value === window.alert;
+  return isAlert || '[object Function]' === toString.call(value);
+};
+
+/**
+ * Test number.
+ */
+
+/**
+ * is.number
+ * Test if `value` is a number.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a number, false otherwise
+ * @api public
+ */
+
+is.number = function (value) {
+  return '[object Number]' === toString.call(value);
+};
+
+/**
+ * is.infinite
+ * Test if `value` is positive or negative infinity.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is positive or negative Infinity, false otherwise
+ * @api public
+ */
+is.infinite = function (value) {
+  return value === Infinity || value === -Infinity;
+};
+
+/**
+ * is.decimal
+ * Test if `value` is a decimal number.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a decimal number, false otherwise
+ * @api public
+ */
+
+is.decimal = function (value) {
+  return is.number(value) && !isActualNaN(value) && value % 1 !== 0;
+};
+
+/**
+ * is.divisibleBy
+ * Test if `value` is divisible by `n`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} n dividend
+ * @return {Boolean} true if `value` is divisible by `n`, false otherwise
+ * @api public
+ */
+
+is.divisibleBy = function (value, n) {
+  var isDividendInfinite = is.infinite(value);
+  var isDivisorInfinite = is.infinite(n);
+  var isNonZeroNumber = is.number(value) && !isActualNaN(value) && is.number(n) && !isActualNaN(n) && n !== 0;
+  return isDividendInfinite || isDivisorInfinite || (isNonZeroNumber && value % n === 0);
+};
+
+/**
+ * is.int
+ * Test if `value` is an integer.
+ *
+ * @param value to test
+ * @return {Boolean} true if `value` is an integer, false otherwise
+ * @api public
+ */
+
+is.int = function (value) {
+  return is.number(value) && !isActualNaN(value) && value % 1 === 0;
+};
+
+/**
+ * is.maximum
+ * Test if `value` is greater than 'others' values.
+ *
+ * @param {Number} value value to test
+ * @param {Array} others values to compare with
+ * @return {Boolean} true if `value` is greater than `others` values
+ * @api public
+ */
+
+is.maximum = function (value, others) {
+  if (isActualNaN(value)) {
+    throw new TypeError('NaN is not a valid value');
+  } else if (!is.arraylike(others)) {
+    throw new TypeError('second argument must be array-like');
+  }
+  var len = others.length;
+
+  while (--len >= 0) {
+    if (value < others[len]) {
+      return false;
+    }
+  }
+
+  return true;
+};
+
+/**
+ * is.minimum
+ * Test if `value` is less than `others` values.
+ *
+ * @param {Number} value value to test
+ * @param {Array} others values to compare with
+ * @return {Boolean} true if `value` is less than `others` values
+ * @api public
+ */
+
+is.minimum = function (value, others) {
+  if (isActualNaN(value)) {
+    throw new TypeError('NaN is not a valid value');
+  } else if (!is.arraylike(others)) {
+    throw new TypeError('second argument must be array-like');
+  }
+  var len = others.length;
+
+  while (--len >= 0) {
+    if (value > others[len]) {
+      return false;
+    }
+  }
+
+  return true;
+};
+
+/**
+ * is.nan
+ * Test if `value` is not a number.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is not a number, false otherwise
+ * @api public
+ */
+
+is.nan = function (value) {
+  return !is.number(value) || value !== value;
+};
+
+/**
+ * is.even
+ * Test if `value` is an even number.
+ *
+ * @param {Number} value value to test
+ * @return {Boolean} true if `value` is an even number, false otherwise
+ * @api public
+ */
+
+is.even = function (value) {
+  return is.infinite(value) || (is.number(value) && value === value && value % 2 === 0);
+};
+
+/**
+ * is.odd
+ * Test if `value` is an odd number.
+ *
+ * @param {Number} value value to test
+ * @return {Boolean} true if `value` is an odd number, false otherwise
+ * @api public
+ */
+
+is.odd = function (value) {
+  return is.infinite(value) || (is.number(value) && value === value && value % 2 !== 0);
+};
+
+/**
+ * is.ge
+ * Test if `value` is greater than or equal to `other`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} other value to compare with
+ * @return {Boolean}
+ * @api public
+ */
+
+is.ge = function (value, other) {
+  if (isActualNaN(value) || isActualNaN(other)) {
+    throw new TypeError('NaN is not a valid value');
+  }
+  return !is.infinite(value) && !is.infinite(other) && value >= other;
+};
+
+/**
+ * is.gt
+ * Test if `value` is greater than `other`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} other value to compare with
+ * @return {Boolean}
+ * @api public
+ */
+
+is.gt = function (value, other) {
+  if (isActualNaN(value) || isActualNaN(other)) {
+    throw new TypeError('NaN is not a valid value');
+  }
+  return !is.infinite(value) && !is.infinite(other) && value > other;
+};
+
+/**
+ * is.le
+ * Test if `value` is less than or equal to `other`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} other value to compare with
+ * @return {Boolean} if 'value' is less than or equal to 'other'
+ * @api public
+ */
+
+is.le = function (value, other) {
+  if (isActualNaN(value) || isActualNaN(other)) {
+    throw new TypeError('NaN is not a valid value');
+  }
+  return !is.infinite(value) && !is.infinite(other) && value <= other;
+};
+
+/**
+ * is.lt
+ * Test if `value` is less than `other`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} other value to compare with
+ * @return {Boolean} if `value` is less than `other`
+ * @api public
+ */
+
+is.lt = function (value, other) {
+  if (isActualNaN(value) || isActualNaN(other)) {
+    throw new TypeError('NaN is not a valid value');
+  }
+  return !is.infinite(value) && !is.infinite(other) && value < other;
+};
+
+/**
+ * is.within
+ * Test if `value` is within `start` and `finish`.
+ *
+ * @param {Number} value value to test
+ * @param {Number} start lower bound
+ * @param {Number} finish upper bound
+ * @return {Boolean} true if 'value' is is within 'start' and 'finish'
+ * @api public
+ */
+is.within = function (value, start, finish) {
+  if (isActualNaN(value) || isActualNaN(start) || isActualNaN(finish)) {
+    throw new TypeError('NaN is not a valid value');
+  } else if (!is.number(value) || !is.number(start) || !is.number(finish)) {
+    throw new TypeError('all arguments must be numbers');
+  }
+  var isAnyInfinite = is.infinite(value) || is.infinite(start) || is.infinite(finish);
+  return isAnyInfinite || (value >= start && value <= finish);
+};
+
+/**
+ * Test object.
+ */
+
+/**
+ * is.object
+ * Test if `value` is an object.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is an object, false otherwise
+ * @api public
+ */
+
+is.object = function (value) {
+  return value && '[object Object]' === toString.call(value);
+};
+
+/**
+ * is.hash
+ * Test if `value` is a hash - a plain object literal.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a hash, false otherwise
+ * @api public
+ */
+
+is.hash = function (value) {
+  return is.object(value) && value.constructor === Object && !value.nodeType && !value.setInterval;
+};
+
+/**
+ * Test regexp.
+ */
+
+/**
+ * is.regexp
+ * Test if `value` is a regular expression.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if `value` is a regexp, false otherwise
+ * @api public
+ */
+
+is.regexp = function (value) {
+  return '[object RegExp]' === toString.call(value);
+};
+
+/**
+ * Test string.
+ */
+
+/**
+ * is.string
+ * Test if `value` is a string.
+ *
+ * @param {Mixed} value value to test
+ * @return {Boolean} true if 'value' is a string, false otherwise
+ * @api public
+ */
+
+is.string = function (value) {
+  return '[object String]' === toString.call(value);
+};
+
+
+},{}],10:[function(require,module,exports){
 
 var hasOwn = Object.prototype.hasOwnProperty;
 var toString = Object.prototype.toString;
@@ -16158,7 +18996,6 @@ if (typeof exports === 'object') {
 }).call(function() {
   return this || (typeof window !== 'undefined' ? window : global);
 }());
-/* jshint ignore:start */
 (function () {
 'use strict';
 window.iD = function () {
@@ -16170,7 +19007,7 @@ window.iD = function () {
 
     // https://github.com/openstreetmap/iD/issues/772
     // http://mathiasbynens.be/notes/localstorage-pattern#comment-9
-    try { storage = localStorage; } catch (e) {}
+    try { storage = localStorage; } catch (e) {}  // eslint-disable-line no-empty
     storage = storage || (function() {
         var s = {};
         return {
@@ -16187,9 +19024,9 @@ window.iD = function () {
             else storage.setItem(k, v);
         } catch(e) {
             // localstorage quota exceeded
-            /* jshint devel:true */
+            /* eslint-disable no-console */
             if (typeof console !== 'undefined') console.error('localStorage quota exceeded');
-            /* jshint devel:false */
+            /* eslint-enable no-console */
         }
     };
 
@@ -16216,18 +19053,20 @@ window.iD = function () {
         locale = locale.split('-')[0];
     }
 
-    connection.on('load.context', function loadContext(err, result) {
-        history.merge(result.data, result.extent);
-    });
-
     context.preauth = function(options) {
         connection.switch(options);
         return context;
     };
 
-    context.locale = function(_, path) {
-        locale = _;
+    context.locale = function(loc, path) {
+        locale = loc;
         localePath = path;
+
+        // Also set iD.detect().locale (unless we detected 'en-us' and openstreetmap wants 'en')..
+        if (!(loc.toLowerCase() === 'en' && iD.detect().locale.toLowerCase() === 'en-us')) {
+            iD.detect().locale = loc;
+        }
+
         return context;
     };
 
@@ -16249,6 +19088,51 @@ window.iD = function () {
     context.connection = function() { return connection; };
     context.history = function() { return history; };
 
+    /* Connection */
+    function entitiesLoaded(err, result) {
+        if (!err) history.merge(result.data, result.extent);
+    }
+
+    context.loadTiles = function(projection, dimensions, callback) {
+        function done(err, result) {
+            entitiesLoaded(err, result);
+            if (callback) callback(err, result);
+        }
+        connection.loadTiles(projection, dimensions, done);
+    };
+
+    context.loadEntity = function(id, callback) {
+        function done(err, result) {
+            entitiesLoaded(err, result);
+            if (callback) callback(err, result);
+        }
+        connection.loadEntity(id, done);
+    };
+
+    context.zoomToEntity = function(id, zoomTo) {
+        if (zoomTo !== false) {
+            this.loadEntity(id, function(err, result) {
+                if (err) return;
+                var entity = _.find(result.data, function(e) { return e.id === id; });
+                if (entity) { map.zoomTo(entity); }
+            });
+        }
+
+        map.on('drawn.zoomToEntity', function() {
+            if (!context.hasEntity(id)) return;
+            map.on('drawn.zoomToEntity', null);
+            context.on('enter.zoomToEntity', null);
+            context.enter(iD.modes.Select(context, [id]));
+        });
+
+        context.on('enter.zoomToEntity', function() {
+            if (mode.id !== 'browse') {
+                map.on('drawn.zoomToEntity', null);
+                context.on('enter.zoomToEntity', null);
+            }
+        });
+    };
+
     /* History */
     context.graph = history.graph;
     context.changes = history.changes;
@@ -16263,7 +19147,7 @@ window.iD = function () {
     };
 
     context.save = function() {
-        if (inIntro) return;
+        if (inIntro || (mode && mode.id === 'save')) return;
         history.save();
         if (history.hasChanges()) return t('save.unsaved_changes');
     };
@@ -16289,6 +19173,7 @@ window.iD = function () {
     context.perform = withDebouncedSave(history.perform);
     context.replace = withDebouncedSave(history.replace);
     context.pop = withDebouncedSave(history.pop);
+    context.overwrite = withDebouncedSave(history.overwrite);
     context.undo = withDebouncedSave(history.undo);
     context.redo = withDebouncedSave(history.redo);
 
@@ -16333,31 +19218,6 @@ window.iD = function () {
         }
     };
 
-    context.loadEntity = function(id, zoomTo) {
-        if (zoomTo !== false) {
-            connection.loadEntity(id, function(error, entity) {
-                if (entity) {
-                    map.zoomTo(entity);
-                }
-            });
-        }
-
-        map.on('drawn.loadEntity', function() {
-            if (!context.hasEntity(id)) return;
-            map.on('drawn.loadEntity', null);
-            context.on('enter.loadEntity', null);
-            context.enter(iD.modes.Select(context, [id]));
-        });
-
-        context.on('enter.loadEntity', function() {
-            if (mode.id !== 'browse') {
-                map.on('drawn.loadEntity', null);
-                context.on('enter.loadEntity', null);
-            }
-        });
-    };
-
-
     /* Behaviors */
     context.install = function(behavior) {
         context.surface().call(behavior);
@@ -16368,10 +19228,12 @@ window.iD = function () {
     };
 
     /* Copy/Paste */
-    var copiedIDs = [];
-    context.copiedIDs = function(_) {
-        if (!arguments.length) return copiedIDs;
-        copiedIDs = _;
+    var copyIDs = [], copyGraph;
+    context.copyGraph = function() { return copyGraph; };
+    context.copyIDs = function(_) {
+        if (!arguments.length) return copyIDs;
+        copyIDs = _;
+        copyGraph = history.graph();
         return context;
     };
 
@@ -16402,6 +19264,8 @@ window.iD = function () {
     context.pan = map.pan;
     context.zoomIn = map.zoomIn;
     context.zoomOut = map.zoomOut;
+    context.zoomInFurther = map.zoomInFurther;
+    context.zoomOutFurther = map.zoomOutFurther;
 
     context.surfaceRect = function() {
         // Work around a bug in Firefox.
@@ -16469,25 +19333,54 @@ window.iD = function () {
     return d3.rebind(context, dispatch, 'on');
 };
 
-iD.version = '1.6.3';
+iD.version = '1.8.0';
 
 (function() {
     var detected = {};
 
     var ua = navigator.userAgent,
-        msie = new RegExp('MSIE ([0-9]{1,}[\\.0-9]{0,})');
+        m = null;
 
-    if (msie.exec(ua) !== null) {
-        var rv = parseFloat(RegExp.$1);
-        detected.support = !(rv && rv < 9);
+    m = ua.match(/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i);   // IE11+
+    if (m !== null) {
+        detected.browser = 'msie';
+        detected.version = m[1];
+    }
+    if (!detected.browser) {
+        m = ua.match(/(opr)\/?\s*(\.?\d+(\.\d+)*)/i);   // Opera 15+
+        if (m !== null) {
+            detected.browser = 'Opera';
+            detected.version = m[2];
+        }
+    }
+    if (!detected.browser) {
+        m = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
+        if (m !== null) {
+            detected.browser = m[1];
+            detected.version = m[2];
+            m = ua.match(/version\/([\.\d]+)/i);
+            if (m !== null) detected.version = m[1];
+        }
+    }
+    if (!detected.browser) {
+        detected.browser = navigator.appName;
+        detected.version = navigator.appVersion;
+    }
+
+    // keep major.minor version only..
+    detected.version = detected.version.split(/\W/).slice(0,2).join('.');
+
+    if (detected.browser.toLowerCase() === 'msie') {
+        detected.browser = 'Internet Explorer';
+        detected.support = parseFloat(detected.version) > 9;
     } else {
         detected.support = true;
     }
 
     // Added due to incomplete svg style support. See #715
-    detected.opera = ua.indexOf('Opera') >= 0;
+    detected.opera = (detected.browser.toLowerCase() === 'opera' && parseFloat(detected.version) < 15 );
 
-    detected.locale = navigator.language || navigator.userLanguage;
+    detected.locale = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage || 'en-US');
 
     detected.filedrop = (window.FileReader && 'ondrop' in window);
 
@@ -16495,11 +19388,22 @@ iD.version = '1.6.3';
         return navigator.userAgent.indexOf(x) !== -1;
     }
 
-    if (nav('Win')) detected.os = 'win';
-    else if (nav('Mac')) detected.os = 'mac';
-    else if (nav('X11')) detected.os = 'linux';
-    else if (nav('Linux')) detected.os = 'linux';
-    else detected.os = 'win';
+    if (nav('Win')) {
+        detected.os = 'win';
+        detected.platform = 'Windows';
+    }
+    else if (nav('Mac')) {
+        detected.os = 'mac';
+        detected.platform = 'Macintosh';
+    }
+    else if (nav('X11') || nav('Linux')) {
+        detected.os = 'linux';
+        detected.platform = 'Linux';
+    }
+    else {
+        detected.os = 'win';
+        detected.platform = 'Unknown';
+    }
 
     iD.detect = function() { return detected; };
 })();
@@ -16582,19 +19486,10 @@ iD.taginfo = function() {
         return _.omit(parameters, 'geometry', 'debounce');
     }
 
-    function shorten(parameters) {
-        if (!parameters.query) {
-            delete parameters.query;
-        } else {
-            parameters.query = parameters.query.slice(0, 3);
-        }
-        return parameters;
-    }
-
     function popularKeys(parameters) {
         var pop_field = 'count_all';
         if (parameters.filter) pop_field = 'count_' + parameters.filter;
-        return function(d) { return parseFloat(d[pop_field]) > 10000; };
+        return function(d) { return parseFloat(d[pop_field]) > 5000 || d.in_wiki; };
     }
 
     function popularValues() {
@@ -16629,7 +19524,7 @@ iD.taginfo = function() {
 
     taginfo.keys = function(parameters, callback) {
         var debounce = parameters.debounce;
-        parameters = clean(shorten(setSort(parameters)));
+        parameters = clean(setSort(parameters));
         request(endpoint + 'keys/all?' +
             iD.util.qsString(_.extend({
                 rp: 10,
@@ -16644,7 +19539,7 @@ iD.taginfo = function() {
 
     taginfo.values = function(parameters, callback) {
         var debounce = parameters.debounce;
-        parameters = clean(shorten(setSort(setFilter(parameters))));
+        parameters = clean(setSort(setFilter(parameters)));
         request(endpoint + 'key/values?' +
             iD.util.qsString(_.extend({
                 rp: 25,
@@ -16665,8 +19560,21 @@ iD.taginfo = function() {
         if (parameters.value) path = 'tag/wiki_pages?';
         else if (parameters.rtype) path = 'relation/wiki_pages?';
 
+        var decoratedCallback;
+        if (parameters.value) {
+            decoratedCallback = function(err, data) {
+                // The third argument to callback is the softfail flag, to
+                // make the callback function not show a message to the end
+                // user when no docs are found but just return false.
+                var docsFound = callback(err, data, true);
+                if (!docsFound) {
+                    taginfo.docs(_.omit(parameters, 'value'), callback);
+                }
+            };
+        }
+
         request(endpoint + path +
-            iD.util.qsString(parameters), debounce, callback);
+            iD.util.qsString(parameters), debounce, decoratedCallback || callback);
     };
 
     taginfo.endpoint = function(_) {
@@ -16770,6 +19678,14 @@ iD.util.displayName = function(entity) {
     return entity.tags[localeName] || entity.tags.name || entity.tags.ref;
 };
 
+iD.util.displayType = function(id) {
+    return {
+        n: t('inspector.node'),
+        w: t('inspector.way'),
+        r: t('inspector.relation')
+    }[id.charAt(0)];
+};
+
 iD.util.stringQs = function(str) {
     return str.split('&').reduce(function(obj, pair){
         var parts = pair.split('=');
@@ -16871,7 +19787,7 @@ iD.util.editDistance = function(a, b) {
 // 1. Only works on HTML elements, not SVG
 // 2. Does not cause style recalculation
 iD.util.fastMouse = function(container) {
-    var rect = _.clone(container.getBoundingClientRect()),
+    var rect = container.getBoundingClientRect(),
         rectLeft = rect.left,
         rectTop = rect.top,
         clientLeft = +container.clientLeft,
@@ -16883,8 +19799,9 @@ iD.util.fastMouse = function(container) {
     };
 };
 
-/* jshint -W103 */
+/* eslint-disable no-proto */
 iD.util.getPrototypeOf = Object.getPrototypeOf || function(obj) { return obj.__proto__; };
+/* eslint-enable no-proto */
 
 iD.util.asyncMap = function(inputs, func, callback) {
     var remaining = inputs.length,
@@ -16895,7 +19812,7 @@ iD.util.asyncMap = function(inputs, func, callback) {
         func(d, function done(err, data) {
             errors[i] = err;
             results[i] = data;
-            remaining --;
+            remaining--;
             if (!remaining) callback(errors, results);
         });
     });
@@ -17120,6 +20037,19 @@ iD.geo.lineIntersection = function(a, b) {
     return null;
 };
 
+iD.geo.pathIntersections = function(path1, path2) {
+    var intersections = [];
+    for (var i = 0; i < path1.length - 1; i++) {
+        for (var j = 0; j < path2.length - 1; j++) {
+            var a = [ path1[i], path1[i+1] ],
+                b = [ path2[j], path2[j+1] ],
+                hit = iD.geo.lineIntersection(a, b);
+            if (hit) intersections.push(hit);
+        }
+    }
+    return intersections;
+};
+
 // Return whether point is contained in polygon.
 //
 // `point` should be a 2-item array of coordinates.
@@ -17152,7 +20082,7 @@ iD.geo.polygonContainsPolygon = function(outer, inner) {
     });
 };
 
-iD.geo.polygonIntersectsPolygon = function(outer, inner) {
+iD.geo.polygonIntersectsPolygon = function(outer, inner, checkSegments) {
     function testSegments(outer, inner) {
         for (var i = 0; i < outer.length - 1; i++) {
             for (var j = 0; j < inner.length - 1; j++) {
@@ -17164,9 +20094,13 @@ iD.geo.polygonIntersectsPolygon = function(outer, inner) {
         return false;
     }
 
-    return _.some(inner, function(point) {
-        return iD.geo.pointInPolygon(point, outer);
-    }) || testSegments(outer, inner);
+    function testPoints(outer, inner) {
+        return _.some(inner, function(point) {
+            return iD.geo.pointInPolygon(point, outer);
+        });
+    }
+
+   return testPoints(outer, inner) || (!!checkSegments && testSegments(outer, inner));
 };
 
 iD.geo.pathLength = function(path) {
@@ -17236,6 +20170,14 @@ _.extend(iD.geo.Extent.prototype, {
         ];
     },
 
+    contains: function(obj) {
+        if (!(obj instanceof iD.geo.Extent)) obj = new iD.geo.Extent(obj);
+        return obj[0][0] >= this[0][0] &&
+               obj[0][1] >= this[0][1] &&
+               obj[1][0] <= this[1][0] &&
+               obj[1][1] <= this[1][1];
+    },
+
     intersects: function(obj) {
         if (!(obj instanceof iD.geo.Extent)) obj = new iD.geo.Extent(obj);
         return obj[0][0] <= this[1][0] &&
@@ -17285,43 +20227,82 @@ iD.geo.Turn = function(turn) {
 
 iD.geo.Intersection = function(graph, vertexId) {
     var vertex = graph.entity(vertexId),
-        highways = [];
+        parentWays = graph.parentWays(vertex),
+        coincident = [],
+        highways = {};
+
+    function addHighway(way, adjacentNodeId) {
+        if (highways[adjacentNodeId]) {
+            coincident.push(adjacentNodeId);
+        } else {
+            highways[adjacentNodeId] = way;
+        }
+    }
 
     // Pre-split ways that would need to be split in
     // order to add a restriction. The real split will
     // happen when the restriction is added.
-    graph.parentWays(vertex).forEach(function(way) {
+    parentWays.forEach(function(way) {
         if (!way.tags.highway || way.isArea() || way.isDegenerate())
             return;
 
-        if (way.affix(vertexId)) {
-            highways.push(way);
-        } else {
-            var idx = _.indexOf(way.nodes, vertex.id, 1),
-                wayA = iD.Way({id: way.id + '-a', tags: way.tags, nodes: way.nodes.slice(0, idx + 1)}),
-                wayB = iD.Way({id: way.id + '-b', tags: way.tags, nodes: way.nodes.slice(idx)});
+        var isFirst = (vertexId === way.first()),
+            isLast = (vertexId === way.last()),
+            isAffix = (isFirst || isLast),
+            isClosingNode = (isFirst && isLast);
 
-            graph = graph.replace(wayA);
-            graph = graph.replace(wayB);
+        if (isAffix && !isClosingNode) {
+            var index = (isFirst ? 1 : way.nodes.length - 2);
+            addHighway(way, way.nodes[index]);
 
-            highways.push(wayA);
-            highways.push(wayB);
+        } else {
+            var splitIndex, wayA, wayB, indexA, indexB;
+            if (isClosingNode) {
+                splitIndex = Math.ceil(way.nodes.length / 2);  // split at midpoint
+                wayA = iD.Way({id: way.id + '-a', tags: way.tags, nodes: way.nodes.slice(0, splitIndex)});
+                wayB = iD.Way({id: way.id + '-b', tags: way.tags, nodes: way.nodes.slice(splitIndex)});
+                indexA = 1;
+                indexB = way.nodes.length - 2;
+            } else {
+                splitIndex = _.indexOf(way.nodes, vertex.id, 1);  // split at vertexid
+                wayA = iD.Way({id: way.id + '-a', tags: way.tags, nodes: way.nodes.slice(0, splitIndex + 1)});
+                wayB = iD.Way({id: way.id + '-b', tags: way.tags, nodes: way.nodes.slice(splitIndex)});
+                indexA = splitIndex - 1;
+                indexB = splitIndex + 1;
+            }
+            graph = graph.replace(wayA).replace(wayB);
+            addHighway(wayA, way.nodes[indexA]);
+            addHighway(wayB, way.nodes[indexB]);
         }
     });
 
+    // remove any ways from this intersection that are coincident
+    // (i.e. any adjacent node used by more than one intersecting way)
+    coincident.forEach(function (n) {
+        delete highways[n];
+    });
+
+
     var intersection = {
         highways: highways,
+        ways: _.values(highways),
         graph: graph
     };
 
-    intersection.turns = function(fromNodeID) {
-        if (!fromNodeID)
+    intersection.adjacentNodeId = function(fromWayId) {
+        return _.find(_.keys(highways), function(k) {
+            return highways[k].id === fromWayId;
+        });
+    };
+
+    intersection.turns = function(fromNodeId) {
+        var start = highways[fromNodeId];
+        if (!start)
             return [];
 
-        var way = _.find(highways, function(way) { return way.contains(fromNodeID); });
-        if (way.first() === vertex.id && way.tags.oneway === 'yes')
+        if (start.first() === vertex.id && start.tags.oneway === 'yes')
             return [];
-        if (way.last() === vertex.id && way.tags.oneway === '-1')
+        if (start.last() === vertex.id && start.tags.oneway === '-1')
             return [];
 
         function withRestriction(turn) {
@@ -17350,39 +20331,44 @@ iD.geo.Intersection = function(graph, vertexId) {
         }
 
         var from = {
-                node: way.nodes[way.first() === vertex.id ? 1 : way.nodes.length - 2],
-                way: way.id.split(/-(a|b)/)[0]
+                node: fromNodeId,
+                way: start.id.split(/-(a|b)/)[0]
             },
-            via = {node: vertex.id},
+            via = { node: vertex.id },
             turns = [];
 
-        highways.forEach(function(parent) {
-            if (parent === way)
+        _.each(highways, function(end, adjacentNodeId) {
+            if (end === start)
                 return;
 
-            var index = parent.nodes.indexOf(vertex.id);
-
             // backward
-            if (parent.first() !== vertex.id && parent.tags.oneway !== 'yes') {
+            if (end.first() !== vertex.id && end.tags.oneway !== 'yes') {
                 turns.push(withRestriction({
                     from: from,
                     via: via,
-                    to: {node: parent.nodes[index - 1], way: parent.id.split(/-(a|b)/)[0]}
+                    to: {
+                        node: adjacentNodeId,
+                        way: end.id.split(/-(a|b)/)[0]
+                    }
                 }));
             }
 
             // forward
-            if (parent.last() !== vertex.id && parent.tags.oneway !== '-1') {
+            if (end.last() !== vertex.id && end.tags.oneway !== '-1') {
                 turns.push(withRestriction({
                     from: from,
                     via: via,
-                    to: {node: parent.nodes[index + 1], way: parent.id.split(/-(a|b)/)[0]}
+                    to: {
+                        node: adjacentNodeId,
+                        way: end.id.split(/-(a|b)/)[0]
+                    }
                 }));
             }
+
         });
 
         // U-turn
-        if (way.tags.oneway !== 'yes' && way.tags.oneway !== '-1') {
+        if (start.tags.oneway !== 'yes' && start.tags.oneway !== '-1') {
             turns.push(withRestriction({
                 from: from,
                 via: via,
@@ -17510,7 +20496,7 @@ iD.geo.joinWays = function(array, graph) {
     }
 
     function reverse(member) {
-        return member.tags ? iD.actions.Reverse(member.id)(graph).entity(member.id) : member;
+        return member.tags ? iD.actions.Reverse(member.id, {reverseOneway: true})(graph).entity(member.id) : member;
     }
 
     while (array.length) {
@@ -17807,16 +20793,16 @@ iD.actions.Circularize = function(wayId, projection, maxAngle) {
                 var startIndex1 = way.nodes.lastIndexOf(startNode.id),
                     endIndex1 = way.nodes.lastIndexOf(endNode.id),
                     wayDirection1 = (endIndex1 - startIndex1);
-                if (wayDirection1 < -1) { wayDirection1 = 1;}
+                if (wayDirection1 < -1) { wayDirection1 = 1; }
 
-                /*jshint -W083 */
+                /* eslint-disable no-loop-func */
                 _.each(_.without(graph.parentWays(keyNodes[i]), way), function(sharedWay) {
                     if (sharedWay.areAdjacent(startNode.id, endNode.id)) {
                         var startIndex2 = sharedWay.nodes.lastIndexOf(startNode.id),
                             endIndex2 = sharedWay.nodes.lastIndexOf(endNode.id),
                             wayDirection2 = (endIndex2 - startIndex2),
                             insertAt = endIndex2;
-                        if (wayDirection2 < -1) { wayDirection2 = 1;}
+                        if (wayDirection2 < -1) { wayDirection2 = 1; }
 
                         if (wayDirection1 !== wayDirection2) {
                             inBetweenNodes.reverse();
@@ -17828,7 +20814,7 @@ iD.actions.Circularize = function(wayId, projection, maxAngle) {
                         graph = graph.replace(sharedWay);
                     }
                 });
-                /*jshint +W083 */
+                /* eslint-enable no-loop-func */
             }
 
         }
@@ -17903,7 +20889,7 @@ iD.actions.Connect = function(nodeIds) {
         for (var i = 0; i < nodeIds.length - 1; i++) {
             var node = graph.entity(nodeIds[i]);
 
-            /*jshint -W083 */
+            /* eslint-disable no-loop-func */
             graph.parentWays(node).forEach(function(parent) {
                 if (!parent.areAdjacent(node.id, survivor.id)) {
                     graph = graph.replace(parent.replaceNode(node.id, survivor.id));
@@ -17913,7 +20899,7 @@ iD.actions.Connect = function(nodeIds) {
             graph.parentRelations(node).forEach(function(parent) {
                 graph = graph.replace(parent.replaceMember(node, survivor));
             });
-            /*jshint +W083 */
+            /* eslint-enable no-loop-func */
 
             survivor = survivor.mergeTags(node.tags);
             graph = iD.actions.DeleteNode(node.id)(graph);
@@ -17924,11 +20910,13 @@ iD.actions.Connect = function(nodeIds) {
         return graph;
     };
 };
-iD.actions.CopyEntity = function(entity, deep) {
+iD.actions.CopyEntity = function(id, fromGraph, deep) {
     var newEntities = [];
 
     var action = function(graph) {
-        newEntities = entity.copy(deep, graph);
+        var entity = fromGraph.entity(id);
+
+        newEntities = entity.copy(deep, fromGraph);
 
         for (var i = 0; i < newEntities.length; i++) {
             graph = graph.replace(newEntities[i]);
@@ -18090,8 +21078,18 @@ iD.actions.DeleteWay = function(wayId) {
         return graph.remove(way);
     };
 
-    action.disabled = function() {
-        return false;
+    action.disabled = function(graph) {
+        var disabled = false;
+
+        graph.parentRelations(graph.entity(wayId)).forEach(function(parent) {
+            var type = parent.tags.type,
+                role = parent.memberById(wayId).role || 'outer';
+            if (type === 'route' || type === 'boundary' || (type === 'multipolygon' && role === 'outer')) {
+                disabled = 'part_of_relation';
+            }
+        });
+
+        return disabled;
     };
 
     return action;
@@ -18288,7 +21286,9 @@ iD.actions.Join = function(ids) {
             return 'not_adjacent';
 
         var nodeIds = _.pluck(joined[0].nodes, 'id').slice(1, -1),
-            relation;
+            relation,
+            tags = {},
+            conflicting = false;
 
         joined[0].forEach(function(way) {
             var parents = graph.parentRelations(way);
@@ -18296,10 +21296,21 @@ iD.actions.Join = function(ids) {
                 if (parent.isRestriction() && parent.members.some(function(m) { return nodeIds.indexOf(m.id) >= 0; }))
                     relation = parent;
             });
+
+            for (var k in way.tags) {
+                if (!(k in tags)) {
+                    tags[k] = way.tags[k];
+                } else if (tags[k] && iD.interestingTag(k) && tags[k] !== way.tags[k]) {
+                    conflicting = true;
+                }
+            }
         });
 
         if (relation)
             return 'restriction';
+
+        if (conflicting)
+            return 'conflicting_tags';
     };
 
     return action;
@@ -18456,34 +21467,521 @@ iD.actions.MergePolygon = function(ids, newRelationId) {
 
     return action;
 };
+iD.actions.MergeRemoteChanges = function(id, localGraph, remoteGraph, formatUser) {
+    var option = 'safe',  // 'safe', 'force_local', 'force_remote'
+        conflicts = [];
+
+    function user(d) {
+        return _.isFunction(formatUser) ? formatUser(d) : d;
+    }
+
+
+    function mergeLocation(remote, target) {
+        function pointEqual(a, b) {
+            var epsilon = 1e-6;
+            return (Math.abs(a[0] - b[0]) < epsilon) && (Math.abs(a[1] - b[1]) < epsilon);
+        }
+
+        if (option === 'force_local' || pointEqual(target.loc, remote.loc)) {
+            return target;
+        }
+        if (option === 'force_remote') {
+            return target.update({loc: remote.loc});
+        }
+
+        conflicts.push(t('merge_remote_changes.conflict.location', { user: user(remote.user) }));
+        return target;
+    }
+
+
+    function mergeNodes(base, remote, target) {
+        if (option === 'force_local' || _.isEqual(target.nodes, remote.nodes)) {
+            return target;
+        }
+        if (option === 'force_remote') {
+            return target.update({nodes: remote.nodes});
+        }
+
+        var ccount = conflicts.length,
+            o = base.nodes || [],
+            a = target.nodes || [],
+            b = remote.nodes || [],
+            nodes = [],
+            hunks = Diff3.diff3_merge(a, o, b, true);
+
+        for (var i = 0; i < hunks.length; i++) {
+            var hunk = hunks[i];
+            if (hunk.ok) {
+                nodes.push.apply(nodes, hunk.ok);
+            } else {
+                // for all conflicts, we can assume c.a !== c.b
+                // because `diff3_merge` called with `true` option to exclude false conflicts..
+                var c = hunk.conflict;
+                if (_.isEqual(c.o, c.a)) {  // only changed remotely
+                    nodes.push.apply(nodes, c.b);
+                } else if (_.isEqual(c.o, c.b)) {  // only changed locally
+                    nodes.push.apply(nodes, c.a);
+                } else {       // changed both locally and remotely
+                    conflicts.push(t('merge_remote_changes.conflict.nodelist', { user: user(remote.user) }));
+                    break;
+                }
+            }
+        }
+
+        return (conflicts.length === ccount) ? target.update({nodes: nodes}) : target;
+    }
+
+
+    function mergeChildren(targetWay, children, updates, graph) {
+        function isUsed(node, targetWay) {
+            var parentWays = _.pluck(graph.parentWays(node), 'id');
+            return node.hasInterestingTags() ||
+                _.without(parentWays, targetWay.id).length > 0 ||
+                graph.parentRelations(node).length > 0;
+        }
+
+        var ccount = conflicts.length;
+
+        for (var i = 0; i < children.length; i++) {
+            var id = children[i],
+                node = graph.hasEntity(id);
+
+            // remove unused childNodes..
+            if (targetWay.nodes.indexOf(id) === -1) {
+                if (node && !isUsed(node, targetWay)) {
+                    updates.removeIds.push(id);
+                }
+                continue;
+            }
+
+            // restore used childNodes..
+            var local = localGraph.hasEntity(id),
+                remote = remoteGraph.hasEntity(id),
+                target;
+
+            if (option === 'force_remote' && remote && remote.visible) {
+                updates.replacements.push(remote);
+
+            } else if (option === 'force_local' && local) {
+                target = iD.Entity(local);
+                if (remote) {
+                    target = target.update({ version: remote.version });
+                }
+                updates.replacements.push(target);
+
+            } else if (option === 'safe' && local && remote && local.version !== remote.version) {
+                target = iD.Entity(local, { version: remote.version });
+                if (remote.visible) {
+                    target = mergeLocation(remote, target);
+                } else {
+                    conflicts.push(t('merge_remote_changes.conflict.deleted', { user: user(remote.user) }));
+                }
+
+                if (conflicts.length !== ccount) break;
+                updates.replacements.push(target);
+            }
+        }
+
+        return targetWay;
+    }
+
+
+    function updateChildren(updates, graph) {
+        for (var i = 0; i < updates.replacements.length; i++) {
+            graph = graph.replace(updates.replacements[i]);
+        }
+        if (updates.removeIds.length) {
+            graph = iD.actions.DeleteMultiple(updates.removeIds)(graph);
+        }
+        return graph;
+    }
+
+
+    function mergeMembers(remote, target) {
+        if (option === 'force_local' || _.isEqual(target.members, remote.members)) {
+            return target;
+        }
+        if (option === 'force_remote') {
+            return target.update({members: remote.members});
+        }
+
+        conflicts.push(t('merge_remote_changes.conflict.memberlist', { user: user(remote.user) }));
+        return target;
+    }
+
+
+    function mergeTags(base, remote, target) {
+        function ignoreKey(k) {
+            return _.contains(iD.data.discarded, k);
+        }
+
+        if (option === 'force_local' || _.isEqual(target.tags, remote.tags)) {
+            return target;
+        }
+        if (option === 'force_remote') {
+            return target.update({tags: remote.tags});
+        }
+
+        var ccount = conflicts.length,
+            o = base.tags || {},
+            a = target.tags || {},
+            b = remote.tags || {},
+            keys = _.reject(_.union(_.keys(o), _.keys(a), _.keys(b)), ignoreKey),
+            tags = _.clone(a),
+            changed = false;
+
+        for (var i = 0; i < keys.length; i++) {
+            var k = keys[i];
+
+            if (o[k] !== b[k] && a[k] !== b[k]) {    // changed remotely..
+                if (o[k] !== a[k]) {      // changed locally..
+                    conflicts.push(t('merge_remote_changes.conflict.tags',
+                        { tag: k, local: a[k], remote: b[k], user: user(remote.user) }));
+
+                } else {                  // unchanged locally, accept remote change..
+                    if (b.hasOwnProperty(k)) {
+                        tags[k] = b[k];
+                    } else {
+                        delete tags[k];
+                    }
+                    changed = true;
+                }
+            }
+        }
+
+        return (changed && conflicts.length === ccount) ? target.update({tags: tags}) : target;
+    }
+
+
+    //  `graph.base()` is the common ancestor of the two graphs.
+    //  `localGraph` contains user's edits up to saving
+    //  `remoteGraph` contains remote edits to modified nodes
+    //  `graph` must be a descendent of `localGraph` and may include
+    //      some conflict resolution actions performed on it.
+    //
+    //                  --- ... --- `localGraph` -- ... -- `graph`
+    //                 /
+    //  `graph.base()` --- ... --- `remoteGraph`
+    //
+    var action = function(graph) {
+        var updates = { replacements: [], removeIds: [] },
+            base = graph.base().entities[id],
+            local = localGraph.entity(id),
+            remote = remoteGraph.entity(id),
+            target = iD.Entity(local, { version: remote.version });
+
+        // delete/undelete
+        if (!remote.visible) {
+            if (option === 'force_remote') {
+                return iD.actions.DeleteMultiple([id])(graph);
+
+            } else if (option === 'force_local') {
+                if (target.type === 'way') {
+                    target = mergeChildren(target, _.uniq(local.nodes), updates, graph);
+                    graph = updateChildren(updates, graph);
+                }
+                return graph.replace(target);
+
+            } else {
+                conflicts.push(t('merge_remote_changes.conflict.deleted', { user: user(remote.user) }));
+                return graph;  // do nothing
+            }
+        }
+
+        // merge
+        if (target.type === 'node') {
+            target = mergeLocation(remote, target);
+
+        } else if (target.type === 'way') {
+            // pull in any child nodes that may not be present locally..
+            graph.rebase(remoteGraph.childNodes(remote), [graph], false);
+            target = mergeNodes(base, remote, target);
+            target = mergeChildren(target, _.union(local.nodes, remote.nodes), updates, graph);
+
+        } else if (target.type === 'relation') {
+            target = mergeMembers(remote, target);
+        }
+
+        target = mergeTags(base, remote, target);
+
+        if (!conflicts.length) {
+            graph = updateChildren(updates, graph).replace(target);
+        }
+
+        return graph;
+    };
+
+    action.withOption = function(opt) {
+        option = opt;
+        return action;
+    };
+
+    action.conflicts = function() {
+        return conflicts;
+    };
+
+    return action;
+};
 // https://github.com/openstreetmap/josm/blob/mirror/src/org/openstreetmap/josm/command/MoveCommand.java
 // https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/MoveNodeAction.as
-iD.actions.Move = function(ids, delta, projection) {
-    function addNodes(ids, nodes, graph) {
-        ids.forEach(function(id) {
-            var entity = graph.entity(id);
-            if (entity.type === 'node') {
-                nodes.push(id);
-            } else if (entity.type === 'way') {
-                nodes.push.apply(nodes, entity.nodes);
-            } else {
-                addNodes(_.pluck(entity.members, 'id'), nodes, graph);
+iD.actions.Move = function(moveIds, tryDelta, projection, cache) {
+    var delta = tryDelta;
+
+    function vecAdd(a, b) { return [a[0] + b[0], a[1] + b[1]]; }
+    function vecSub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }
+
+    function setupCache(graph) {
+        function canMove(nodeId) {
+            var parents = _.pluck(graph.parentWays(graph.entity(nodeId)), 'id');
+            if (parents.length < 3) return true;
+
+            // Don't move a vertex where >2 ways meet, unless all parentWays are moving too..
+            var parentsMoving = _.all(parents, function(id) { return cache.moving[id]; });
+            if (!parentsMoving) delete cache.moving[nodeId];
+
+            return parentsMoving;
+        }
+
+        function cacheEntities(ids) {
+            _.each(ids, function(id) {
+                if (cache.moving[id]) return;
+                cache.moving[id] = true;
+
+                var entity = graph.hasEntity(id);
+                if (!entity) return;
+
+                if (entity.type === 'node') {
+                    cache.nodes.push(id);
+                    cache.startLoc[id] = entity.loc;
+                } else if (entity.type === 'way') {
+                    cache.ways.push(id);
+                    cacheEntities(entity.nodes);
+                } else {
+                    cacheEntities(_.pluck(entity.members, 'id'));
+                }
+            });
+        }
+
+        function cacheIntersections(ids) {
+            function isEndpoint(way, id) { return !way.isClosed() && !!way.affix(id); }
+
+            _.each(ids, function(id) {
+                // consider only intersections with 1 moved and 1 unmoved way.
+                _.each(graph.childNodes(graph.entity(id)), function(node) {
+                    var parents = graph.parentWays(node);
+                    if (parents.length !== 2) return;
+
+                    var moved = graph.entity(id),
+                        unmoved = _.find(parents, function(way) { return !cache.moving[way.id]; });
+                    if (!unmoved) return;
+
+                    // exclude ways that are overly connected..
+                    if (_.intersection(moved.nodes, unmoved.nodes).length > 2) return;
+
+                    if (moved.isArea() || unmoved.isArea()) return;
+
+                    cache.intersection[node.id] = {
+                        nodeId: node.id,
+                        movedId: moved.id,
+                        unmovedId: unmoved.id,
+                        movedIsEP: isEndpoint(moved, node.id),
+                        unmovedIsEP: isEndpoint(unmoved, node.id)
+                    };
+                });
+            });
+        }
+
+
+        if (!cache) {
+            cache = {};
+        }
+        if (!cache.ok) {
+            cache.moving = {};
+            cache.intersection = {};
+            cache.replacedVertex = {};
+            cache.startLoc = {};
+            cache.nodes = [];
+            cache.ways = [];
+
+            cacheEntities(moveIds);
+            cacheIntersections(cache.ways);
+            cache.nodes = _.filter(cache.nodes, canMove);
+
+            cache.ok = true;
+        }
+    }
+
+
+    // Place a vertex where the moved vertex used to be, to preserve way shape..
+    function replaceMovedVertex(nodeId, wayId, graph, delta) {
+        var way = graph.entity(wayId),
+            moved = graph.entity(nodeId),
+            movedIndex = way.nodes.indexOf(nodeId),
+            len, prevIndex, nextIndex;
+
+        if (way.isClosed()) {
+            len = way.nodes.length - 1;
+            prevIndex = (movedIndex + len - 1) % len;
+            nextIndex = (movedIndex + len + 1) % len;
+        } else {
+            len = way.nodes.length;
+            prevIndex = movedIndex - 1;
+            nextIndex = movedIndex + 1;
+        }
+
+        var prev = graph.hasEntity(way.nodes[prevIndex]),
+            next = graph.hasEntity(way.nodes[nextIndex]);
+
+        // Don't add orig vertex at endpoint..
+        if (!prev || !next) return graph;
+
+        var key = wayId + '_' + nodeId,
+            orig = cache.replacedVertex[key];
+        if (!orig) {
+            orig = iD.Node();
+            cache.replacedVertex[key] = orig;
+            cache.startLoc[orig.id] = cache.startLoc[nodeId];
+        }
+
+        var start, end;
+        if (delta) {
+            start = projection(cache.startLoc[nodeId]);
+            end = projection.invert(vecAdd(start, delta));
+        } else {
+            end = cache.startLoc[nodeId];
+        }
+        orig = orig.move(end);
+
+        var angle = Math.abs(iD.geo.angle(orig, prev, projection) -
+                iD.geo.angle(orig, next, projection)) * 180 / Math.PI;
+
+        // Don't add orig vertex if it would just make a straight line..
+        if (angle > 175 && angle < 185) return graph;
+
+        // Don't add orig vertex if another point is already nearby (within 10m)
+        if (iD.geo.sphericalDistance(prev.loc, orig.loc) < 10 ||
+            iD.geo.sphericalDistance(orig.loc, next.loc) < 10) return graph;
+
+        // moving forward or backward along way?
+        var p1 = [prev.loc, orig.loc, moved.loc, next.loc].map(projection),
+            p2 = [prev.loc, moved.loc, orig.loc, next.loc].map(projection),
+            d1 = iD.geo.pathLength(p1),
+            d2 = iD.geo.pathLength(p2),
+            insertAt = (d1 < d2) ? movedIndex : nextIndex;
+
+        // moving around closed loop?
+        if (way.isClosed() && insertAt === 0) insertAt = len;
+
+        way = way.addNode(orig.id, insertAt);
+        return graph.replace(orig).replace(way);
+    }
+
+    // Reorder nodes around intersections that have moved..
+    function unZorroIntersection(intersection, graph) {
+        var vertex = graph.entity(intersection.nodeId),
+            way1 = graph.entity(intersection.movedId),
+            way2 = graph.entity(intersection.unmovedId),
+            isEP1 = intersection.movedIsEP,
+            isEP2 = intersection.unmovedIsEP;
+
+        // don't move the vertex if it is the endpoint of both ways.
+        if (isEP1 && isEP2) return graph;
+
+        var nodes1 = _.without(graph.childNodes(way1), vertex),
+            nodes2 = _.without(graph.childNodes(way2), vertex);
+
+        if (way1.isClosed() && way1.first() === vertex.id) nodes1.push(nodes1[0]);
+        if (way2.isClosed() && way2.first() === vertex.id) nodes2.push(nodes2[0]);
+
+        var edge1 = !isEP1 && iD.geo.chooseEdge(nodes1, projection(vertex.loc), projection),
+            edge2 = !isEP2 && iD.geo.chooseEdge(nodes2, projection(vertex.loc), projection),
+            loc;
+
+        // snap vertex to nearest edge (or some point between them)..
+        if (!isEP1 && !isEP2) {
+            var epsilon = 1e-4, maxIter = 10;
+            for (var i = 0; i < maxIter; i++) {
+                loc = iD.geo.interp(edge1.loc, edge2.loc, 0.5);
+                edge1 = iD.geo.chooseEdge(nodes1, projection(loc), projection);
+                edge2 = iD.geo.chooseEdge(nodes2, projection(loc), projection);
+                if (Math.abs(edge1.distance - edge2.distance) < epsilon) break;
+            }
+        } else if (!isEP1) {
+            loc = edge1.loc;
+        } else {
+            loc = edge2.loc;
+        }
+
+        graph = graph.replace(vertex.move(loc));
+
+        // if zorro happened, reorder nodes..
+        if (!isEP1 && edge1.index !== way1.nodes.indexOf(vertex.id)) {
+            way1 = way1.removeNode(vertex.id).addNode(vertex.id, edge1.index);
+            graph = graph.replace(way1);
+        }
+        if (!isEP2 && edge2.index !== way2.nodes.indexOf(vertex.id)) {
+            way2 = way2.removeNode(vertex.id).addNode(vertex.id, edge2.index);
+            graph = graph.replace(way2);
+        }
+
+        return graph;
+    }
+
+
+    function cleanupIntersections(graph) {
+        _.each(cache.intersection, function(obj) {
+            graph = replaceMovedVertex(obj.nodeId, obj.movedId, graph, delta);
+            graph = replaceMovedVertex(obj.nodeId, obj.unmovedId, graph, null);
+            graph = unZorroIntersection(obj, graph);
+        });
+
+        return graph;
+    }
+
+    // check if moving way endpoint can cross an unmoved way, if so limit delta..
+    function limitDelta(graph) {
+        _.each(cache.intersection, function(obj) {
+            if (!obj.movedIsEP) return;
+
+            var node = graph.entity(obj.nodeId),
+                start = projection(node.loc),
+                end = vecAdd(start, delta),
+                movedNodes = graph.childNodes(graph.entity(obj.movedId)),
+                movedPath = _.map(_.pluck(movedNodes, 'loc'),
+                    function(loc) { return vecAdd(projection(loc), delta); }),
+                unmovedNodes = graph.childNodes(graph.entity(obj.unmovedId)),
+                unmovedPath = _.map(_.pluck(unmovedNodes, 'loc'), projection),
+                hits = iD.geo.pathIntersections(movedPath, unmovedPath);
+
+            for (var i = 0; i < hits.length; i++) {
+                if (_.isEqual(hits[i], end)) continue;
+                var edge = iD.geo.chooseEdge(unmovedNodes, end, projection);
+                delta = vecSub(projection(edge.loc), start);
             }
         });
     }
 
+
     var action = function(graph) {
-        var nodes = [];
+        if (delta[0] === 0 && delta[1] === 0) return graph;
 
-        addNodes(ids, nodes, graph);
+        setupCache(graph);
+
+        if (!_.isEmpty(cache.intersection)) {
+            limitDelta(graph);
+        }
 
-        _.uniq(nodes).forEach(function(id) {
+        _.each(cache.nodes, function(id) {
             var node = graph.entity(id),
                 start = projection(node.loc),
-                end = projection.invert([start[0] + delta[0], start[1] + delta[1]]);
-            graph = graph.replace(node.move(end));
+                end = vecAdd(start, delta);
+            graph = graph.replace(node.move(projection.invert(end)));
         });
 
+        if (!_.isEmpty(cache.intersection)) {
+            graph = cleanupIntersections(graph);
+        }
+
         return graph;
     };
 
@@ -18493,10 +21991,14 @@ iD.actions.Move = function(ids, delta, projection) {
             return entity.type === 'relation' && !entity.isComplete(graph);
         }
 
-        if (_.any(ids, incompleteRelation))
+        if (_.any(moveIds, incompleteRelation))
             return 'incomplete_relation';
     };
 
+    action.delta = function() {
+        return delta;
+    };
+
     return action;
 };
 // https://github.com/openstreetmap/josm/blob/mirror/src/org/openstreetmap/josm/command/MoveCommand.java
@@ -18713,6 +22215,10 @@ iD.actions.RestrictTurn = function(turn, projection, restrictionId) {
             via  = graph.entity(turn.via.node),
             to   = graph.entity(turn.to.way);
 
+        function isClosingNode(way, nodeId) {
+            return nodeId === way.first() && nodeId === way.last();
+        }
+
         function split(toOrFrom) {
             var newID = toOrFrom.newID || iD.Way().id;
             graph = iD.actions.Split(via.id, [newID])
@@ -18728,12 +22234,12 @@ iD.actions.RestrictTurn = function(turn, projection, restrictionId) {
             }
         }
 
-        if (!from.affix(via.id)) {
+        if (!from.affix(via.id) || isClosingNode(from, via.id)) {
             if (turn.from.node === turn.to.node) {
                 // U-turn
                 from = to = split(turn.from)[0];
             } else if (turn.from.way === turn.to.way) {
-                // Straight-on
+                // Straight-on or circular
                 var s = split(turn.from);
                 from = s[0];
                 to   = s[1];
@@ -18743,7 +22249,7 @@ iD.actions.RestrictTurn = function(turn, projection, restrictionId) {
             }
         }
 
-        if (!to.affix(via.id)) {
+        if (!to.affix(via.id) || isClosingNode(to, via.id)) {
             to = split(turn.to)[0];
         }
 
@@ -18798,7 +22304,7 @@ iD.actions.RestrictTurn = function(turn, projection, restrictionId) {
       http://wiki.openstreetmap.org/wiki/Route#Members
       http://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
  */
-iD.actions.Reverse = function(wayId) {
+iD.actions.Reverse = function(wayId, options) {
     var replacements = [
             [/:right$/, ':left'], [/:left$/, ':right'],
             [/:forward$/, ':backward'], [/:backward$/, ':forward']
@@ -18828,6 +22334,8 @@ iD.actions.Reverse = function(wayId) {
             return value.replace(numeric, function(_, sign) { return sign === '-' ? '' : '-'; });
         } else if (key === 'incline' || key === 'direction') {
             return {up: 'down', down: 'up'}[value] || value;
+        } else if (options && options.reverseOneway && key === 'oneway') {
+            return {yes: '-1', '1': '-1', '-1': 'yes'}[value] || value;
         } else {
             return {left: 'right', right: 'left'}[value] || value;
         }
@@ -18854,6 +22362,41 @@ iD.actions.Reverse = function(wayId) {
         return graph.replace(way.update({nodes: nodes, tags: tags}));
     };
 };
+iD.actions.Revert = function(id) {
+
+    var action = function(graph) {
+        var entity = graph.hasEntity(id),
+            base = graph.base().entities[id];
+
+        if (entity && !base) {    // entity will be removed..
+            if (entity.type === 'node') {
+                graph.parentWays(entity)
+                    .forEach(function(parent) {
+                        parent = parent.removeNode(id);
+                        graph = graph.replace(parent);
+
+                        if (parent.isDegenerate()) {
+                            graph = iD.actions.DeleteWay(parent.id)(graph);
+                        }
+                    });
+            }
+
+            graph.parentRelations(entity)
+                .forEach(function(parent) {
+                    parent = parent.removeMembersWithID(id);
+                    graph = graph.replace(parent);
+
+                    if (parent.isDegenerate()) {
+                        graph = iD.actions.DeleteRelation(parent.id)(graph);
+                    }
+                });
+        }
+
+        return graph.revert(id);
+    };
+
+    return action;
+};
 iD.actions.RotateWay = function(wayId, pivot, angle, projection) {
     return function(graph) {
         return graph.update(function(graph) {
@@ -19264,7 +22807,7 @@ iD.behavior.Copy = function(context) {
             }
         }
 
-        context.copiedIDs(canCopy);
+        context.copyIDs(canCopy);
     }
 
     function copy() {
@@ -19482,7 +23025,7 @@ iD.behavior.drag = function() {
 };
 iD.behavior.Draw = function(context) {
     var event = d3.dispatch('move', 'click', 'clickWay',
-        'clickNode', 'undo', 'cancel', 'finish'),
+            'clickNode', 'undo', 'cancel', 'finish'),
         keybinding = d3.keybinding('draw'),
         hover = iD.behavior.Hover(context)
             .altDisables(true)
@@ -19500,7 +23043,7 @@ iD.behavior.Draw = function(context) {
     function mousedown() {
 
         function point() {
-            var p = element.node().parentNode;
+            var p = context.container().node();
             return touchId !== null ? d3.touches(p).filter(function(p) {
                 return p.identifier === touchId;
             })[0] : d3.mouse(p);
@@ -19508,17 +23051,20 @@ iD.behavior.Draw = function(context) {
 
         var element = d3.select(this),
             touchId = d3.event.touches ? d3.event.changedTouches[0].identifier : null,
-            time = +new Date(),
-            pos = point();
+            t1 = +new Date(),
+            p1 = point();
 
         element.on('mousemove.draw', null);
 
         d3.select(window).on('mouseup.draw', function() {
+            var t2 = +new Date(),
+                p2 = point(),
+                dist = iD.geo.euclideanDistance(p1, p2);
+
             element.on('mousemove.draw', mousemove);
-            if (iD.geo.euclideanDistance(pos, point()) < closeTolerance ||
-                (iD.geo.euclideanDistance(pos, point()) < tolerance &&
-                (+new Date() - time) < 500)) {
+            d3.select(window).on('mouseup.draw', null);
 
+            if (dist < closeTolerance || (dist < tolerance && (t2 - t1) < 500)) {
                 // Prevent a quick second click
                 d3.select(window).on('click.draw-block', function() {
                     d3.event.stopPropagation();
@@ -19877,6 +23423,7 @@ iD.behavior.Hash = function(context) {
     };
 
     function update() {
+        if (context.inIntro()) return;
         var s1 = formatter(context.map());
         if (s0 !== s1) location.replace(s0 = s1); // don't recenter the map!
     }
@@ -19902,7 +23449,7 @@ iD.behavior.Hash = function(context) {
 
         if (location.hash) {
             var q = iD.util.stringQs(location.hash.substring(1));
-            if (q.id) context.loadEntity(q.id.split(',')[0], !q.map);
+            if (q.id) context.zoomToEntity(q.id.split(',')[0], !q.map);
             if (q.comment) context.storage('comment', q.comment);
             hashchange();
             if (q.map) hash.hadHash = true;
@@ -20148,18 +23695,20 @@ iD.behavior.Paste = function(context) {
 
         if (!iD.geo.pointInPolygon(mouse, viewport)) return;
 
-        var graph = context.graph(),
-            extent = iD.geo.Extent(),
-            oldIDs = context.copiedIDs(),
+        var extent = iD.geo.Extent(),
+            oldIDs = context.copyIDs(),
+            oldGraph = context.copyGraph(),
             newIDs = [],
             i, j;
 
+        if (!oldIDs.length) return;
+
         for (i = 0; i < oldIDs.length; i++) {
-            var oldEntity = graph.entity(oldIDs[i]),
-                action = iD.actions.CopyEntity(oldEntity, true),
+            var oldEntity = oldGraph.entity(oldIDs[i]),
+                action = iD.actions.CopyEntity(oldEntity.id, oldGraph, true),
                 newEntities;
 
-            extent._extend(oldEntity.extent(graph));
+            extent._extend(oldEntity.extent(oldGraph));
             context.perform(action);
 
             // First element in `newEntities` contains the copied Entity,
@@ -20211,10 +23760,12 @@ iD.behavior.Select = function(context) {
     }
 
     function click() {
-        var datum = d3.event.target.__data__;
-        var lasso = d3.select('#surface .lasso').node();
+        var datum = d3.event.target.__data__,
+            lasso = d3.select('#surface .lasso').node(),
+            mode = context.mode();
+
         if (!(datum instanceof iD.Entity)) {
-            if (!d3.event.shiftKey && !lasso)
+            if (!d3.event.shiftKey && !lasso && mode.id !== 'browse')
                 context.enter(iD.modes.Browse(context));
 
         } else if (!d3.event.shiftKey && !lasso) {
@@ -20222,7 +23773,7 @@ iD.behavior.Select = function(context) {
             if (context.selectedIDs().length !== 1 || context.selectedIDs()[0] !== datum.id) {
                 context.enter(iD.modes.Select(context, [datum.id]));
             } else {
-                context.mode().reselect();
+                mode.suppressMenu(false).reselect();
             }
         } else if (context.selectedIDs().indexOf(datum.id) >= 0) {
             var selectedIDs = _.without(context.selectedIDs(), datum.id);
@@ -20560,7 +24111,7 @@ iD.modes.Browse = function(context) {
         });
 
         if (sidebar) {
-            context.ui().sidebar.hide(sidebar);
+            context.ui().sidebar.hide();
         }
     };
 
@@ -20875,9 +24426,12 @@ iD.modes.Move = function(context, entityIDs) {
         annotation = entityIDs.length === 1 ?
             t('operations.move.annotation.' + context.geometry(entityIDs[0])) :
             t('operations.move.annotation.multiple'),
+        cache,
         origin,
         nudgeInterval;
 
+    function vecSub(a, b) { return [a[0] - b[0], a[1] - b[1]]; }
+
     function edge(point, size) {
         var pad = [30, 100, 30, 100];
         if (point[0] > size[0] - pad[0]) return [-10, 0];
@@ -20891,11 +24445,14 @@ iD.modes.Move = function(context, entityIDs) {
         if (nudgeInterval) window.clearInterval(nudgeInterval);
         nudgeInterval = window.setInterval(function() {
             context.pan(nudge);
-            context.replace(
-                iD.actions.Move(entityIDs, [-nudge[0], -nudge[1]], context.projection),
-                annotation);
-            var c = context.projection(origin);
-            origin = context.projection.invert([c[0] - nudge[0], c[1] - nudge[1]]);
+
+            var currMouse = context.mouse(),
+                origMouse = context.projection(origin),
+                delta = vecSub(vecSub(currMouse, origMouse), nudge),
+                action = iD.actions.Move(entityIDs, delta, context.projection, cache);
+
+            context.overwrite(action, annotation);
+
         }, 50);
     }
 
@@ -20905,35 +24462,27 @@ iD.modes.Move = function(context, entityIDs) {
     }
 
     function move() {
-        var p = context.mouse();
+        var currMouse = context.mouse(),
+            origMouse = context.projection(origin),
+            delta = vecSub(currMouse, origMouse),
+            action = iD.actions.Move(entityIDs, delta, context.projection, cache);
 
-        var delta = origin ?
-            [p[0] - context.projection(origin)[0],
-                p[1] - context.projection(origin)[1]] :
-            [0, 0];
+        context.overwrite(action, annotation);
 
-        var nudge = edge(p, context.map().dimensions());
+        var nudge = edge(currMouse, context.map().dimensions());
         if (nudge) startNudge(nudge);
         else stopNudge();
-
-        origin = context.map().mouseCoordinates();
-
-        context.replace(
-            iD.actions.Move(entityIDs, delta, context.projection),
-            annotation);
     }
 
     function finish() {
         d3.event.stopPropagation();
-        context.enter(iD.modes.Select(context, entityIDs)
-            .suppressMenu(true));
+        context.enter(iD.modes.Select(context, entityIDs).suppressMenu(true));
         stopNudge();
     }
 
     function cancel() {
         context.pop();
-        context.enter(iD.modes.Select(context, entityIDs)
-            .suppressMenu(true));
+        context.enter(iD.modes.Select(context, entityIDs).suppressMenu(true));
         stopNudge();
     }
 
@@ -20942,6 +24491,9 @@ iD.modes.Move = function(context, entityIDs) {
     }
 
     mode.enter = function() {
+        origin = context.map().mouseCoordinates();
+        cache = {};
+
         context.install(edit);
 
         context.perform(
@@ -21065,44 +24617,296 @@ iD.modes.RotateWay = function(context, wayId) {
 };
 iD.modes.Save = function(context) {
     var ui = iD.ui.Commit(context)
-        .on('cancel', cancel)
-        .on('save', save);
+            .on('cancel', cancel)
+            .on('save', save);
 
     function cancel() {
         context.enter(iD.modes.Browse(context));
     }
 
-    function save(e) {
-        var loading = iD.ui.Loading(context)
-            .message(t('save.uploading'))
-            .blocking(true);
+    function save(e, tryAgain) {
+        function withChildNodes(ids, graph) {
+            return _.uniq(_.reduce(ids, function(result, id) {
+                var e = graph.entity(id);
+                if (e.type === 'way') {
+                    var cn = graph.childNodes(e);
+                    result.push.apply(result, _.pluck(_.filter(cn, 'version'), 'id'));
+                }
+                return result;
+            }, _.clone(ids)));
+        }
+
+        var loading = iD.ui.Loading(context).message(t('save.uploading')).blocking(true),
+            history = context.history(),
+            origChanges = history.changes(iD.actions.DiscardTags(history.difference())),
+            localGraph = context.graph(),
+            remoteGraph = iD.Graph(history.base(), true),
+            modified = _.filter(history.difference().summary(), {changeType: 'modified'}),
+            toCheck = _.pluck(_.pluck(modified, 'entity'), 'id'),
+            toLoad = withChildNodes(toCheck, localGraph),
+            conflicts = [],
+            errors = [];
+
+        if (!tryAgain) history.perform(iD.actions.Noop());  // checkpoint
+        context.container().call(loading);
+
+        if (toCheck.length) {
+            context.connection().loadMultiple(toLoad, loaded);
+        } else {
+            finalize();
+        }
 
-        context.container()
-            .call(loading);
-
-        context.connection().putChangeset(
-            context.history().changes(iD.actions.DiscardTags(context.history().difference())),
-            e.comment,
-            context.history().imageryUsed(),
-            function(err, changeset_id) {
-                loading.close();
-                if (err) {
-                    var confirm = iD.ui.confirm(context.container());
-                    confirm
-                        .select('.modal-section.header')
-                        .append('h3')
-                        .text(t('save.error'));
-                    confirm
-                        .select('.modal-section.message-text')
-                        .append('p')
-                        .text(err.responseText || t('save.unknown_error_details'));
-                } else {
-                    context.flush();
-                    success(e, changeset_id);
+
+        // Reload modified entities into an alternate graph and check for conflicts..
+        function loaded(err, result) {
+            if (errors.length) return;
+
+            if (err) {
+                errors.push({
+                    msg: err.responseText,
+                    details: [ t('save.status_code', { code: err.status }) ]
+                });
+                showErrors();
+
+            } else {
+                var loadMore = [];
+                _.each(result.data, function(entity) {
+                    remoteGraph.replace(entity);
+                    toLoad = _.without(toLoad, entity.id);
+
+                    // Because loadMultiple doesn't download /full like loadEntity,
+                    // need to also load children that aren't already being checked..
+                    if (!entity.visible) return;
+                    if (entity.type === 'way') {
+                        loadMore.push.apply(loadMore,
+                            _.difference(entity.nodes, toCheck, toLoad, loadMore));
+                    } else if (entity.type === 'relation' && entity.isMultipolygon()) {
+                        loadMore.push.apply(loadMore,
+                            _.difference(_.pluck(entity.members, 'id'), toCheck, toLoad, loadMore));
+                    }
+                });
+
+                if (loadMore.length) {
+                    toLoad.push.apply(toLoad, loadMore);
+                    context.connection().loadMultiple(loadMore, loaded);
+                }
+
+                if (!toLoad.length) {
+                    checkConflicts();
                 }
+            }
+        }
+
+
+        function checkConflicts() {
+            function choice(id, text, action) {
+                return { id: id, text: text, action: function() { history.replace(action); } };
+            }
+            function formatUser(d) {
+                return '<a href="' + context.connection().userURL(d) + '" target="_blank">' + d + '</a>';
+            }
+            function entityName(entity) {
+                return iD.util.displayName(entity) || (iD.util.displayType(entity.id) + ' ' + entity.id);
+            }
+
+            function compareVersions(local, remote) {
+                if (local.version !== remote.version) return false;
+
+                if (local.type === 'way') {
+                    var children = _.union(local.nodes, remote.nodes);
+
+                    for (var i = 0; i < children.length; i++) {
+                        var a = localGraph.hasEntity(children[i]),
+                            b = remoteGraph.hasEntity(children[i]);
+
+                        if (a && b && a.version !== b.version) return false;
+                    }
+                }
+
+                return true;
+            }
+
+            _.each(toCheck, function(id) {
+                var local = localGraph.entity(id),
+                    remote = remoteGraph.entity(id);
+
+                if (compareVersions(local, remote)) return;
+
+                var action = iD.actions.MergeRemoteChanges,
+                    merge = action(id, localGraph, remoteGraph, formatUser);
+
+                history.replace(merge);
+
+                var mergeConflicts = merge.conflicts();
+                if (!mergeConflicts.length) return;  // merged safely
+
+                var forceLocal = action(id, localGraph, remoteGraph).withOption('force_local'),
+                    forceRemote = action(id, localGraph, remoteGraph).withOption('force_remote'),
+                    keepMine = t('save.conflict.' + (remote.visible ? 'keep_local' : 'restore')),
+                    keepTheirs = t('save.conflict.' + (remote.visible ? 'keep_remote' : 'delete'));
+
+                conflicts.push({
+                    id: id,
+                    name: entityName(local),
+                    details: mergeConflicts,
+                    chosen: 1,
+                    choices: [
+                        choice(id, keepMine, forceLocal),
+                        choice(id, keepTheirs, forceRemote)
+                    ]
+                });
             });
+
+            finalize();
+        }
+
+
+        function finalize() {
+            if (conflicts.length) {
+                conflicts.sort(function(a,b) { return b.id.localeCompare(a.id); });
+                showConflicts();
+            } else if (errors.length) {
+                showErrors();
+            } else {
+                var changes = history.changes(iD.actions.DiscardTags(history.difference()));
+                if (changes.modified.length || changes.created.length || changes.deleted.length) {
+                    context.connection().putChangeset(
+                        changes,
+                        e.comment,
+                        history.imageryUsed(),
+                        function(err, changeset_id) {
+                            if (err) {
+                                errors.push({
+                                    msg: err.responseText,
+                                    details: [ t('save.status_code', { code: err.status }) ]
+                                });
+                                showErrors();
+                            } else {
+                                history.clearSaved();
+                                success(e, changeset_id);
+                                // Add delay to allow for postgres replication #1646 #2678
+                                window.setTimeout(function() {
+                                    loading.close();
+                                    context.flush();
+                                }, 2500);
+                            }
+                        });
+                } else {        // changes were insignificant or reverted by user
+                    loading.close();
+                    context.flush();
+                    cancel();
+                }
+            }
+        }
+
+
+        function showConflicts() {
+            var selection = context.container()
+                .select('#sidebar')
+                .append('div')
+                .attr('class','sidebar-component');
+
+            loading.close();
+
+            selection.call(iD.ui.Conflicts(context)
+                .list(conflicts)
+                .on('download', function() {
+                    var data = JXON.stringify(context.connection().osmChangeJXON('CHANGEME', origChanges)),
+                        win = window.open('data:text/xml,' + encodeURIComponent(data), '_blank');
+                    win.focus();
+                })
+                .on('cancel', function() {
+                    history.pop();
+                    selection.remove();
+                })
+                .on('save', function() {
+                    for (var i = 0; i < conflicts.length; i++) {
+                        if (conflicts[i].chosen === 1) {  // user chose "keep theirs"
+                            var entity = context.hasEntity(conflicts[i].id);
+                            if (entity && entity.type === 'way') {
+                                var children = _.uniq(entity.nodes);
+                                for (var j = 0; j < children.length; j++) {
+                                    history.replace(iD.actions.Revert(children[j]));
+                                }
+                            }
+                            history.replace(iD.actions.Revert(conflicts[i].id));
+                        }
+                    }
+
+                    selection.remove();
+                    save(e, true);
+                })
+            );
+        }
+
+
+        function showErrors() {
+            var selection = iD.ui.confirm(context.container());
+
+            history.pop();
+            loading.close();
+
+            selection
+                .select('.modal-section.header')
+                .append('h3')
+                .text(t('save.error'));
+
+            addErrors(selection, errors);
+            selection.okButton();
+        }
+
+
+        function addErrors(selection, data) {
+            var message = selection
+                .select('.modal-section.message-text');
+
+            var items = message
+                .selectAll('.error-container')
+                .data(data);
+
+            var enter = items.enter()
+                .append('div')
+                .attr('class', 'error-container');
+
+            enter
+                .append('a')
+                .attr('class', 'error-description')
+                .attr('href', '#')
+                .classed('hide-toggle', true)
+                .text(function(d) { return d.msg || t('save.unknown_error_details'); })
+                .on('click', function() {
+                    var error = d3.select(this),
+                        detail = d3.select(this.nextElementSibling),
+                        exp = error.classed('expanded');
+
+                    detail.style('display', exp ? 'none' : 'block');
+                    error.classed('expanded', !exp);
+
+                    d3.event.preventDefault();
+                });
+
+            var details = enter
+                .append('div')
+                .attr('class', 'error-detail-container')
+                .style('display', 'none');
+
+            details
+                .append('ul')
+                .attr('class', 'error-detail-list')
+                .selectAll('li')
+                .data(function(d) { return d.details || []; })
+                .enter()
+                .append('li')
+                .attr('class', 'error-detail-item')
+                .text(function(d) { return d; });
+
+            items.exit()
+                .remove();
+        }
+
     }
 
+
     function success(e, changeset_id) {
         context.enter(iD.modes.Browse(context)
             .sidebar(iD.ui.Success(context)
@@ -21110,8 +24914,8 @@ iD.modes.Save = function(context) {
                     id: changeset_id,
                     comment: e.comment
                 })
-                .on('cancel', function(ui) {
-                    context.ui().sidebar.hide(ui);
+                .on('cancel', function() {
+                    context.ui().sidebar.hide();
                 })));
     }
 
@@ -21119,28 +24923,14 @@ iD.modes.Save = function(context) {
         id: 'save'
     };
 
-    var behaviors = [
-        iD.behavior.Hover(context),
-        iD.behavior.Select(context),
-        iD.behavior.Lasso(context),
-        iD.modes.DragNode(context).behavior];
-
     mode.enter = function() {
-        behaviors.forEach(function(behavior) {
-            context.install(behavior);
-        });
-
         context.connection().authenticate(function() {
             context.ui().sidebar.show(ui);
         });
     };
 
     mode.exit = function() {
-        behaviors.forEach(function(behavior) {
-            context.uninstall(behavior);
-        });
-
-        context.ui().sidebar.hide(ui);
+        context.ui().sidebar.hide();
     };
 
     return mode;
@@ -21209,6 +24999,14 @@ iD.modes.Select = function(context, selectedIDs) {
         }
     }
 
+    function toggleMenu() {
+        if (d3.select('.radial-menu').empty()) {
+            showMenu();
+        } else {
+            closeMenu();
+        }
+    }
+
     mode.selectedIDs = function() {
         return selectedIDs;
     };
@@ -21295,9 +25093,9 @@ iD.modes.Select = function(context, selectedIDs) {
 
         operations.unshift(iD.operations.Delete(selectedIDs, context));
 
-        keybinding.on('⎋', function() {
-            context.enter(iD.modes.Browse(context));
-        }, true);
+        keybinding
+            .on('⎋', function() { context.enter(iD.modes.Browse(context)); }, true)
+            .on('space', toggleMenu);
 
         operations.forEach(function(operation) {
             operation.keys.forEach(function(key) {
@@ -21885,16 +25683,20 @@ iD.operations.Straighten = function(selectedIDs, context) {
 
     return operation;
 };
-iD.Connection = function() {
+iD.Connection = function(useHttps) {
+    if (typeof useHttps !== 'boolean') {
+      useHttps = window.location.protocol === 'https:';
+    }
 
-    var event = d3.dispatch('authenticating', 'authenticated', 'auth', 'loading', 'load', 'loaded'),
-        url = 'http://www.openstreetmap.org',
+    var event = d3.dispatch('authenticating', 'authenticated', 'auth', 'loading', 'loaded'),
+        protocol = useHttps ? 'https:' : 'http:',
+        url = protocol + '//www.openstreetmap.org',
         connection = {},
         inflight = {},
         loadedTiles = {},
         tileZoom = 16,
         oauth = osmAuth({
-            url: 'http://www.openstreetmap.org',
+            url: protocol + '//www.openstreetmap.org',
             oauth_consumer_key: '5A043yRSEugj4DJ5TljuapfnrflWDte8jTOcWLlT',
             oauth_secret: 'aB3jKq1TRsCOUrfOIZ6oQMEDmv2ptV76PA54NGLL',
             loading: authenticating,
@@ -21906,8 +25708,10 @@ iD.Connection = function() {
         nodeStr = 'node',
         wayStr = 'way',
         relationStr = 'relation',
+        userDetails,
         off;
 
+
     connection.changesetURL = function(changesetId) {
         return url + '/changeset/' + changesetId;
     };
@@ -21929,10 +25733,10 @@ iD.Connection = function() {
     };
 
     connection.loadFromURL = function(url, callback) {
-        function done(dom) {
-            return callback(null, parse(dom));
+        function done(err, dom) {
+            return callback(err, parse(dom));
         }
-        return d3.xml(url).get().on('load', done);
+        return d3.xml(url).get(done);
     };
 
     connection.loadEntity = function(id, callback) {
@@ -21942,11 +25746,36 @@ iD.Connection = function() {
         connection.loadFromURL(
             url + '/api/0.6/' + type + '/' + osmID + (type !== 'node' ? '/full' : ''),
             function(err, entities) {
-                event.load(err, {data: entities});
-                if (callback) callback(err, entities && _.find(entities, function(e) { return e.id === id; }));
+                if (callback) callback(err, {data: entities});
             });
     };
 
+    connection.loadEntityVersion = function(id, version, callback) {
+        var type = iD.Entity.id.type(id),
+            osmID = iD.Entity.id.toOSM(id);
+
+        connection.loadFromURL(
+            url + '/api/0.6/' + type + '/' + osmID + '/' + version,
+            function(err, entities) {
+                if (callback) callback(err, {data: entities});
+            });
+    };
+
+    connection.loadMultiple = function(ids, callback) {
+        _.each(_.groupBy(_.uniq(ids), iD.Entity.id.type), function(v, k) {
+            var type = k + 's',
+                osmIDs = _.map(v, iD.Entity.id.toOSM);
+
+            _.each(_.chunk(osmIDs, 150), function(arr) {
+                connection.loadFromURL(
+                    url + '/api/0.6/' + type + '?' + type + '=' + arr.join(),
+                    function(err, entities) {
+                        if (callback) callback(err, {data: entities});
+                    });
+            });
+        });
+    };
+
     function authenticating() {
         event.authenticating();
     }
@@ -21955,6 +25784,12 @@ iD.Connection = function() {
         event.authenticated();
     }
 
+    function getLoc(attrs) {
+        var lon = attrs.lon && attrs.lon.value,
+            lat = attrs.lat && attrs.lat.value;
+        return [parseFloat(lon), parseFloat(lat)];
+    }
+
     function getNodes(obj) {
         var elems = obj.getElementsByTagName(ndStr),
             nodes = new Array(elems.length);
@@ -21988,15 +25823,20 @@ iD.Connection = function() {
         return members;
     }
 
+    function getVisible(attrs) {
+        return (!attrs.visible || attrs.visible.value !== 'false');
+    }
+
     var parsers = {
         node: function nodeData(obj) {
             var attrs = obj.attributes;
             return new iD.Node({
                 id: iD.Entity.id.fromOSM(nodeStr, attrs.id.value),
-                loc: [parseFloat(attrs.lon.value), parseFloat(attrs.lat.value)],
+                loc: getLoc(attrs),
                 version: attrs.version.value,
                 user: attrs.user && attrs.user.value,
-                tags: getTags(obj)
+                tags: getTags(obj),
+                visible: getVisible(attrs)
             });
         },
 
@@ -22007,7 +25847,8 @@ iD.Connection = function() {
                 version: attrs.version.value,
                 user: attrs.user && attrs.user.value,
                 tags: getTags(obj),
-                nodes: getNodes(obj)
+                nodes: getNodes(obj),
+                visible: getVisible(attrs)
             });
         },
 
@@ -22018,13 +25859,14 @@ iD.Connection = function() {
                 version: attrs.version.value,
                 user: attrs.user && attrs.user.value,
                 tags: getTags(obj),
-                members: getMembers(obj)
+                members: getMembers(obj),
+                visible: getVisible(attrs)
             });
         }
     };
 
     function parse(dom) {
-        if (!dom || !dom.childNodes) return new Error('Bad request');
+        if (!dom || !dom.childNodes) return;
 
         var root = dom.childNodes[0],
             children = root.childNodes,
@@ -22053,7 +25895,7 @@ iD.Connection = function() {
                     tag: _.map(tags, function(value, key) {
                         return { '@k': key, '@v': value };
                     }),
-                    '@version': 0.3,
+                    '@version': 0.6,
                     '@generator': 'iD'
                 }
             }
@@ -22083,7 +25925,7 @@ iD.Connection = function() {
 
         return {
             osmChange: {
-                '@version': 0.3,
+                '@version': 0.6,
                 '@generator': 'iD',
                 'create': nest(changes.created.map(rep), ['node', 'way', 'relation']),
                 'modify': nest(changes.modified.map(rep), ['node', 'way', 'relation']),
@@ -22093,13 +25935,16 @@ iD.Connection = function() {
     };
 
     connection.changesetTags = function(comment, imageryUsed) {
-        var tags = {
-            imagery_used: imageryUsed.join(';').substr(0, 255),
-            created_by: 'iD ' + iD.version
-        };
+        var detected = iD.detect(),
+            tags = {
+                created_by: 'iD ' + iD.version,
+                imagery_used: imageryUsed.join(';').substr(0, 255),
+                host: (window.location.origin + window.location.pathname).substr(0, 255),
+                locale: detected.locale
+            };
 
         if (comment) {
-            tags.comment = comment;
+            tags.comment = comment.substr(0, 255);
         }
 
         return tags;
@@ -22120,18 +25965,18 @@ iD.Connection = function() {
                     content: JXON.stringify(connection.osmChangeJXON(changeset_id, changes))
                 }, function(err) {
                     if (err) return callback(err);
+                    // POST was successful, safe to call the callback.
+                    // Still attempt to close changeset, but ignore response because #2667
+                    // Add delay to allow for postgres replication #1646 #2678
+                    window.setTimeout(function() { callback(null, changeset_id); }, 2500);
                     oauth.xhr({
                         method: 'PUT',
                         path: '/api/0.6/changeset/' + changeset_id + '/close'
-                    }, function(err) {
-                        callback(err, changeset_id);
-                    });
+                    }, d3.functor(true));
                 });
             });
     };
 
-    var userDetails;
-
     connection.userDetails = function(callback) {
         if (userDetails) {
             callback(undefined, userDetails);
@@ -22179,7 +26024,7 @@ iD.Connection = function() {
         return connection;
     };
 
-    connection.loadTiles = function(projection, dimensions) {
+    connection.loadTiles = function(projection, dimensions, callback) {
 
         if (off) return;
 
@@ -22232,7 +26077,7 @@ iD.Connection = function() {
                 loadedTiles[id] = true;
                 delete inflight[id];
 
-                event.load(err, _.extend({data: parsed}, tile));
+                if (callback) callback(err, _.extend({data: parsed}, tile));
 
                 if (_.isEmpty(inflight)) {
                     event.loaded();
@@ -22258,6 +26103,7 @@ iD.Connection = function() {
     };
 
     connection.flush = function() {
+        userDetails = undefined;
         _.forEach(inflight, abortRequest);
         loadedTiles = {};
         inflight = {};
@@ -22271,12 +26117,14 @@ iD.Connection = function() {
     };
 
     connection.logout = function() {
+        userDetails = undefined;
         oauth.logout();
         event.auth();
         return connection;
     };
 
     connection.authenticate = function(callback) {
+        userDetails = undefined;
         function done(err, res) {
             event.auth();
             if (callback) callback(err, res);
@@ -22298,7 +26146,7 @@ iD.Difference = function(base, head) {
     var changes = {}, length = 0;
 
     function changed(h, b) {
-        return !_.isEqual(_.omit(h, 'v'), _.omit(b, 'v'));
+        return h !== b && !_.isEqual(_.omit(h, 'v'), _.omit(b, 'v'));
     }
 
     _.each(head.entities, function(h, id) {
@@ -22520,6 +26368,9 @@ iD.Entity.prototype = {
         if (!this.id && this.type) {
             this.id = iD.Entity.id(this.type);
         }
+        if (!this.hasOwnProperty('visible')) {
+            this.visible = true;
+        }
 
         if (iD.debug) {
             Object.freeze(this);
@@ -22577,13 +26428,7 @@ iD.Entity.prototype = {
     },
 
     hasInterestingTags: function() {
-        return _.keys(this.tags).some(function(key) {
-            return key !== 'attribution' &&
-                key !== 'created_by' &&
-                key !== 'source' &&
-                key !== 'odbl' &&
-                key.indexOf('tiger:') !== 0;
-        });
+        return _.keys(this.tags).some(iD.interestingTag);
     },
 
     isHighwayIntersection: function() {
@@ -22625,10 +26470,7 @@ iD.Graph = function(other, mutable) {
 
     this.transients = {};
     this._childNodes = {};
-
-    if (!mutable) {
-        this.freeze();
-    }
+    this.frozen = !mutable;
 };
 
 iD.Graph.prototype = {
@@ -22663,7 +26505,7 @@ iD.Graph.prototype = {
             result = [];
 
         if (parents) {
-            for (var i = 0, imax = parents.length; i !== imax; i++) {
+            for (var i = 0; i < parents.length; i++) {
                 result.push(this.entity(parents[i]));
             }
         }
@@ -22685,7 +26527,7 @@ iD.Graph.prototype = {
             result = [];
 
         if (parents) {
-            for (var i = 0, imax = parents.length; i !== imax; i++) {
+            for (var i = 0; i < parents.length; i++) {
                 result.push(this.entity(parents[i]));
             }
         }
@@ -22698,7 +26540,7 @@ iD.Graph.prototype = {
 
         var nodes = [];
         if (entity.nodes) {
-            for (var i = 0, l = entity.nodes.length; i < l; i++) {
+            for (var i = 0; i < entity.nodes.length; i++) {
                 nodes[i] = this.entity(entity.nodes[i]);
             }
         }
@@ -22721,20 +26563,19 @@ iD.Graph.prototype = {
     // is used only during the history operation that merges newly downloaded
     // data into each state. To external consumers, it should appear as if the
     // graph always contained the newly downloaded data.
-    rebase: function(entities, stack) {
+    rebase: function(entities, stack, force) {
         var base = this.base(),
             i, j, k, id;
 
         for (i = 0; i < entities.length; i++) {
             var entity = entities[i];
 
-            if (base.entities[entity.id])
+            if (!entity.visible || (!force && base.entities[entity.id]))
                 continue;
 
             // Merging data into the base graph
             base.entities[entity.id] = entity;
-            this._updateCalculated(undefined, entity,
-                base.parentWays, base.parentRels);
+            this._updateCalculated(undefined, entity, base.parentWays, base.parentRels);
 
             // Restore provisionally-deleted nodes that are discovered to have an extant parent
             if (entity.type === 'way') {
@@ -22864,6 +26705,19 @@ iD.Graph.prototype = {
         });
     },
 
+    revert: function(id) {
+        var baseEntity = this.base().entities[id],
+            headEntity = this.entities[id];
+
+        if (headEntity === baseEntity)
+            return this;
+
+        return this.update(function() {
+            this._updateCalculated(headEntity, baseEntity);
+            delete this.entities[id];
+        });
+    },
+
     update: function() {
         var graph = this.frozen ? iD.Graph(this, true) : this;
 
@@ -22871,15 +26725,9 @@ iD.Graph.prototype = {
             arguments[i].call(graph, graph);
         }
 
-        return this.frozen ? graph.freeze() : this;
-    },
-
-    freeze: function() {
-        this.frozen = true;
+        if (this.frozen) graph.frozen = true;
 
-        // No longer freezing entities here due to in-place updates needed in rebase.
-
-        return this;
+        return graph;
     },
 
     // Obliterates any existing entities
@@ -22938,9 +26786,13 @@ iD.History = function(context) {
             return stack[index].graph;
         },
 
+        base: function() {
+            return stack[0].graph;
+        },
+
         merge: function(entities, extent) {
-            stack[0].graph.rebase(entities, _.pluck(stack, 'graph'));
-            tree.rebase(entities);
+            stack[0].graph.rebase(entities, _.pluck(stack, 'graph'), false);
+            tree.rebase(entities, false);
 
             dispatch.change(undefined, extent);
         },
@@ -22974,6 +26826,21 @@ iD.History = function(context) {
             }
         },
 
+        // Same as calling pop and then perform
+        overwrite: function() {
+            var previous = stack[index].graph;
+
+            if (index > 0) {
+                index--;
+                stack.pop();
+            }
+            stack = stack.slice(0, index + 1);
+            stack.push(perform(arguments));
+            index++;
+
+            return change(previous);
+        },
+
         undo: function() {
             var previous = stack[index].graph;
 
@@ -23042,6 +26909,13 @@ iD.History = function(context) {
             };
         },
 
+        validate: function(changes) {
+            return _(iD.validations)
+                .map(function(fn) { return fn()(changes, stack[index].graph); })
+                .flatten()
+                .value();
+        },
+
         hasChanges: function() {
             return this.difference().length() > 0;
         },
@@ -23069,7 +26943,7 @@ iD.History = function(context) {
         },
 
         toJSON: function() {
-            if (stack.length <= 1) return;
+            if (!this.hasChanges()) return;
 
             var allEntities = {},
                 baseEntities = {},
@@ -23092,6 +26966,12 @@ iD.History = function(context) {
                     if (id in base.graph.entities) {
                         baseEntities[id] = base.graph.entities[id];
                     }
+                    // get originals of parent entities too
+                    _.forEach(base.graph._parentWays[id], function(parentId) {
+                        if (parentId in base.graph.entities) {
+                            baseEntities[parentId] = base.graph.entities[parentId];
+                        }
+                    });
                 });
 
                 var x = {};
@@ -23114,7 +26994,7 @@ iD.History = function(context) {
             });
         },
 
-        fromJSON: function(json) {
+        fromJSON: function(json, loadChildNodes) {
             var h = JSON.parse(json);
 
             iD.Entity.id.next = h.nextIDs;
@@ -23128,14 +27008,46 @@ iD.History = function(context) {
                 });
 
                 if (h.version === 3) {
-                    // this merges originals for changed entities into the base of
+                    // This merges originals for changed entities into the base of
                     // the stack even if the current stack doesn't have them (for
                     // example when iD has been restarted in a different region)
                     var baseEntities = h.baseEntities.map(function(entity) {
                         return iD.Entity(entity);
                     });
-                    stack[0].graph.rebase(baseEntities, _.pluck(stack, 'graph'));
-                    tree.rebase(baseEntities);
+                    stack[0].graph.rebase(baseEntities, _.pluck(stack, 'graph'), true);
+                    tree.rebase(baseEntities, true);
+
+                    // When we restore a modified way, we also need to fetch any missing
+                    // childnodes that would normally have been downloaded with it.. #2142
+                    if (loadChildNodes) {
+                        var missing =  _(baseEntities)
+                                .filter('type', 'way')
+                                .pluck('nodes')
+                                .flatten()
+                                .uniq()
+                                .reject(function(n) { return stack[0].graph.hasEntity(n); })
+                                .value();
+
+                        if (!_.isEmpty(missing)) {
+                            var childNodesLoaded = function(err, result) {
+                                if (err) return;
+
+                                var visible = _.groupBy(result.data, 'visible');
+                                if (!_.isEmpty(visible.true)) {
+                                    stack[0].graph.rebase(visible.true, _.pluck(stack, 'graph'), false);
+                                    tree.rebase(visible.true, false);
+                                }
+
+                                // fetch older versions of nodes that were deleted..
+                                _.each(visible.false, function(entity) {
+                                    context.connection()
+                                        .loadEntityVersion(entity.id, +entity.version - 1, childNodesLoaded);
+                                });
+                            };
+
+                            context.connection().loadMultiple(missing, childNodesLoaded);
+                        }
+                    }
                 }
 
                 stack = h.stack.map(function(d) {
@@ -23208,7 +27120,7 @@ iD.History = function(context) {
             if (!lock.locked()) return;
 
             var json = context.storage(getKey('saved_history'));
-            if (json) history.fromJSON(json);
+            if (json) history.fromJSON(json, true);
         },
 
         _getKey: getKey
@@ -23289,37 +27201,6 @@ _.extend(iD.Node.prototype, {
         };
     }
 });
-iD.oneWayTags = {
-    'aerialway': {
-        'chair_lift': true,
-        'mixed_lift': true,
-        't-bar': true,
-        'j-bar': true,
-        'platter': true,
-        'rope_tow': true,
-        'magic_carpet': true,
-        'yes': true
-    },
-    'highway': {
-        'motorway': true,
-        'motorway_link': true
-    },
-    'junction': {
-        'roundabout': true
-    },
-    'man_made': {
-        'piste:halfpipe': true
-    },
-    'piste:type': {
-        'downhill': true,
-        'sled': true,
-        'yes': true
-    },
-    'waterway': {
-        'river': true,
-        'stream': true
-    }
-};
 iD.Relation = iD.Entity.relation = function iD_Relation() {
     if (!(this instanceof iD_Relation)) {
         return (new iD_Relation()).initialize(arguments);
@@ -23600,6 +27481,46 @@ _.extend(iD.Relation.prototype, {
         return result;
     }
 });
+iD.oneWayTags = {
+    'aerialway': {
+        'chair_lift': true,
+        'mixed_lift': true,
+        't-bar': true,
+        'j-bar': true,
+        'platter': true,
+        'rope_tow': true,
+        'magic_carpet': true,
+        'yes': true
+    },
+    'highway': {
+        'motorway': true,
+        'motorway_link': true
+    },
+    'junction': {
+        'roundabout': true
+    },
+    'man_made': {
+        'piste:halfpipe': true
+    },
+    'piste:type': {
+        'downhill': true,
+        'sled': true,
+        'yes': true
+    },
+    'waterway': {
+        'river': true,
+        'stream': true
+    }
+};
+
+iD.interestingTag = function (key) {
+    return key !== 'attribution' &&
+        key !== 'created_by' &&
+        key !== 'source' &&
+        key !== 'odbl' &&
+        key.indexOf('tiger:') !== 0;
+
+};
 iD.Tree = function(head) {
     var rtree = rbush(),
         rectangles = {};
@@ -23641,15 +27562,23 @@ iD.Tree = function(head) {
 
     var tree = {};
 
-    tree.rebase = function(entities) {
+    tree.rebase = function(entities, force) {
         var insertions = {};
 
         for (var i = 0; i < entities.length; i++) {
             var entity = entities[i];
 
-            if (head.entities.hasOwnProperty(entity.id) || rectangles[entity.id])
+            if (!entity.visible)
                 continue;
 
+            if (head.entities.hasOwnProperty(entity.id) || rectangles[entity.id]) {
+                if (!force) {
+                    continue;
+                } else if (rectangles[entity.id]) {
+                    rtree.remove(rectangles[entity.id]);
+                }
+            }
+
             insertions[entity.id] = entity;
             updateParents(entity, insertions, {});
         }
@@ -24103,6 +28032,7 @@ iD.Background = function(context) {
 
         reader.onload = function(e) {
             gpxLayer.geojson(toGeoJSON.gpx(toDom(e.target.result)));
+            iD.ui.MapInMap.gpxLayer.geojson(toGeoJSON.gpx(toDom(e.target.result)));
             background.zoomToGpxLayer();
             dispatch.change();
         };
@@ -24112,20 +28042,23 @@ iD.Background = function(context) {
 
     background.zoomToGpxLayer = function() {
         if (background.hasGpxLayer()) {
-            var viewport = context.map().extent().polygon(),
+            var map = context.map(),
+                viewport = map.trimmedExtent().polygon(),
                 coords = _.reduce(gpxLayer.geojson().features, function(coords, feature) {
                     var c = feature.geometry.coordinates;
                     return _.union(coords, feature.geometry.type === 'Point' ? [c] : c);
                 }, []);
 
-            if (!iD.geo.polygonIntersectsPolygon(viewport, coords)) {
-                context.map().extent(d3.geo.bounds(gpxLayer.geojson()));
+            if (!iD.geo.polygonIntersectsPolygon(viewport, coords, true)) {
+                var extent = iD.geo.Extent(d3.geo.bounds(gpxLayer.geojson()));
+                map.centerZoom(extent.center(), map.trimmedExtentZoom(extent));
             }
         }
     };
 
     background.toggleGpxLayer = function() {
         gpxLayer.enable(!gpxLayer.enable());
+        iD.ui.MapInMap.gpxLayer.enable(!iD.ui.MapInMap.gpxLayer.enable());
         dispatch.change();
     };
 
@@ -24221,8 +28154,11 @@ iD.Background = function(context) {
         var gpx = q.gpx;
         if (gpx) {
             d3.text(gpx, function(err, gpxTxt) {
-                gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt)));
-                dispatch.change();
+                if (!err) {
+                    gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt)));
+                    iD.ui.MapInMap.gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt)));
+                    dispatch.change();
+                }
             });
         }
     };
@@ -24235,6 +28171,7 @@ iD.BackgroundSource = function(data) {
         name = source.name;
 
     source.scaleExtent = data.scaleExtent || [0, 20];
+    source.overzoom = data.overzoom !== false;
 
     source.offset = function(_) {
         if (!arguments.length) return offset;
@@ -24283,13 +28220,13 @@ iD.BackgroundSource = function(data) {
     source.intersects = function(extent) {
         extent = extent.polygon();
         return !data.polygon || data.polygon.some(function(polygon) {
-            return iD.geo.polygonIntersectsPolygon(polygon, extent);
+            return iD.geo.polygonIntersectsPolygon(polygon, extent, true);
         });
     };
 
     source.validZoom = function(z) {
         return source.scaleExtent[0] <= z &&
-            (!source.isLocatorOverlay() || source.scaleExtent[1] > z);
+            (source.overzoom || source.scaleExtent[1] > z);
     };
 
     source.isLocatorOverlay = function() {
@@ -24403,7 +28340,8 @@ iD.Features = function(context) {
         'cycleway': true,
         'bridleway': true,
         'steps': true,
-        'pedestrian': true
+        'pedestrian': true,
+        'corridor': true
     };
 
     var past_futures = {
@@ -24523,32 +28461,27 @@ iD.Features = function(context) {
 
         var strings = Object.keys(entity.tags);
 
-        for (var i = 0, imax = strings.length; i !== imax; i++) {
+        for (var i = 0; i < strings.length; i++) {
             var s = strings[i];
             if (past_futures[s] || past_futures[entity.tags[s]]) { return true; }
         }
         return false;
     });
 
-    // lines or areas that don't match another feature filter.
+    // Lines or areas that don't match another feature filter.
+    // IMPORTANT: The 'others' feature must be the last one defined,
+    //   so that code in getMatches can skip this test if `hasMatch = true`
     defineFeature('others', function isOther(entity, resolver, geometry) {
-        return (geometry === 'line' || geometry === 'area') && !(
-            _features.major_roads.filter(entity, resolver, geometry) ||
-            _features.minor_roads.filter(entity, resolver, geometry) ||
-            _features.paths.filter(entity, resolver, geometry) ||
-            _features.buildings.filter(entity, resolver, geometry) ||
-            _features.landuse.filter(entity, resolver, geometry) ||
-            _features.boundaries.filter(entity, resolver, geometry) ||
-            _features.water.filter(entity, resolver, geometry) ||
-            _features.rail.filter(entity, resolver, geometry) ||
-            _features.power.filter(entity, resolver, geometry) ||
-            _features.past_future.filter(entity, resolver, geometry)
-        );
+        return (geometry === 'line' || geometry === 'area');
     });
 
 
     function features() {}
 
+    features.features = function() {
+        return _features;
+    };
+
     features.keys = function() {
         return _keys;
     };
@@ -24609,6 +28542,8 @@ iD.Features = function(context) {
 
     features.gatherStats = function(d, resolver, dimensions) {
         var needsRedraw = false,
+            type = _.groupBy(d, function(ent) { return ent.type; }),
+            entities = [].concat(type.relation || [], type.way || [], type.node || []),
             currHidden, geometry, matches;
 
         _.each(_features, function(f) { f.count = 0; });
@@ -24617,11 +28552,11 @@ iD.Features = function(context) {
         // a _cullFactor of 1 corresponds to a 1000x1000px viewport..
         _cullFactor = dimensions[0] * dimensions[1] / 1000000;
 
-        for (var i = 0, imax = d.length; i !== imax; i++) {
-            geometry = d[i].geometry(resolver);
+        for (var i = 0; i < entities.length; i++) {
+            geometry = entities[i].geometry(resolver);
             if (!(geometry === 'vertex' || geometry === 'relation')) {
-                matches = Object.keys(features.getMatches(d[i], resolver, geometry));
-                for (var j = 0, jmax = matches.length; j !== jmax; j++) {
+                matches = Object.keys(features.getMatches(entities[i], resolver, geometry));
+                for (var j = 0; j < matches.length; j++) {
                     _features[matches[j]].count++;
                 }
             }
@@ -24643,7 +28578,7 @@ iD.Features = function(context) {
     };
 
     features.clear = function(d) {
-        for (var i = 0, imax = d.length; i !== imax; i++) {
+        for (var i = 0; i < d.length; i++) {
             features.clearEntity(d[i]);
         }
     };
@@ -24667,10 +28602,31 @@ iD.Features = function(context) {
                 hasMatch = false;
 
             if (!(geometry === 'vertex' || geometry === 'relation')) {
-                for (var i = 0, imax = _keys.length; i !== imax; i++) {
-                    if (hasMatch && _keys[i] === 'others') {
-                        continue;
+                for (var i = 0; i < _keys.length; i++) {
+
+                    if (_keys[i] === 'others') {
+                        if (hasMatch) continue;
+
+                        // If the entity is a way that has not matched any other
+                        // feature type, see if it has a parent relation, and if so,
+                        // match whatever feature types the parent has matched.
+                        // (The way is a member of a multipolygon.)
+                        //
+                        // IMPORTANT:
+                        // For this to work, getMatches must be called on relations before ways.
+                        //
+                        if (entity.type === 'way') {
+                            var parents = features.getParents(entity, resolver, geometry);
+                            if (parents.length === 1) {
+                                var pkey = iD.Entity.key(parents[0]);
+                                if (_cache[pkey] && _cache[pkey].matches) {
+                                    matches = _.clone(_cache[pkey].matches);
+                                    continue;
+                                }
+                            }
+                        }
                     }
+
                     if (_features[_keys[i]].filter(entity, resolver, geometry)) {
                         matches[_keys[i]] = hasMatch = true;
                     }
@@ -24707,7 +28663,7 @@ iD.Features = function(context) {
 
         var matches = features.getMatches(entity, resolver, geometry);
 
-        for (var i = 0, imax = _hidden.length; i !== imax; i++) {
+        for (var i = 0; i < _hidden.length; i++) {
             if (matches[_hidden[i]]) { return true; }
         }
         return false;
@@ -24720,7 +28676,7 @@ iD.Features = function(context) {
 
         if (!parents.length) { return false; }
 
-        for (var i = 0, imax = parents.length; i !== imax; i++) {
+        for (var i = 0; i < parents.length; i++) {
             if (!features.isHidden(parents[i], resolver, parents[i].geometry(resolver))) {
                 return false;
             }
@@ -24766,7 +28722,7 @@ iD.Features = function(context) {
             return d;
 
         var result = [];
-        for (var i = 0, imax = d.length; i !== imax; i++) {
+        for (var i = 0; i < d.length; i++) {
             var entity = d[i];
             if (!features.isHidden(entity, resolver, entity.geometry(resolver))) {
                 result.push(entity);
@@ -24910,7 +28866,9 @@ iD.Map = function(context) {
         context.features()
             .on('redraw.map', redraw);
 
-        selection.call(zoom);
+        selection
+            .on('dblclick.map', dblClick)
+            .call(zoom);
 
         supersurface = selection.append('div')
             .attr('id', 'supersurface');
@@ -25023,20 +28981,23 @@ iD.Map = function(context) {
         dispatch.drawn({full: true});
     }
 
-    function zoomPan() {
-        if (d3.event && d3.event.sourceEvent.type === 'dblclick') {
-            if (!dblclickEnabled) {
-                zoom.scale(projection.scale() * 2 * Math.PI)
-                    .translate(projection.translate());
-                return d3.event.sourceEvent.preventDefault();
-            }
+    function dblClick() {
+        if (!dblclickEnabled) {
+            d3.event.preventDefault();
+            d3.event.stopImmediatePropagation();
         }
+    }
 
-        if (Math.log(d3.event.scale / Math.LN2 - 8) < minzoom + 1) {
+    function zoomPan() {
+        if (Math.log(d3.event.scale) / Math.LN2 - 8 < minzoom) {
+            surface.interrupt();
             iD.ui.flash(context.container())
                 .select('.content')
                 .text(t('cannot_zoom'));
-            return setZoom(context.minEditableZoom(), true);
+            setZoom(context.minEditableZoom(), true);
+            queueRedraw();
+            dispatch.move(map);
+            return;
         }
 
         projection
@@ -25085,7 +29046,7 @@ iD.Map = function(context) {
         }
 
         if (map.editable()) {
-            context.connection().loadTiles(projection, dimensions);
+            context.loadTiles(projection, dimensions);
             drawVector(difference, extent);
         } else {
             editOff();
@@ -25132,6 +29093,22 @@ iD.Map = function(context) {
         return map;
     };
 
+    function interpolateZoom(_) {
+        var k = projection.scale(),
+            t = projection.translate();
+
+        surface.node().__chart__ = {
+            x: t[0],
+            y: t[1],
+            k: k * 2 * Math.PI
+        };
+
+        setZoom(_);
+        projection.scale(k).translate(t);  // undo setZoom projection changes
+
+        zoom.event(surface.transition());
+    }
+
     function setZoom(_, force) {
         if (_ === map.zoom() && !force)
             return false;
@@ -25186,8 +29163,19 @@ iD.Map = function(context) {
         return redraw();
     };
 
-    map.zoomIn = function() { return map.zoom(~~map.zoom() + 1); };
-    map.zoomOut = function() { return map.zoom(~~map.zoom() - 1); };
+    function zoomIn(integer) {
+      interpolateZoom(~~map.zoom() + integer);
+    }
+
+    function zoomOut(integer) {
+      interpolateZoom(~~map.zoom() - integer);
+    }
+
+    map.zoomIn = function() { zoomIn(1); };
+    map.zoomInFurther = function() { zoomIn(4); };
+
+    map.zoomOut = function() { zoomOut(1); };
+    map.zoomOutFurther = function() { zoomOut(4); };
 
     map.center = function(loc) {
         if (!arguments.length) {
@@ -25207,6 +29195,7 @@ iD.Map = function(context) {
         }
 
         if (z < minzoom) {
+            surface.interrupt();
             iD.ui.flash(context.container())
                 .select('.content')
                 .text(t('cannot_zoom'));
@@ -25221,8 +29210,10 @@ iD.Map = function(context) {
     };
 
     map.zoomTo = function(entity, zoomLimits) {
-        var extent = entity.extent(context.graph()),
-            zoom = map.extentZoom(extent);
+        var extent = entity.extent(context.graph());
+        if (!isFinite(extent.area())) return;
+
+        var zoom = map.trimmedExtentZoom(extent);
         zoomLimits = zoomLimits || [context.minEditableZoom(), 20];
         map.centerZoom(extent.center(), Math.min(Math.max(zoom, zoomLimits[0]), zoomLimits[1]));
     };
@@ -25265,25 +29256,39 @@ iD.Map = function(context) {
         }
     };
 
-    map.trimmedExtent = function() {
-        var headerY = 60, footerY = 30, pad = 10;
-        return new iD.geo.Extent(projection.invert([pad, dimensions[1] - footerY - pad]),
-                projection.invert([dimensions[0] - pad, headerY + pad]));
+    map.trimmedExtent = function(_) {
+        if (!arguments.length) {
+            var headerY = 60, footerY = 30, pad = 10;
+            return new iD.geo.Extent(projection.invert([pad, dimensions[1] - footerY - pad]),
+                    projection.invert([dimensions[0] - pad, headerY + pad]));
+        } else {
+            var extent = iD.geo.Extent(_);
+            map.centerZoom(extent.center(), map.trimmedExtentZoom(extent));
+        }
     };
 
-    map.extentZoom = function(_) {
-        var extent = iD.geo.Extent(_),
-            tl = projection([extent[0][0], extent[1][1]]),
+    function calcZoom(extent, dim) {
+        var tl = projection([extent[0][0], extent[1][1]]),
             br = projection([extent[1][0], extent[0][1]]);
 
         // Calculate maximum zoom that fits extent
-        var hFactor = (br[0] - tl[0]) / dimensions[0],
-            vFactor = (br[1] - tl[1]) / dimensions[1],
+        var hFactor = (br[0] - tl[0]) / dim[0],
+            vFactor = (br[1] - tl[1]) / dim[1],
             hZoomDiff = Math.log(Math.abs(hFactor)) / Math.LN2,
             vZoomDiff = Math.log(Math.abs(vFactor)) / Math.LN2,
             newZoom = map.zoom() - Math.max(hZoomDiff, vZoomDiff);
 
         return newZoom;
+    }
+
+    map.extentZoom = function(_) {
+        return calcZoom(iD.geo.Extent(_), dimensions);
+    };
+
+    map.trimmedExtentZoom = function(_) {
+        var trimY = 120, trimX = 40,
+            trimmed = [dimensions[0] - trimX, dimensions[1] - trimY];
+        return calcZoom(iD.geo.Extent(_), trimmed);
     };
 
     map.editable = function() {
@@ -25370,18 +29375,16 @@ iD.MapillaryLayer = function (context) {
         enter.append('button')
             .on('click', hide)
             .append('div')
-            .attr('class', 'icon close');
+            .call(iD.svg.Icon('#icon-close'));
 
         enter.append('img');
 
-        var link = enter.append('a')
+        enter
+            .append('a')
             .attr('class', 'link')
-            .attr('target', '_blank');
-
-        link.append('span')
-            .attr('class', 'icon icon-pre-text out-link');
-
-        link.append('span')
+            .attr('target', '_blank')
+            .call(iD.svg.Icon('#icon-out-link', 'inline'))
+            .append('span')
             .text(t('mapillary.view_on_mapillary'));
 
         if (!enable) {
@@ -25429,12 +29432,14 @@ iD.MapillaryLayer = function (context) {
                     .attr('class', 'image');
 
                 enter.append('path')
-                    .attr('d', 'M 0,-5 l 0,-20 l -5,30 l 10,0 l -5,-30');
+                    .attr('class', 'viewfield')
+                    .attr('transform', 'scale(1.5,1.5),translate(-8, -13)')
+                    .attr('d', 'M 6,9 C 8,8.4 8,8.4 10,9 L 16,-2 C 12,-5 4,-5 0,-2 z');
 
                 enter.append('circle')
                     .attr('dx', '0')
                     .attr('dy', '0')
-                    .attr('r', '8');
+                    .attr('r', '6');
 
                 g.attr('transform', transform);
 
@@ -25655,7 +29660,7 @@ iD.svg = {
             if (entity.id in cache) {
                 return cache[entity.id];
             } else {
-                return cache[entity.id] = path(entity.asGeoJSON(graph)); // jshint ignore:line
+                return cache[entity.id] = path(entity.asGeoJSON(graph));
             }
         };
     },
@@ -25667,7 +29672,7 @@ iD.svg = {
                 i = 0,
                 offset = dt,
                 segments = [],
-                viewport = iD.geo.Extent(projection.clipExtent()),
+                clip = d3.geo.clipExtent().extent(projection.clipExtent()).stream,
                 coordinates = graph.childNodes(entity).map(function(n) {
                     return n.loc;
                 });
@@ -25677,7 +29682,7 @@ iD.svg = {
             d3.geo.stream({
                 type: 'LineString',
                 coordinates: coordinates
-            }, projection.stream({
+            }, projection.stream(clip({
                 lineStart: function() {},
                 lineEnd: function() {
                     a = null;
@@ -25686,10 +29691,9 @@ iD.svg = {
                     b = [x, y];
 
                     if (a) {
-                        var extent = iD.geo.Extent(a).extend(b),
-                            span = iD.geo.euclideanDistance(a, b) - offset;
+                        var span = iD.geo.euclideanDistance(a, b) - offset;
 
-                        if (extent.intersects(viewport) && span >= 0) {
+                        if (span >= 0) {
                             var angle = Math.atan2(b[1] - a[1], b[0] - a[0]),
                                 dx = dt * Math.cos(angle),
                                 dy = dt * Math.sin(angle),
@@ -25715,7 +29719,7 @@ iD.svg = {
 
                     a = b;
                 }
-            }));
+            })));
 
             return segments;
         };
@@ -25870,36 +29874,22 @@ iD.svg.Areas = function(projection) {
     used once globally, since defs IDs must be unique within a document.
 */
 iD.svg.Defs = function(context) {
-    function autosize(image) {
-        var img = document.createElement('img');
-        img.src = image.attr('xlink:href');
-        img.onload = function() {
-            image.attr({
-                width: img.width,
-                height: img.height
-            });
-        };
-    }
 
-    function SpriteDefinition(id, href, data) {
+    function SVGSpriteDefinition(id, href) {
         return function(defs) {
-            defs.append('image')
-                .attr('id', id)
-                .attr('xlink:href', href)
-                .call(autosize);
-
-            defs.selectAll()
-                .data(data)
-                .enter().append('use')
-                .attr('id', function(d) { return d.key; })
-                .attr('transform', function(d) { return 'translate(-' + d.value[0] + ',-' + d.value[1] + ')'; })
-                .attr('xlink:href', '#' + id);
+            d3.xml(href, 'image/svg+xml', function(err, svg) {
+                if (err) return;
+                defs.node().appendChild(
+                    d3.select(svg.documentElement).attr('id', id).node()
+                );
+            });
         };
     }
 
     return function (selection) {
         var defs = selection.append('defs');
 
+        // marker
         defs.append('marker')
             .attr({
                 id: 'oneway-marker',
@@ -25913,6 +29903,7 @@ iD.svg.Defs = function(context) {
             .append('path')
             .attr('d', 'M 5 3 L 0 3 L 0 2 L 5 2 L 5 0 L 10 2.5 L 5 5 z');
 
+        // patterns
         var patterns = defs.selectAll('pattern')
             .data([
                 // pattern name, pattern image name
@@ -25958,6 +29949,7 @@ iD.svg.Defs = function(context) {
                 return context.imagePath('pattern/' + d[1] + '.png');
             });
 
+        // clip paths
         defs.selectAll()
             .data([12, 18, 20, 32, 45])
             .enter().append('clipPath')
@@ -25974,24 +29966,25 @@ iD.svg.Defs = function(context) {
                 return d;
             });
 
-        var maki = [];
-        _.forEach(iD.data.featureIcons, function (dimensions, name) {
-            if (dimensions['12'] && dimensions['18'] && dimensions['24']) {
-                maki.push({key: 'maki-' + name + '-12', value: dimensions['12']});
-                maki.push({key: 'maki-' + name + '-18', value: dimensions['18']});
-                maki.push({key: 'maki-' + name + '-24', value: dimensions['24']});
-            }
-        });
-
-        defs.call(SpriteDefinition(
-            'sprite',
-            context.imagePath('sprite.svg'),
-            d3.entries(iD.data.operations)));
+        defs.call(SVGSpriteDefinition(
+            'iD-sprite',
+            context.imagePath('iD-sprite.svg')));
 
-        defs.call(SpriteDefinition(
+        defs.call(SVGSpriteDefinition(
             'maki-sprite',
-            context.imagePath('maki-sprite.png'),
-            maki));
+            context.imagePath('maki-sprite.svg')));
+    };
+};
+iD.svg.Icon = function(name, svgklass, useklass) {
+    return function (selection) {
+        selection.selectAll('svg')
+            .data([0])
+            .enter()
+            .append('svg')
+            .attr('class', 'icon ' + (svgklass || ''))
+            .append('use')
+            .attr('xlink:href', name)
+            .attr('class', useklass);
     };
 };
 iD.svg.Labels = function(projection, context) {
@@ -26157,19 +30150,18 @@ iD.svg.Labels = function(projection, context) {
     }
 
     function drawAreaIcons(group, entities, filter, classes, labels) {
-
         var icons = group.selectAll('use')
             .filter(filter)
             .data(entities, iD.Entity.key);
 
         icons.enter()
             .append('use')
-            .attr('clip-path', 'url(#clip-square-18)')
-            .attr('class', 'icon');
+            .attr('width', '18px')
+            .attr('height', '18px');
 
         icons.attr('transform', get(labels, 'transform'))
             .attr('xlink:href', function(d) {
-                return '#maki-' + context.presets().match(d, context.graph()).icon + '-18';
+                return '#' + context.presets().match(d, context.graph()).icon + '-18';
             });
 
 
@@ -26178,7 +30170,7 @@ iD.svg.Labels = function(projection, context) {
 
     function reverse(p) {
         var angle = Math.atan2(p[1][1] - p[0][1], p[1][0] - p[0][0]);
-        return !(p[0][0] < p[p.length - 1][0] && angle < Math.PI/2 && angle > - Math.PI/2);
+        return !(p[0][0] < p[p.length - 1][0] && angle < Math.PI/2 && angle > -Math.PI/2);
     }
 
     function lineString(nodes) {
@@ -26275,7 +30267,7 @@ iD.svg.Labels = function(projection, context) {
             if (!icon && !iD.util.displayName(entity))
                 continue;
 
-            for (k = 0; k < label_stack.length; k ++) {
+            for (k = 0; k < label_stack.length; k++) {
                 if (geometry === label_stack[k][0] && entity.tags[label_stack[k][1]]) {
                     labelable[k].push(entity);
                     break;
@@ -26298,7 +30290,7 @@ iD.svg.Labels = function(projection, context) {
         // Try and find a valid label for labellable entities
         for (k = 0; k < labelable.length; k++) {
             var font_size = font_sizes[k];
-            for (i = 0; i < labelable[k].length; i ++) {
+            for (i = 0; i < labelable[k].length; i++) {
                 entity = labelable[k][i];
                 var name = iD.util.displayName(entity),
                     width = name && textWidth(name, font_size),
@@ -26339,7 +30331,7 @@ iD.svg.Labels = function(projection, context) {
                 length = iD.geo.pathLength(nodes);
             if (length < width + 20) return;
 
-            for (var i = 0; i < lineOffsets.length; i ++) {
+            for (var i = 0; i < lineOffsets.length; i++) {
                 var offset = lineOffsets[i],
                     middle = offset / 100 * length,
                     start = middle - width/2;
@@ -26367,7 +30359,7 @@ iD.svg.Labels = function(projection, context) {
                 entitywidth = projection(extent[1])[0] - projection(extent[0])[0],
                 rect;
 
-            if (!centroid || entitywidth < 20) return;
+            if (isNaN(centroid[0]) || entitywidth < 20) return;
 
             var iconX = centroid[0] - (iconSize/2),
                 iconY = centroid[1] - (iconSize/2),
@@ -26678,7 +30670,10 @@ iD.svg.Points = function(projection, context) {
 
     return function drawPoints(surface, entities, filter) {
         var graph = context.graph(),
-            points = _.filter(entities, function(e) { return e.geometry(graph) === 'point'; });
+            wireframe = surface.classed('fill-wireframe'),
+            points = wireframe ? [] : _.filter(entities, function(e) {
+                return e.geometry(graph) === 'point';
+            });
 
         points.sort(sortY);
 
@@ -26698,9 +30693,10 @@ iD.svg.Points = function(projection, context) {
             .call(markerPath, 'stroke');
 
         group.append('use')
-            .attr('class', 'icon')
             .attr('transform', 'translate(-6, -20)')
-            .attr('clip-path', 'url(#clip-square-12)');
+            .attr('class', 'icon')
+            .attr('width', '12px')
+            .attr('height', '12px');
 
         groups.attr('transform', iD.svg.PointTransform(projection))
             .call(iD.svg.TagClasses());
@@ -26712,7 +30708,7 @@ iD.svg.Points = function(projection, context) {
         groups.select('.icon')
             .attr('xlink:href', function(entity) {
                 var preset = context.presets().match(entity, context.graph());
-                return preset.icon ? '#maki-' + preset.icon + '-12' : '';
+                return preset.icon ? '#' + preset.icon + '-12' : '';
             });
 
         groups.exit()
@@ -26734,20 +30730,26 @@ iD.svg.Surface = function() {
     };
 };
 iD.svg.TagClasses = function() {
-    var primary = [
+    var primaries = [
             'building', 'highway', 'railway', 'waterway', 'aeroway',
             'motorway', 'boundary', 'power', 'amenity', 'natural', 'landuse',
             'leisure', 'place'
         ],
-        secondary = [
-            'oneway', 'bridge', 'tunnel', 'construction', 'embankment', 'cutting'
+        statuses = [
+            'proposed', 'construction', 'disused', 'abandoned', 'dismantled',
+            'razed', 'demolished', 'obliterated'
+        ],
+        secondaries = [
+            'oneway', 'bridge', 'tunnel', 'embankment', 'cutting', 'barrier'
         ],
         tagClassRe = /^tag-/,
         tags = function(entity) { return entity.tags; };
 
+
     var tagClasses = function(selection) {
         selection.each(function tagClassesEach(entity) {
-            var classes, value = this.className;
+            var value = this.className,
+                classes, primary, status;
 
             if (value.baseVal !== undefined) value = value.baseVal;
 
@@ -26757,16 +30759,52 @@ iD.svg.TagClasses = function() {
 
             var t = tags(entity), i, k, v;
 
-            for (i = 0; i < primary.length; i++) {
-                k = primary[i];
+            // pick at most one primary classification tag..
+            for (i = 0; i < primaries.length; i++) {
+                k = primaries[i];
                 v = t[k];
                 if (!v || v === 'no') continue;
-                classes += ' tag-' + k + ' tag-' + k + '-' + v;
+
+                primary = k;
+                if (statuses.indexOf(v) !== -1) {   // e.g. `railway=abandoned`
+                    status = v;
+                    classes += ' tag-' + k;
+                } else {
+                    classes += ' tag-' + k + ' tag-' + k + '-' + v;
+                }
+
                 break;
             }
 
-            for (i = 0; i < secondary.length; i++) {
-                k = secondary[i];
+            // add at most one ephemeral status tag, only if relates to primary tag..
+            if (!status) {
+                for (i = 0; i < statuses.length; i++) {
+                    k = statuses[i];
+                    v = t[k];
+                    if (!v || v === 'no') continue;
+
+                    if (v === 'yes') {   // e.g. `railway=rail + abandoned=yes`
+                        status = k;
+                    }
+                    else if (primary && primary === v) {  // e.g. `railway=rail + abandoned=railway`
+                        status = k;
+                    } else if (!primary && primaries.indexOf(v) !== -1) {  // e.g. `abandoned=railway`
+                        status = k;
+                        primary = v;
+                        classes += ' tag-' + v;
+                    }  // else ignore e.g.  `highway=path + abandoned=railway`
+
+                    if (status) break;
+                }
+            }
+
+            if (status) {
+                classes += ' tag-ephemeral';
+            }
+
+            // add any secondary (structure) tags
+            for (i = 0; i < secondaries.length; i++) {
+                k = secondaries[i];
                 v = t[k];
                 if (!v || v === 'no') continue;
                 classes += ' tag-' + k + ' tag-' + k + '-' + v;
@@ -26797,9 +30835,9 @@ iD.svg.Turns = function(projection) {
         function icon(turn) {
             var u = turn.u ? '-u' : '';
             if (!turn.restriction)
-                return '#icon-restriction-yes' + u;
+                return '#turn-yes' + u;
             var restriction = graph.entity(turn.restriction).tags.restriction;
-            return '#icon-restriction-' +
+            return '#turn-' +
                 (!turn.indirect_restriction && /^only_/.test(restriction) ? 'only' : 'no') + u;
         }
 
@@ -26807,20 +30845,20 @@ iD.svg.Turns = function(projection) {
             .data(turns, key);
 
         // Enter
-
         var enter = groups.enter().append('g')
             .attr('class', 'turn');
 
         var nEnter = enter.filter(function (turn) { return !turn.u; });
 
         nEnter.append('rect')
-            .attr('transform', 'translate(-12, -12)')
-            .attr('width', '45')
-            .attr('height', '25');
+            .attr('transform', 'translate(-22, -12)')
+            .attr('width', '44')
+            .attr('height', '24');
 
         nEnter.append('use')
-            .attr('transform', 'translate(-12, -12)')
-            .attr('clip-path', 'url(#clip-square-45)');
+            .attr('width', '44')
+            .attr('height', '24');
+
 
         var uEnter = enter.filter(function (turn) { return turn.u; });
 
@@ -26828,11 +30866,11 @@ iD.svg.Turns = function(projection) {
             .attr('r', '16');
 
         uEnter.append('use')
-            .attr('transform', 'translate(-16, -16)')
-            .attr('clip-path', 'url(#clip-square-32)');
+            .attr('width', '32')
+            .attr('height', '32');
 
-        // Update
 
+        // Update
         groups
             .attr('transform', function (turn) {
                 var v = graph.entity(turn.via.node),
@@ -26841,7 +30879,7 @@ iD.svg.Turns = function(projection) {
                     p = projection(v.loc),
                     r = turn.u ? 0 : 60;
 
-                return 'translate(' + (r * Math.cos(a) + p[0]) + ',' + (r * Math.sin(a) + p[1]) + ')' +
+                return 'translate(' + (r * Math.cos(a) + p[0]) + ',' + (r * Math.sin(a) + p[1]) + ') ' +
                     'rotate(' + a * 180 / Math.PI + ')';
             });
 
@@ -26851,8 +30889,8 @@ iD.svg.Turns = function(projection) {
         groups.select('rect');
         groups.select('circle');
 
-        // Exit
 
+        // Exit
         groups.exit()
             .remove();
 
@@ -26980,8 +31018,9 @@ iD.svg.Vertices = function(projection, context) {
         enter.filter(function(d) { return icon(d); })
             .append('use')
             .attr('transform', 'translate(-6, -6)')
-            .attr('clip-path', 'url(#clip-square-12)')
-            .attr('xlink:href', function(d) { return '#maki-' + icon(d) + '-12'; });
+            .attr('xlink:href', function(d) { return '#' + icon(d) + '-12'; })
+            .attr('width', '12px')
+            .attr('height', '12px');
 
         // Vertices with tags get a fill.
         enter.filter(function(d) { return d.hasInterestingTags(); })
@@ -26999,12 +31038,19 @@ iD.svg.Vertices = function(projection, context) {
 
     function drawVertices(surface, graph, entities, filter, extent, zoom) {
         var selected = siblingAndChildVertices(context.selectedIDs(), graph, extent),
+            wireframe = surface.classed('fill-wireframe'),
             vertices = [];
 
         for (var i = 0; i < entities.length; i++) {
-            var entity = entities[i];
+            var entity = entities[i],
+                geometry = entity.geometry(graph);
+
+            if (wireframe && geometry === 'point') {
+                vertices.push(entity);
+                continue;
+            }
 
-            if (entity.geometry(graph) !== 'vertex')
+            if (geometry !== 'vertex')
                 continue;
 
             if (entity.id in selected ||
@@ -27071,6 +31117,16 @@ iD.ui = function(context) {
             .attr('id', 'map')
             .call(map);
 
+        content.append('div')
+            .attr('class', 'map-in-map')
+            .style('display', 'none')
+            .call(iD.ui.MapInMap(context));
+
+        content.append('div')
+            .attr('class', 'infobox fillD2')
+            .style('display', 'none')
+            .call(iD.ui.Info(context));
+
         bar.append('div')
             .attr('class', 'spacer col4');
 
@@ -27089,6 +31145,10 @@ iD.ui = function(context) {
             .attr('class', 'button-wrap col1')
             .call(iD.ui.Save(context));
 
+        bar.append('div')
+            .attr('class', 'full-screen')
+            .call(iD.ui.FullScreen(context));
+
         bar.append('div')
             .attr('class', 'spinner')
             .call(iD.ui.Spinner(context));
@@ -27127,6 +31187,10 @@ iD.ui = function(context) {
             .attr('id', 'footer')
             .attr('class', 'fillD');
 
+        footer.append('div')
+            .attr('class', 'api-status')
+            .call(iD.ui.Status(context));
+
         footer.append('div')
             .attr('id', 'scale-block')
             .call(iD.ui.Scale(context));
@@ -27147,20 +31211,28 @@ iD.ui = function(context) {
             .attr('href', 'http://github.com/openstreetmap/iD')
             .text(iD.version);
 
-        var bugReport = aboutList.append('li')
-            .append('a')
+        var issueLinks = aboutList.append('li');
+
+        issueLinks.append('a')
             .attr('target', '_blank')
             .attr('tabindex', -1)
-            .attr('href', 'https://github.com/openstreetmap/iD/issues');
-
-        bugReport.append('span')
-            .attr('class','icon bug light');
-
-        bugReport.call(bootstrap.tooltip()
+            .attr('href', 'https://github.com/openstreetmap/iD/issues')
+            .call(iD.svg.Icon('#icon-bug', 'light'))
+            .call(bootstrap.tooltip()
                 .title(t('report_a_bug'))
                 .placement('top')
             );
 
+        issueLinks.append('a')
+            .attr('target', '_blank')
+            .attr('tabindex', -1)
+            .attr('href', 'https://github.com/openstreetmap/iD/blob/master/CONTRIBUTING.md#translating')
+            .call(iD.svg.Icon('#icon-translate', 'light'))
+            .call(bootstrap.tooltip()
+                .title(t('help_translate'))
+                .placement('top')
+            );
+
         aboutList.append('li')
             .attr('class', 'feature-warning')
             .attr('tabindex', -1)
@@ -27171,10 +31243,6 @@ iD.ui = function(context) {
             .attr('tabindex', -1)
             .call(iD.ui.Contributors(context));
 
-        footer.append('div')
-            .attr('class', 'api-status')
-            .call(iD.ui.Status(context));
-
         window.onbeforeunload = function() {
             return context.save();
         };
@@ -27183,25 +31251,37 @@ iD.ui = function(context) {
             context.history().unlock();
         };
 
+        var mapDimensions = map.dimensions();
+
         d3.select(window).on('resize.editor', function() {
+            mapDimensions = m.dimensions();
             map.dimensions(m.dimensions());
         });
 
         function pan(d) {
             return function() {
+                d3.event.preventDefault();
                 context.pan(d);
             };
         }
 
         // pan amount
-        var pa = 5;
+        var pa = 10;
 
         var keybinding = d3.keybinding('main')
             .on('⌫', function() { d3.event.preventDefault(); })
             .on('←', pan([pa, 0]))
             .on('↑', pan([0, pa]))
             .on('→', pan([-pa, 0]))
-            .on('↓', pan([0, -pa]));
+            .on('↓', pan([0, -pa]))
+            .on('⇧←', pan([mapDimensions[0], 0]))
+            .on('⇧↑', pan([0, mapDimensions[1]]))
+            .on('⇧→', pan([-mapDimensions[0], 0]))
+            .on('⇧↓', pan([0, -mapDimensions[1]]))
+            .on(iD.ui.cmd('⌘←'), pan([mapDimensions[0], 0]))
+            .on(iD.ui.cmd('⌘↑'), pan([0, mapDimensions[1]]))
+            .on(iD.ui.cmd('⌘→'), pan([-mapDimensions[0], 0]))
+            .on(iD.ui.cmd('⌘↓'), pan([0, -mapDimensions[1]]));
 
         d3.select(document)
             .call(keybinding);
@@ -27276,11 +31356,11 @@ iD.ui.Account = function(context) {
             // Add thumbnail or dont
             if (details.image_url) {
                 userLink.append('img')
-                    .attr('class', 'icon icon-pre-text user-icon')
+                    .attr('class', 'icon pre-text user-icon')
                     .attr('src', details.image_url);
             } else {
-                userLink.append('span')
-                    .attr('class', 'icon avatar light icon-pre-text');
+                userLink
+                    .call(iD.svg.Icon('#icon-avatar', 'pre-text light'));
             }
 
             // Add user name
@@ -27401,11 +31481,11 @@ iD.ui.Background = function(context) {
             ['right', [-1, 0]],
             ['bottom', [0, 1]]],
         opacityDefault = (context.storage('background-opacity') !== null) ?
-            (+context.storage('background-opacity')) : 0.5,
-        customTemplate = '';
+            (+context.storage('background-opacity')) : 1.0,
+        customTemplate = context.storage('background-custom-template') || '';
 
     // Can be 0 from <1.3.0 use or due to issue #1923.
-    if (opacityDefault === 0) opacityDefault = 0.5;
+    if (opacityDefault === 0) opacityDefault = 1.0;
 
     function background(selection) {
 
@@ -27458,6 +31538,7 @@ iD.ui.Background = function(context) {
         function setCustom(template) {
             context.background().baseLayerSource(iD.BackgroundSource.Custom(template));
             selectLayer();
+            context.storage('background-custom-template', template);
         }
 
         function clickSetOverlay(d) {
@@ -27579,13 +31660,10 @@ iD.ui.Background = function(context) {
             button = selection.append('button')
                 .attr('tabindex', -1)
                 .on('click', toggle)
+                .call(iD.svg.Icon('#icon-layers', 'light'))
                 .call(tooltip),
             shown = false;
 
-        button.append('span')
-            .attr('class', 'icon layers light');
-
-
         var opa = content.append('div')
                 .attr('class', 'opacity-options-wrapper');
 
@@ -27608,7 +31686,7 @@ iD.ui.Background = function(context) {
                 .placement('left'))
             .append('div')
             .attr('class', 'opacity')
-            .style('opacity', String);
+            .style('opacity', function(d) { return 1.25 - d; });
 
         var backgroundList = content.append('ul')
             .attr('class', 'layer-list');
@@ -27623,8 +31701,7 @@ iD.ui.Background = function(context) {
                 .title(t('background.custom_button'))
                 .placement('left'))
             .on('click', editCustom)
-            .append('span')
-            .attr('class', 'icon geocode');
+            .call(iD.svg.Icon('#icon-search'));
 
         var label = custom.append('label');
 
@@ -27645,6 +31722,28 @@ iD.ui.Background = function(context) {
         var overlayList = content.append('ul')
             .attr('class', 'layer-list');
 
+        var controls = content.append('div')
+            .attr('class', 'controls-list');
+
+        var minimapLabel = controls
+            .append('label')
+            .call(bootstrap.tooltip()
+                .html(true)
+                .title(iD.ui.tooltipHtml(t('background.minimap.tooltip'), '/'))
+                .placement('top')
+            );
+
+        minimapLabel.classed('minimap-toggle', true)
+            .append('input')
+            .attr('type', 'checkbox')
+            .on('change', function() {
+                iD.ui.MapInMap.toggle();
+                d3.event.preventDefault();
+            });
+
+        minimapLabel.append('span')
+            .text(t('background.minimap.description'));
+
         var adjustments = content.append('div')
             .attr('class', 'adjustments');
 
@@ -27670,15 +31769,14 @@ iD.ui.Background = function(context) {
             .attr('class', function(d) { return d[0] + ' nudge'; })
             .on('mousedown', clickNudge);
 
-        var resetButton = nudgeContainer.append('button')
+        var resetButton = nudgeContainer
+            .append('button')
             .attr('class', 'reset disabled')
             .on('click', function () {
                 context.background().offset([0, 0]);
                 resetButton.classed('disabled', true);
-            });
-
-        resetButton.append('div')
-            .attr('class', 'icon undo');
+            })
+            .call(iD.svg.Icon('#icon-undo'));
 
         context.map()
             .on('move.background-update', _.debounce(update, 1000));
@@ -27706,33 +31804,35 @@ iD.ui.Background = function(context) {
 // Translate a MacOS key command into the appropriate Windows/Linux equivalent.
 // For example, ⌘Z -> Ctrl+Z
 iD.ui.cmd = function(code) {
-    if (iD.detect().os === 'mac')
+    if (iD.detect().os === 'mac') {
         return code;
-
-    var replacements = {
-        '⌘': 'Ctrl',
-        '⇧': 'Shift',
-        '⌥': 'Alt',
-        '⌫': 'Backspace',
-        '⌦': 'Delete'
-    }, keys = [];
+    }
 
     if (iD.detect().os === 'win') {
         if (code === '⌘⇧Z') return 'Ctrl+Y';
     }
 
+    var result = '',
+        replacements = {
+            '⌘': 'Ctrl',
+            '⇧': 'Shift',
+            '⌥': 'Alt',
+            '⌫': 'Backspace',
+            '⌦': 'Delete'
+        };
+
     for (var i = 0; i < code.length; i++) {
         if (code[i] in replacements) {
-            keys.push(replacements[code[i]]);
+            result += replacements[code[i]] + '+';
         } else {
-            keys.push(code[i]);
+            result += code[i];
         }
     }
 
-    return keys.join('+');
+    return result;
 };
 iD.ui.Commit = function(context) {
-    var event = d3.dispatch('cancel', 'save');
+    var dispatch = d3.dispatch('cancel', 'save');
 
     function commit(selection) {
         var changes = context.history().changes(),
@@ -27752,18 +31852,13 @@ iD.ui.Commit = function(context) {
         var header = selection.append('div')
             .attr('class', 'header fillL');
 
-        header.append('button')
-            .attr('class', 'fr')
-            .on('click', event.cancel)
-            .append('span')
-            .attr('class', 'icon close');
-
         header.append('h3')
             .text(t('commit.title'));
 
         var body = selection.append('div')
             .attr('class', 'body');
 
+
         // Comment Section
         var commentSection = body.append('div')
             .attr('class', 'modal-section form-field commit-form');
@@ -27776,15 +31871,20 @@ iD.ui.Commit = function(context) {
             .attr('placeholder', t('commit.description_placeholder'))
             .attr('maxlength', 255)
             .property('value', context.storage('comment') || '')
-            .on('blur.save', function () {
+            .on('input.save', function() {
+                d3.selectAll('.save-section .save-button')
+                    .attr('disabled', (this.value.length ? null : true));
+            })
+            .on('blur.save', function() {
                 context.storage('comment', this.value);
             });
 
         commentField.node().select();
 
+
         // Warnings
         var warnings = body.selectAll('div.warning-section')
-            .data([iD.validate(changes, context.graph())])
+            .data([context.history().validate(changes)])
             .enter()
             .append('div')
             .attr('class', 'modal-section warning-section fillL2')
@@ -27805,12 +31905,13 @@ iD.ui.Commit = function(context) {
             .on('mouseout', mouseout)
             .on('click', warningClick);
 
-        warningLi.append('span')
-            .attr('class', 'alert icon icon-pre-text');
+        warningLi
+            .call(iD.svg.Icon('#icon-alert', 'pre-text'));
 
-        warningLi.append('strong').text(function(d) {
-            return d.message;
-        });
+        warningLi
+            .append('strong').text(function(d) {
+                return d.message;
+            });
 
         warningLi.filter(function(d) { return d.tooltip; })
             .call(bootstrap.tooltip()
@@ -27818,9 +31919,10 @@ iD.ui.Commit = function(context) {
                 .placement('top')
             );
 
-        // Save Section
+
+        // Upload Explanation
         var saveSection = body.append('div')
-            .attr('class','modal-section fillL cf');
+            .attr('class','modal-section save-section fillL cf');
 
         var prose = saveSection.append('p')
             .attr('class', 'commit-info')
@@ -27834,7 +31936,7 @@ iD.ui.Commit = function(context) {
             if (user.image_url) {
                 userLink.append('img')
                     .attr('src', user.image_url)
-                    .attr('class', 'icon icon-pre-text user-icon');
+                    .attr('class', 'icon pre-text user-icon');
             }
 
             userLink.append('a')
@@ -27847,11 +31949,19 @@ iD.ui.Commit = function(context) {
             prose.html(t('commit.upload_explanation_with_user', {user: userLink.html()}));
         });
 
-        // Confirm Button
-        var saveButton = saveSection.append('button')
-            .attr('class', 'action col4 button')
+
+        // Buttons
+        var buttonSection = saveSection.append('div')
+            .attr('class','buttons fillL cf');
+
+        var saveButton = buttonSection.append('button')
+            .attr('class', 'action col5 button save-button')
+            .attr('disabled', function() {
+                var n = d3.select('.commit-form textarea').node();
+                return (n && n.value.length) ? null : true;
+            })
             .on('click.save', function() {
-                event.save({
+                dispatch.save({
                     comment: commentField.node().value
                 });
             });
@@ -27860,6 +31970,16 @@ iD.ui.Commit = function(context) {
             .attr('class', 'label')
             .text(t('commit.save'));
 
+        var cancelButton = buttonSection.append('button')
+            .attr('class', 'action col5 button cancel-button')
+            .on('click.cancel', function() { dispatch.cancel(); });
+
+        cancelButton.append('span')
+            .attr('class', 'label')
+            .text(t('commit.cancel'));
+
+
+        // Changes
         var changeSection = body.selectAll('div.commit-section')
             .data([0])
             .enter()
@@ -27879,10 +31999,10 @@ iD.ui.Commit = function(context) {
             .on('mouseout', mouseout)
             .on('click', zoomToEntity);
 
-        li.append('span')
-            .attr('class', function(d) {
-                return d.entity.geometry(d.graph) + ' ' + d.changeType + ' icon icon-pre-text';
-            });
+        li.each(function(d) {
+            d3.select(this)
+                .call(iD.svg.Icon('#icon-' + d.entity.geometry(d.graph), 'pre-text ' + d.changeType));
+        });
 
         li.append('span')
             .attr('class', 'change-type')
@@ -27936,7 +32056,7 @@ iD.ui.Commit = function(context) {
         }
     }
 
-    return d3.rebind(commit, event, 'on');
+    return d3.rebind(commit, dispatch, 'on');
 };
 iD.ui.confirm = function(selection) {
     var modal = iD.ui.modal(selection);
@@ -27952,18 +32072,273 @@ iD.ui.confirm = function(selection) {
     section.append('div')
         .attr('class', 'modal-section message-text');
 
-    var buttonwrap = section.append('div')
+    var buttons = section.append('div')
         .attr('class', 'modal-section buttons cf');
 
-    buttonwrap.append('button')
-        .attr('class', 'col2 action')
-        .on('click.confirm', function() {
-            modal.remove();
-        })
-        .text(t('confirm.okay'));
+    modal.okButton = function() {
+        buttons
+            .append('button')
+            .attr('class', 'action col4')
+            .on('click.confirm', function() {
+                modal.remove();
+            })
+            .text(t('confirm.okay'));
+
+        return modal;
+    };
 
     return modal;
 };
+iD.ui.Conflicts = function(context) {
+    var dispatch = d3.dispatch('download', 'cancel', 'save'),
+        list;
+
+    function conflicts(selection) {
+        var header = selection
+            .append('div')
+            .attr('class', 'header fillL');
+
+        header
+            .append('button')
+            .attr('class', 'fr')
+            .on('click', function() { dispatch.cancel(); })
+            .call(iD.svg.Icon('#icon-close'));
+
+        header
+            .append('h3')
+            .text(t('save.conflict.header'));
+
+        var body = selection
+            .append('div')
+            .attr('class', 'body fillL');
+
+        body
+            .append('div')
+            .attr('class', 'conflicts-help')
+            .text(t('save.conflict.help'))
+            .append('a')
+            .attr('class', 'conflicts-download')
+            .text(t('save.conflict.download_changes'))
+            .on('click.download', function() { dispatch.download(); });
+
+        body
+            .append('div')
+            .attr('class', 'conflict-container fillL3')
+            .call(showConflict, 0);
+
+        body
+            .append('div')
+            .attr('class', 'conflicts-done')
+            .attr('opacity', 0)
+            .style('display', 'none')
+            .text(t('save.conflict.done'));
+
+        var buttons = body
+            .append('div')
+            .attr('class','buttons col12 joined conflicts-buttons');
+
+        buttons
+            .append('button')
+            .attr('disabled', list.length > 1)
+            .attr('class', 'action conflicts-button col6')
+            .text(t('save.title'))
+            .on('click.try_again', function() { dispatch.save(); });
+
+        buttons
+            .append('button')
+            .attr('class', 'secondary-action conflicts-button col6')
+            .text(t('confirm.cancel'))
+            .on('click.cancel', function() { dispatch.cancel(); });
+    }
+
+
+    function showConflict(selection, index) {
+        if (index < 0 || index >= list.length) return;
+
+        var parent = d3.select(selection.node().parentElement);
+
+        // enable save button if this is the last conflict being reviewed..
+        if (index === list.length - 1) {
+            window.setTimeout(function() {
+                parent.select('.conflicts-button')
+                    .attr('disabled', null);
+
+                parent.select('.conflicts-done')
+                    .transition()
+                    .attr('opacity', 1)
+                    .style('display', 'block');
+            }, 250);
+        }
+
+        var item = selection
+            .selectAll('.conflict')
+            .data([list[index]]);
+
+        var enter = item.enter()
+            .append('div')
+            .attr('class', 'conflict');
+
+        enter
+            .append('h4')
+            .attr('class', 'conflict-count')
+            .text(t('save.conflict.count', { num: index + 1, total: list.length }));
+
+        enter
+            .append('a')
+            .attr('class', 'conflict-description')
+            .attr('href', '#')
+            .text(function(d) { return d.name; })
+            .on('click', function(d) {
+                zoomToEntity(d.id);
+                d3.event.preventDefault();
+            });
+
+        var details = enter
+            .append('div')
+            .attr('class', 'conflict-detail-container');
+
+        details
+            .append('ul')
+            .attr('class', 'conflict-detail-list')
+            .selectAll('li')
+            .data(function(d) { return d.details || []; })
+            .enter()
+            .append('li')
+            .attr('class', 'conflict-detail-item')
+            .html(function(d) { return d; });
+
+        details
+            .append('div')
+            .attr('class', 'conflict-choices')
+            .call(addChoices);
+
+        details
+            .append('div')
+            .attr('class', 'conflict-nav-buttons joined cf')
+            .selectAll('button')
+            .data(['previous', 'next'])
+            .enter()
+            .append('button')
+            .text(function(d) { return t('save.conflict.' + d); })
+            .attr('class', 'conflict-nav-button action col6')
+            .attr('disabled', function(d, i) {
+                return (i === 0 && index === 0) ||
+                    (i === 1 && index === list.length - 1) || null;
+            })
+            .on('click', function(d, i) {
+                var container = parent.select('.conflict-container'),
+                sign = (i === 0 ? -1 : 1);
+
+                container
+                    .selectAll('.conflict')
+                    .remove();
+
+                container
+                    .call(showConflict, index + sign);
+
+                d3.event.preventDefault();
+            });
+
+        item.exit()
+            .remove();
+
+    }
+
+    function addChoices(selection) {
+        var choices = selection
+            .append('ul')
+            .attr('class', 'layer-list')
+            .selectAll('li')
+            .data(function(d) { return d.choices || []; });
+
+        var enter = choices.enter()
+            .append('li')
+            .attr('class', 'layer');
+
+        var label = enter
+            .append('label');
+
+        label
+            .append('input')
+            .attr('type', 'radio')
+            .attr('name', function(d) { return d.id; })
+            .on('change', function(d, i) {
+                var ul = this.parentElement.parentElement.parentElement;
+                ul.__data__.chosen = i;
+                choose(ul, d);
+            });
+
+        label
+            .append('span')
+            .text(function(d) { return d.text; });
+
+        choices
+            .each(function(d, i) {
+                var ul = this.parentElement;
+                if (ul.__data__.chosen === i) choose(ul, d);
+            });
+    }
+
+    function choose(ul, datum) {
+        if (d3.event) d3.event.preventDefault();
+
+        d3.select(ul)
+            .selectAll('li')
+            .classed('active', function(d) { return d === datum; })
+            .selectAll('input')
+            .property('checked', function(d) { return d === datum; });
+
+        var extent = iD.geo.Extent(),
+            entity;
+
+        entity = context.graph().hasEntity(datum.id);
+        if (entity) extent._extend(entity.extent(context.graph()));
+
+        datum.action();
+
+        entity = context.graph().hasEntity(datum.id);
+        if (entity) extent._extend(entity.extent(context.graph()));
+
+        zoomToEntity(datum.id, extent);
+    }
+
+    function zoomToEntity(id, extent) {
+        context.surface().selectAll('.hover')
+            .classed('hover', false);
+
+        var entity = context.graph().hasEntity(id);
+        if (entity) {
+            if (extent) {
+                context.map().trimmedExtent(extent);
+            } else {
+                context.map().zoomTo(entity);
+            }
+            context.surface().selectAll(
+                iD.util.entityOrMemberSelector([entity.id], context.graph()))
+                .classed('hover', true);
+        }
+    }
+
+
+    // The conflict list should be an array of objects like:
+    // {
+    //     id: id,
+    //     name: entityName(local),
+    //     details: merge.conflicts(),
+    //     chosen: 1,
+    //     choices: [
+    //         choice(id, keepMine, forceLocal),
+    //         choice(id, keepTheirs, forceRemote)
+    //     ]
+    // }
+    conflicts.list = function(_) {
+        if (!arguments.length) return list;
+        list = _;
+        return conflicts;
+    };
+
+    return d3.rebind(conflicts, dispatch, 'on');
+};
 iD.ui.Contributors = function(context) {
     function update(selection) {
         var users = {},
@@ -27978,8 +32353,7 @@ iD.ui.Contributors = function(context) {
             subset = u.slice(0, u.length > limit ? limit - 1 : limit);
 
         selection.html('')
-            .append('span')
-            .attr('class', 'icon nearby light icon-pre-text');
+            .call(iD.svg.Icon('#icon-nearby', 'pre-text light'));
 
         var userList = d3.select(document.createElement('span'));
 
@@ -28021,7 +32395,7 @@ iD.ui.Contributors = function(context) {
     return function(selection) {
         update(selection);
 
-        context.connection().on('load.contributors', function() {
+        context.connection().on('loaded.contributors', function() {
             update(selection);
         });
 
@@ -28110,8 +32484,7 @@ iD.ui.EntityEditor = function(context) {
 
         $enter.append('button')
             .attr('class', 'fr preset-close')
-            .append('span')
-            .attr('class', 'icon close');
+            .call(iD.svg.Icon('#icon-close'));
 
         $enter.append('h3');
 
@@ -28219,14 +32592,46 @@ iD.ui.EntityEditor = function(context) {
     }
 
     function clean(o) {
+
+        function cleanVal(k, v) {
+            function keepSpaces(k) {
+                var whitelist = ['opening_hours', 'service_times', 'collection_times',
+                    'operating_times', 'smoking_hours', 'happy_hours'];
+                return _.any(whitelist, function(s) { return k.indexOf(s) !== -1; });
+            }
+
+            var blacklist = ['description', 'note', 'fixme'];
+            if (_.any(blacklist, function(s) { return k.indexOf(s) !== -1; })) return v;
+
+            var cleaned = v.split(';')
+                .map(function(s) { return s.trim(); })
+                .join(keepSpaces(k) ? '; ' : ';');
+
+            // The code below is not intended to validate websites and emails.
+            // It is only intended to prevent obvious copy-paste errors. (#2323)
+
+            // clean website-like tags
+            if (k.indexOf('website') !== -1 || cleaned.indexOf('http') === 0) {
+                cleaned = cleaned
+                    .replace(/[\u200B-\u200F\uFEFF]/g, '')  // strip LRM and other zero width chars
+                    .replace(/[^\w\+\-\.\/\?\[\]\(\)~!@#$%&*',:;=]/g, encodeURIComponent);
+
+            // clean email-like tags
+            } else if (k.indexOf('email') !== -1) {
+                cleaned = cleaned
+                    .replace(/[\u200B-\u200F\uFEFF]/g, '')  // strip LRM and other zero width chars
+                    .replace(/[^\w\+\-\.\/\?\|~!@#$%^&*'`{};=]/g, '');  // note: ';' allowed as OSM delimiter
+            }
+
+            return cleaned;
+        }
+
         var out = {}, k, v;
-        /*jshint -W083 */
         for (k in o) {
             if (k && (v = o[k]) !== undefined) {
-                out[k] = v.split(';').map(function(s) { return s.trim(); }).join(';');
+                out[k] = cleanVal(k, v);
             }
         }
-        /*jshint +W083 */
         return out;
     }
 
@@ -28344,8 +32749,8 @@ iD.ui.FeatureList = function(context) {
             .on('keypress', keypress)
             .on('input', inputevent);
 
-        searchWrap.append('span')
-            .attr('class', 'icon search');
+        searchWrap
+            .call(iD.svg.Icon('#icon-search', 'pre-text'));
 
         var listWrap = selection.append('div')
             .attr('class', 'inspector-body');
@@ -28452,10 +32857,8 @@ iD.ui.FeatureList = function(context) {
                 .data([0])
                 .enter().append('button')
                 .property('disabled', true)
-                .attr('class', 'no-results-item');
-
-            resultsIndicator.append('span')
-                .attr('class', 'icon alert');
+                .attr('class', 'no-results-item')
+                .call(iD.svg.Icon('#icon-alert', 'pre-text'));
 
             resultsIndicator.append('span')
                 .attr('class', 'entity-name');
@@ -28487,17 +32890,21 @@ iD.ui.FeatureList = function(context) {
             var items = list.selectAll('.feature-list-item')
                 .data(results, function(d) { return d.id; });
 
-            var enter = items.enter().insert('button', '.geocode-item')
+            var enter = items.enter()
+                .insert('button', '.geocode-item')
                 .attr('class', 'feature-list-item')
                 .on('mouseover', mouseover)
                 .on('mouseout', mouseout)
                 .on('click', click);
 
-            var label = enter.append('div')
+            var label = enter
+                .append('div')
                 .attr('class', 'label');
 
-            label.append('span')
-                .attr('class', function(d) { return d.geometry + ' icon icon-pre-text'; });
+            label.each(function(d) {
+                d3.select(this)
+                    .call(iD.svg.Icon('#icon-' + d.geometry, 'pre-text'));
+            });
 
             label.append('span')
                 .attr('class', 'entity-type')
@@ -28537,7 +32944,7 @@ iD.ui.FeatureList = function(context) {
             else if (d.entity) {
                 context.enter(iD.modes.Select(context, [d.entity.id]));
             } else {
-                context.loadEntity(d.id);
+                context.zoomToEntity(d.id);
             }
         }
 
@@ -28571,6 +32978,79 @@ iD.ui.flash = function(selection) {
 
     return modal;
 };
+iD.ui.FullScreen = function(context) {
+    var element = context.container().node(),
+        keybinding = d3.keybinding('full-screen');
+        // button;
+
+    function getFullScreenFn() {
+        if (element.requestFullscreen) {
+            return element.requestFullscreen;
+        } else if (element.msRequestFullscreen) {
+            return  element.msRequestFullscreen;
+        } else if (element.mozRequestFullScreen) {
+            return  element.mozRequestFullScreen;
+        } else if (element.webkitRequestFullscreen) {
+            return element.webkitRequestFullscreen;
+        }
+    }
+
+    function getExitFullScreenFn() {
+        if (document.exitFullscreen) {
+            return document.exitFullscreen;
+        } else if (document.msExitFullscreen) {
+            return  document.msExitFullscreen;
+        } else if (document.mozCancelFullScreen) {
+            return  document.mozCancelFullScreen;
+        } else if (document.webkitExitFullscreen) {
+            return document.webkitExitFullscreen;
+        }
+    }
+
+    function isFullScreen() {
+        return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ||
+            document.msFullscreenElement;
+    }
+
+    function isSupported() {
+        return !!getFullScreenFn();
+    }
+
+    function fullScreen() {
+        d3.event.preventDefault();
+        if (!isFullScreen()) {
+            // button.classed('active', true);
+            getFullScreenFn().apply(element);
+        } else {
+            // button.classed('active', false);
+            getExitFullScreenFn().apply(document);
+        }
+    }
+
+    return function() { // selection) {
+        if (!isSupported())
+            return;
+
+        // var tooltip = bootstrap.tooltip()
+        //     .placement('left');
+
+        // button = selection.append('button')
+        //     .attr('title', t('full_screen'))
+        //     .attr('tabindex', -1)
+        //     .on('click', fullScreen)
+        //     .call(tooltip);
+
+        // button.append('span')
+        //     .attr('class', 'icon full-screen');
+
+        keybinding
+            .on('f11', fullScreen)
+            .on(iD.ui.cmd('⌘⇧F'), fullScreen);
+
+        d3.select(document)
+            .call(keybinding);
+    };
+};
 iD.ui.Geolocate = function(map) {
     function click() {
         navigator.geolocation.getCurrentPosition(
@@ -28589,15 +33069,13 @@ iD.ui.Geolocate = function(map) {
     return function(selection) {
         if (!navigator.geolocation) return;
 
-        var button = selection.append('button')
+        selection.append('button')
             .attr('tabindex', -1)
             .attr('title', t('geolocate.title'))
             .on('click', click)
+            .call(iD.svg.Icon('#icon-geolocate', 'light'))
             .call(bootstrap.tooltip()
                 .placement('left'));
-
-         button.append('span')
-             .attr('class', 'icon geolocate light');
     };
 };
 iD.ui.Help = function(context) {
@@ -28663,7 +33141,7 @@ iD.ui.Help = function(context) {
 
         function clickHelp(d, i) {
             pane.property('scrollTop', 0);
-            doctitle.text(d.title);
+            doctitle.html(d.title);
             body.html(d.html);
             body.selectAll('a')
                 .attr('target', '_blank');
@@ -28679,8 +33157,7 @@ iD.ui.Help = function(context) {
                     .on('click', function() {
                         clickHelp(docs[i - 1], i - 1);
                     });
-                prevLink.append('span').attr('class', 'icon back blue');
-                prevLink.append('span').text(docs[i - 1].title);
+                prevLink.append('span').html('&#9668; ' + docs[i - 1].title);
             }
             if (i < docs.length - 1) {
                 var nextLink = nav.append('a')
@@ -28688,8 +33165,7 @@ iD.ui.Help = function(context) {
                     .on('click', function() {
                         clickHelp(docs[i + 1], i + 1);
                     });
-                nextLink.append('span').text(docs[i + 1].title);
-                nextLink.append('span').attr('class', 'icon forward blue');
+                nextLink.append('span').html(docs[i + 1].title + ' &#9658;');
             }
         }
 
@@ -28708,12 +33184,10 @@ iD.ui.Help = function(context) {
             button = selection.append('button')
                 .attr('tabindex', -1)
                 .on('click', toggle)
+                .call(iD.svg.Icon('#icon-help', 'light'))
                 .call(tooltip),
             shown = false;
 
-        button.append('span')
-            .attr('class', 'icon help light');
-
 
         var toc = pane.append('ul')
             .attr('class', 'toc');
@@ -28723,7 +33197,7 @@ iD.ui.Help = function(context) {
             .enter()
             .append('li')
             .append('a')
-            .text(function(d) { return d.title; })
+            .html(function(d) { return d.title; })
             .on('click', clickHelp);
 
         toc.append('li')
@@ -28760,6 +33234,231 @@ iD.ui.Help = function(context) {
 
     return help;
 };
+iD.ui.Info = function(context) {
+    var key = iD.ui.cmd('⌘I'),
+        imperial = (iD.detect().locale.toLowerCase() === 'en-us');
+
+    function info(selection) {
+        function radiansToMeters(r) {
+            // using WGS84 authalic radius (6371007.1809 m)
+            return r * 6371007.1809;
+        }
+
+        function steradiansToSqmeters(r) {
+            // http://gis.stackexchange.com/a/124857/40446
+            return r / 12.56637 * 510065621724000;
+        }
+
+        function toLineString(feature) {
+            if (feature.type === 'LineString') return feature;
+
+            var result = { type: 'LineString', coordinates: [] };
+            if (feature.type === 'Polygon') {
+                result.coordinates = feature.coordinates[0];
+            } else if (feature.type === 'MultiPolygon') {
+                result.coordinates = feature.coordinates[0][0];
+            }
+
+            return result;
+        }
+
+        function displayLength(m) {
+            var d = m * (imperial ? 3.28084 : 1),
+                p, unit;
+
+            if (imperial) {
+                if (d >= 5280) {
+                    d /= 5280;
+                    unit = 'mi';
+                } else {
+                    unit = 'ft';
+                }
+            } else {
+                if (d >= 1000) {
+                    d /= 1000;
+                    unit = 'km';
+                } else {
+                    unit = 'm';
+                }
+            }
+
+            // drop unnecessary precision
+            p = d > 1000 ? 0 : d > 100 ? 1 : 2;
+
+            return String(d.toFixed(p)) + ' ' + unit;
+        }
+
+        function displayArea(m2) {
+            var d = m2 * (imperial ? 10.7639111056 : 1),
+                d1, d2, p1, p2, unit1, unit2;
+
+            if (imperial) {
+                if (d >= 6969600) {     // > 0.25mi² show mi²
+                    d1 = d / 27878400;
+                    unit1 = 'mi²';
+                } else {
+                    d1 = d;
+                    unit1 = 'ft²';
+                }
+
+                if (d > 4356 && d < 43560000) {   // 0.1 - 1000 acres
+                    d2 = d / 43560;
+                    unit2 = 'ac';
+                }
+
+            } else {
+                if (d >= 250000) {    // > 0.25km² show km²
+                    d1 = d / 1000000;
+                    unit1 = 'km²';
+                } else {
+                    d1 = d;
+                    unit1 = 'm²';
+                }
+
+                if (d > 1000 && d < 10000000) {   // 0.1 - 1000 hectares
+                    d2 = d / 10000;
+                    unit2 = 'ha';
+                }
+            }
+
+            // drop unnecessary precision
+            p1 = d1 > 1000 ? 0 : d1 > 100 ? 1 : 2;
+            p2 = d2 > 1000 ? 0 : d2 > 100 ? 1 : 2;
+
+            return String(d1.toFixed(p1)) + ' ' + unit1 +
+                (d2 ? ' (' + String(d2.toFixed(p2)) + ' ' + unit2 + ')' : '');
+        }
+
+
+        function redraw() {
+            if (hidden()) return;
+
+            var resolver = context.graph(),
+                selected = _.filter(context.selectedIDs(), function(e) { return context.hasEntity(e); }),
+                singular = selected.length === 1 ? selected[0] : null,
+                extent = iD.geo.Extent(),
+                entity;
+
+            selection.html('');
+            selection.append('h4')
+                .attr('class', 'selection-heading fillD')
+                .text(singular || t('infobox.selected', { n: selected.length }));
+
+            if (!selected.length) return;
+
+            var center;
+            for (var i = 0; i < selected.length; i++) {
+                entity = context.entity(selected[i]);
+                extent._extend(entity.extent(resolver));
+            }
+            center = extent.center();
+
+
+            var list = selection.append('ul');
+
+            // multiple selection, just display extent center..
+            if (!singular) {
+                list.append('li')
+                    .text(t('infobox.center') + ': ' + center[0].toFixed(5) + ', ' + center[1].toFixed(5));
+                return;
+            }
+
+            // single selection, display details..
+            if (!entity) return;
+            var geometry = entity.geometry(resolver);
+
+            if (geometry === 'line' || geometry === 'area') {
+                var closed = (entity.type === 'relation') || (entity.isClosed() && !entity.isDegenerate()),
+                    feature = entity.asGeoJSON(resolver),
+                    length = radiansToMeters(d3.geo.length(toLineString(feature))),
+                    lengthLabel = t('infobox.' + (closed ? 'perimeter' : 'length')),
+                    centroid = d3.geo.centroid(feature);
+
+                list.append('li')
+                    .text(t('infobox.geometry') + ': ' +
+                        (closed ? t('infobox.closed') + ' ' : '') + t('geometry.' + geometry) );
+
+                if (closed) {
+                    var area = steradiansToSqmeters(entity.area(resolver));
+                    list.append('li')
+                        .text(t('infobox.area') + ': ' + displayArea(area));
+                }
+
+                list.append('li')
+                    .text(lengthLabel + ': ' + displayLength(length));
+
+                list.append('li')
+                    .text(t('infobox.centroid') + ': ' + centroid[0].toFixed(5) + ', ' + centroid[1].toFixed(5));
+
+
+                var toggle  = imperial ? 'imperial' : 'metric';
+                selection.append('a')
+                    .text(t('infobox.' + toggle))
+                    .attr('href', '#')
+                    .attr('class', 'button')
+                    .on('click', function() {
+                        d3.event.preventDefault();
+                        imperial = !imperial;
+                        redraw();
+                    });
+
+            } else {
+                var centerLabel = t('infobox.' + (entity.type === 'node' ? 'location' : 'center'));
+
+                list.append('li')
+                    .text(t('infobox.geometry') + ': ' + t('geometry.' + geometry));
+
+                list.append('li')
+                    .text(centerLabel + ': ' + center[0].toFixed(5) + ', ' + center[1].toFixed(5));
+            }
+        }
+
+
+        function hidden() {
+            return selection.style('display') === 'none';
+        }
+
+
+        function toggle() {
+            if (d3.event) d3.event.preventDefault();
+
+            if (hidden()) {
+                selection
+                    .style('display', 'block')
+                    .style('opacity', 0)
+                    .transition()
+                    .duration(200)
+                    .style('opacity', 1);
+
+                redraw();
+
+            } else {
+                selection
+                    .style('display', 'block')
+                    .style('opacity', 1)
+                    .transition()
+                    .duration(200)
+                    .style('opacity', 0)
+                    .each('end', function() {
+                        d3.select(this).style('display', 'none');
+                    });
+            }
+        }
+
+        context.map()
+            .on('drawn.info', redraw);
+
+        redraw();
+
+        var keybinding = d3.keybinding('info')
+            .on(key, toggle);
+
+        d3.select(document)
+            .call(keybinding);
+    }
+
+    return info;
+};
 iD.ui.Inspector = function(context) {
     var presetList = iD.ui.PresetList(context),
         entityEditor = iD.ui.EntityEditor(context),
@@ -28876,7 +33575,7 @@ iD.ui.intro = function(context) {
         // Load semi-real data used in intro
         context.connection().toggle(false).flush();
         context.history().reset();
-        
+
         introGraph = JSON.parse(iD.introGraph);
         for (var key in introGraph) {
             introGraph[key] = iD.Entity(introGraph[key]);
@@ -28919,7 +33618,7 @@ iD.ui.intro = function(context) {
             context.connection().toggle(true).flush().loadedTiles(loadedTiles);
             context.history().reset().merge(d3.values(baseEntities));
             context.background().baseLayerSource(background);
-            if (history) context.history().fromJSON(history);
+            if (history) context.history().fromJSON(history, false);
             window.location.replace(hash);
             context.inIntro(false);
             d3.select('#bar button.save').on('click', save);
@@ -28931,20 +33630,24 @@ iD.ui.intro = function(context) {
             .attr('class', 'joined')
             .selectAll('button.step');
 
-        var entered = buttonwrap.data(steps)
-            .enter().append('button')
-                .attr('class', 'step')
-                .on('click', enter);
+        var entered = buttonwrap
+            .data(steps)
+            .enter()
+            .append('button')
+            .attr('class', 'step')
+            .on('click', enter);
+
+        entered
+            .call(iD.svg.Icon('#icon-apply', 'pre-text'));
+
+        entered
+            .append('label')
+            .text(function(d) { return t(d.title); });
 
-        entered.append('div').attr('class','icon icon-pre-text apply');
-        entered.append('label').text(function(d) { return t(d.title); });
         enter(steps[0]);
 
         function enter (newStep) {
-
-            if (step) {
-                step.exit();
-            }
+            if (step) { step.exit(); }
 
             context.enter(iD.modes.Browse(context));
 
@@ -29103,7 +33806,7 @@ iD.ui.MapData = function(context) {
     function map_data(selection) {
 
         function showsFeature(d) {
-            return autoHiddenFeature(d) ? null : context.features().enabled(d);
+            return context.features().enabled(d);
         }
 
         function autoHiddenFeature(d) {
@@ -29178,13 +33881,10 @@ iD.ui.MapData = function(context) {
             items
                 .classed('active', active)
                 .selectAll('input')
-                .property('checked', active);
-
-            if (name === 'feature') {
-                items
-                    .selectAll('input')
-                    .property('indeterminate', autoHiddenFeature);
-            }
+                .property('checked', active)
+                .property('indeterminate', function(d) {
+                    return (name === 'feature' && autoHiddenFeature(d));
+                });
 
             //exit
             items.exit()
@@ -29225,6 +33925,7 @@ iD.ui.MapData = function(context) {
                 d3.event.stopPropagation();
             }
             setFill((fillSelected === 'wireframe' ? fillDefault : 'wireframe'));
+            context.map().pan([0,0]);  // trigger a redraw
         }
 
         function setVisible(show) {
@@ -29265,12 +33966,10 @@ iD.ui.MapData = function(context) {
             button = selection.append('button')
                 .attr('tabindex', -1)
                 .on('click', togglePanel)
+                .call(iD.svg.Icon('#icon-data', 'light'))
                 .call(tooltip),
             shown = false;
 
-        button.append('span')
-            .attr('class', 'icon data light');
-
         content.append('h4')
             .text(t('map_data.title'));
 
@@ -29326,8 +34025,7 @@ iD.ui.MapData = function(context) {
                 d3.event.stopPropagation();
                 context.background().zoomToGpxLayer();
             })
-            .append('span')
-            .attr('class', 'icon geolocate');
+            .call(iD.svg.Icon('#icon-search'));
 
         gpxLayerItem.append('button')
             .attr('class', 'layer-browse')
@@ -29342,8 +34040,7 @@ iD.ui.MapData = function(context) {
                     })
                     .node().click();
             })
-            .append('span')
-            .attr('class', 'icon geocode');
+            .call(iD.svg.Icon('#icon-geolocate'));
 
         label = gpxLayerItem.append('label')
             .call(bootstrap.tooltip()
@@ -29404,7 +34101,6 @@ iD.ui.MapData = function(context) {
         context.features()
             .on('change.map_data-update', update);
 
-        update();
         setFill(fillDefault);
 
         var keybinding = d3.keybinding('features')
@@ -29422,6 +34118,309 @@ iD.ui.MapData = function(context) {
 
     return map_data;
 };
+iD.ui.MapInMap = function(context) {
+    var key = '/';
+
+    function map_in_map(selection) {
+
+        var backgroundLayer = iD.TileLayer(),
+            dispatch = d3.dispatch('change'),
+            gpxLayer = iD.GpxLayer(context, dispatch),
+            overlayLayer = iD.TileLayer(),
+            projection = iD.geo.RawMercator(),
+            zoom = d3.behavior.zoom()
+                .scaleExtent([ztok(0.5), ztok(24)])
+                .on('zoom', zoomPan),
+            transformed = false,
+            panning = false,
+            zDiff = 6,    // by default, minimap renders at (main zoom - 6)
+            tStart, tLast, tCurr, kLast, kCurr, tiles, svg, gpx, timeoutId;
+
+        iD.ui.MapInMap.gpxLayer = gpxLayer;
+
+        function ztok(z) { return 256 * Math.pow(2, z); }
+        function ktoz(k) { return Math.log(k) / Math.LN2 - 8; }
+
+
+        function startMouse() {
+            context.surface().on('mouseup.map-in-map-outside', endMouse);
+            context.container().on('mouseup.map-in-map-outside', endMouse);
+
+            tStart = tLast = tCurr = projection.translate();
+            panning = true;
+        }
+
+
+        function zoomPan() {
+            var e = d3.event.sourceEvent,
+                t = d3.event.translate,
+                k = d3.event.scale,
+                zMain = ktoz(context.projection.scale() * 2 * Math.PI),
+                zMini = ktoz(k);
+
+            // restrict minimap zoom to < (main zoom - 3)
+            if (zMini > zMain - 3) {
+                zMini = zMain - 3;
+                zoom.scale(kCurr).translate(tCurr);  // restore last good values
+                return;
+            }
+
+            tCurr = t;
+            kCurr = k;
+            zDiff = zMain - zMini;
+
+            var scale = kCurr / kLast,
+                tX = Math.round((tCurr[0] / scale - tLast[0]) * scale),
+                tY = Math.round((tCurr[1] / scale - tLast[1]) * scale);
+
+            iD.util.setTransform(tiles, tX, tY, scale);
+            iD.util.setTransform(svg, 0, 0, scale);
+            iD.util.setTransform(gpx, 0, 0, scale);
+            transformed = true;
+
+            queueRedraw();
+
+            e.preventDefault();
+            e.stopPropagation();
+        }
+
+
+        function endMouse() {
+            context.surface().on('mouseup.map-in-map-outside', null);
+            context.container().on('mouseup.map-in-map-outside', null);
+
+            updateProjection();
+            panning = false;
+
+            if (tCurr[0] !== tStart[0] && tCurr[1] !== tStart[1]) {
+                var dMini = selection.dimensions(),
+                    cMini = [ dMini[0] / 2, dMini[1] / 2 ];
+
+                context.map().center(projection.invert(cMini));
+            }
+        }
+
+
+        function updateProjection() {
+            var loc = context.map().center(),
+                dMini = selection.dimensions(),
+                cMini = [ dMini[0] / 2, dMini[1] / 2 ],
+                tMain = context.projection.translate(),
+                kMain = context.projection.scale(),
+                zMain = ktoz(kMain * 2 * Math.PI),
+                zMini = Math.max(zMain - zDiff, 0.5),
+                kMini = ztok(zMini);
+
+            projection
+                .translate(tMain)
+                .scale(kMini / (2 * Math.PI));
+
+            var s = projection(loc),
+                mouse = panning ? [ tCurr[0] - tStart[0], tCurr[1] - tStart[1] ] : [0, 0],
+                tMini = [
+                    cMini[0] - s[0] + tMain[0] + mouse[0],
+                    cMini[1] - s[1] + tMain[1] + mouse[1]
+                ];
+
+            projection
+                .translate(tMini)
+                .clipExtent([[0, 0], dMini]);
+
+            zoom
+                .center(cMini)
+                .translate(tMini)
+                .scale(kMini);
+
+            tLast = tCurr = tMini;
+            kLast = kCurr = kMini;
+
+            if (transformed) {
+                iD.util.setTransform(tiles, 0, 0);
+                iD.util.setTransform(svg, 0, 0);
+                iD.util.setTransform(gpx, 0, 0);
+                transformed = false;
+            }
+        }
+
+
+        function redraw() {
+            if (hidden()) return;
+
+            updateProjection();
+
+            var dMini = selection.dimensions(),
+                zMini = ktoz(projection.scale() * 2 * Math.PI);
+
+            // setup tile container
+            tiles = selection
+                .selectAll('.map-in-map-tiles')
+                .data([0]);
+
+            tiles
+                .enter()
+                .append('div')
+                .attr('class', 'map-in-map-tiles');
+
+            // redraw background
+            backgroundLayer
+                .source(context.background().baseLayerSource())
+                .projection(projection)
+                .dimensions(dMini);
+
+            var background = tiles
+                .selectAll('.map-in-map-background')
+                .data([0]);
+
+            background.enter()
+                .append('div')
+                .attr('class', 'map-in-map-background');
+
+            background
+                .call(backgroundLayer);
+
+            // redraw overlay
+            var overlaySources = context.background().overlayLayerSources(),
+                hasOverlay = false;
+
+            for (var i = 0; i < overlaySources.length; i++) {
+                if (overlaySources[i].validZoom(zMini)) {
+                    overlayLayer
+                        .source(overlaySources[i])
+                        .projection(projection)
+                        .dimensions(dMini);
+
+                    hasOverlay = true;
+                    break;
+                }
+            }
+
+            var overlay = tiles
+                .selectAll('.map-in-map-overlay')
+                .data(hasOverlay ? [0] : []);
+
+            overlay.enter()
+                .append('div')
+                .attr('class', 'map-in-map-overlay');
+
+            overlay.exit()
+                .remove();
+
+            if (hasOverlay) {
+                overlay
+                    .call(overlayLayer);
+            }
+
+            gpxLayer
+                .projection(projection);
+
+            gpx = tiles
+                .selectAll('.map-in-map-gpx')
+                .data([0]);
+
+            gpx.enter()
+                .append('div')
+                .attr('class', 'map-in-map-gpx');
+
+            gpx.call(gpxLayer);
+            gpx.dimensions(dMini);
+
+            // redraw bounding box
+            if (!panning) {
+                var getPath = d3.geo.path().projection(projection),
+                    bbox = { type: 'Polygon', coordinates: [context.map().extent().polygon()] };
+
+                svg = selection.selectAll('.map-in-map-svg')
+                    .data([0]);
+
+                svg.enter()
+                    .append('svg')
+                    .attr('class', 'map-in-map-svg');
+
+                var path = svg.selectAll('.map-in-map-bbox')
+                    .data([bbox]);
+
+                path.enter()
+                    .append('path')
+                    .attr('class', 'map-in-map-bbox');
+
+                path
+                    .attr('d', getPath)
+                    .classed('thick', function(d) { return getPath.area(d) < 30; });
+            }
+        }
+
+
+        function queueRedraw() {
+            clearTimeout(timeoutId);
+            timeoutId = setTimeout(function() { redraw(); }, 300);
+        }
+
+
+        function hidden() {
+            return selection.style('display') === 'none';
+        }
+
+
+        function toggle() {
+            if (d3.event) d3.event.preventDefault();
+
+            var label = d3.select('.minimap-toggle');
+
+            if (hidden()) {
+                selection
+                    .style('display', 'block')
+                    .style('opacity', 0)
+                    .transition()
+                    .duration(200)
+                    .style('opacity', 1);
+
+                label.classed('active', true)
+                    .select('input').property('checked', true);
+
+                redraw();
+
+            } else {
+                selection
+                    .style('display', 'block')
+                    .style('opacity', 1)
+                    .transition()
+                    .duration(200)
+                    .style('opacity', 0)
+                    .each('end', function() {
+                        d3.select(this).style('display', 'none');
+                    });
+
+                label.classed('active', false)
+                    .select('input').property('checked', false);
+            }
+        }
+
+        iD.ui.MapInMap.toggle = toggle;
+
+        selection
+            .on('mousedown.map-in-map', startMouse)
+            .on('mouseup.map-in-map', endMouse);
+
+        selection
+            .call(zoom)
+            .on('dblclick.zoom', null);
+
+        context.map()
+            .on('drawn.map-in-map', function(drawn) {
+                if (drawn.full === true) redraw();
+            });
+
+        redraw();
+
+        var keybinding = d3.keybinding('map-in-map')
+            .on(key, toggle);
+
+        d3.select(document)
+            .call(keybinding);
+    }
+
+    return map_in_map;
+};
 iD.ui.modal = function(selection, blocking) {
 
     var previous = selection.select('div.modal');
@@ -29476,16 +34475,10 @@ iD.ui.modal = function(selection, blocking) {
 
     if (animate) {
         shaded.transition().style('opacity', 1);
-        modal
-            .style('top','0px')
-            .transition()
-            .duration(200)
-            .style('top','40px');
     } else {
         shaded.style('opacity', 1);
     }
 
-
     return shaded;
 };
 iD.ui.Modes = function(context) {
@@ -29525,8 +34518,10 @@ iD.ui.Modes = function(context) {
         context
             .on('enter.modes', update);
 
-        buttons.append('span')
-            .attr('class', function(mode) { return mode.id + ' icon icon-pre-text'; });
+        buttons.each(function(d) {
+            d3.select(this)
+                .call(iD.svg.Icon('#icon-' + d.button, 'pre-text'));
+        });
 
         buttons.append('span')
             .attr('class', 'label')
@@ -29566,10 +34561,9 @@ iD.ui.Notice = function(context) {
             .attr('class', 'zoom-to notice')
             .on('click', function() { context.map().zoom(context.minEditableZoom()); });
 
-        button.append('span')
-            .attr('class', 'icon zoom-in-invert');
-
-        button.append('span')
+        button
+            .call(iD.svg.Icon('#icon-plus', 'pre-text'))
+            .append('span')
             .attr('class', 'label')
             .text(t('zoom_in_edit'));
 
@@ -29698,13 +34692,12 @@ iD.ui.preset = function(context) {
 
         wrap.append('button')
             .attr('class', 'remove-icon')
-            .append('span').attr('class', 'icon delete');
+            .call(iD.svg.Icon('#operation-delete'));
 
         wrap.append('button')
             .attr('class', 'modified-icon')
             .attr('tabindex', -1)
-            .append('div')
-            .attr('class', 'icon undo');
+            .call(iD.svg.Icon('#icon-undo'));
 
         // Update
 
@@ -29837,13 +34830,26 @@ iD.ui.PresetIcon = function() {
     var preset, geometry;
 
     function presetIcon(selection) {
-        selection.each(setup);
+        selection.each(render);
     }
 
-    function setup() {
+    function render() {
         var selection = d3.select(this),
             p = preset.apply(this, arguments),
-            geom = geometry.apply(this, arguments);
+            geom = geometry.apply(this, arguments),
+            icon = p.icon || (geom === 'line' ? 'other-line' : 'marker-stroked'),
+            maki = iD.data.featureIcons.hasOwnProperty(icon + '-24');
+
+        function tag_classes(p) {
+            var s = '';
+            for (var i in p.tags) {
+                s += ' tag-' + i;
+                if (p.tags[i] !== '*') {
+                    s += ' tag-' + i + '-' + p.tags[i];
+                }
+            }
+            return s;
+        }
 
         var $fill = selection.selectAll('.preset-icon-fill')
             .data([0]);
@@ -29851,32 +34857,39 @@ iD.ui.PresetIcon = function() {
         $fill.enter().append('div');
 
         $fill.attr('class', function() {
-            var s = 'preset-icon-fill preset-icon-fill-' + geom;
-            for (var i in p.tags) {
-                s += ' tag-' + i + ' tag-' + i + '-' + p.tags[i];
-            }
-            return s;
+            return 'preset-icon-fill preset-icon-fill-' + geom + tag_classes(p);
+        });
+
+        var $frame = selection.selectAll('.preset-icon-frame')
+            .data([0]);
+
+        $frame.enter()
+            .append('div')
+            .call(iD.svg.Icon('#preset-icon-frame'));
+
+        $frame.attr('class', function() {
+            return 'preset-icon-frame ' + (geom === 'area' ? '' : 'hide');
         });
 
+
         var $icon = selection.selectAll('.preset-icon')
             .data([0]);
 
-        $icon.enter().append('div');
+        $icon.enter()
+            .append('div')
+            .attr('class', 'preset-icon')
+            .call(iD.svg.Icon(''));
 
-        $icon.attr('class', function() {
-            var icon = p.icon || (geom === 'line' ? 'other-line' : 'marker-stroked'),
-                klass = 'feature-' + icon + ' preset-icon';
+        $icon
+            .attr('class', 'preset-icon preset-icon-' + (maki ? '32' : '60'));
 
-            var featureicon = iD.data.featureIcons[icon];
-            if (featureicon && featureicon[geom]) {
-                klass += ' preset-icon-' + geom;
-            } else if (icon === 'multipolygon') {
-                // Special case (geometry === 'area')
-                klass += ' preset-icon-relation';
-            }
+        $icon.selectAll('svg')
+            .attr('class', function() {
+                return 'icon ' + icon + tag_classes(p);
+            });
 
-            return klass;
-        });
+        $icon.selectAll('use')       // workaround: maki parking-24 broken?
+            .attr('href', '#' + icon + (maki ? ( icon === 'parking' ? '-18' : '-24') : ''));
     }
 
     presetIcon.preset = function(_) {
@@ -29916,15 +34929,14 @@ iD.ui.PresetList = function(context) {
                 .attr('class', 'preset-choose')
                 .on('click', function() { event.choose(currentPreset); })
                 .append('span')
-                .attr('class', 'icon forward');
+                .html('&#9658;');
         } else {
             messagewrap.append('button')
                 .attr('class', 'close')
                 .on('click', function() {
                     context.enter(iD.modes.Browse(context));
                 })
-                .append('span')
-                .attr('class', 'icon close');
+                .call(iD.svg.Icon('#icon-close'));
         }
 
         function keydown() {
@@ -29981,8 +34993,8 @@ iD.ui.PresetList = function(context) {
             .on('keypress', keypress)
             .on('input', inputevent);
 
-        searchWrap.append('span')
-            .attr('class', 'icon search');
+        searchWrap
+            .call(iD.svg.Icon('#icon-search', 'pre-text'));
 
         if (autofocus) {
             search.node().focus();
@@ -30178,25 +35190,28 @@ iD.ui.RadialMenu = function(context, operations) {
 
         var button = menu.selectAll()
             .data(operations)
-            .enter().append('g')
+            .enter()
+            .append('g')
+            .attr('class', function(d) { return 'radial-menu-item radial-menu-item-' + d.id; })
+            .classed('disabled', function(d) { return d.disabled(); })
             .attr('transform', function(d, i) {
-                return 'translate(' + r * Math.sin(a0 + i * a) + ',' +
-                                      r * Math.cos(a0 + i * a) + ')';
+                return 'translate(' + iD.geo.roundCoords([
+                        r * Math.sin(a0 + i * a),
+                        r * Math.cos(a0 + i * a)]).join(',') + ')';
             });
 
         button.append('circle')
-            .attr('class', function(d) { return 'radial-menu-item radial-menu-item-' + d.id; })
             .attr('r', 15)
-            .classed('disabled', function(d) { return d.disabled(); })
             .on('click', click)
             .on('mousedown', mousedown)
             .on('mouseover', mouseover)
             .on('mouseout', mouseout);
 
         button.append('use')
-            .attr('transform', 'translate(-10, -10)')
-            .attr('clip-path', 'url(#clip-square-20)')
-            .attr('xlink:href', function(d) { return '#icon-operation-' + (d.disabled() ? 'disabled-' : '') + d.id; });
+            .attr('transform', 'translate(-10,-10)')
+            .attr('width', '20')
+            .attr('height', '20')
+            .attr('xlink:href', function(d) { return '#operation-' + d.id; });
 
         tooltip = d3.select(document.body)
             .append('div')
@@ -30367,8 +35382,7 @@ iD.ui.RawMemberEditor = function(context) {
                 .attr('tabindex', -1)
                 .attr('class', 'remove button-input-action member-delete minor')
                 .on('click', deleteMember)
-                .append('span')
-                .attr('class', 'icon delete');
+                .call(iD.svg.Icon('#operation-delete'));
 
             $items.exit()
                 .remove();
@@ -30520,8 +35534,7 @@ iD.ui.RawMembershipEditor = function(context) {
                 .attr('tabindex', -1)
                 .attr('class', 'remove button-input-action member-delete minor')
                 .on('click', deleteMembership)
-                .append('span')
-                .attr('class', 'icon delete');
+                .call(iD.svg.Icon('#operation-delete'));
 
             $items.exit()
                 .remove();
@@ -30556,8 +35569,7 @@ iD.ui.RawMembershipEditor = function(context) {
                     .attr('tabindex', -1)
                     .attr('class', 'remove button-input-action member-delete minor')
                     .on('click', deleteMembership)
-                    .append('span')
-                    .attr('class', 'icon delete');
+                    .call(iD.svg.Icon('#operation-delete'));
 
             } else {
                 $list.selectAll('.member-row-new')
@@ -30567,10 +35579,10 @@ iD.ui.RawMembershipEditor = function(context) {
             var $add = $wrap.selectAll('.add-relation')
                 .data([0]);
 
-            $add.enter().append('button')
+            $add.enter()
+                .append('button')
                 .attr('class', 'add-relation')
-                .append('span')
-                .attr('class', 'icon plus light');
+                .call(iD.svg.Icon('#icon-plus', 'light'));
 
             $wrap.selectAll('.add-relation')
                 .on('click', function() {
@@ -30631,11 +35643,10 @@ iD.ui.RawTagEditor = function(context) {
         var $newTag = $wrap.selectAll('.add-tag')
             .data([0]);
 
-        var $enter = $newTag.enter().append('button')
-            .attr('class', 'add-tag');
-
-        $enter.append('span')
-            .attr('class', 'icon plus light');
+        $newTag.enter()
+            .append('button')
+            .attr('class', 'add-tag')
+            .call(iD.svg.Icon('#icon-plus', 'light'));
 
         $newTag.on('click', addTag);
 
@@ -30644,7 +35655,7 @@ iD.ui.RawTagEditor = function(context) {
 
         // Enter
 
-        $enter = $items.enter().append('li')
+        var $enter = $items.enter().append('li')
             .attr('class', 'tag-row cf');
 
         $enter.append('div')
@@ -30664,8 +35675,7 @@ iD.ui.RawTagEditor = function(context) {
         $enter.append('button')
             .attr('tabindex', -1)
             .attr('class', 'remove minor')
-            .append('span')
-            .attr('class', 'icon delete');
+            .call(iD.svg.Icon('#operation-delete'));
 
         if (context.taginfo()) {
             $enter.each(bindTypeahead);
@@ -30676,7 +35686,12 @@ iD.ui.RawTagEditor = function(context) {
         $items.order();
 
         $items.each(function(tag) {
-            var reference = iD.ui.TagReference({key: tag.key}, context);
+            var isRelation = (context.entity(id).type === 'relation'),
+                reference;
+            if (isRelation && tag.key === 'type')
+                reference = iD.ui.TagReference({rtype: tag.value}, context);
+            else
+                reference = iD.ui.TagReference({key: tag.key, value: tag.value}, context);
 
             if (state === 'hover') {
                 reference.showing(false);
@@ -30938,12 +35953,12 @@ iD.ui.Save = function(context) {
 };
 iD.ui.Scale = function(context) {
     var projection = context.projection,
-        imperial = (iD.detect().locale.toLowerCase() === 'en-us'),
         maxLength = 180,
         tickHeight = 8;
 
     function scaleDefs(loc1, loc2) {
         var lat = (loc2[1] + loc1[1]) / 2,
+            imperial = (iD.detect().locale.toLowerCase() === 'en-us'),
             conversion = (imperial ? 3.28084 : 1),
             dist = iD.geo.lonToMeters(loc2[0] - loc1[0], lat) * conversion,
             scale = { dist: 0, px: 0, text: '' },
@@ -31020,6 +36035,11 @@ iD.ui.Scale = function(context) {
 };
 iD.ui.SelectionList = function(context, selectedIDs) {
 
+    function selectEntity(entity) {
+        context.enter(iD.modes.Select(context, [entity.id]).suppressMenu(true));
+    }
+
+
     function selectionList(selection) {
         selection.classed('selection-list-pane', true);
 
@@ -31048,17 +36068,12 @@ iD.ui.SelectionList = function(context, selectedIDs) {
 
             var enter = items.enter().append('button')
                 .attr('class', 'feature-list-item')
-                .on('click', function(entity) {
-                    context.enter(iD.modes.Select(context, [entity.id]));
-                });
+                .on('click', selectEntity);
 
             // Enter
-
             var label = enter.append('div')
-                .attr('class', 'label');
-
-            label.append('span')
-                .attr('class', 'icon icon-pre-text');
+                .attr('class', 'label')
+                .call(iD.svg.Icon('', 'pre-text'));
 
             label.append('span')
                 .attr('class', 'entity-type');
@@ -31067,9 +36082,11 @@ iD.ui.SelectionList = function(context, selectedIDs) {
                 .attr('class', 'entity-name');
 
             // Update
-
-            items.selectAll('.icon')
-                .attr('class', function(entity) { return context.geometry(entity.id) + ' icon icon-pre-text'; });
+            items.selectAll('use')
+                .attr('href', function() {
+                    var entity = this.parentElement.parentElement.__data__;
+                    return '#icon-' + context.geometry(entity.id);
+                });
 
             items.selectAll('.entity-type')
                 .text(function(entity) { return context.presets().match(entity, context.graph()).name(); });
@@ -31078,7 +36095,6 @@ iD.ui.SelectionList = function(context, selectedIDs) {
                 .text(function(entity) { return iD.util.displayName(entity); });
 
             // Exit
-
             items.exit()
                 .remove();
         }
@@ -31183,6 +36199,7 @@ iD.ui.SourceSwitch = function(context) {
         context.connection()
             .switch(live ? keys[1] : keys[0]);
 
+        context.enter(iD.modes.Browse(context));
         context.flush();
 
         d3.select(this)
@@ -31310,7 +36327,7 @@ iD.ui.Status = function(context) {
     };
 };
 iD.ui.Success = function(context) {
-    var event = d3.dispatch('cancel'),
+    var dispatch = d3.dispatch('cancel'),
         changeset;
 
     function success(selection) {
@@ -31322,9 +36339,8 @@ iD.ui.Success = function(context) {
 
         header.append('button')
             .attr('class', 'fr')
-            .append('span')
-            .attr('class', 'icon close')
-            .on('click', function() { event.cancel(success); });
+            .on('click', function() { dispatch.cancel(); })
+            .call(iD.svg.Icon('#icon-close'));
 
         header.append('h3')
             .text(t('success.just_edited'));
@@ -31351,13 +36367,15 @@ iD.ui.Success = function(context) {
 
         body.selectAll('.button.social')
             .data(d3.entries(sharing))
-            .enter().append('a')
-            .attr('class', function(d) { return 'button social col4 ' + d.key; })
+            .enter()
+            .append('a')
+            .attr('class', 'button social col4')
             .attr('target', '_blank')
             .attr('href', function(d) { return d.value; })
             .call(bootstrap.tooltip()
                 .title(function(d) { return t('success.' + d.key); })
-                .placement('bottom'));
+                .placement('bottom'))
+            .each(function(d) { d3.select(this).call(iD.svg.Icon('#logo-' + d.key, 'social')); });
     }
 
     success.changeset = function(_) {
@@ -31366,7 +36384,7 @@ iD.ui.Success = function(context) {
         return success;
     };
 
-    return d3.rebind(success, event, 'on');
+    return d3.rebind(success, dispatch, 'on');
 };
 iD.ui.TagReference = function(tag, context) {
     var tagReference = {},
@@ -31403,7 +36421,7 @@ iD.ui.TagReference = function(tag, context) {
     function load() {
         button.classed('tag-reference-loading', true);
 
-        context.taginfo().docs(tag, function(err, docs) {
+        context.taginfo().docs(tag, function(err, docs, softfail) {
             if (!err && docs) {
                 docs = findLocal(docs);
             }
@@ -31411,9 +36429,11 @@ iD.ui.TagReference = function(tag, context) {
             body.html('');
 
             if (!docs || !docs.description) {
-                body.append('p').text(t('inspector.no_documentation_key'));
-                show();
-                return;
+                if (!softfail) {
+                    body.append('p').text(t('inspector.no_documentation_key'));
+                    show();
+                }
+                return false;
             }
 
             if (docs.image && docs.image.thumb_url_prefix) {
@@ -31431,16 +36451,15 @@ iD.ui.TagReference = function(tag, context) {
                 .append('p')
                 .text(docs.description);
 
-            var wikiLink = body
+            body
                 .append('a')
                 .attr('target', '_blank')
-                .attr('href', 'http://wiki.openstreetmap.org/wiki/' + docs.title);
-
-            wikiLink.append('span')
-                .attr('class','icon icon-pre-text out-link');
-
-            wikiLink.append('span')
+                .attr('href', 'http://wiki.openstreetmap.org/wiki/' + docs.title)
+                .call(iD.svg.Icon('#icon-out-link', 'inline'))
+                .append('span')
                 .text(t('inspector.reference'));
+
+            return true;
         });
     }
 
@@ -31471,12 +36490,11 @@ iD.ui.TagReference = function(tag, context) {
         button = selection.selectAll('.tag-reference-button')
             .data([0]);
 
-        var enter = button.enter().append('button')
+        button.enter()
+            .append('button')
+            .attr('class', 'tag-reference-button')
             .attr('tabindex', -1)
-            .attr('class', 'tag-reference-button');
-
-        enter.append('span')
-            .attr('class', 'icon inspect');
+            .call(iD.svg.Icon('#icon-inspect'));
 
         button.on('click', function () {
             d3.event.stopPropagation();
@@ -31514,7 +36532,8 @@ iD.ui.TagReference = function(tag, context) {
     };
 
     return tagReference;
-};// toggles the visibility of ui elements, using a combination of the
+};
+// toggles the visibility of ui elements, using a combination of the
 // hide class, which sets display=none, and a d3 transition for opacity.
 // this will cause blinking when called repeatedly, so check that the
 // value actually changes between calls.
@@ -31565,8 +36584,10 @@ iD.ui.UndoRedo = function(context) {
             .on('click', function(d) { return d.action(); })
             .call(tooltip);
 
-        buttons.append('span')
-            .attr('class', function(d) { return 'icon ' + d.id; });
+        buttons.each(function(d) {
+            d3.select(this)
+                .call(iD.svg.Icon('#icon-' + d.id));
+        });
 
         var keybinding = d3.keybinding('undo')
             .on(commands[0].cmd, function() { d3.event.preventDefault(); commands[0].action(); })
@@ -31605,17 +36626,16 @@ iD.ui.ViewOnOSM = function(context) {
         var $link = selection.selectAll('.view-on-osm')
             .data([0]);
 
-        var $enter = $link.enter().append('a')
+        $link.enter()
+            .append('a')
             .attr('class', 'view-on-osm')
-            .attr('target', '_blank');
-
-        $enter.append('span')
-            .attr('class', 'icon icon-pre-text out-link');
-
-        $enter.append('span')
+            .attr('target', '_blank')
+            .call(iD.svg.Icon('#icon-out-link', 'inline'))
+            .append('span')
             .text(t('inspector.view_on_osm'));
 
-        $link.attr('href', context.connection().entityURL(entity));
+        $link
+            .attr('href', context.connection().entityURL(entity));
     }
 
     viewOnOSM.entityID = function(_) {
@@ -31629,16 +36649,39 @@ iD.ui.ViewOnOSM = function(context) {
 iD.ui.Zoom = function(context) {
     var zooms = [{
         id: 'zoom-in',
+        icon: 'plus',
         title: t('zoom.in'),
         action: context.zoomIn,
         key: '+'
     }, {
         id: 'zoom-out',
+        icon: 'minus',
         title: t('zoom.out'),
         action: context.zoomOut,
         key: '-'
     }];
 
+    function zoomIn() {
+        d3.event.preventDefault();
+        context.zoomIn();
+    }
+
+    function zoomOut() {
+        d3.event.preventDefault();
+        context.zoomOut();
+    }
+
+    function zoomInFurther() {
+        d3.event.preventDefault();
+        context.zoomInFurther();
+    }
+
+    function zoomOutFurther() {
+        d3.event.preventDefault();
+        context.zoomOutFurther();
+    }
+
+
     return function(selection) {
         var button = selection.selectAll('button')
             .data(zooms)
@@ -31653,18 +36696,24 @@ iD.ui.Zoom = function(context) {
                     return iD.ui.tooltipHtml(d.title, d.key);
                 }));
 
-        button.append('span')
-            .attr('class', function(d) { return d.id + ' icon'; });
+        button.each(function(d) {
+            d3.select(this)
+                .call(iD.svg.Icon('#icon-' + d.icon, 'light'));
+        });
 
         var keybinding = d3.keybinding('zoom');
 
         _.each(['=','ffequals','plus','ffplus'], function(key) {
-            keybinding.on(key, function() { context.zoomIn(); });
-            keybinding.on('⇧' + key, function() { context.zoomIn(); });
+            keybinding.on(key, zoomIn);
+            keybinding.on('⇧' + key, zoomIn);
+            keybinding.on(iD.ui.cmd('⌘' + key), zoomInFurther);
+            keybinding.on(iD.ui.cmd('⌘⇧' + key), zoomInFurther);
         });
         _.each(['-','ffminus','_','dash'], function(key) {
-            keybinding.on(key, function() { context.zoomOut(); });
-            keybinding.on('⇧' + key, function() { context.zoomOut(); });
+            keybinding.on(key, zoomOut);
+            keybinding.on('⇧' + key, zoomOut);
+            keybinding.on(iD.ui.cmd('⌘' + key), zoomOutFurther);
+            keybinding.on(iD.ui.cmd('⌘⇧' + key), zoomOutFurther);
         });
 
         d3.select(document)
@@ -31727,6 +36776,10 @@ iD.ui.preset.access = function(field) {
         if (type !== 'access') {
             options.unshift('yes');
             options.push('designated');
+
+            if (type === 'bicycle') {
+                options.push('dismount');
+            }
         }
 
         return options.map(function(option) {
@@ -31847,14 +36900,12 @@ iD.ui.preset.access = function(field) {
                 return tags.access ? tags.access : field.placeholder();
             });
 
-        items.selectAll('#preset-input-access-access')
-            .attr('placeholder', 'yes');
+        // items.selectAll('#preset-input-access-access')
+        //     .attr('placeholder', 'yes');
 
-        _.forEach(placeholders[tags.highway], function(value, key) {
-            items.selectAll('#preset-input-access-' + key)
-                .attr('placeholder', function() {
-                    return (tags.access && (value === 'yes' || value === 'designated')) ? tags.access : value;
-                });
+        _.forEach(placeholders[tags.highway], function(v, k) {
+            items.selectAll('#preset-input-access-' + k)
+                .attr('placeholder', function() { return (tags.access || v); });
         });
     };
 
@@ -32255,6 +37306,106 @@ iD.ui.preset.typeCombo = function(field, context) {
 
     return d3.rebind(combo, event, 'on');
 };
+iD.ui.preset.cycleway = function(field) {
+    var event = d3.dispatch('change'),
+        items;
+
+    function cycleway(selection) {
+        var wrap = selection.selectAll('.preset-input-wrap')
+            .data([0]);
+
+        wrap.enter().append('div')
+            .attr('class', 'cf preset-input-wrap')
+            .append('ul');
+
+        items = wrap.select('ul').selectAll('li')
+            .data(field.keys);
+
+        // Enter
+
+        var enter = items.enter().append('li')
+            .attr('class', function(d) { return 'cf preset-cycleway-' + d; });
+
+        enter.append('span')
+            .attr('class', 'col6 label preset-label-cycleway')
+            .attr('for', function(d) { return 'preset-input-cycleway-' + d; })
+            .text(function(d) { return field.t('types.' + d); });
+
+        enter.append('div')
+            .attr('class', 'col6 preset-input-cycleway-wrap')
+            .append('input')
+            .attr('type', 'text')
+            .attr('class', 'preset-input-cycleway')
+            .attr('id', function(d) { return 'preset-input-cycleway-' + d; })
+            .each(function(d) {
+                d3.select(this)
+                    .call(d3.combobox()
+                        .data(cycleway.options(d)));
+            });
+
+        // Update
+
+        wrap.selectAll('.preset-input-cycleway')
+            .on('change', change)
+            .on('blur', change);
+    }
+
+    function change() {
+        var inputs = d3.selectAll('.preset-input-cycleway')[0],
+            left = d3.select(inputs[0]).value(),
+            right = d3.select(inputs[1]).value(),
+            tag = {};
+        if (left === 'none' || left === '') { left = undefined; }
+        if (right === 'none' || right === '') { right = undefined; }
+
+        // Always set both left and right as changing one can affect the other
+        tag = {
+            cycleway: undefined,
+            'cycleway:left': left,
+            'cycleway:right': right
+        };
+
+        // If the left and right tags match, use the cycleway tag to tag both
+        // sides the same way
+        if (left === right) {
+            tag = {
+                cycleway: left,
+                'cycleway:left': undefined,
+                'cycleway:right': undefined
+            };
+        }
+
+        event.change(tag);
+    }
+
+    cycleway.options = function() {
+        return d3.keys(field.strings.options).map(function(option) {
+            return {
+                title: field.t('options.' + option + '.description'),
+                value: option
+            };
+        });
+    };
+
+    cycleway.tags = function(tags) {
+        items.selectAll('.preset-input-cycleway')
+            .value(function(d) {
+                // If cycleway is set, always return that
+                if (tags.cycleway) {
+                    return tags.cycleway;
+                }
+                return tags[d] || '';
+            })
+            .attr('placeholder', field.placeholder());
+    };
+
+    cycleway.focus = function() {
+        items.selectAll('.preset-input-cycleway')
+            .node().focus();
+    };
+
+    return d3.rebind(cycleway, event, 'on');
+};
 iD.ui.preset.text =
 iD.ui.preset.number =
 iD.ui.preset.tel =
@@ -32351,13 +37502,13 @@ iD.ui.preset.localized = function(field, context) {
         var translateButton = selection.selectAll('.localized-add')
             .data([0]);
 
-        translateButton.enter().append('button')
+        translateButton.enter()
+            .append('button')
             .attr('class', 'button-input-action localized-add minor')
+            .call(iD.svg.Icon('#icon-plus'))
             .call(bootstrap.tooltip()
                 .title(t('translate.translate'))
-                .placement('left'))
-            .append('span')
-            .attr('class', 'icon plus');
+                .placement('left'));
 
         translateButton
             .on('click', addBlank);
@@ -32463,7 +37614,7 @@ iD.ui.preset.localized = function(field, context) {
                             .style('max-height','0px')
                             .remove();
                     })
-                    .append('span').attr('class', 'icon delete');
+                    .call(iD.svg.Icon('#operation-delete'));
 
                 wrap.append('input')
                     .attr('class', 'localized-lang')
@@ -32531,11 +37682,11 @@ iD.ui.preset.localized = function(field, context) {
 
         input.value(tags[field.key] || '');
 
-        var postfixed = [];
-        for (var i in tags) {
-            var m = i.match(new RegExp(field.key + ':([a-zA-Z_-]+)$'));
-            if (m && m[1]) {
-                postfixed.push({ lang: m[1], value: tags[i]});
+        var postfixed = [], k, m;
+        for (k in tags) {
+            m = k.match(/^(.*):([a-zA-Z_-]+)$/);
+            if (m && m[1] === field.key && m[2]) {
+                postfixed.push({ lang: m[2], value: tags[k] });
             }
         }
 
@@ -32784,7 +37935,7 @@ iD.ui.preset.restrictions = function(field, context) {
 
         surface
             .call(vertices, graph, [vertex], filter, extent, z)
-            .call(lines, graph, intersection.highways, filter)
+            .call(lines, graph, intersection.ways, filter)
             .call(turns, graph, intersection.turns(fromNodeID));
 
         surface
@@ -32798,7 +37949,7 @@ iD.ui.preset.restrictions = function(field, context) {
 
         if (fromNodeID) {
             surface
-                .selectAll('.' + _.find(intersection.highways, function(way) { return way.contains(fromNodeID); }).id)
+                .selectAll('.' + intersection.highways[fromNodeID].id)
                 .classed('selected', true);
         }
 
@@ -32813,7 +37964,7 @@ iD.ui.preset.restrictions = function(field, context) {
         function click() {
             var datum = d3.event.target.__data__;
             if (datum instanceof iD.Entity) {
-                fromNodeID = datum.nodes[(datum.first() === vertexID) ? 1 : datum.nodes.length - 2];
+                fromNodeID = intersection.adjacentNodeId(datum.id);
                 render();
             } else if (datum instanceof iD.geo.Turn) {
                 if (datum.restriction) {
@@ -32980,17 +38131,19 @@ iD.ui.preset.wikipedia = function(field, context) {
         link.enter().append('a')
             .attr('class', 'wiki-link button-input-action minor')
             .attr('target', '_blank')
-            .append('span')
-            .attr('class', 'icon out-link');
+            .call(iD.svg.Icon('#icon-out-link', 'inline'));
     }
 
     function language() {
         var value = lang.value().toLowerCase();
+        var locale = iD.detect().locale.toLowerCase();
+        var localeLanguage;
         return _.find(iD.data.wikipedia, function(d) {
+            if (d[2] === locale) localeLanguage = d;
             return d[0].toLowerCase() === value ||
                 d[1].toLowerCase() === value ||
-                d[2].toLowerCase() === value;
-        }) || iD.data.wikipedia[0];
+                d[2] === value;
+        }) || localeLanguage || ['English', 'English', 'en'];
     }
 
     function changeLang() {
@@ -33000,12 +38153,22 @@ iD.ui.preset.wikipedia = function(field, context) {
 
     function change() {
         var value = title.value(),
-            m = value.match(/https?:\/\/([a-z]+)\.wikipedia\.org\/wiki\/(.+)/),
-            l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; });
+            m = value.match(/https?:\/\/([-a-z]+)\.wikipedia\.org\/(?:wiki|\1-[-a-z]+)\/([^#]+)(?:#(.+))?/),
+            l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; }),
+            anchor;
 
         if (l) {
             // Normalize title http://www.mediawiki.org/wiki/API:Query#Title_normalization
-            value = m[2].replace(/_/g, ' ');
+            value = decodeURIComponent(m[2]).replace(/_/g, ' ');
+            if (m[3]) {
+                try {
+                    // Best-effort `anchordecode:` implementation
+                    anchor = decodeURIComponent(m[3].replace(/\.([0-9A-F]{2})/g, '%$1'));
+                } catch (e) {
+                    anchor = decodeURIComponent(m[3]);
+                }
+                value += '#' + anchor.replace(/_/g, ' ');
+            }
             value = value.slice(0, 1).toUpperCase() + value.slice(1);
             lang.value(l[1]);
             title.value(value);
@@ -33018,14 +38181,24 @@ iD.ui.preset.wikipedia = function(field, context) {
 
     i.tags = function(tags) {
         var value = tags[field.key] || '',
-            m = value.match(/([^:]+):(.+)/),
-            l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; });
+            m = value.match(/([^:]+):([^#]+)(?:#(.+))?/),
+            l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; }),
+            anchor = m && m[3];
 
         // value in correct format
         if (l) {
             lang.value(l[1]);
-            title.value(m[2]);
-            link.attr('href', 'http://' + m[1] + '.wikipedia.org/wiki/' + m[2]);
+            title.value(m[2] + (anchor ? ('#' + anchor) : ''));
+            if (anchor) {
+                try {
+                    // Best-effort `anchorencode:` implementation
+                    anchor = encodeURIComponent(anchor.replace(/ /g, '_')).replace(/%/g, '.');
+                } catch (e) {
+                    anchor = anchor.replace(/ /g, '_');
+                }
+            }
+            link.attr('href', 'http://' + m[1] + '.wikipedia.org/wiki/' +
+                      m[2].replace(/ /g, '_') + (anchor ? ('#' + anchor) : ''));
 
         // unrecognized value format
         } else {
@@ -33612,21 +38785,30 @@ iD.presets = function() {
     // (see `iD.Way#isArea()`). In other words, the keys of L form the whitelist,
     // and the subkeys form the blacklist.
     all.areaKeys = function() {
-        var areaKeys = {};
+        var areaKeys = {},
+            ignore = ['barrier', 'highway', 'footway', 'railway', 'type'],
+            presets = _.reject(all.collection, 'suggestion');
 
-        all.collection.forEach(function(d) {
-            if (d.suggestion) return;
+        // whitelist
+        presets.forEach(function(d) {
+            for (var key in d.tags) break;
+            if (!key) return;
+            if (ignore.indexOf(key) !== -1) return;
+
+            if (d.geometry.indexOf('area') !== -1) {
+                areaKeys[key] = areaKeys[key] || {};
+            }
+        });
 
+        // blacklist
+        presets.forEach(function(d) {
             for (var key in d.tags) break;
             if (!key) return;
-            var value = d.tags[key];
+            if (ignore.indexOf(key) !== -1) return;
 
-            if (['highway', 'footway', 'railway', 'type'].indexOf(key) === -1) {
-                if (d.geometry.indexOf('area') >= 0) {
-                    areaKeys[key] = areaKeys[key] || {};
-                } else if (key in areaKeys && value !== '*') {
-                    areaKeys[key][value] = true;
-                }
+            var value = d.tags[key];
+            if (d.geometry.indexOf('area') === -1 && key in areaKeys && value !== '*') {
+                areaKeys[key][value] = true;
             }
         });
 
@@ -33755,11 +38937,16 @@ iD.presets.Collection = function(collection) {
             value = value.toLowerCase();
 
             var searchable = _.filter(collection, function(a) {
-                return a.searchable !== false && a.suggestion !== true;
-            }),
-            suggestions = _.filter(collection, function(a) {
-                return a.suggestion === true;
-            });
+                    return a.searchable !== false && a.suggestion !== true;
+                }),
+                suggestions = _.filter(collection, function(a) {
+                    return a.suggestion === true;
+                });
+
+            function leading(a) {
+                var index = a.indexOf(value);
+                return index === 0 || a[index - 1] === ' ';
+            }
 
             // matches value to preset.name
             var leading_name = _.filter(searchable, function(a) {
@@ -33772,13 +38959,14 @@ iD.presets.Collection = function(collection) {
 
             // matches value to preset.terms values
             var leading_terms = _.filter(searchable, function(a) {
-                return _.any(a.terms() || [], leading);
-            });
+                    return _.any(a.terms() || [], leading);
+                });
+
+            // matches value to preset.tags values
+            var leading_tag_values = _.filter(searchable, function(a) {
+                    return _.any(_.without(_.values(a.tags || {}), '*'), leading);
+                });
 
-            function leading(a) {
-                var index = a.indexOf(value);
-                return index === 0 || a[index - 1] === ' ';
-            }
 
             // finds close matches to value in preset.name
             var levenstein_name = searchable.map(function(a) {
@@ -33836,6 +39024,7 @@ iD.presets.Collection = function(collection) {
 
             var results = leading_name.concat(
                             leading_terms,
+                            leading_tag_values,
                             leading_suggestions.slice(0, maxSuggestionResults+5),
                             levenstein_name,
                             leventstein_terms,
@@ -33879,6 +39068,7 @@ iD.presets.Preset = function(id, preset, fields) {
 
     preset.id = id;
     preset.fields = (preset.fields || []).map(getFields);
+    preset.geometry = (preset.geometry || []);
 
     function getFields(f) {
         return fields[f];
@@ -33921,7 +39111,7 @@ iD.presets.Preset = function(id, preset, fields) {
     };
 
     preset.terms = function() {
-        return preset.t('terms', {'default': ''}).split(',');
+        return preset.t('terms', {'default': ''}).toLowerCase().trim().split(/\s*,+\s*/);
     };
 
     preset.isFallback = function() {
@@ -33947,11 +39137,12 @@ iD.presets.Preset = function(id, preset, fields) {
 
         for (var f in preset.fields) {
             var field = preset.fields[f];
-            if (field.matchGeometry(geometry) && field['default'] === tags[field.key]) {
+            if (field.matchGeometry(geometry) && field.default === tags[field.key]) {
                 delete tags[field.key];
             }
         }
 
+        delete tags.area;
         return tags;
     };
 
@@ -33969,17 +39160,29 @@ iD.presets.Preset = function(id, preset, fields) {
             }
         }
 
-        // Add area=yes if necessary
-        for (k in applyTags) {
-            if (geometry === 'area' && !(k in iD.areaKeys))
+        // Add area=yes if necessary.
+        // This is necessary if the geometry is already an area (e.g. user drew an area) AND any of:
+        // 1. chosen preset could be either an area or a line (`barrier=city_wall`)
+        // 2. chosen preset doesn't have a key in areaKeys (`railway=station`)
+        if (geometry === 'area') {
+            var needsAreaTag = true;
+            if (preset.geometry.indexOf('line') === -1) {
+                for (k in applyTags) {
+                    if (k in iD.areaKeys) {
+                        needsAreaTag = false;
+                        break;
+                    }
+                }
+            }
+            if (needsAreaTag) {
                 tags.area = 'yes';
-            break;
+            }
         }
 
         for (var f in preset.fields) {
             var field = preset.fields[f];
-            if (field.matchGeometry(geometry) && field.key && !tags[field.key] && field['default']) {
-                tags[field.key] = field['default'];
+            if (field.matchGeometry(geometry) && field.key && !tags[field.key] && field.default) {
+                tags[field.key] = field.default;
             }
         }
 
@@ -33988,60 +39191,104 @@ iD.presets.Preset = function(id, preset, fields) {
 
     return preset;
 };
-iD.validate = function(changes, graph) {
-    var warnings = [];
+iD.validations = {};
+iD.validations.DeprecatedTag = function() {
+
+    var validation = function(changes) {
+        var warnings = [];
+        for (var i = 0; i < changes.created.length; i++) {
+            var change = changes.created[i],
+                deprecatedTags = change.deprecatedTags();
+
+            if (!_.isEmpty(deprecatedTags)) {
+                var tags = iD.util.tagText({ tags: deprecatedTags });
+                warnings.push({
+                    id: 'deprecated_tags',
+                    message: t('validations.deprecated_tags', { tags: tags }),
+                    entity: change
+                });
+            }
+        }
+        return warnings;
+    };
+
+    return validation;
+};
+iD.validations.ManyDeletions = function() {
+    var threshold = 100;
+
+    var validation = function(changes) {
+        var warnings = [];
+        if (changes.deleted.length > threshold) {
+            warnings.push({
+                id: 'many_deletions',
+                message: t('validations.many_deletions', { n: changes.deleted.length })
+            });
+        }
+        return warnings;
+    };
+
+    return validation;
+};
+iD.validations.MissingTag = function() {
+
+    var validation = function(changes, graph) {
+        var warnings = [];
+        for (var i = 0; i < changes.created.length; i++) {
+            var change = changes.created[i],
+                geometry = change.geometry(graph);
+
+            if ((geometry === 'point' || geometry === 'line' || geometry === 'area') && !change.isUsed(graph)) {
+                warnings.push({
+                    id: 'missing_tag',
+                    message: t('validations.untagged_' + geometry),
+                    tooltip: t('validations.untagged_' + geometry + '_tooltip'),
+                    entity: change
+                });
+            }
+        }
+        return warnings;
+    };
+
+    return validation;
+};
+iD.validations.TagSuggestsArea = function() {
 
     // https://github.com/openstreetmap/josm/blob/mirror/src/org/
     // openstreetmap/josm/data/validation/tests/UnclosedWays.java#L80
-    function tagSuggestsArea(change) {
-        if (_.isEmpty(change.tags)) return false;
-        var tags = change.tags;
+    function tagSuggestsArea(tags) {
+        if (_.isEmpty(tags)) return false;
+
         var presence = ['landuse', 'amenities', 'tourism', 'shop'];
         for (var i = 0; i < presence.length; i++) {
             if (tags[presence[i]] !== undefined) {
                 return presence[i] + '=' + tags[presence[i]];
             }
         }
-        if (tags.building && tags.building === 'yes') return 'building=yes';
-    }
 
-    if (changes.deleted.length > 100) {
-        warnings.push({
-            message: t('validations.many_deletions', { n: changes.deleted.length })
-        });
+        if (tags.building && tags.building === 'yes') return 'building=yes';
     }
 
-    for (var i = 0; i < changes.created.length; i++) {
-        var change = changes.created[i],
-            geometry = change.geometry(graph);
-
-        if ((geometry === 'point' || geometry === 'line' || geometry === 'area') && !change.isUsed(graph)) {
-            warnings.push({
-                message: t('validations.untagged_' + geometry),
-                tooltip: t('validations.untagged_' + geometry + '_tooltip'),
-                entity: change
-            });
-        }
-
-        var deprecatedTags = change.deprecatedTags();
-        if (!_.isEmpty(deprecatedTags)) {
-            warnings.push({
-                message: t('validations.deprecated_tags', {
-                    tags: iD.util.tagText({ tags: deprecatedTags })
-                }), entity: change });
-        }
+    var validation = function(changes, graph) {
+        var warnings = [];
+        for (var i = 0; i < changes.created.length; i++) {
+            var change = changes.created[i],
+                geometry = change.geometry(graph),
+                suggestion = (geometry === 'line' ? tagSuggestsArea(change.tags) : undefined);
 
-        if (geometry === 'line' && tagSuggestsArea(change)) {
-            warnings.push({
-                message: t('validations.tag_suggests_area', {tag: tagSuggestsArea(change)}),
-                entity: change
-            });
+            if (suggestion) {
+                warnings.push({
+                    id: 'tag_suggests_area',
+                    message: t('validations.tag_suggests_area', { tag: suggestion }),
+                    entity: change
+                });
+            }
         }
-    }
+        return warnings;
+    };
 
-    return warnings;
+    return validation;
 };
-/* jshint ignore:start */
 })();
 window.locale = { _current: 'en' };
 
@@ -34233,464 +39480,445 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "yh:STRUCTURE",
         "yh:TOTYUMONO",
         "yh:TYPE",
+        "yh:WIDTH",
         "yh:WIDTH_RANK",
         "SK53_bulk:load"
     ],
     "wikipedia": [
         [
-            "English",
-            "English",
-            "en"
+            "Abkhazian",
+            "Аҧсшәа",
+            "ab"
         ],
         [
-            "German",
-            "Deutsch",
-            "de"
+            "Achinese",
+            "Acèh",
+            "ace"
         ],
         [
-            "Dutch",
-            "Nederlands",
-            "nl"
+            "Afrikaans",
+            "Afrikaans",
+            "af"
         ],
         [
-            "French",
-            "Français",
-            "fr"
+            "Akan",
+            "Akan",
+            "ak"
         ],
         [
-            "Italian",
-            "Italiano",
-            "it"
+            "Alemannisch",
+            "Alemannisch",
+            "als"
         ],
         [
-            "Russian",
-            "Русский",
-            "ru"
+            "Amharic",
+            "አማርኛ",
+            "am"
         ],
         [
-            "Spanish",
-            "Español",
-            "es"
+            "Aragonese",
+            "aragonés",
+            "an"
         ],
         [
-            "Polish",
-            "Polski",
-            "pl"
+            "Old English",
+            "Ænglisc",
+            "ang"
         ],
         [
-            "Swedish",
-            "Svenska",
-            "sv"
+            "Arabic",
+            "العربية",
+            "ar"
         ],
         [
-            "Japanese",
-            "日本語",
-            "ja"
+            "Aramaic",
+            "ܐܪܡܝܐ",
+            "arc"
         ],
         [
-            "Portuguese",
-            "Português",
-            "pt"
+            "Egyptian Arabic",
+            "مصرى",
+            "arz"
         ],
         [
-            "Chinese",
-            "中文",
-            "zh"
+            "Assamese",
+            "অসমীয়া",
+            "as"
         ],
         [
-            "Vietnamese",
-            "Tiếng Việt",
-            "vi"
+            "Asturian",
+            "asturianu",
+            "ast"
         ],
         [
-            "Ukrainian",
-            "УкÑ\80аÑ\97нÑ\81Ñ\8cка",
-            "uk"
+            "Avaric",
+            "аваÑ\80",
+            "av"
         ],
         [
-            "Catalan",
-            "Català",
-            "ca"
+            "Aymara",
+            "Aymar aru",
+            "ay"
         ],
         [
-            "Norwegian (Bokmål)",
-            "Norsk (Bokmål)",
-            "no"
+            "Azerbaijani",
+            "azərbaycanca",
+            "az"
         ],
         [
-            "Waray-Waray",
-            "Winaray",
-            "war"
+            "South Azerbaijani",
+            "تۆرکجه",
+            "azb"
         ],
         [
-            "Cebuano",
-            "Sinugboanong Binisaya",
-            "ceb"
+            "Bashkir",
+            "башҡортса",
+            "ba"
         ],
         [
-            "Finnish",
-            "Suomi",
-            "fi"
+            "Bavarian",
+            "Boarisch",
+            "bar"
         ],
         [
-            "Persian",
-            "فارسی",
-            "fa"
+            "Samogitian",
+            "žemaitėška",
+            "bat-smg"
         ],
         [
-            "Czech",
-            "Čeština",
-            "cs"
+            "Bikol Central",
+            "Bikol Central",
+            "bcl"
         ],
         [
-            "Hungarian",
-            "Magyar",
-            "hu"
+            "Belarusian",
+            "беларуская",
+            "be"
         ],
         [
-            "Korean",
-            "한국어",
-            "ko"
+            "беларуская (тарашкевіца)‎",
+            "беларуская (тарашкевіца)‎",
+            "be-x-old"
         ],
         [
-            "Romanian",
-            "Română",
-            "ro"
+            "Bulgarian",
+            "български",
+            "bg"
         ],
         [
-            "Arabic",
-            "العربية",
-            "ar"
+            "भोजपुरी",
+            "भोजपुरी",
+            "bh"
         ],
         [
-            "Turkish",
-            "Türkçe",
-            "tr"
+            "Bislama",
+            "Bislama",
+            "bi"
         ],
         [
-            "Indonesian",
-            "Bahasa Indonesia",
-            "id"
+            "Banjar",
+            "Bahasa Banjar",
+            "bjn"
         ],
         [
-            "Kazakh",
-            "Қазақша",
-            "kk"
+            "Bambara",
+            "bamanankan",
+            "bm"
         ],
         [
-            "Malay",
-            "Bahasa Melayu",
-            "ms"
+            "Bengali",
+            "বাংলা",
+            "bn"
         ],
         [
-            "Serbian",
-            "Српски / Srpski",
-            "sr"
+            "Tibetan",
+            "བོད་ཡིག",
+            "bo"
         ],
         [
-            "Slovak",
-            "Slovenčina",
-            "sk"
+            "Bishnupriya",
+            "বিষ্ণুপ্রিয়া মণিপুরী",
+            "bpy"
         ],
         [
-            "Esperanto",
-            "Esperanto",
-            "eo"
+            "Breton",
+            "brezhoneg",
+            "br"
         ],
         [
-            "Danish",
-            "Dansk",
-            "da"
+            "Bosnian",
+            "bosanski",
+            "bs"
         ],
         [
-            "Lithuanian",
-            "Lietuvių",
-            "lt"
+            "Buginese",
+            "ᨅᨔ ᨕᨘᨁᨗ",
+            "bug"
         ],
         [
-            "Basque",
-            "Euskara",
-            "eu"
+            "буряад",
+            "буряад",
+            "bxr"
         ],
         [
-            "Bulgarian",
-            "Български",
-            "bg"
+            "Catalan",
+            "català",
+            "ca"
         ],
         [
-            "Hebrew",
-            "עברית",
-            "he"
+            "Chavacano de Zamboanga",
+            "Chavacano de Zamboanga",
+            "cbk-zam"
         ],
         [
-            "Slovenian",
-            "Slovenščina",
-            "sl"
+            "Min Dong Chinese",
+            "Mìng-dĕ̤ng-ngṳ̄",
+            "cdo"
         ],
         [
-            "Croatian",
-            "Hrvatski",
-            "hr"
+            "Chechen",
+            "нохчийн",
+            "ce"
         ],
         [
-            "Volapük",
-            "Volapük",
-            "vo"
+            "Cebuano",
+            "Cebuano",
+            "ceb"
         ],
         [
-            "Estonian",
-            "Eesti",
-            "et"
+            "Chamorro",
+            "Chamoru",
+            "ch"
         ],
         [
-            "Hindi",
-            "हिन्दी",
-            "hi"
+            "Cherokee",
+            "ᏣᎳᎩ",
+            "chr"
         ],
         [
-            "Uzbek",
-            "O‘zbek",
-            "uz"
+            "Cheyenne",
+            "Tsetsêhestâhese",
+            "chy"
         ],
         [
-            "Galician",
-            "Galego",
-            "gl"
+            "Central Kurdish",
+            "کوردیی ناوەندی",
+            "ckb"
         ],
         [
-            "Norwegian (Nynorsk)",
-            "Nynorsk",
-            "nn"
+            "Corsican",
+            "corsu",
+            "co"
         ],
         [
-            "Simple English",
-            "Simple English",
-            "simple"
+            "Cree",
+            "Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ",
+            "cr"
         ],
         [
-            "Azerbaijani",
-            "Azərbaycanca",
-            "az"
+            "Crimean Turkish",
+            "qırımtatarca",
+            "crh"
         ],
         [
-            "Latin",
-            "Latina",
-            "la"
+            "Czech",
+            "čeština",
+            "cs"
         ],
         [
-            "Greek",
-            "Ελληνικά",
-            "el"
+            "Kashubian",
+            "kaszëbsczi",
+            "csb"
         ],
         [
-            "Thai",
-            "ไทย",
-            "th"
+            "Church Slavic",
+            "словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ",
+            "cu"
         ],
         [
-            "Serbo-Croatian",
-            "Srpskohrvatski / Српскохрватски",
-            "sh"
+            "Chuvash",
+            "Чӑвашла",
+            "cv"
         ],
         [
-            "Georgian",
-            "ქართული",
-            "ka"
+            "Welsh",
+            "Cymraeg",
+            "cy"
         ],
         [
-            "Occitan",
-            "Occitan",
-            "oc"
+            "Danish",
+            "dansk",
+            "da"
         ],
         [
-            "Macedonian",
-            "Македонски",
-            "mk"
+            "German",
+            "Deutsch",
+            "de"
         ],
         [
-            "Newar / Nepal Bhasa",
-            "नेपाल भाषा",
-            "new"
+            "Zazaki",
+            "Zazaki",
+            "diq"
         ],
         [
-            "Tagalog",
-            "Tagalog",
-            "tl"
+            "Lower Sorbian",
+            "dolnoserbski",
+            "dsb"
         ],
         [
-            "Piedmontese",
-            "Piemontèis",
-            "pms"
+            "Divehi",
+            "ދިވެހިބަސް",
+            "dv"
         ],
         [
-            "Belarusian",
-            "Беларуская",
-            "be"
+            "Dzongkha",
+            "ཇོང་ཁ",
+            "dz"
         ],
         [
-            "Haitian",
-            "Krèyol ayisyen",
-            "ht"
+            "Ewe",
+            "eʋegbe",
+            "ee"
         ],
         [
-            "Tamil",
-            "தமிழ்",
-            "ta"
-        ],
-        [
-            "Telugu",
-            "తెలుగు",
-            "te"
-        ],
-        [
-            "Belarusian (Taraškievica)",
-            "Беларуская (тарашкевіца)",
-            "be-x-old"
-        ],
-        [
-            "Latvian",
-            "Latviešu",
-            "lv"
-        ],
-        [
-            "Breton",
-            "Brezhoneg",
-            "br"
+            "Greek",
+            "Ελληνικά",
+            "el"
         ],
         [
-            "Malagasy",
-            "Malagasy",
-            "mg"
+            "Emiliano-Romagnolo",
+            "emiliàn e rumagnòl",
+            "eml"
         ],
         [
-            "Albanian",
-            "Shqip",
-            "sq"
+            "English",
+            "English",
+            "en"
         ],
         [
-            "Armenian",
-            "Հայերեն",
-            "hy"
+            "Esperanto",
+            "Esperanto",
+            "eo"
         ],
         [
-            "Tatar",
-            "Tatarça / Татарча",
-            "tt"
+            "Spanish",
+            "español",
+            "es"
         ],
         [
-            "Javanese",
-            "Basa Jawa",
-            "jv"
+            "Estonian",
+            "eesti",
+            "et"
         ],
         [
-            "Welsh",
-            "Cymraeg",
-            "cy"
+            "Basque",
+            "euskara",
+            "eu"
         ],
         [
-            "Marathi",
-            "मराठी",
-            "mr"
+            "Extremaduran",
+            "estremeñu",
+            "ext"
         ],
         [
-            "Luxembourgish",
-            "Lëtzebuergesch",
-            "lb"
+            "Persian",
+            "فارسی",
+            "fa"
         ],
         [
-            "Icelandic",
-            "Íslenska",
-            "is"
+            "Fulah",
+            "Fulfulde",
+            "ff"
         ],
         [
-            "Bosnian",
-            "Bosanski",
-            "bs"
+            "Finnish",
+            "suomi",
+            "fi"
         ],
         [
-            "Burmese",
-            "မြန်မာဘာသာ",
-            "my"
+            "Võro",
+            "Võro",
+            "fiu-vro"
         ],
         [
-            "Yoruba",
-            "Yorùbá",
-            "yo"
+            "Fijian",
+            "Na Vosa Vakaviti",
+            "fj"
         ],
         [
-            "Bashkir",
-            "Башҡорт",
-            "ba"
+            "Faroese",
+            "føroyskt",
+            "fo"
         ],
         [
-            "Malayalam",
-            "മലയാളം",
-            "ml"
+            "French",
+            "français",
+            "fr"
         ],
         [
-            "Aragonese",
-            "Aragonés",
-            "an"
+            "Arpitan",
+            "arpetan",
+            "frp"
         ],
         [
-            "Lombard",
-            "Lumbaart",
-            "lmo"
+            "Northern Frisian",
+            "Nordfriisk",
+            "frr"
         ],
         [
-            "Afrikaans",
-            "Afrikaans",
-            "af"
+            "Friulian",
+            "furlan",
+            "fur"
         ],
         [
-            "West Frisian",
+            "Western Frisian",
             "Frysk",
             "fy"
         ],
         [
-            "Western Panjabi",
-            "شاہ مکھی پنجابی (Shāhmukhī Pañjābī)",
-            "pnb"
+            "Irish",
+            "Gaeilge",
+            "ga"
         ],
         [
-            "Bengali",
-            "বাংলা",
-            "bn"
+            "Gagauz",
+            "Gagauz",
+            "gag"
         ],
         [
-            "Swahili",
-            "Kiswahili",
-            "sw"
+            "Gan Chinese",
+            "贛語",
+            "gan"
         ],
         [
-            "Bishnupriya Manipuri",
-            "ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী",
-            "bpy"
+            "Scottish Gaelic",
+            "Gàidhlig",
+            "gd"
         ],
         [
-            "Ido",
-            "Ido",
-            "io"
+            "Galician",
+            "galego",
+            "gl"
         ],
         [
-            "Kirghiz",
-            "Кыргызча",
-            "ky"
+            "Gilaki",
+            "گیلکی",
+            "glk"
         ],
         [
-            "Urdu",
-            "اردو",
-            "ur"
+            "Guarani",
+            "Avañe'ẽ",
+            "gn"
         ],
         [
-            "Nepali",
-            "नà¥\87पालà¥\80",
-            "ne"
+            "Goan Konkani",
+            "à¤\97à¥\8bवा à¤\95à¥\8bà¤\82à¤\95णà¥\80 / Gova Konknni",
+            "gom"
         ],
         [
-            "Sicilian",
-            "Sicilianu",
-            "scn"
+            "Gothic",
+            "𐌲𐌿𐍄𐌹𐍃𐌺",
+            "got"
         ],
         [
             "Gujarati",
@@ -34698,439 +39926,439 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "gu"
         ],
         [
-            "Cantonese",
-            "粵語",
-            "zh-yue"
+            "Manx",
+            "Gaelg",
+            "gv"
         ],
         [
-            "Low Saxon",
-            "Plattdüütsch",
-            "nds"
+            "Hausa",
+            "Hausa",
+            "ha"
         ],
         [
-            "Kurdish",
-            "Kurdî / كوردی",
-            "ku"
+            "Hakka Chinese",
+            "客家語/Hak-kâ-ngî",
+            "hak"
         ],
         [
-            "Irish",
-            "Gaeilge",
-            "ga"
+            "Hawaiian",
+            "Hawai`i",
+            "haw"
         ],
         [
-            "Asturian",
-            "Asturianu",
-            "ast"
+            "Hebrew",
+            "עברית",
+            "he"
         ],
         [
-            "Quechua",
-            "Runa Simi",
-            "qu"
+            "Hindi",
+            "हिन्दी",
+            "hi"
         ],
         [
-            "Sundanese",
-            "Basa Sunda",
-            "su"
+            "Fiji Hindi",
+            "Fiji Hindi",
+            "hif"
         ],
         [
-            "Chuvash",
-            "Чăваш",
-            "cv"
+            "Croatian",
+            "hrvatski",
+            "hr"
         ],
         [
-            "Scots",
-            "Scots",
-            "sco"
+            "Upper Sorbian",
+            "hornjoserbsce",
+            "hsb"
         ],
         [
-            "Interlingua",
-            "Interlingua",
-            "ia"
+            "Haitian",
+            "Kreyòl ayisyen",
+            "ht"
         ],
         [
-            "Alemannic",
-            "Alemannisch",
-            "als"
+            "Hungarian",
+            "magyar",
+            "hu"
         ],
         [
-            "Buginese",
-            "Basa Ugi",
-            "bug"
+            "Armenian",
+            "Հայերեն",
+            "hy"
         ],
         [
-            "Neapolitan",
-            "Nnapulitano",
-            "nap"
+            "Interlingua",
+            "interlingua",
+            "ia"
         ],
         [
-            "Samogitian",
-            "Žemaitėška",
-            "bat-smg"
+            "Indonesian",
+            "Bahasa Indonesia",
+            "id"
         ],
         [
-            "Kannada",
-            "ಕನ್ನಡ",
-            "kn"
+            "Interlingue",
+            "Interlingue",
+            "ie"
         ],
         [
-            "Banyumasan",
-            "Basa Banyumasan",
-            "map-bms"
+            "Igbo",
+            "Igbo",
+            "ig"
         ],
         [
-            "Walloon",
-            "Walon",
-            "wa"
+            "Inupiaq",
+            "Iñupiak",
+            "ik"
         ],
         [
-            "Amharic",
-            "አማርኛ",
-            "am"
+            "Iloko",
+            "Ilokano",
+            "ilo"
         ],
         [
-            "Sorani",
-            "Soranî / کوردی",
-            "ckb"
+            "Ido",
+            "Ido",
+            "io"
         ],
         [
-            "Scottish Gaelic",
-            "Gàidhlig",
-            "gd"
+            "Icelandic",
+            "íslenska",
+            "is"
         ],
         [
-            "Fiji Hindi",
-            "Fiji Hindi",
-            "hif"
+            "Italian",
+            "italiano",
+            "it"
         ],
         [
-            "Min Nan",
-            "Bân-lâm-gú",
-            "zh-min-nan"
+            "Inuktitut",
+            "ᐃᓄᒃᑎᑐᑦ/inuktitut",
+            "iu"
         ],
         [
-            "Tajik",
-            "Тоҷикӣ",
-            "tg"
+            "Japanese",
+            "日本語",
+            "ja"
         ],
         [
-            "Mazandarani",
-            "مَزِروني",
-            "mzn"
+            "Lojban",
+            "Lojban",
+            "jbo"
         ],
         [
-            "Egyptian Arabic",
-            "مصرى (Maṣrī)",
-            "arz"
+            "Javanese",
+            "Basa Jawa",
+            "jv"
         ],
         [
-            "Yiddish",
-            "ייִדיש",
-            "yi"
+            "Georgian",
+            "ქართული",
+            "ka"
         ],
         [
-            "Venetian",
-            "Vèneto",
-            "vec"
+            "Kara-Kalpak",
+            "Qaraqalpaqsha",
+            "kaa"
         ],
         [
-            "Mongolian",
-            "Монгол",
-            "mn"
+            "Kabyle",
+            "Taqbaylit",
+            "kab"
         ],
         [
-            "Tarantino",
-            "Tarandíne",
-            "roa-tara"
+            "Kabardian",
+            "Адыгэбзэ",
+            "kbd"
         ],
         [
-            "Sanskrit",
-            "संस्कृतम्",
-            "sa"
+            "Kongo",
+            "Kongo",
+            "kg"
         ],
         [
-            "Nahuatl",
-            "Nāhuatl",
-            "nah"
+            "Kikuyu",
+            "Gĩkũyũ",
+            "ki"
         ],
         [
-            "Ossetian",
-            "Иронау",
-            "os"
+            "Kazakh",
+            "қазақша",
+            "kk"
         ],
         [
-            "Sakha",
-            "Саха тыла (Saxa Tyla)",
-            "sah"
+            "Kalaallisut",
+            "kalaallisut",
+            "kl"
         ],
         [
-            "Kapampangan",
-            "Kapampangan",
-            "pam"
+            "Khmer",
+            "ភាសាខ្មែរ",
+            "km"
         ],
         [
-            "Upper Sorbian",
-            "Hornjoserbsce",
-            "hsb"
+            "Kannada",
+            "ಕನ್ನಡ",
+            "kn"
         ],
         [
-            "Sinhalese",
-            "සිංහල",
-            "si"
+            "Korean",
+            "한국어",
+            "ko"
         ],
         [
-            "Northern Sami",
-            "Sámegiella",
-            "se"
+            "Komi-Permyak",
+            "Перем Коми",
+            "koi"
         ],
         [
-            "Limburgish",
-            "Limburgs",
-            "li"
+            "Karachay-Balkar",
+            "къарачай-малкъар",
+            "krc"
         ],
         [
-            "Maori",
-            "Māori",
-            "mi"
+            "Kashmiri",
+            "कॉशुर / کٲشُر",
+            "ks"
         ],
         [
-            "Bavarian",
-            "Boarisch",
-            "bar"
+            "Colognian",
+            "Ripoarisch",
+            "ksh"
         ],
         [
-            "Corsican",
-            "Corsu",
-            "co"
+            "Kurdish",
+            "Kurdî",
+            "ku"
         ],
         [
-            "Ilokano",
-            "Ilokano",
-            "ilo"
+            "Komi",
+            "коми",
+            "kv"
         ],
         [
-            "Gan",
-            "贛語",
-            "gan"
+            "Cornish",
+            "kernowek",
+            "kw"
         ],
         [
-            "Tibetan",
-            "བོད་སྐད",
-            "bo"
+            "Kyrgyz",
+            "Кыргызча",
+            "ky"
         ],
         [
-            "Gilaki",
-            "گیلکی",
-            "glk"
+            "Latin",
+            "Latina",
+            "la"
         ],
         [
-            "Faroese",
-            "Føroyskt",
-            "fo"
+            "Ladino",
+            "Ladino",
+            "lad"
         ],
         [
-            "Rusyn",
-            "русиньскый язык",
-            "rue"
+            "Luxembourgish",
+            "Lëtzebuergesch",
+            "lb"
         ],
         [
-            "Punjabi",
-            "ਪੰਜਾਬੀ",
-            "pa"
+            "лакку",
+            "лакку",
+            "lbe"
         ],
         [
-            "Central_Bicolano",
-            "Bikol",
-            "bcl"
+            "Lezghian",
+            "лезги",
+            "lez"
         ],
         [
-            "Hill Mari",
-            "Кырык Мары (Kyryk Mary) ",
-            "mrj"
+            "Ganda",
+            "Luganda",
+            "lg"
         ],
         [
-            "Võro",
-            "Võro",
-            "fiu-vro"
+            "Limburgish",
+            "Limburgs",
+            "li"
         ],
         [
-            "Dutch Low Saxon",
-            "Nedersaksisch",
-            "nds-nl"
+            "Ligurian",
+            "Ligure",
+            "lij"
         ],
         [
-            "Turkmen",
-            "تركمن / Туркмен",
-            "tk"
+            "Lombard",
+            "lumbaart",
+            "lmo"
         ],
         [
-            "Pashto",
-            "پښتو",
-            "ps"
+            "Lingala",
+            "lingála",
+            "ln"
         ],
         [
-            "West Flemish",
-            "West-Vlams",
-            "vls"
+            "Lao",
+            "ລາວ",
+            "lo"
         ],
         [
-            "Mingrelian",
-            "მარგალური (Margaluri)",
-            "xmf"
+            "Northern Luri",
+            "لۊری شومالی",
+            "lrc"
         ],
         [
-            "Manx",
-            "Gaelg",
-            "gv"
+            "Lithuanian",
+            "lietuvių",
+            "lt"
         ],
         [
-            "Zazaki",
-            "Zazaki",
-            "diq"
+            "Latgalian",
+            "latgaļu",
+            "ltg"
         ],
         [
-            "Pangasinan",
-            "Pangasinan",
-            "pag"
+            "Latvian",
+            "latviešu",
+            "lv"
         ],
         [
-            "Komi",
-            "Коми",
-            "kv"
+            "Maithili",
+            "मैथिली",
+            "mai"
         ],
         [
-            "Zeelandic",
-            "Zeêuws",
-            "zea"
+            "Basa Banyumasan",
+            "Basa Banyumasan",
+            "map-bms"
         ],
         [
-            "Divehi",
-            "ދިވެހިބަސް",
-            "dv"
+            "Moksha",
+            "мокшень",
+            "mdf"
         ],
         [
-            "Oriya",
-            "ଓଡ଼ିଆ",
-            "or"
+            "Malagasy",
+            "Malagasy",
+            "mg"
         ],
         [
-            "Khmer",
-            "ភាសាខ្មែរ",
-            "km"
+            "Eastern Mari",
+            "олык марий",
+            "mhr"
         ],
         [
-            "Norman",
-            "Nouormand/Normaund",
-            "nrm"
+            "Maori",
+            "Māori",
+            "mi"
         ],
         [
-            "Romansh",
-            "Rumantsch",
-            "rm"
+            "Minangkabau",
+            "Baso Minangkabau",
+            "min"
         ],
         [
-            "Komi-Permyak",
-            "Ð\9fеÑ\80ем Ð\9aоми (Perem Komi)",
-            "koi"
+            "Macedonian",
+            "македонÑ\81ки",
+            "mk"
         ],
         [
-            "Udmurt",
-            "Удмурт кыл",
-            "udm"
+            "Malayalam",
+            "മലയാളം",
+            "ml"
         ],
         [
-            "Meadow Mari",
-            "Ð\9eлÑ\8bк Ð\9cаÑ\80ий (Olyk Marij)",
-            "mhr"
+            "Mongolian",
+            "монгол",
+            "mn"
         ],
         [
-            "Ladino",
-            "Dzhudezmo",
-            "lad"
+            "Marathi",
+            "मराठी",
+            "mr"
         ],
         [
-            "North Frisian",
-            "Nordfriisk",
-            "frr"
+            "Western Mari",
+            "кырык мары",
+            "mrj"
         ],
         [
-            "Kashubian",
-            "Kaszëbsczi",
-            "csb"
+            "Malay",
+            "Bahasa Melayu",
+            "ms"
         ],
         [
-            "Ligurian",
-            "Líguru",
-            "lij"
+            "Maltese",
+            "Malti",
+            "mt"
         ],
         [
-            "Wu",
-            "吴语",
-            "wuu"
+            "Mirandese",
+            "Mirandés",
+            "mwl"
         ],
         [
-            "Friulian",
-            "Furlan",
-            "fur"
+            "Burmese",
+            "မြန်မာဘာသာ",
+            "my"
         ],
         [
-            "Vepsian",
-            "Vepsän",
-            "vep"
+            "Erzya",
+            "эрзянь",
+            "myv"
         ],
         [
-            "Classical Chinese",
-            "古文 / 文言文",
-            "zh-classical"
+            "Mazanderani",
+            "مازِرونی",
+            "mzn"
         ],
         [
-            "Uyghur",
-            "ئۇيغۇر تىلى",
-            "ug"
+            "Nauru",
+            "Dorerin Naoero",
+            "na"
         ],
         [
-            "Saterland Frisian",
-            "Seeltersk",
-            "stq"
+            "Nāhuatl",
+            "Nāhuatl",
+            "nah"
         ],
         [
-            "Sardinian",
-            "Sardu",
-            "sc"
+            "Neapolitan",
+            "Napulitano",
+            "nap"
         ],
         [
-            "Aromanian",
-            "Armãneashce",
-            "roa-rup"
+            "Low German",
+            "Plattdüütsch",
+            "nds"
         ],
         [
-            "Pali",
-            "पाऴि",
-            "pi"
+            "Low Saxon (Netherlands)",
+            "Nedersaksies",
+            "nds-nl"
         ],
         [
-            "Somali",
-            "Soomaaliga",
-            "so"
+            "Nepali",
+            "नेपाली",
+            "ne"
         ],
         [
-            "Bihari",
-            "भà¥\8bà¤\9cपà¥\81रà¥\80",
-            "bh"
+            "Newari",
+            "नà¥\87पाल à¤­à¤¾à¤·à¤¾",
+            "new"
         ],
         [
-            "Maltese",
-            "Malti",
-            "mt"
+            "Dutch",
+            "Nederlands",
+            "nl"
         ],
         [
-            "Aymara",
-            "Aymar",
-            "ay"
+            "Norwegian Nynorsk",
+            "norsk nynorsk",
+            "nn"
         ],
         [
-            "Ripuarian",
-            "Ripoarisch",
-            "ksh"
+            "Norwegian",
+            "norsk bokmål",
+            "no"
         ],
         [
             "Novial",
@@ -35138,14 +40366,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "nov"
         ],
         [
-            "Anglo-Saxon",
-            "Englisc",
-            "ang"
+            "Nouormand",
+            "Nouormand",
+            "nrm"
         ],
         [
-            "Cornish",
-            "Kernewek/Karnuack",
-            "kw"
+            "Northern Sotho",
+            "Sesotho sa Leboa",
+            "nso"
         ],
         [
             "Navajo",
@@ -35153,459 +40381,454 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "nv"
         ],
         [
-            "Picard",
-            "Picard",
-            "pcd"
-        ],
-        [
-            "Hakka",
-            "Hak-kâ-fa / 客家話",
-            "hak"
+            "Nyanja",
+            "Chi-Chewa",
+            "ny"
         ],
         [
-            "Guarani",
-            "Avañe'ẽ",
-            "gn"
+            "Occitan",
+            "occitan",
+            "oc"
         ],
         [
-            "Extremaduran",
-            "Estremeñu",
-            "ext"
+            "Oromo",
+            "Oromoo",
+            "om"
         ],
         [
-            "Franco-Provençal/Arpitan",
-            "Arpitan",
-            "frp"
+            "Oriya",
+            "ଓଡ଼ିଆ",
+            "or"
         ],
         [
-            "Assamese",
-            "অসমীয়া",
-            "as"
+            "Ossetic",
+            "Ирон",
+            "os"
         ],
         [
-            "Silesian",
-            "Ślůnski",
-            "szl"
+            "Punjabi",
+            "ਪੰਜਾਬੀ",
+            "pa"
         ],
         [
-            "Gagauz",
-            "Gagauz",
-            "gag"
+            "Pangasinan",
+            "Pangasinan",
+            "pag"
         ],
         [
-            "Interlingue",
-            "Interlingue",
-            "ie"
+            "Pampanga",
+            "Kapampangan",
+            "pam"
         ],
         [
-            "Lingala",
-            "Lingala",
-            "ln"
+            "Papiamento",
+            "Papiamentu",
+            "pap"
         ],
         [
-            "Emilian-Romagnol",
-            "Emiliàn e rumagnòl",
-            "eml"
+            "Picard",
+            "Picard",
+            "pcd"
         ],
         [
-            "Chechen",
-            "Нохчийн",
-            "ce"
+            "Pennsylvania German",
+            "Deitsch",
+            "pdc"
         ],
         [
-            "Kalmyk",
-            "Хальмг",
-            "xal"
+            "Palatine German",
+            "Pälzisch",
+            "pfl"
         ],
         [
-            "Palatinate German",
-            "Pfälzisch",
-            "pfl"
+            "Pali",
+            "पालि",
+            "pi"
         ],
         [
-            "Hawaiian",
-            "Hawai`i",
-            "haw"
+            "Norfuk / Pitkern",
+            "Norfuk / Pitkern",
+            "pih"
         ],
         [
-            "Karachay-Balkar",
-            "Къарачай-Малкъар (Qarachay-Malqar)",
-            "krc"
+            "Polish",
+            "polski",
+            "pl"
         ],
         [
-            "Pennsylvania German",
-            "Deitsch",
-            "pdc"
+            "Piedmontese",
+            "Piemontèis",
+            "pms"
         ],
         [
-            "Kinyarwanda",
-            "Ikinyarwanda",
-            "rw"
+            "Western Punjabi",
+            "پنجابی",
+            "pnb"
         ],
         [
-            "Crimean Tatar",
-            "Qırımtatarca",
-            "crh"
+            "Pontic",
+            "Ποντιακά",
+            "pnt"
         ],
         [
-            "Acehnese",
-            "Bahsa Acèh",
-            "ace"
+            "Pashto",
+            "پښتو",
+            "ps"
         ],
         [
-            "Tongan",
-            "faka Tonga",
-            "to"
+            "Portuguese",
+            "português",
+            "pt"
         ],
         [
-            "Greenlandic",
-            "Kalaallisut",
-            "kl"
+            "Quechua",
+            "Runa Simi",
+            "qu"
         ],
         [
-            "Lower Sorbian",
-            "Dolnoserbski",
-            "dsb"
+            "Romansh",
+            "rumantsch",
+            "rm"
         ],
         [
-            "Aramaic",
-            "ܐܪܡܝܐ",
-            "arc"
+            "Romani",
+            "Romani",
+            "rmy"
         ],
         [
-            "Erzya",
-            "Эрзянь (Erzjanj Kelj)",
-            "myv"
+            "Rundi",
+            "Kirundi",
+            "rn"
         ],
         [
-            "Lezgian",
-            "Лезги чІал (Lezgi č’al)",
-            "lez"
+            "Romanian",
+            "română",
+            "ro"
         ],
         [
-            "Banjar",
-            "Bahasa Banjar",
-            "bjn"
+            "Aromanian",
+            "armãneashti",
+            "roa-rup"
         ],
         [
-            "Shona",
-            "chiShona",
-            "sn"
+            "tarandíne",
+            "tarandíne",
+            "roa-tara"
         ],
         [
-            "Papiamentu",
-            "Papiamentu",
-            "pap"
+            "Russian",
+            "русский",
+            "ru"
         ],
         [
-            "Kabyle",
-            "Taqbaylit",
-            "kab"
+            "Rusyn",
+            "русиньскый",
+            "rue"
         ],
         [
-            "Tok Pisin",
-            "Tok Pisin",
-            "tpi"
+            "Kinyarwanda",
+            "Kinyarwanda",
+            "rw"
         ],
         [
-            "Lak",
-            "Лакку",
-            "lbe"
+            "Sanskrit",
+            "संस्कृतम्",
+            "sa"
         ],
         [
-            "Buryat (Russia)",
-            "Буряад",
-            "bxr"
+            "Sakha",
+            "саха тыла",
+            "sah"
         ],
         [
-            "Lojban",
-            "Lojban",
-            "jbo"
+            "Sardinian",
+            "sardu",
+            "sc"
         ],
         [
-            "Wolof",
-            "Wolof",
-            "wo"
+            "Sicilian",
+            "sicilianu",
+            "scn"
         ],
         [
-            "Moksha",
-            "Мокшень (Mokshanj Kälj)",
-            "mdf"
+            "Scots",
+            "Scots",
+            "sco"
         ],
         [
-            "Zamboanga Chavacano",
-            "Chavacano de Zamboanga",
-            "cbk-zam"
+            "Sindhi",
+            "سنڌي",
+            "sd"
         ],
         [
-            "Avar",
-            "Авар",
-            "av"
+            "Northern Sami",
+            "sámegiella",
+            "se"
         ],
         [
-            "Sranan",
-            "Sranantongo",
-            "srn"
+            "Sango",
+            "Sängö",
+            "sg"
         ],
         [
-            "Mirandese",
-            "Mirandés",
-            "mwl"
+            "Serbo-Croatian",
+            "srpskohrvatski / српскохрватски",
+            "sh"
         ],
         [
-            "Kabardian Circassian",
-            "Адыгэбзэ (Adighabze)",
-            "kbd"
+            "Sinhala",
+            "සිංහල",
+            "si"
         ],
         [
-            "Tahitian",
-            "Reo Mā`ohi",
-            "ty"
+            "Simple English",
+            "Simple English",
+            "simple"
         ],
         [
-            "Lao",
-            "ລາວ",
-            "lo"
+            "Slovak",
+            "slovenčina",
+            "sk"
         ],
         [
-            "Abkhazian",
-            "Аҧсуа",
-            "ab"
+            "Slovenian",
+            "slovenščina",
+            "sl"
         ],
         [
-            "Tetum",
-            "Tetun",
-            "tet"
+            "Samoan",
+            "Gagana Samoa",
+            "sm"
         ],
         [
-            "Latgalian",
-            "Latgaļu",
-            "ltg"
+            "Shona",
+            "chiShona",
+            "sn"
         ],
         [
-            "Nauruan",
-            "dorerin Naoero",
-            "na"
+            "Somali",
+            "Soomaaliga",
+            "so"
         ],
         [
-            "Kongo",
-            "KiKongo",
-            "kg"
+            "Albanian",
+            "shqip",
+            "sq"
         ],
         [
-            "Igbo",
-            "Igbo",
-            "ig"
+            "Serbian",
+            "српски / srpski",
+            "sr"
         ],
         [
-            "Northern Sotho",
-            "Sesotho sa Leboa",
-            "nso"
+            "Sranan Tongo",
+            "Sranantongo",
+            "srn"
         ],
         [
-            "Zhuang",
-            "Cuengh",
-            "za"
+            "Swati",
+            "SiSwati",
+            "ss"
         ],
         [
-            "Karakalpak",
-            "Qaraqalpaqsha",
-            "kaa"
+            "Southern Sotho",
+            "Sesotho",
+            "st"
         ],
         [
-            "Zulu",
-            "isiZulu",
-            "zu"
+            "Saterland Frisian",
+            "Seeltersk",
+            "stq"
         ],
         [
-            "Cheyenne",
-            "Tsetsêhestâhese",
-            "chy"
+            "Sundanese",
+            "Basa Sunda",
+            "su"
         ],
         [
-            "Romani",
-            "romani - रोमानी",
-            "rmy"
+            "Swedish",
+            "svenska",
+            "sv"
         ],
         [
-            "Old Church Slavonic",
-            "Словѣньскъ",
-            "cu"
+            "Swahili",
+            "Kiswahili",
+            "sw"
         ],
         [
-            "Tswana",
-            "Setswana",
-            "tn"
+            "Silesian",
+            "ślůnski",
+            "szl"
         ],
         [
-            "Cherokee",
-            "ᏣᎳᎩ",
-            "chr"
+            "Tamil",
+            "தமிழ்",
+            "ta"
         ],
         [
-            "Bislama",
-            "Bislama",
-            "bi"
+            "Telugu",
+            "తెలుగు",
+            "te"
         ],
         [
-            "Min Dong",
-            "Mìng-dĕ̤ng-ngṳ̄",
-            "cdo"
+            "Tetum",
+            "tetun",
+            "tet"
         ],
         [
-            "Gothic",
-            "𐌲𐌿𐍄𐌹𐍃𐌺",
-            "got"
+            "Tajik",
+            "тоҷикӣ",
+            "tg"
         ],
         [
-            "Samoan",
-            "Gagana Samoa",
-            "sm"
+            "Thai",
+            "ไทย",
+            "th"
         ],
         [
-            "Moldovan",
-            "Молдовеняскэ",
-            "mo"
+            "Tigrinya",
+            "ትግርኛ",
+            "ti"
         ],
         [
-            "Bambara",
-            "Bamanankan",
-            "bm"
+            "Turkmen",
+            "Türkmençe",
+            "tk"
         ],
         [
-            "Inuktitut",
-            "ᐃᓄᒃᑎᑐᑦ",
-            "iu"
+            "Tagalog",
+            "Tagalog",
+            "tl"
         ],
         [
-            "Norfolk",
-            "Norfuk",
-            "pih"
+            "Tswana",
+            "Setswana",
+            "tn"
         ],
         [
-            "Pontic",
-            "Ποντιακά",
-            "pnt"
+            "Tongan",
+            "lea faka-Tonga",
+            "to"
         ],
         [
-            "Sindhi",
-            "سنڌي، سندھی ، सिन्ध",
-            "sd"
+            "Tok Pisin",
+            "Tok Pisin",
+            "tpi"
         ],
         [
-            "Swati",
-            "SiSwati",
-            "ss"
+            "Turkish",
+            "Türkçe",
+            "tr"
         ],
         [
-            "Kikuyu",
-            "Gĩkũyũ",
-            "ki"
+            "Tsonga",
+            "Xitsonga",
+            "ts"
         ],
         [
-            "Ewe",
-            "Eʋegbe",
-            "ee"
+            "Tatar",
+            "татарча/tatarça",
+            "tt"
         ],
         [
-            "Hausa",
-            "هَوُسَ",
-            "ha"
+            "Tumbuka",
+            "chiTumbuka",
+            "tum"
         ],
         [
-            "Oromo",
-            "Oromoo",
-            "om"
+            "Twi",
+            "Twi",
+            "tw"
         ],
         [
-            "Fijian",
-            "Na Vosa Vakaviti",
-            "fj"
+            "Tahitian",
+            "reo tahiti",
+            "ty"
         ],
         [
-            "Tigrinya",
-            "ትግርኛ",
-            "ti"
+            "Tuvinian",
+            "тыва дыл",
+            "tyv"
         ],
         [
-            "Tsonga",
-            "Xitsonga",
-            "ts"
+            "Udmurt",
+            "удмурт",
+            "udm"
         ],
         [
-            "Kashmiri",
-            "कश्मीरी / كشميري",
-            "ks"
+            "Uyghur",
+            "ئۇيغۇرچە / Uyghurche",
+            "ug"
         ],
         [
-            "Venda",
-            "Tshivenda",
-            "ve"
+            "Ukrainian",
+            "українська",
+            "uk"
         ],
         [
-            "Sango",
-            "Sängö",
-            "sg"
+            "Urdu",
+            "اردو",
+            "ur"
         ],
         [
-            "Kirundi",
-            "Kirundi",
-            "rn"
+            "Uzbek",
+            "oʻzbekcha/ўзбекча",
+            "uz"
         ],
         [
-            "Sesotho",
-            "Sesotho",
-            "st"
+            "Venda",
+            "Tshivenda",
+            "ve"
         ],
         [
-            "Dzongkha",
-            "ཇོང་ཁ",
-            "dz"
+            "Venetian",
+            "vèneto",
+            "vec"
         ],
         [
-            "Cree",
-            "Nehiyaw",
-            "cr"
+            "Veps",
+            "vepsän kel’",
+            "vep"
         ],
         [
-            "Akan",
-            "Akana",
-            "ak"
+            "Vietnamese",
+            "Tiếng Việt",
+            "vi"
         ],
         [
-            "Tumbuka",
-            "chiTumbuka",
-            "tum"
+            "West Flemish",
+            "West-Vlams",
+            "vls"
         ],
         [
-            "Luganda",
-            "Luganda",
-            "lg"
+            "Volapük",
+            "Volapük",
+            "vo"
         ],
         [
-            "Chichewa",
-            "Chi-Chewa",
-            "ny"
+            "Walloon",
+            "walon",
+            "wa"
         ],
         [
-            "Fula",
-            "Fulfulde",
-            "ff"
+            "Waray",
+            "Winaray",
+            "war"
         ],
         [
-            "Inupiak",
-            "Iñupiak",
-            "ik"
+            "Wolof",
+            "Wolof",
+            "wo"
         ],
         [
-            "Chamorro",
-            "Chamoru",
-            "ch"
+            "Wu Chinese",
+            "吴语",
+            "wuu"
         ],
         [
-            "Twi",
-            "Twi",
-            "tw"
+            "Kalmyk",
+            "хальмг",
+            "xal"
         ],
         [
             "Xhosa",
@@ -35613,54 +40836,54 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "xh"
         ],
         [
-            "Ndonga",
-            "Oshiwambo",
-            "ng"
+            "Mingrelian",
+            "მარგალური",
+            "xmf"
         ],
         [
-            "Sichuan Yi",
-            "ꆇꉙ",
-            "ii"
+            "Yiddish",
+            "ייִדיש",
+            "yi"
         ],
         [
-            "Choctaw",
-            "Choctaw",
-            "cho"
+            "Yoruba",
+            "Yorùbá",
+            "yo"
         ],
         [
-            "Marshallese",
-            "Ebon",
-            "mh"
+            "Zhuang",
+            "Vahcuengh",
+            "za"
         ],
         [
-            "Afar",
-            "Afar",
-            "aa"
+            "Zeelandic",
+            "Zeêuws",
+            "zea"
         ],
         [
-            "Kuanyama",
-            "Kuanyama",
-            "kj"
+            "Chinese",
+            "中文",
+            "zh"
         ],
         [
-            "Hiri Motu",
-            "Hiri Motu",
-            "ho"
+            "Classical Chinese",
+            "文言",
+            "zh-classical"
         ],
         [
-            "Muscogee",
-            "Muskogee",
-            "mus"
+            "Chinese (Min Nan)",
+            "Bân-lâm-gú",
+            "zh-min-nan"
         ],
         [
-            "Kanuri",
-            "Kanuri",
-            "kr"
+            "Cantonese",
+            "粵語",
+            "zh-yue"
         ],
         [
-            "Herero",
-            "Otsiherero",
-            "hz"
+            "Zulu",
+            "isiZulu",
+            "zu"
         ]
     ],
     "imperial": {
@@ -45201,2461 +50424,2432 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                                 ],
                                 [
                                     -130.427926,
-                                    56.143964
-                                ],
-                                [
-                                    -130.418159,
-                                    56.129702
-                                ],
-                                [
-                                    -130.403974,
-                                    56.121898
-                                ],
-                                [
-                                    -130.290311,
-                                    56.10097
-                                ],
-                                [
-                                    -130.243156,
-                                    56.092391
-                                ],
-                                [
-                                    -130.211246,
-                                    56.089962
-                                ],
-                                [
-                                    -130.116756,
-                                    56.105646
-                                ],
-                                [
-                                    -130.094328,
-                                    56.101486
-                                ],
-                                [
-                                    -130.071539,
-                                    56.084123
-                                ],
-                                [
-                                    -130.039319,
-                                    56.045521
-                                ],
-                                [
-                                    -130.026632,
-                                    56.024101
-                                ],
-                                [
-                                    -130.01901,
-                                    56.002216
-                                ],
-                                [
-                                    -130.014695,
-                                    55.963252
-                                ],
-                                [
-                                    -130.016788,
-                                    55.918913
-                                ],
-                                [
-                                    -130.019612,
-                                    55.907978
-                                ],
-                                [
-                                    -130.019618,
-                                    55.907952
-                                ],
-                                [
-                                    -130.022817,
-                                    55.901353
-                                ],
-                                [
-                                    -130.049387,
-                                    55.871405
-                                ],
-                                [
-                                    -130.104726,
-                                    55.825263
-                                ],
-                                [
-                                    -130.136627,
-                                    55.806464
-                                ],
-                                [
-                                    -130.148834,
-                                    55.795356
-                                ],
-                                [
-                                    -130.163482,
-                                    55.771145
-                                ],
-                                [
-                                    -130.167307,
-                                    55.766262
-                                ],
-                                [
-                                    -130.170806,
-                                    55.759833
-                                ],
-                                [
-                                    -130.173655,
-                                    55.749498
-                                ],
-                                [
-                                    -130.170806,
-                                    55.740953
-                                ],
-                                [
-                                    -130.163808,
-                                    55.734565
-                                ],
-                                [
-                                    -130.160064,
-                                    55.727118
-                                ],
-                                [
-                                    -130.167388,
-                                    55.715399
-                                ],
-                                [
-                                    -130.155914,
-                                    55.700141
-                                ],
-                                [
-                                    -130.142893,
-                                    55.689521
-                                ],
-                                [
-                                    -130.131825,
-                                    55.676581
-                                ],
-                                [
-                                    -130.126454,
-                                    55.653998
-                                ],
-                                [
-                                    -130.12857,
-                                    55.63642
-                                ],
-                                [
-                                    -130.135121,
-                                    55.619127
-                                ],
-                                [
-                                    -130.153147,
-                                    55.58511
-                                ],
-                                [
-                                    -130.148671,
-                                    55.578192
-                                ],
-                                [
-                                    -130.146881,
-                                    55.569322
-                                ],
-                                [
-                                    -130.146962,
-                                    55.547187
-                                ],
-                                [
-                                    -130.112172,
-                                    55.509345
-                                ],
-                                [
-                                    -130.101674,
-                                    55.481147
-                                ],
-                                [
-                                    -130.095082,
-                                    55.472113
-                                ],
-                                [
-                                    -130.065419,
-                                    55.446112
-                                ],
-                                [
-                                    -130.057525,
-                                    55.434882
-                                ],
-                                [
-                                    -130.052561,
-                                    55.414008
-                                ],
-                                [
-                                    -130.054311,
-                                    55.366645
-                                ],
-                                [
-                                    -130.05012,
-                                    55.345445
-                                ],
-                                [
-                                    -130.039296,
-                                    55.330756
-                                ],
-                                [
-                                    -129.989247,
-                                    55.284003
-                                ],
-                                [
-                                    -130.031239,
-                                    55.26435
-                                ],
-                                [
-                                    -130.050038,
-                                    55.252875
-                                ],
-                                [
-                                    -130.067494,
-                                    55.239
-                                ],
-                                [
-                                    -130.078236,
-                                    55.233791
-                                ],
-                                [
-                                    -130.100494,
-                                    55.230292
-                                ],
-                                [
-                                    -130.104726,
-                                    55.225653
-                                ],
-                                [
-                                    -130.105702,
-                                    55.211127
-                                ],
-                                [
-                                    -130.10912,
-                                    55.200751
-                                ],
-                                [
-                                    -130.115793,
-                                    55.191596
-                                ],
-                                [
-                                    -130.126454,
-                                    55.180976
-                                ],
-                                [
-                                    -130.151967,
-                                    55.163275
-                                ],
-                                [
-                                    -130.159983,
-                                    55.153713
-                                ],
-                                [
-                                    -130.167592,
-                                    55.129584
-                                ],
-                                [
-                                    -130.173695,
-                                    55.117743
-                                ],
-                                [
-                                    -130.200266,
-                                    55.104153
-                                ],
-                                [
-                                    -130.211781,
-                                    55.084133
-                                ],
-                                [
-                                    -130.228871,
-                                    55.04385
-                                ],
-                                [
-                                    -130.238678,
-                                    55.03441
-                                ],
-                                [
-                                    -130.261342,
-                                    55.022895
-                                ],
-                                [
-                                    -130.269846,
-                                    55.016547
-                                ],
-                                [
-                                    -130.275706,
-                                    55.006985
-                                ],
-                                [
-                                    -130.286366,
-                                    54.983222
-                                ],
-                                [
-                                    -130.294342,
-                                    54.971869
-                                ],
-                                [
-                                    -130.326568,
-                                    54.952094
-                                ],
-                                [
-                                    -130.335561,
-                                    54.938707
-                                ],
-                                [
-                                    -130.365387,
-                                    54.907294
-                                ],
-                                [
-                                    -130.385243,
-                                    54.896552
-                                ],
-                                [
-                                    -130.430816,
-                                    54.881252
-                                ],
-                                [
-                                    -130.488759,
-                                    54.844184
-                                ],
-                                [
-                                    -130.580312,
-                                    54.806383
-                                ],
-                                [
-                                    -130.597485,
-                                    54.803391
-                                ],
-                                [
-                                    -130.71074,
-                                    54.733215
-                                ],
-                                [
-                                    -131.160718,
-                                    54.787192
-                                ]
-                            ]
-                        ]
-                    ]
-                }
-            }
-        ]
-    },
-    "featureIcons": {
-        "circle-stroked": {
-            "12": [
-                42,
-                0
-            ],
-            "18": [
-                24,
-                0
-            ],
-            "24": [
-                0,
-                0
-            ]
-        },
-        "circle": {
-            "12": [
-                96,
-                0
-            ],
-            "18": [
-                78,
-                0
-            ],
-            "24": [
-                54,
-                0
-            ]
-        },
-        "square-stroked": {
-            "12": [
-                150,
-                0
-            ],
-            "18": [
-                132,
-                0
-            ],
-            "24": [
-                108,
-                0
-            ]
-        },
-        "square": {
-            "12": [
-                204,
-                0
-            ],
-            "18": [
-                186,
-                0
-            ],
-            "24": [
-                162,
-                0
-            ]
-        },
-        "triangle-stroked": {
-            "12": [
-                258,
-                0
-            ],
-            "18": [
-                240,
-                0
-            ],
-            "24": [
-                216,
-                0
-            ]
-        },
-        "triangle": {
-            "12": [
-                42,
-                24
-            ],
-            "18": [
-                24,
-                24
-            ],
-            "24": [
-                0,
-                24
-            ]
-        },
-        "star-stroked": {
-            "12": [
-                96,
-                24
-            ],
-            "18": [
-                78,
-                24
-            ],
-            "24": [
-                54,
-                24
-            ]
-        },
-        "star": {
-            "12": [
-                150,
-                24
-            ],
-            "18": [
-                132,
-                24
-            ],
-            "24": [
-                108,
-                24
-            ]
-        },
-        "cross": {
-            "12": [
-                204,
-                24
-            ],
-            "18": [
-                186,
-                24
-            ],
-            "24": [
-                162,
-                24
-            ]
-        },
-        "marker-stroked": {
-            "12": [
-                258,
-                24
-            ],
-            "18": [
-                240,
-                24
-            ],
-            "24": [
-                216,
-                24
-            ]
-        },
-        "marker": {
-            "12": [
-                42,
-                48
-            ],
-            "18": [
-                24,
-                48
-            ],
-            "24": [
-                0,
-                48
-            ]
-        },
-        "religious-jewish": {
-            "12": [
-                96,
-                48
-            ],
-            "18": [
-                78,
-                48
-            ],
-            "24": [
-                54,
-                48
-            ]
-        },
-        "religious-christian": {
-            "12": [
-                150,
-                48
-            ],
-            "18": [
-                132,
-                48
-            ],
-            "24": [
-                108,
-                48
-            ]
-        },
-        "religious-muslim": {
-            "12": [
-                204,
-                48
-            ],
-            "18": [
-                186,
-                48
-            ],
-            "24": [
-                162,
-                48
-            ]
-        },
-        "cemetery": {
-            "12": [
-                258,
-                48
-            ],
-            "18": [
-                240,
-                48
-            ],
-            "24": [
-                216,
-                48
-            ]
-        },
-        "rocket": {
-            "12": [
-                42,
-                72
-            ],
-            "18": [
-                24,
-                72
-            ],
-            "24": [
-                0,
-                72
-            ]
-        },
-        "airport": {
-            "12": [
-                96,
-                72
-            ],
-            "18": [
-                78,
-                72
-            ],
-            "24": [
-                54,
-                72
-            ]
-        },
-        "heliport": {
-            "12": [
-                150,
-                72
-            ],
-            "18": [
-                132,
-                72
-            ],
-            "24": [
-                108,
-                72
-            ]
-        },
-        "rail": {
-            "12": [
-                204,
-                72
-            ],
-            "18": [
-                186,
-                72
-            ],
-            "24": [
-                162,
-                72
-            ]
-        },
-        "rail-metro": {
-            "12": [
-                258,
-                72
-            ],
-            "18": [
-                240,
-                72
-            ],
-            "24": [
-                216,
-                72
-            ]
-        },
-        "rail-light": {
-            "12": [
-                42,
-                96
-            ],
-            "18": [
-                24,
-                96
-            ],
-            "24": [
-                0,
-                96
-            ]
-        },
-        "bus": {
-            "12": [
-                96,
-                96
-            ],
-            "18": [
-                78,
-                96
-            ],
-            "24": [
-                54,
-                96
-            ]
-        },
-        "fuel": {
-            "12": [
-                150,
-                96
-            ],
-            "18": [
-                132,
-                96
-            ],
-            "24": [
-                108,
-                96
-            ]
-        },
-        "parking": {
-            "12": [
-                204,
-                96
-            ],
-            "18": [
-                186,
-                96
-            ],
-            "24": [
-                162,
-                96
-            ]
-        },
-        "parking-garage": {
-            "12": [
-                258,
-                96
-            ],
-            "18": [
-                240,
-                96
-            ],
-            "24": [
-                216,
-                96
-            ]
-        },
-        "airfield": {
-            "12": [
-                42,
-                120
-            ],
-            "18": [
-                24,
-                120
-            ],
-            "24": [
-                0,
-                120
-            ]
-        },
-        "roadblock": {
-            "12": [
-                96,
-                120
-            ],
-            "18": [
-                78,
-                120
-            ],
-            "24": [
-                54,
-                120
-            ]
-        },
-        "ferry": {
-            "12": [
-                150,
-                120
-            ],
-            "18": [
-                132,
-                120
-            ],
-            "24": [
-                108,
-                120
-            ],
-            "line": [
-                2240,
-                25
-            ]
-        },
-        "harbor": {
-            "12": [
-                204,
-                120
-            ],
-            "18": [
-                186,
-                120
-            ],
-            "24": [
-                162,
-                120
-            ]
-        },
-        "bicycle": {
-            "12": [
-                258,
-                120
-            ],
-            "18": [
-                240,
-                120
-            ],
-            "24": [
-                216,
-                120
-            ]
-        },
-        "park": {
-            "12": [
-                42,
-                144
-            ],
-            "18": [
-                24,
-                144
-            ],
-            "24": [
-                0,
-                144
-            ]
-        },
-        "park2": {
-            "12": [
-                96,
-                144
-            ],
-            "18": [
-                78,
-                144
-            ],
-            "24": [
-                54,
-                144
-            ]
-        },
-        "museum": {
-            "12": [
-                150,
-                144
-            ],
-            "18": [
-                132,
-                144
-            ],
-            "24": [
-                108,
-                144
-            ]
-        },
-        "lodging": {
-            "12": [
-                204,
-                144
-            ],
-            "18": [
-                186,
-                144
-            ],
-            "24": [
-                162,
-                144
-            ]
-        },
-        "monument": {
-            "12": [
-                258,
-                144
-            ],
-            "18": [
-                240,
-                144
-            ],
-            "24": [
-                216,
-                144
-            ]
-        },
-        "zoo": {
-            "12": [
-                42,
-                168
-            ],
-            "18": [
-                24,
-                168
-            ],
-            "24": [
-                0,
-                168
-            ]
-        },
-        "garden": {
-            "12": [
-                96,
-                168
-            ],
-            "18": [
-                78,
-                168
-            ],
-            "24": [
-                54,
-                168
-            ]
-        },
-        "campsite": {
-            "12": [
-                150,
-                168
-            ],
-            "18": [
-                132,
-                168
-            ],
-            "24": [
-                108,
-                168
-            ]
-        },
-        "theatre": {
-            "12": [
-                204,
-                168
-            ],
-            "18": [
-                186,
-                168
-            ],
-            "24": [
-                162,
-                168
-            ]
-        },
-        "art-gallery": {
-            "12": [
-                258,
-                168
-            ],
-            "18": [
-                240,
-                168
-            ],
-            "24": [
-                216,
-                168
-            ]
-        },
-        "pitch": {
-            "12": [
-                42,
-                192
-            ],
-            "18": [
-                24,
-                192
-            ],
-            "24": [
-                0,
-                192
-            ]
-        },
-        "soccer": {
-            "12": [
-                96,
-                192
-            ],
-            "18": [
-                78,
-                192
-            ],
-            "24": [
-                54,
-                192
-            ]
-        },
-        "america-football": {
-            "12": [
-                150,
-                192
-            ],
-            "18": [
-                132,
-                192
-            ],
-            "24": [
-                108,
-                192
-            ]
-        },
-        "tennis": {
-            "12": [
-                204,
-                192
-            ],
-            "18": [
-                186,
-                192
-            ],
-            "24": [
-                162,
-                192
-            ]
-        },
-        "basketball": {
-            "12": [
-                258,
-                192
-            ],
-            "18": [
-                240,
-                192
-            ],
-            "24": [
-                216,
-                192
-            ]
-        },
-        "baseball": {
-            "12": [
-                42,
-                216
-            ],
-            "18": [
-                24,
-                216
-            ],
-            "24": [
-                0,
-                216
-            ]
-        },
-        "golf": {
-            "12": [
-                96,
-                216
-            ],
-            "18": [
-                78,
-                216
-            ],
-            "24": [
-                54,
-                216
-            ]
-        },
-        "swimming": {
-            "12": [
-                150,
-                216
-            ],
-            "18": [
-                132,
-                216
-            ],
-            "24": [
-                108,
-                216
-            ]
-        },
-        "cricket": {
-            "12": [
-                204,
-                216
-            ],
-            "18": [
-                186,
-                216
-            ],
-            "24": [
-                162,
-                216
-            ]
-        },
-        "skiing": {
-            "12": [
-                258,
-                216
-            ],
-            "18": [
-                240,
-                216
-            ],
-            "24": [
-                216,
-                216
-            ]
-        },
-        "school": {
-            "12": [
-                42,
-                240
-            ],
-            "18": [
-                24,
-                240
-            ],
-            "24": [
-                0,
-                240
-            ]
-        },
-        "college": {
-            "12": [
-                96,
-                240
-            ],
-            "18": [
-                78,
-                240
-            ],
-            "24": [
-                54,
-                240
-            ]
-        },
-        "library": {
-            "12": [
-                150,
-                240
-            ],
-            "18": [
-                132,
-                240
-            ],
-            "24": [
-                108,
-                240
-            ]
-        },
-        "post": {
-            "12": [
-                204,
-                240
-            ],
-            "18": [
-                186,
-                240
-            ],
-            "24": [
-                162,
-                240
-            ]
-        },
-        "fire-station": {
-            "12": [
-                258,
-                240
-            ],
-            "18": [
-                240,
-                240
-            ],
-            "24": [
-                216,
-                240
-            ]
-        },
-        "town-hall": {
-            "12": [
-                42,
-                264
-            ],
-            "18": [
-                24,
-                264
-            ],
-            "24": [
-                0,
-                264
-            ]
-        },
-        "police": {
-            "12": [
-                96,
-                264
-            ],
-            "18": [
-                78,
-                264
-            ],
-            "24": [
-                54,
-                264
-            ]
-        },
-        "prison": {
-            "12": [
-                150,
-                264
-            ],
-            "18": [
-                132,
-                264
-            ],
-            "24": [
-                108,
-                264
-            ]
-        },
-        "embassy": {
-            "12": [
-                204,
-                264
-            ],
-            "18": [
-                186,
-                264
-            ],
-            "24": [
-                162,
-                264
-            ]
-        },
-        "beer": {
-            "12": [
-                258,
-                264
-            ],
-            "18": [
-                240,
-                264
-            ],
-            "24": [
-                216,
-                264
-            ]
-        },
-        "restaurant": {
-            "12": [
-                42,
-                288
-            ],
-            "18": [
-                24,
-                288
-            ],
-            "24": [
-                0,
-                288
-            ]
-        },
-        "cafe": {
-            "12": [
-                96,
-                288
-            ],
-            "18": [
-                78,
-                288
-            ],
-            "24": [
-                54,
-                288
-            ]
-        },
-        "shop": {
-            "12": [
-                150,
-                288
-            ],
-            "18": [
-                132,
-                288
-            ],
-            "24": [
-                108,
-                288
-            ]
-        },
-        "fast-food": {
-            "12": [
-                204,
-                288
-            ],
-            "18": [
-                186,
-                288
-            ],
-            "24": [
-                162,
-                288
-            ]
-        },
-        "bar": {
-            "12": [
-                258,
-                288
-            ],
-            "18": [
-                240,
-                288
-            ],
-            "24": [
-                216,
-                288
-            ]
-        },
-        "bank": {
-            "12": [
-                42,
-                312
-            ],
-            "18": [
-                24,
-                312
-            ],
-            "24": [
-                0,
-                312
-            ]
-        },
-        "grocery": {
-            "12": [
-                96,
-                312
-            ],
-            "18": [
-                78,
-                312
-            ],
-            "24": [
-                54,
-                312
-            ]
-        },
-        "cinema": {
-            "12": [
-                150,
-                312
-            ],
-            "18": [
-                132,
-                312
-            ],
-            "24": [
-                108,
-                312
-            ]
-        },
-        "pharmacy": {
-            "12": [
-                204,
-                312
-            ],
-            "18": [
-                186,
-                312
-            ],
-            "24": [
-                162,
-                312
-            ]
-        },
-        "hospital": {
-            "12": [
-                258,
-                312
-            ],
-            "18": [
-                240,
-                312
-            ],
-            "24": [
-                216,
-                312
-            ]
-        },
-        "danger": {
-            "12": [
-                42,
-                336
-            ],
-            "18": [
-                24,
-                336
-            ],
-            "24": [
-                0,
-                336
-            ]
-        },
-        "industrial": {
-            "12": [
-                96,
-                336
-            ],
-            "18": [
-                78,
-                336
-            ],
-            "24": [
-                54,
-                336
-            ]
-        },
-        "warehouse": {
-            "12": [
-                150,
-                336
-            ],
-            "18": [
-                132,
-                336
-            ],
-            "24": [
-                108,
-                336
-            ]
-        },
-        "commercial": {
-            "12": [
-                204,
-                336
-            ],
-            "18": [
-                186,
-                336
-            ],
-            "24": [
-                162,
-                336
-            ]
-        },
-        "building": {
-            "12": [
-                258,
-                336
-            ],
-            "18": [
-                240,
-                336
-            ],
-            "24": [
-                216,
-                336
-            ]
-        },
-        "place-of-worship": {
-            "12": [
-                42,
-                360
-            ],
-            "18": [
-                24,
-                360
-            ],
-            "24": [
-                0,
-                360
-            ]
-        },
-        "alcohol-shop": {
-            "12": [
-                96,
-                360
-            ],
-            "18": [
-                78,
-                360
-            ],
-            "24": [
-                54,
-                360
-            ]
-        },
-        "logging": {
-            "12": [
-                150,
-                360
-            ],
-            "18": [
-                132,
-                360
-            ],
-            "24": [
-                108,
-                360
-            ]
-        },
-        "oil-well": {
-            "12": [
-                204,
-                360
-            ],
-            "18": [
-                186,
-                360
-            ],
-            "24": [
-                162,
-                360
-            ]
-        },
-        "slaughterhouse": {
-            "12": [
-                258,
-                360
-            ],
-            "18": [
-                240,
-                360
-            ],
-            "24": [
-                216,
-                360
-            ]
-        },
-        "dam": {
-            "12": [
-                42,
-                384
-            ],
-            "18": [
-                24,
-                384
-            ],
-            "24": [
-                0,
-                384
-            ]
-        },
-        "water": {
-            "12": [
-                96,
-                384
-            ],
-            "18": [
-                78,
-                384
-            ],
-            "24": [
-                54,
-                384
-            ]
-        },
-        "wetland": {
-            "12": [
-                150,
-                384
-            ],
-            "18": [
-                132,
-                384
-            ],
-            "24": [
-                108,
-                384
-            ]
-        },
-        "disability": {
-            "12": [
-                204,
-                384
-            ],
-            "18": [
-                186,
-                384
-            ],
-            "24": [
-                162,
-                384
-            ]
-        },
-        "telephone": {
-            "12": [
-                258,
-                384
-            ],
-            "18": [
-                240,
-                384
-            ],
-            "24": [
-                216,
-                384
-            ]
-        },
-        "emergency-telephone": {
-            "12": [
-                42,
-                408
-            ],
-            "18": [
-                24,
-                408
-            ],
-            "24": [
-                0,
-                408
-            ]
-        },
-        "toilets": {
-            "12": [
-                96,
-                408
-            ],
-            "18": [
-                78,
-                408
-            ],
-            "24": [
-                54,
-                408
-            ]
-        },
-        "waste-basket": {
-            "12": [
-                150,
-                408
-            ],
-            "18": [
-                132,
-                408
-            ],
-            "24": [
-                108,
-                408
-            ]
-        },
-        "music": {
-            "12": [
-                204,
-                408
-            ],
-            "18": [
-                186,
-                408
-            ],
-            "24": [
-                162,
-                408
-            ]
-        },
-        "land-use": {
-            "12": [
-                258,
-                408
-            ],
-            "18": [
-                240,
-                408
-            ],
-            "24": [
-                216,
-                408
-            ]
-        },
-        "city": {
-            "12": [
-                42,
-                432
-            ],
-            "18": [
-                24,
-                432
-            ],
-            "24": [
-                0,
-                432
-            ]
-        },
-        "town": {
-            "12": [
-                96,
-                432
-            ],
-            "18": [
-                78,
-                432
-            ],
-            "24": [
-                54,
-                432
-            ]
-        },
-        "village": {
-            "12": [
-                150,
-                432
-            ],
-            "18": [
-                132,
-                432
-            ],
-            "24": [
-                108,
-                432
-            ]
-        },
-        "farm": {
-            "12": [
-                204,
-                432
-            ],
-            "18": [
-                186,
-                432
-            ],
-            "24": [
-                162,
-                432
-            ]
-        },
-        "bakery": {
-            "12": [
-                258,
-                432
-            ],
-            "18": [
-                240,
-                432
-            ],
-            "24": [
-                216,
-                432
-            ]
-        },
-        "dog-park": {
-            "12": [
-                42,
-                456
-            ],
-            "18": [
-                24,
-                456
-            ],
-            "24": [
-                0,
-                456
-            ]
-        },
-        "lighthouse": {
-            "12": [
-                96,
-                456
-            ],
-            "18": [
-                78,
-                456
-            ],
-            "24": [
-                54,
-                456
-            ]
-        },
-        "clothing-store": {
-            "12": [
-                150,
-                456
-            ],
-            "18": [
-                132,
-                456
-            ],
-            "24": [
-                108,
-                456
-            ]
-        },
-        "polling-place": {
-            "12": [
-                204,
-                456
-            ],
-            "18": [
-                186,
-                456
-            ],
-            "24": [
-                162,
-                456
-            ]
-        },
-        "playground": {
-            "12": [
-                258,
-                456
-            ],
-            "18": [
-                240,
-                456
-            ],
-            "24": [
-                216,
-                456
-            ]
-        },
-        "entrance": {
-            "12": [
-                42,
-                480
-            ],
-            "18": [
-                24,
-                480
-            ],
-            "24": [
-                0,
-                480
-            ]
-        },
-        "heart": {
-            "12": [
-                96,
-                480
-            ],
-            "18": [
-                78,
-                480
-            ],
-            "24": [
-                54,
-                480
-            ]
-        },
-        "london-underground": {
-            "12": [
-                150,
-                480
-            ],
-            "18": [
-                132,
-                480
-            ],
-            "24": [
-                108,
-                480
-            ]
-        },
-        "minefield": {
-            "12": [
-                204,
-                480
-            ],
-            "18": [
-                186,
-                480
-            ],
-            "24": [
-                162,
-                480
-            ]
-        },
-        "rail-underground": {
-            "12": [
-                258,
-                480
-            ],
-            "18": [
-                240,
-                480
-            ],
-            "24": [
-                216,
-                480
-            ]
-        },
-        "rail-above": {
-            "12": [
-                42,
-                504
-            ],
-            "18": [
-                24,
-                504
-            ],
-            "24": [
-                0,
-                504
-            ]
-        },
-        "camera": {
-            "12": [
-                96,
-                504
-            ],
-            "18": [
-                78,
-                504
-            ],
-            "24": [
-                54,
-                504
-            ]
-        },
-        "laundry": {
-            "12": [
-                150,
-                504
-            ],
-            "18": [
-                132,
-                504
-            ],
-            "24": [
-                108,
-                504
-            ]
-        },
-        "car": {
-            "12": [
-                204,
-                504
-            ],
-            "18": [
-                186,
-                504
-            ],
-            "24": [
-                162,
-                504
-            ]
-        },
-        "suitcase": {
-            "12": [
-                258,
-                504
-            ],
-            "18": [
-                240,
-                504
-            ],
-            "24": [
-                216,
-                504
-            ]
-        },
-        "hairdresser": {
-            "12": [
-                42,
-                528
-            ],
-            "18": [
-                24,
-                528
-            ],
-            "24": [
-                0,
-                528
-            ]
-        },
-        "chemist": {
-            "12": [
-                96,
-                528
-            ],
-            "18": [
-                78,
-                528
-            ],
-            "24": [
-                54,
-                528
-            ]
-        },
-        "mobilephone": {
-            "12": [
-                150,
-                528
-            ],
-            "18": [
-                132,
-                528
-            ],
-            "24": [
-                108,
-                528
-            ]
-        },
-        "scooter": {
-            "12": [
-                204,
-                528
-            ],
-            "18": [
-                186,
-                528
-            ],
-            "24": [
-                162,
-                528
-            ]
-        },
-        "gift": {
-            "12": [
-                258,
-                528
-            ],
-            "18": [
-                240,
-                528
-            ],
-            "24": [
-                216,
-                528
-            ]
-        },
-        "ice-cream": {
-            "12": [
-                42,
-                552
-            ],
-            "18": [
-                24,
-                552
-            ],
-            "24": [
-                0,
-                552
-            ]
-        },
-        "highway-motorway": {
-            "line": [
-                20,
-                25
-            ]
-        },
-        "highway-trunk": {
-            "line": [
-                80,
-                25
-            ]
-        },
-        "highway-primary": {
-            "line": [
-                140,
-                25
-            ]
-        },
-        "highway-secondary": {
-            "line": [
-                200,
-                25
-            ]
-        },
-        "highway-tertiary": {
-            "line": [
-                260,
-                25
-            ]
-        },
-        "highway-motorway-link": {
-            "line": [
-                320,
-                25
-            ]
-        },
-        "highway-trunk-link": {
-            "line": [
-                380,
-                25
-            ]
-        },
-        "highway-primary-link": {
-            "line": [
-                440,
-                25
-            ]
-        },
-        "highway-secondary-link": {
-            "line": [
-                500,
-                25
-            ]
-        },
-        "highway-tertiary-link": {
-            "line": [
-                560,
-                25
-            ]
-        },
-        "highway-residential": {
-            "line": [
-                620,
-                25
-            ]
-        },
-        "highway-unclassified": {
-            "line": [
-                680,
-                25
-            ]
-        },
-        "highway-service": {
-            "line": [
-                740,
-                25
-            ]
-        },
-        "highway-road": {
-            "line": [
-                800,
-                25
-            ]
-        },
-        "highway-track": {
-            "line": [
-                860,
-                25
-            ]
-        },
-        "highway-living-street": {
-            "line": [
-                920,
-                25
-            ]
-        },
-        "highway-path": {
-            "line": [
-                980,
-                25
-            ]
-        },
-        "highway-cycleway": {
-            "line": [
-                1040,
-                25
-            ]
-        },
-        "highway-footway": {
-            "line": [
-                1100,
-                25
-            ]
-        },
-        "highway-bridleway": {
-            "line": [
-                1160,
-                25
-            ]
-        },
-        "highway-steps": {
-            "line": [
-                1220,
-                25
-            ]
-        },
-        "railway-rail": {
-            "line": [
-                1280,
-                25
-            ]
-        },
-        "railway-disused": {
-            "line": [
-                1340,
-                25
-            ]
-        },
-        "railway-abandoned": {
-            "line": [
-                1400,
-                25
-            ]
-        },
-        "railway-subway": {
-            "line": [
-                1460,
-                25
-            ]
-        },
-        "railway-light-rail": {
-            "line": [
-                1520,
-                25
-            ]
-        },
-        "railway-monorail": {
-            "line": [
-                1580,
-                25
-            ]
-        },
-        "waterway-river": {
-            "line": [
-                1640,
-                25
-            ]
-        },
-        "waterway-stream": {
-            "line": [
-                1700,
-                25
-            ]
-        },
-        "waterway-canal": {
-            "line": [
-                1760,
-                25
-            ]
-        },
-        "waterway-ditch": {
-            "line": [
-                1820,
-                25
-            ]
-        },
-        "power-line": {
-            "line": [
-                1880,
-                25
-            ]
-        },
-        "other-line": {
-            "line": [
-                1940,
-                25
-            ]
-        },
-        "category-roads": {
-            "line": [
-                2000,
-                25
-            ]
-        },
-        "category-rail": {
-            "line": [
-                2060,
-                25
-            ]
-        },
-        "category-path": {
-            "line": [
-                2120,
-                25
-            ]
-        },
-        "category-water": {
-            "line": [
-                2180,
-                25
-            ]
-        },
-        "pipeline": {
-            "line": [
-                2300,
-                25
-            ]
-        },
-        "relation": {
-            "relation": [
-                20,
-                25
-            ]
-        },
-        "restriction": {
-            "relation": [
-                80,
-                25
-            ]
-        },
-        "multipolygon": {
-            "relation": [
-                140,
-                25
-            ]
-        },
-        "boundary": {
-            "relation": [
-                200,
-                25
-            ]
-        },
-        "route": {
-            "relation": [
-                260,
-                25
-            ]
-        },
-        "route-road": {
-            "relation": [
-                320,
-                25
-            ]
-        },
-        "route-bicycle": {
-            "relation": [
-                380,
-                25
-            ]
-        },
-        "route-foot": {
-            "relation": [
-                440,
-                25
-            ]
-        },
-        "route-bus": {
-            "relation": [
-                500,
-                25
-            ]
-        },
-        "route-train": {
-            "relation": [
-                560,
-                25
-            ]
-        },
-        "route-detour": {
-            "relation": [
-                620,
-                25
-            ]
-        },
-        "route-tram": {
-            "relation": [
-                680,
-                25
-            ]
-        },
-        "route-ferry": {
-            "relation": [
-                740,
-                25
-            ]
-        },
-        "route-power": {
-            "relation": [
-                800,
-                25
-            ]
-        },
-        "route-pipeline": {
-            "relation": [
-                860,
-                25
-            ]
-        },
-        "route-master": {
-            "relation": [
-                920,
-                25
-            ]
-        },
-        "restriction-no-straight-on": {
-            "relation": [
-                980,
-                25
-            ]
-        },
-        "restriction-no-u-turn": {
-            "relation": [
-                1040,
-                25
-            ]
-        },
-        "restriction-no-left-turn": {
-            "relation": [
-                1100,
-                25
-            ]
-        },
-        "restriction-no-right-turn": {
-            "relation": [
-                1160,
-                25
-            ]
-        },
-        "restriction-only-straight-on": {
-            "relation": [
-                1220,
-                25
-            ]
-        },
-        "restriction-only-left-turn": {
-            "relation": [
-                1280,
-                25
-            ]
-        },
-        "restriction-only-right-turn": {
-            "relation": [
-                1340,
-                25
-            ]
-        }
-    },
-    "operations": {
-        "icon-operation-delete": [
-            0,
-            140
-        ],
-        "icon-operation-circularize": [
-            20,
-            140
-        ],
-        "icon-operation-straighten": [
-            40,
-            140
-        ],
-        "icon-operation-split": [
-            60,
-            140
-        ],
-        "icon-operation-disconnect": [
-            80,
-            140
-        ],
-        "icon-operation-reverse": [
-            100,
-            140
-        ],
-        "icon-operation-move": [
-            120,
-            140
-        ],
-        "icon-operation-merge": [
-            140,
-            140
-        ],
-        "icon-operation-orthogonalize": [
-            160,
-            140
-        ],
-        "icon-operation-rotate": [
-            180,
-            140
-        ],
-        "icon-operation-simplify": [
-            200,
-            140
-        ],
-        "icon-operation-continue": [
-            220,
-            140
-        ],
-        "icon-operation-disabled-delete": [
-            0,
-            160
-        ],
-        "icon-operation-disabled-circularize": [
-            20,
-            160
-        ],
-        "icon-operation-disabled-straighten": [
-            40,
-            160
-        ],
-        "icon-operation-disabled-split": [
-            60,
-            160
-        ],
-        "icon-operation-disabled-disconnect": [
-            80,
-            160
-        ],
-        "icon-operation-disabled-reverse": [
-            100,
-            160
-        ],
-        "icon-operation-disabled-move": [
-            120,
-            160
-        ],
-        "icon-operation-disabled-merge": [
-            140,
-            160
-        ],
-        "icon-operation-disabled-orthogonalize": [
-            160,
-            160
-        ],
-        "icon-operation-disabled-rotate": [
-            180,
-            160
-        ],
-        "icon-operation-disabled-simplify": [
-            200,
-            160
-        ],
-        "icon-operation-disabled-continue": [
-            220,
-            160
-        ],
-        "icon-restriction-yes": [
-            50,
-            80
-        ],
-        "icon-restriction-no": [
-            95,
-            80
-        ],
-        "icon-restriction-only": [
-            140,
-            80
-        ],
-        "icon-restriction-yes-u": [
-            185,
-            80
-        ],
-        "icon-restriction-no-u": [
-            230,
-            80
-        ],
-        "icon-restriction-only-u": [
-            275,
-            80
+                                    56.143964
+                                ],
+                                [
+                                    -130.418159,
+                                    56.129702
+                                ],
+                                [
+                                    -130.403974,
+                                    56.121898
+                                ],
+                                [
+                                    -130.290311,
+                                    56.10097
+                                ],
+                                [
+                                    -130.243156,
+                                    56.092391
+                                ],
+                                [
+                                    -130.211246,
+                                    56.089962
+                                ],
+                                [
+                                    -130.116756,
+                                    56.105646
+                                ],
+                                [
+                                    -130.094328,
+                                    56.101486
+                                ],
+                                [
+                                    -130.071539,
+                                    56.084123
+                                ],
+                                [
+                                    -130.039319,
+                                    56.045521
+                                ],
+                                [
+                                    -130.026632,
+                                    56.024101
+                                ],
+                                [
+                                    -130.01901,
+                                    56.002216
+                                ],
+                                [
+                                    -130.014695,
+                                    55.963252
+                                ],
+                                [
+                                    -130.016788,
+                                    55.918913
+                                ],
+                                [
+                                    -130.019612,
+                                    55.907978
+                                ],
+                                [
+                                    -130.019618,
+                                    55.907952
+                                ],
+                                [
+                                    -130.022817,
+                                    55.901353
+                                ],
+                                [
+                                    -130.049387,
+                                    55.871405
+                                ],
+                                [
+                                    -130.104726,
+                                    55.825263
+                                ],
+                                [
+                                    -130.136627,
+                                    55.806464
+                                ],
+                                [
+                                    -130.148834,
+                                    55.795356
+                                ],
+                                [
+                                    -130.163482,
+                                    55.771145
+                                ],
+                                [
+                                    -130.167307,
+                                    55.766262
+                                ],
+                                [
+                                    -130.170806,
+                                    55.759833
+                                ],
+                                [
+                                    -130.173655,
+                                    55.749498
+                                ],
+                                [
+                                    -130.170806,
+                                    55.740953
+                                ],
+                                [
+                                    -130.163808,
+                                    55.734565
+                                ],
+                                [
+                                    -130.160064,
+                                    55.727118
+                                ],
+                                [
+                                    -130.167388,
+                                    55.715399
+                                ],
+                                [
+                                    -130.155914,
+                                    55.700141
+                                ],
+                                [
+                                    -130.142893,
+                                    55.689521
+                                ],
+                                [
+                                    -130.131825,
+                                    55.676581
+                                ],
+                                [
+                                    -130.126454,
+                                    55.653998
+                                ],
+                                [
+                                    -130.12857,
+                                    55.63642
+                                ],
+                                [
+                                    -130.135121,
+                                    55.619127
+                                ],
+                                [
+                                    -130.153147,
+                                    55.58511
+                                ],
+                                [
+                                    -130.148671,
+                                    55.578192
+                                ],
+                                [
+                                    -130.146881,
+                                    55.569322
+                                ],
+                                [
+                                    -130.146962,
+                                    55.547187
+                                ],
+                                [
+                                    -130.112172,
+                                    55.509345
+                                ],
+                                [
+                                    -130.101674,
+                                    55.481147
+                                ],
+                                [
+                                    -130.095082,
+                                    55.472113
+                                ],
+                                [
+                                    -130.065419,
+                                    55.446112
+                                ],
+                                [
+                                    -130.057525,
+                                    55.434882
+                                ],
+                                [
+                                    -130.052561,
+                                    55.414008
+                                ],
+                                [
+                                    -130.054311,
+                                    55.366645
+                                ],
+                                [
+                                    -130.05012,
+                                    55.345445
+                                ],
+                                [
+                                    -130.039296,
+                                    55.330756
+                                ],
+                                [
+                                    -129.989247,
+                                    55.284003
+                                ],
+                                [
+                                    -130.031239,
+                                    55.26435
+                                ],
+                                [
+                                    -130.050038,
+                                    55.252875
+                                ],
+                                [
+                                    -130.067494,
+                                    55.239
+                                ],
+                                [
+                                    -130.078236,
+                                    55.233791
+                                ],
+                                [
+                                    -130.100494,
+                                    55.230292
+                                ],
+                                [
+                                    -130.104726,
+                                    55.225653
+                                ],
+                                [
+                                    -130.105702,
+                                    55.211127
+                                ],
+                                [
+                                    -130.10912,
+                                    55.200751
+                                ],
+                                [
+                                    -130.115793,
+                                    55.191596
+                                ],
+                                [
+                                    -130.126454,
+                                    55.180976
+                                ],
+                                [
+                                    -130.151967,
+                                    55.163275
+                                ],
+                                [
+                                    -130.159983,
+                                    55.153713
+                                ],
+                                [
+                                    -130.167592,
+                                    55.129584
+                                ],
+                                [
+                                    -130.173695,
+                                    55.117743
+                                ],
+                                [
+                                    -130.200266,
+                                    55.104153
+                                ],
+                                [
+                                    -130.211781,
+                                    55.084133
+                                ],
+                                [
+                                    -130.228871,
+                                    55.04385
+                                ],
+                                [
+                                    -130.238678,
+                                    55.03441
+                                ],
+                                [
+                                    -130.261342,
+                                    55.022895
+                                ],
+                                [
+                                    -130.269846,
+                                    55.016547
+                                ],
+                                [
+                                    -130.275706,
+                                    55.006985
+                                ],
+                                [
+                                    -130.286366,
+                                    54.983222
+                                ],
+                                [
+                                    -130.294342,
+                                    54.971869
+                                ],
+                                [
+                                    -130.326568,
+                                    54.952094
+                                ],
+                                [
+                                    -130.335561,
+                                    54.938707
+                                ],
+                                [
+                                    -130.365387,
+                                    54.907294
+                                ],
+                                [
+                                    -130.385243,
+                                    54.896552
+                                ],
+                                [
+                                    -130.430816,
+                                    54.881252
+                                ],
+                                [
+                                    -130.488759,
+                                    54.844184
+                                ],
+                                [
+                                    -130.580312,
+                                    54.806383
+                                ],
+                                [
+                                    -130.597485,
+                                    54.803391
+                                ],
+                                [
+                                    -130.71074,
+                                    54.733215
+                                ],
+                                [
+                                    -131.160718,
+                                    54.787192
+                                ]
+                            ]
+                        ]
+                    ]
+                }
+            }
         ]
     },
+    "featureIcons": {
+        "circle-stroked-24": {
+            "x": 0,
+            "y": 0,
+            "width": 24,
+            "height": 24
+        },
+        "circle-stroked-18": {
+            "x": 24,
+            "y": 0,
+            "width": 18,
+            "height": 18
+        },
+        "circle-stroked-12": {
+            "x": 42,
+            "y": 0,
+            "width": 12,
+            "height": 12
+        },
+        "circle-24": {
+            "x": 54,
+            "y": 0,
+            "width": 24,
+            "height": 24
+        },
+        "circle-18": {
+            "x": 78,
+            "y": 0,
+            "width": 18,
+            "height": 18
+        },
+        "circle-12": {
+            "x": 96,
+            "y": 0,
+            "width": 12,
+            "height": 12
+        },
+        "square-stroked-24": {
+            "x": 108,
+            "y": 0,
+            "width": 24,
+            "height": 24
+        },
+        "square-stroked-18": {
+            "x": 132,
+            "y": 0,
+            "width": 18,
+            "height": 18
+        },
+        "square-stroked-12": {
+            "x": 150,
+            "y": 0,
+            "width": 12,
+            "height": 12
+        },
+        "square-24": {
+            "x": 162,
+            "y": 0,
+            "width": 24,
+            "height": 24
+        },
+        "square-18": {
+            "x": 186,
+            "y": 0,
+            "width": 18,
+            "height": 18
+        },
+        "square-12": {
+            "x": 204,
+            "y": 0,
+            "width": 12,
+            "height": 12
+        },
+        "triangle-stroked-24": {
+            "x": 216,
+            "y": 0,
+            "width": 24,
+            "height": 24
+        },
+        "triangle-stroked-18": {
+            "x": 240,
+            "y": 0,
+            "width": 18,
+            "height": 18
+        },
+        "triangle-stroked-12": {
+            "x": 258,
+            "y": 0,
+            "width": 12,
+            "height": 12
+        },
+        "triangle-24": {
+            "x": 0,
+            "y": 24,
+            "width": 24,
+            "height": 24
+        },
+        "triangle-18": {
+            "x": 24,
+            "y": 24,
+            "width": 18,
+            "height": 18
+        },
+        "triangle-12": {
+            "x": 42,
+            "y": 24,
+            "width": 12,
+            "height": 12
+        },
+        "star-stroked-24": {
+            "x": 54,
+            "y": 24,
+            "width": 24,
+            "height": 24
+        },
+        "star-stroked-18": {
+            "x": 78,
+            "y": 24,
+            "width": 18,
+            "height": 18
+        },
+        "star-stroked-12": {
+            "x": 96,
+            "y": 24,
+            "width": 12,
+            "height": 12
+        },
+        "star-24": {
+            "x": 108,
+            "y": 24,
+            "width": 24,
+            "height": 24
+        },
+        "star-18": {
+            "x": 132,
+            "y": 24,
+            "width": 18,
+            "height": 18
+        },
+        "star-12": {
+            "x": 150,
+            "y": 24,
+            "width": 12,
+            "height": 12
+        },
+        "cross-24": {
+            "x": 162,
+            "y": 24,
+            "width": 24,
+            "height": 24
+        },
+        "cross-18": {
+            "x": 186,
+            "y": 24,
+            "width": 18,
+            "height": 18
+        },
+        "cross-12": {
+            "x": 204,
+            "y": 24,
+            "width": 12,
+            "height": 12
+        },
+        "marker-stroked-24": {
+            "x": 216,
+            "y": 24,
+            "width": 24,
+            "height": 24
+        },
+        "marker-stroked-18": {
+            "x": 240,
+            "y": 24,
+            "width": 18,
+            "height": 18
+        },
+        "marker-stroked-12": {
+            "x": 258,
+            "y": 24,
+            "width": 12,
+            "height": 12
+        },
+        "marker-24": {
+            "x": 0,
+            "y": 48,
+            "width": 24,
+            "height": 24
+        },
+        "marker-18": {
+            "x": 24,
+            "y": 48,
+            "width": 18,
+            "height": 18
+        },
+        "marker-12": {
+            "x": 42,
+            "y": 48,
+            "width": 12,
+            "height": 12
+        },
+        "religious-jewish-24": {
+            "x": 54,
+            "y": 48,
+            "width": 24,
+            "height": 24
+        },
+        "religious-jewish-18": {
+            "x": 78,
+            "y": 48,
+            "width": 18,
+            "height": 18
+        },
+        "religious-jewish-12": {
+            "x": 96,
+            "y": 48,
+            "width": 12,
+            "height": 12
+        },
+        "religious-christian-24": {
+            "x": 108,
+            "y": 48,
+            "width": 24,
+            "height": 24
+        },
+        "religious-christian-18": {
+            "x": 132,
+            "y": 48,
+            "width": 18,
+            "height": 18
+        },
+        "religious-christian-12": {
+            "x": 150,
+            "y": 48,
+            "width": 12,
+            "height": 12
+        },
+        "religious-muslim-24": {
+            "x": 162,
+            "y": 48,
+            "width": 24,
+            "height": 24
+        },
+        "religious-muslim-18": {
+            "x": 186,
+            "y": 48,
+            "width": 18,
+            "height": 18
+        },
+        "religious-muslim-12": {
+            "x": 204,
+            "y": 48,
+            "width": 12,
+            "height": 12
+        },
+        "cemetery-24": {
+            "x": 216,
+            "y": 48,
+            "width": 24,
+            "height": 24
+        },
+        "cemetery-18": {
+            "x": 240,
+            "y": 48,
+            "width": 18,
+            "height": 18
+        },
+        "cemetery-12": {
+            "x": 258,
+            "y": 48,
+            "width": 12,
+            "height": 12
+        },
+        "rocket-24": {
+            "x": 0,
+            "y": 72,
+            "width": 24,
+            "height": 24
+        },
+        "rocket-18": {
+            "x": 24,
+            "y": 72,
+            "width": 18,
+            "height": 18
+        },
+        "rocket-12": {
+            "x": 42,
+            "y": 72,
+            "width": 12,
+            "height": 12
+        },
+        "airport-24": {
+            "x": 54,
+            "y": 72,
+            "width": 24,
+            "height": 24
+        },
+        "airport-18": {
+            "x": 78,
+            "y": 72,
+            "width": 18,
+            "height": 18
+        },
+        "airport-12": {
+            "x": 96,
+            "y": 72,
+            "width": 12,
+            "height": 12
+        },
+        "heliport-24": {
+            "x": 108,
+            "y": 72,
+            "width": 24,
+            "height": 24
+        },
+        "heliport-18": {
+            "x": 132,
+            "y": 72,
+            "width": 18,
+            "height": 18
+        },
+        "heliport-12": {
+            "x": 150,
+            "y": 72,
+            "width": 12,
+            "height": 12
+        },
+        "rail-24": {
+            "x": 162,
+            "y": 72,
+            "width": 24,
+            "height": 24
+        },
+        "rail-18": {
+            "x": 186,
+            "y": 72,
+            "width": 18,
+            "height": 18
+        },
+        "rail-12": {
+            "x": 204,
+            "y": 72,
+            "width": 12,
+            "height": 12
+        },
+        "rail-metro-24": {
+            "x": 216,
+            "y": 72,
+            "width": 24,
+            "height": 24
+        },
+        "rail-metro-18": {
+            "x": 240,
+            "y": 72,
+            "width": 18,
+            "height": 18
+        },
+        "rail-metro-12": {
+            "x": 258,
+            "y": 72,
+            "width": 12,
+            "height": 12
+        },
+        "rail-light-24": {
+            "x": 0,
+            "y": 96,
+            "width": 24,
+            "height": 24
+        },
+        "rail-light-18": {
+            "x": 24,
+            "y": 96,
+            "width": 18,
+            "height": 18
+        },
+        "rail-light-12": {
+            "x": 42,
+            "y": 96,
+            "width": 12,
+            "height": 12
+        },
+        "bus-24": {
+            "x": 54,
+            "y": 96,
+            "width": 24,
+            "height": 24
+        },
+        "bus-18": {
+            "x": 78,
+            "y": 96,
+            "width": 18,
+            "height": 18
+        },
+        "bus-12": {
+            "x": 96,
+            "y": 96,
+            "width": 12,
+            "height": 12
+        },
+        "fuel-24": {
+            "x": 108,
+            "y": 96,
+            "width": 24,
+            "height": 24
+        },
+        "fuel-18": {
+            "x": 132,
+            "y": 96,
+            "width": 18,
+            "height": 18
+        },
+        "fuel-12": {
+            "x": 150,
+            "y": 96,
+            "width": 12,
+            "height": 12
+        },
+        "parking-24": {
+            "x": 162,
+            "y": 96,
+            "width": 24,
+            "height": 24
+        },
+        "parking-18": {
+            "x": 186,
+            "y": 96,
+            "width": 18,
+            "height": 18
+        },
+        "parking-12": {
+            "x": 204,
+            "y": 96,
+            "width": 12,
+            "height": 12
+        },
+        "parking-garage-24": {
+            "x": 216,
+            "y": 96,
+            "width": 24,
+            "height": 24
+        },
+        "parking-garage-18": {
+            "x": 240,
+            "y": 96,
+            "width": 18,
+            "height": 18
+        },
+        "parking-garage-12": {
+            "x": 258,
+            "y": 96,
+            "width": 12,
+            "height": 12
+        },
+        "airfield-24": {
+            "x": 0,
+            "y": 120,
+            "width": 24,
+            "height": 24
+        },
+        "airfield-18": {
+            "x": 24,
+            "y": 120,
+            "width": 18,
+            "height": 18
+        },
+        "airfield-12": {
+            "x": 42,
+            "y": 120,
+            "width": 12,
+            "height": 12
+        },
+        "roadblock-24": {
+            "x": 54,
+            "y": 120,
+            "width": 24,
+            "height": 24
+        },
+        "roadblock-18": {
+            "x": 78,
+            "y": 120,
+            "width": 18,
+            "height": 18
+        },
+        "roadblock-12": {
+            "x": 96,
+            "y": 120,
+            "width": 12,
+            "height": 12
+        },
+        "ferry-24": {
+            "x": 108,
+            "y": 120,
+            "width": 24,
+            "height": 24
+        },
+        "ferry-18": {
+            "x": 132,
+            "y": 120,
+            "width": 18,
+            "height": 18
+        },
+        "ferry-12": {
+            "x": 150,
+            "y": 120,
+            "width": 12,
+            "height": 12
+        },
+        "harbor-24": {
+            "x": 162,
+            "y": 120,
+            "width": 24,
+            "height": 24
+        },
+        "harbor-18": {
+            "x": 186,
+            "y": 120,
+            "width": 18,
+            "height": 18
+        },
+        "harbor-12": {
+            "x": 204,
+            "y": 120,
+            "width": 12,
+            "height": 12
+        },
+        "bicycle-24": {
+            "x": 216,
+            "y": 120,
+            "width": 24,
+            "height": 24
+        },
+        "bicycle-18": {
+            "x": 240,
+            "y": 120,
+            "width": 18,
+            "height": 18
+        },
+        "bicycle-12": {
+            "x": 258,
+            "y": 120,
+            "width": 12,
+            "height": 12
+        },
+        "park-24": {
+            "x": 0,
+            "y": 144,
+            "width": 24,
+            "height": 24
+        },
+        "park-18": {
+            "x": 24,
+            "y": 144,
+            "width": 18,
+            "height": 18
+        },
+        "park-12": {
+            "x": 42,
+            "y": 144,
+            "width": 12,
+            "height": 12
+        },
+        "park2-24": {
+            "x": 54,
+            "y": 144,
+            "width": 24,
+            "height": 24
+        },
+        "park2-18": {
+            "x": 78,
+            "y": 144,
+            "width": 18,
+            "height": 18
+        },
+        "park2-12": {
+            "x": 96,
+            "y": 144,
+            "width": 12,
+            "height": 12
+        },
+        "museum-24": {
+            "x": 108,
+            "y": 144,
+            "width": 24,
+            "height": 24
+        },
+        "museum-18": {
+            "x": 132,
+            "y": 144,
+            "width": 18,
+            "height": 18
+        },
+        "museum-12": {
+            "x": 150,
+            "y": 144,
+            "width": 12,
+            "height": 12
+        },
+        "lodging-24": {
+            "x": 162,
+            "y": 144,
+            "width": 24,
+            "height": 24
+        },
+        "lodging-18": {
+            "x": 186,
+            "y": 144,
+            "width": 18,
+            "height": 18
+        },
+        "lodging-12": {
+            "x": 204,
+            "y": 144,
+            "width": 12,
+            "height": 12
+        },
+        "monument-24": {
+            "x": 216,
+            "y": 144,
+            "width": 24,
+            "height": 24
+        },
+        "monument-18": {
+            "x": 240,
+            "y": 144,
+            "width": 18,
+            "height": 18
+        },
+        "monument-12": {
+            "x": 258,
+            "y": 144,
+            "width": 12,
+            "height": 12
+        },
+        "zoo-24": {
+            "x": 0,
+            "y": 168,
+            "width": 24,
+            "height": 24
+        },
+        "zoo-18": {
+            "x": 24,
+            "y": 168,
+            "width": 18,
+            "height": 18
+        },
+        "zoo-12": {
+            "x": 42,
+            "y": 168,
+            "width": 12,
+            "height": 12
+        },
+        "garden-24": {
+            "x": 54,
+            "y": 168,
+            "width": 24,
+            "height": 24
+        },
+        "garden-18": {
+            "x": 78,
+            "y": 168,
+            "width": 18,
+            "height": 18
+        },
+        "garden-12": {
+            "x": 96,
+            "y": 168,
+            "width": 12,
+            "height": 12
+        },
+        "campsite-24": {
+            "x": 108,
+            "y": 168,
+            "width": 24,
+            "height": 24
+        },
+        "campsite-18": {
+            "x": 132,
+            "y": 168,
+            "width": 18,
+            "height": 18
+        },
+        "campsite-12": {
+            "x": 150,
+            "y": 168,
+            "width": 12,
+            "height": 12
+        },
+        "theatre-24": {
+            "x": 162,
+            "y": 168,
+            "width": 24,
+            "height": 24
+        },
+        "theatre-18": {
+            "x": 186,
+            "y": 168,
+            "width": 18,
+            "height": 18
+        },
+        "theatre-12": {
+            "x": 204,
+            "y": 168,
+            "width": 12,
+            "height": 12
+        },
+        "art-gallery-24": {
+            "x": 216,
+            "y": 168,
+            "width": 24,
+            "height": 24
+        },
+        "art-gallery-18": {
+            "x": 240,
+            "y": 168,
+            "width": 18,
+            "height": 18
+        },
+        "art-gallery-12": {
+            "x": 258,
+            "y": 168,
+            "width": 12,
+            "height": 12
+        },
+        "pitch-24": {
+            "x": 0,
+            "y": 192,
+            "width": 24,
+            "height": 24
+        },
+        "pitch-18": {
+            "x": 24,
+            "y": 192,
+            "width": 18,
+            "height": 18
+        },
+        "pitch-12": {
+            "x": 42,
+            "y": 192,
+            "width": 12,
+            "height": 12
+        },
+        "soccer-24": {
+            "x": 54,
+            "y": 192,
+            "width": 24,
+            "height": 24
+        },
+        "soccer-18": {
+            "x": 78,
+            "y": 192,
+            "width": 18,
+            "height": 18
+        },
+        "soccer-12": {
+            "x": 96,
+            "y": 192,
+            "width": 12,
+            "height": 12
+        },
+        "america-football-24": {
+            "x": 108,
+            "y": 192,
+            "width": 24,
+            "height": 24
+        },
+        "america-football-18": {
+            "x": 132,
+            "y": 192,
+            "width": 18,
+            "height": 18
+        },
+        "america-football-12": {
+            "x": 150,
+            "y": 192,
+            "width": 12,
+            "height": 12
+        },
+        "tennis-24": {
+            "x": 162,
+            "y": 192,
+            "width": 24,
+            "height": 24
+        },
+        "tennis-18": {
+            "x": 186,
+            "y": 192,
+            "width": 18,
+            "height": 18
+        },
+        "tennis-12": {
+            "x": 204,
+            "y": 192,
+            "width": 12,
+            "height": 12
+        },
+        "basketball-24": {
+            "x": 216,
+            "y": 192,
+            "width": 24,
+            "height": 24
+        },
+        "basketball-18": {
+            "x": 240,
+            "y": 192,
+            "width": 18,
+            "height": 18
+        },
+        "basketball-12": {
+            "x": 258,
+            "y": 192,
+            "width": 12,
+            "height": 12
+        },
+        "baseball-24": {
+            "x": 0,
+            "y": 216,
+            "width": 24,
+            "height": 24
+        },
+        "baseball-18": {
+            "x": 24,
+            "y": 216,
+            "width": 18,
+            "height": 18
+        },
+        "baseball-12": {
+            "x": 42,
+            "y": 216,
+            "width": 12,
+            "height": 12
+        },
+        "golf-24": {
+            "x": 54,
+            "y": 216,
+            "width": 24,
+            "height": 24
+        },
+        "golf-18": {
+            "x": 78,
+            "y": 216,
+            "width": 18,
+            "height": 18
+        },
+        "golf-12": {
+            "x": 96,
+            "y": 216,
+            "width": 12,
+            "height": 12
+        },
+        "swimming-24": {
+            "x": 108,
+            "y": 216,
+            "width": 24,
+            "height": 24
+        },
+        "swimming-18": {
+            "x": 132,
+            "y": 216,
+            "width": 18,
+            "height": 18
+        },
+        "swimming-12": {
+            "x": 150,
+            "y": 216,
+            "width": 12,
+            "height": 12
+        },
+        "cricket-24": {
+            "x": 162,
+            "y": 216,
+            "width": 24,
+            "height": 24
+        },
+        "cricket-18": {
+            "x": 186,
+            "y": 216,
+            "width": 18,
+            "height": 18
+        },
+        "cricket-12": {
+            "x": 204,
+            "y": 216,
+            "width": 12,
+            "height": 12
+        },
+        "skiing-24": {
+            "x": 216,
+            "y": 216,
+            "width": 24,
+            "height": 24
+        },
+        "skiing-18": {
+            "x": 240,
+            "y": 216,
+            "width": 18,
+            "height": 18
+        },
+        "skiing-12": {
+            "x": 258,
+            "y": 216,
+            "width": 12,
+            "height": 12
+        },
+        "school-24": {
+            "x": 0,
+            "y": 240,
+            "width": 24,
+            "height": 24
+        },
+        "school-18": {
+            "x": 24,
+            "y": 240,
+            "width": 18,
+            "height": 18
+        },
+        "school-12": {
+            "x": 42,
+            "y": 240,
+            "width": 12,
+            "height": 12
+        },
+        "college-24": {
+            "x": 54,
+            "y": 240,
+            "width": 24,
+            "height": 24
+        },
+        "college-18": {
+            "x": 78,
+            "y": 240,
+            "width": 18,
+            "height": 18
+        },
+        "college-12": {
+            "x": 96,
+            "y": 240,
+            "width": 12,
+            "height": 12
+        },
+        "library-24": {
+            "x": 108,
+            "y": 240,
+            "width": 24,
+            "height": 24
+        },
+        "library-18": {
+            "x": 132,
+            "y": 240,
+            "width": 18,
+            "height": 18
+        },
+        "library-12": {
+            "x": 150,
+            "y": 240,
+            "width": 12,
+            "height": 12
+        },
+        "post-24": {
+            "x": 162,
+            "y": 240,
+            "width": 24,
+            "height": 24
+        },
+        "post-18": {
+            "x": 186,
+            "y": 240,
+            "width": 18,
+            "height": 18
+        },
+        "post-12": {
+            "x": 204,
+            "y": 240,
+            "width": 12,
+            "height": 12
+        },
+        "fire-station-24": {
+            "x": 216,
+            "y": 240,
+            "width": 24,
+            "height": 24
+        },
+        "fire-station-18": {
+            "x": 240,
+            "y": 240,
+            "width": 18,
+            "height": 18
+        },
+        "fire-station-12": {
+            "x": 258,
+            "y": 240,
+            "width": 12,
+            "height": 12
+        },
+        "town-hall-24": {
+            "x": 0,
+            "y": 264,
+            "width": 24,
+            "height": 24
+        },
+        "town-hall-18": {
+            "x": 24,
+            "y": 264,
+            "width": 18,
+            "height": 18
+        },
+        "town-hall-12": {
+            "x": 42,
+            "y": 264,
+            "width": 12,
+            "height": 12
+        },
+        "police-24": {
+            "x": 54,
+            "y": 264,
+            "width": 24,
+            "height": 24
+        },
+        "police-18": {
+            "x": 78,
+            "y": 264,
+            "width": 18,
+            "height": 18
+        },
+        "police-12": {
+            "x": 96,
+            "y": 264,
+            "width": 12,
+            "height": 12
+        },
+        "prison-24": {
+            "x": 108,
+            "y": 264,
+            "width": 24,
+            "height": 24
+        },
+        "prison-18": {
+            "x": 132,
+            "y": 264,
+            "width": 18,
+            "height": 18
+        },
+        "prison-12": {
+            "x": 150,
+            "y": 264,
+            "width": 12,
+            "height": 12
+        },
+        "embassy-24": {
+            "x": 162,
+            "y": 264,
+            "width": 24,
+            "height": 24
+        },
+        "embassy-18": {
+            "x": 186,
+            "y": 264,
+            "width": 18,
+            "height": 18
+        },
+        "embassy-12": {
+            "x": 204,
+            "y": 264,
+            "width": 12,
+            "height": 12
+        },
+        "beer-24": {
+            "x": 216,
+            "y": 264,
+            "width": 24,
+            "height": 24
+        },
+        "beer-18": {
+            "x": 240,
+            "y": 264,
+            "width": 18,
+            "height": 18
+        },
+        "beer-12": {
+            "x": 258,
+            "y": 264,
+            "width": 12,
+            "height": 12
+        },
+        "restaurant-24": {
+            "x": 0,
+            "y": 288,
+            "width": 24,
+            "height": 24
+        },
+        "restaurant-18": {
+            "x": 24,
+            "y": 288,
+            "width": 18,
+            "height": 18
+        },
+        "restaurant-12": {
+            "x": 42,
+            "y": 288,
+            "width": 12,
+            "height": 12
+        },
+        "cafe-24": {
+            "x": 54,
+            "y": 288,
+            "width": 24,
+            "height": 24
+        },
+        "cafe-18": {
+            "x": 78,
+            "y": 288,
+            "width": 18,
+            "height": 18
+        },
+        "cafe-12": {
+            "x": 96,
+            "y": 288,
+            "width": 12,
+            "height": 12
+        },
+        "shop-24": {
+            "x": 108,
+            "y": 288,
+            "width": 24,
+            "height": 24
+        },
+        "shop-18": {
+            "x": 132,
+            "y": 288,
+            "width": 18,
+            "height": 18
+        },
+        "shop-12": {
+            "x": 150,
+            "y": 288,
+            "width": 12,
+            "height": 12
+        },
+        "fast-food-24": {
+            "x": 162,
+            "y": 288,
+            "width": 24,
+            "height": 24
+        },
+        "fast-food-18": {
+            "x": 186,
+            "y": 288,
+            "width": 18,
+            "height": 18
+        },
+        "fast-food-12": {
+            "x": 204,
+            "y": 288,
+            "width": 12,
+            "height": 12
+        },
+        "bar-24": {
+            "x": 216,
+            "y": 288,
+            "width": 24,
+            "height": 24
+        },
+        "bar-18": {
+            "x": 240,
+            "y": 288,
+            "width": 18,
+            "height": 18
+        },
+        "bar-12": {
+            "x": 258,
+            "y": 288,
+            "width": 12,
+            "height": 12
+        },
+        "bank-24": {
+            "x": 0,
+            "y": 312,
+            "width": 24,
+            "height": 24
+        },
+        "bank-18": {
+            "x": 24,
+            "y": 312,
+            "width": 18,
+            "height": 18
+        },
+        "bank-12": {
+            "x": 42,
+            "y": 312,
+            "width": 12,
+            "height": 12
+        },
+        "grocery-24": {
+            "x": 54,
+            "y": 312,
+            "width": 24,
+            "height": 24
+        },
+        "grocery-18": {
+            "x": 78,
+            "y": 312,
+            "width": 18,
+            "height": 18
+        },
+        "grocery-12": {
+            "x": 96,
+            "y": 312,
+            "width": 12,
+            "height": 12
+        },
+        "cinema-24": {
+            "x": 108,
+            "y": 312,
+            "width": 24,
+            "height": 24
+        },
+        "cinema-18": {
+            "x": 132,
+            "y": 312,
+            "width": 18,
+            "height": 18
+        },
+        "cinema-12": {
+            "x": 150,
+            "y": 312,
+            "width": 12,
+            "height": 12
+        },
+        "pharmacy-24": {
+            "x": 162,
+            "y": 312,
+            "width": 24,
+            "height": 24
+        },
+        "pharmacy-18": {
+            "x": 186,
+            "y": 312,
+            "width": 18,
+            "height": 18
+        },
+        "pharmacy-12": {
+            "x": 204,
+            "y": 312,
+            "width": 12,
+            "height": 12
+        },
+        "hospital-24": {
+            "x": 216,
+            "y": 312,
+            "width": 24,
+            "height": 24
+        },
+        "hospital-18": {
+            "x": 240,
+            "y": 312,
+            "width": 18,
+            "height": 18
+        },
+        "hospital-12": {
+            "x": 258,
+            "y": 312,
+            "width": 12,
+            "height": 12
+        },
+        "danger-24": {
+            "x": 0,
+            "y": 336,
+            "width": 24,
+            "height": 24
+        },
+        "danger-18": {
+            "x": 24,
+            "y": 336,
+            "width": 18,
+            "height": 18
+        },
+        "danger-12": {
+            "x": 42,
+            "y": 336,
+            "width": 12,
+            "height": 12
+        },
+        "industrial-24": {
+            "x": 54,
+            "y": 336,
+            "width": 24,
+            "height": 24
+        },
+        "industrial-18": {
+            "x": 78,
+            "y": 336,
+            "width": 18,
+            "height": 18
+        },
+        "industrial-12": {
+            "x": 96,
+            "y": 336,
+            "width": 12,
+            "height": 12
+        },
+        "warehouse-24": {
+            "x": 108,
+            "y": 336,
+            "width": 24,
+            "height": 24
+        },
+        "warehouse-18": {
+            "x": 132,
+            "y": 336,
+            "width": 18,
+            "height": 18
+        },
+        "warehouse-12": {
+            "x": 150,
+            "y": 336,
+            "width": 12,
+            "height": 12
+        },
+        "commercial-24": {
+            "x": 162,
+            "y": 336,
+            "width": 24,
+            "height": 24
+        },
+        "commercial-18": {
+            "x": 186,
+            "y": 336,
+            "width": 18,
+            "height": 18
+        },
+        "commercial-12": {
+            "x": 204,
+            "y": 336,
+            "width": 12,
+            "height": 12
+        },
+        "building-24": {
+            "x": 216,
+            "y": 336,
+            "width": 24,
+            "height": 24
+        },
+        "building-18": {
+            "x": 240,
+            "y": 336,
+            "width": 18,
+            "height": 18
+        },
+        "building-12": {
+            "x": 258,
+            "y": 336,
+            "width": 12,
+            "height": 12
+        },
+        "place-of-worship-24": {
+            "x": 0,
+            "y": 360,
+            "width": 24,
+            "height": 24
+        },
+        "place-of-worship-18": {
+            "x": 24,
+            "y": 360,
+            "width": 18,
+            "height": 18
+        },
+        "place-of-worship-12": {
+            "x": 42,
+            "y": 360,
+            "width": 12,
+            "height": 12
+        },
+        "alcohol-shop-24": {
+            "x": 54,
+            "y": 360,
+            "width": 24,
+            "height": 24
+        },
+        "alcohol-shop-18": {
+            "x": 78,
+            "y": 360,
+            "width": 18,
+            "height": 18
+        },
+        "alcohol-shop-12": {
+            "x": 96,
+            "y": 360,
+            "width": 12,
+            "height": 12
+        },
+        "logging-24": {
+            "x": 108,
+            "y": 360,
+            "width": 24,
+            "height": 24
+        },
+        "logging-18": {
+            "x": 132,
+            "y": 360,
+            "width": 18,
+            "height": 18
+        },
+        "logging-12": {
+            "x": 150,
+            "y": 360,
+            "width": 12,
+            "height": 12
+        },
+        "oil-well-24": {
+            "x": 162,
+            "y": 360,
+            "width": 24,
+            "height": 24
+        },
+        "oil-well-18": {
+            "x": 186,
+            "y": 360,
+            "width": 18,
+            "height": 18
+        },
+        "oil-well-12": {
+            "x": 204,
+            "y": 360,
+            "width": 12,
+            "height": 12
+        },
+        "slaughterhouse-24": {
+            "x": 216,
+            "y": 360,
+            "width": 24,
+            "height": 24
+        },
+        "slaughterhouse-18": {
+            "x": 240,
+            "y": 360,
+            "width": 18,
+            "height": 18
+        },
+        "slaughterhouse-12": {
+            "x": 258,
+            "y": 360,
+            "width": 12,
+            "height": 12
+        },
+        "dam-24": {
+            "x": 0,
+            "y": 384,
+            "width": 24,
+            "height": 24
+        },
+        "dam-18": {
+            "x": 24,
+            "y": 384,
+            "width": 18,
+            "height": 18
+        },
+        "dam-12": {
+            "x": 42,
+            "y": 384,
+            "width": 12,
+            "height": 12
+        },
+        "water-24": {
+            "x": 54,
+            "y": 384,
+            "width": 24,
+            "height": 24
+        },
+        "water-18": {
+            "x": 78,
+            "y": 384,
+            "width": 18,
+            "height": 18
+        },
+        "water-12": {
+            "x": 96,
+            "y": 384,
+            "width": 12,
+            "height": 12
+        },
+        "wetland-24": {
+            "x": 108,
+            "y": 384,
+            "width": 24,
+            "height": 24
+        },
+        "wetland-18": {
+            "x": 132,
+            "y": 384,
+            "width": 18,
+            "height": 18
+        },
+        "wetland-12": {
+            "x": 150,
+            "y": 384,
+            "width": 12,
+            "height": 12
+        },
+        "disability-24": {
+            "x": 162,
+            "y": 384,
+            "width": 24,
+            "height": 24
+        },
+        "disability-18": {
+            "x": 186,
+            "y": 384,
+            "width": 18,
+            "height": 18
+        },
+        "disability-12": {
+            "x": 204,
+            "y": 384,
+            "width": 12,
+            "height": 12
+        },
+        "telephone-24": {
+            "x": 216,
+            "y": 384,
+            "width": 24,
+            "height": 24
+        },
+        "telephone-18": {
+            "x": 240,
+            "y": 384,
+            "width": 18,
+            "height": 18
+        },
+        "telephone-12": {
+            "x": 258,
+            "y": 384,
+            "width": 12,
+            "height": 12
+        },
+        "emergency-telephone-24": {
+            "x": 0,
+            "y": 408,
+            "width": 24,
+            "height": 24
+        },
+        "emergency-telephone-18": {
+            "x": 24,
+            "y": 408,
+            "width": 18,
+            "height": 18
+        },
+        "emergency-telephone-12": {
+            "x": 42,
+            "y": 408,
+            "width": 12,
+            "height": 12
+        },
+        "toilets-24": {
+            "x": 54,
+            "y": 408,
+            "width": 24,
+            "height": 24
+        },
+        "toilets-18": {
+            "x": 78,
+            "y": 408,
+            "width": 18,
+            "height": 18
+        },
+        "toilets-12": {
+            "x": 96,
+            "y": 408,
+            "width": 12,
+            "height": 12
+        },
+        "waste-basket-24": {
+            "x": 108,
+            "y": 408,
+            "width": 24,
+            "height": 24
+        },
+        "waste-basket-18": {
+            "x": 132,
+            "y": 408,
+            "width": 18,
+            "height": 18
+        },
+        "waste-basket-12": {
+            "x": 150,
+            "y": 408,
+            "width": 12,
+            "height": 12
+        },
+        "music-24": {
+            "x": 162,
+            "y": 408,
+            "width": 24,
+            "height": 24
+        },
+        "music-18": {
+            "x": 186,
+            "y": 408,
+            "width": 18,
+            "height": 18
+        },
+        "music-12": {
+            "x": 204,
+            "y": 408,
+            "width": 12,
+            "height": 12
+        },
+        "land-use-24": {
+            "x": 216,
+            "y": 408,
+            "width": 24,
+            "height": 24
+        },
+        "land-use-18": {
+            "x": 240,
+            "y": 408,
+            "width": 18,
+            "height": 18
+        },
+        "land-use-12": {
+            "x": 258,
+            "y": 408,
+            "width": 12,
+            "height": 12
+        },
+        "city-24": {
+            "x": 0,
+            "y": 432,
+            "width": 24,
+            "height": 24
+        },
+        "city-18": {
+            "x": 24,
+            "y": 432,
+            "width": 18,
+            "height": 18
+        },
+        "city-12": {
+            "x": 42,
+            "y": 432,
+            "width": 12,
+            "height": 12
+        },
+        "town-24": {
+            "x": 54,
+            "y": 432,
+            "width": 24,
+            "height": 24
+        },
+        "town-18": {
+            "x": 78,
+            "y": 432,
+            "width": 18,
+            "height": 18
+        },
+        "town-12": {
+            "x": 96,
+            "y": 432,
+            "width": 12,
+            "height": 12
+        },
+        "village-24": {
+            "x": 108,
+            "y": 432,
+            "width": 24,
+            "height": 24
+        },
+        "village-18": {
+            "x": 132,
+            "y": 432,
+            "width": 18,
+            "height": 18
+        },
+        "village-12": {
+            "x": 150,
+            "y": 432,
+            "width": 12,
+            "height": 12
+        },
+        "farm-24": {
+            "x": 162,
+            "y": 432,
+            "width": 24,
+            "height": 24
+        },
+        "farm-18": {
+            "x": 186,
+            "y": 432,
+            "width": 18,
+            "height": 18
+        },
+        "farm-12": {
+            "x": 204,
+            "y": 432,
+            "width": 12,
+            "height": 12
+        },
+        "bakery-24": {
+            "x": 216,
+            "y": 432,
+            "width": 24,
+            "height": 24
+        },
+        "bakery-18": {
+            "x": 240,
+            "y": 432,
+            "width": 18,
+            "height": 18
+        },
+        "bakery-12": {
+            "x": 258,
+            "y": 432,
+            "width": 12,
+            "height": 12
+        },
+        "dog-park-24": {
+            "x": 0,
+            "y": 456,
+            "width": 24,
+            "height": 24
+        },
+        "dog-park-18": {
+            "x": 24,
+            "y": 456,
+            "width": 18,
+            "height": 18
+        },
+        "dog-park-12": {
+            "x": 42,
+            "y": 456,
+            "width": 12,
+            "height": 12
+        },
+        "lighthouse-24": {
+            "x": 54,
+            "y": 456,
+            "width": 24,
+            "height": 24
+        },
+        "lighthouse-18": {
+            "x": 78,
+            "y": 456,
+            "width": 18,
+            "height": 18
+        },
+        "lighthouse-12": {
+            "x": 96,
+            "y": 456,
+            "width": 12,
+            "height": 12
+        },
+        "clothing-store-24": {
+            "x": 108,
+            "y": 456,
+            "width": 24,
+            "height": 24
+        },
+        "clothing-store-18": {
+            "x": 132,
+            "y": 456,
+            "width": 18,
+            "height": 18
+        },
+        "clothing-store-12": {
+            "x": 150,
+            "y": 456,
+            "width": 12,
+            "height": 12
+        },
+        "polling-place-24": {
+            "x": 162,
+            "y": 456,
+            "width": 24,
+            "height": 24
+        },
+        "polling-place-18": {
+            "x": 186,
+            "y": 456,
+            "width": 18,
+            "height": 18
+        },
+        "polling-place-12": {
+            "x": 204,
+            "y": 456,
+            "width": 12,
+            "height": 12
+        },
+        "playground-24": {
+            "x": 216,
+            "y": 456,
+            "width": 24,
+            "height": 24
+        },
+        "playground-18": {
+            "x": 240,
+            "y": 456,
+            "width": 18,
+            "height": 18
+        },
+        "playground-12": {
+            "x": 258,
+            "y": 456,
+            "width": 12,
+            "height": 12
+        },
+        "entrance-24": {
+            "x": 0,
+            "y": 480,
+            "width": 24,
+            "height": 24
+        },
+        "entrance-18": {
+            "x": 24,
+            "y": 480,
+            "width": 18,
+            "height": 18
+        },
+        "entrance-12": {
+            "x": 42,
+            "y": 480,
+            "width": 12,
+            "height": 12
+        },
+        "heart-24": {
+            "x": 54,
+            "y": 480,
+            "width": 24,
+            "height": 24
+        },
+        "heart-18": {
+            "x": 78,
+            "y": 480,
+            "width": 18,
+            "height": 18
+        },
+        "heart-12": {
+            "x": 96,
+            "y": 480,
+            "width": 12,
+            "height": 12
+        },
+        "london-underground-24": {
+            "x": 108,
+            "y": 480,
+            "width": 24,
+            "height": 24
+        },
+        "london-underground-18": {
+            "x": 132,
+            "y": 480,
+            "width": 18,
+            "height": 18
+        },
+        "london-underground-12": {
+            "x": 150,
+            "y": 480,
+            "width": 12,
+            "height": 12
+        },
+        "minefield-24": {
+            "x": 162,
+            "y": 480,
+            "width": 24,
+            "height": 24
+        },
+        "minefield-18": {
+            "x": 186,
+            "y": 480,
+            "width": 18,
+            "height": 18
+        },
+        "minefield-12": {
+            "x": 204,
+            "y": 480,
+            "width": 12,
+            "height": 12
+        },
+        "rail-underground-24": {
+            "x": 216,
+            "y": 480,
+            "width": 24,
+            "height": 24
+        },
+        "rail-underground-18": {
+            "x": 240,
+            "y": 480,
+            "width": 18,
+            "height": 18
+        },
+        "rail-underground-12": {
+            "x": 258,
+            "y": 480,
+            "width": 12,
+            "height": 12
+        },
+        "rail-above-24": {
+            "x": 0,
+            "y": 504,
+            "width": 24,
+            "height": 24
+        },
+        "rail-above-18": {
+            "x": 24,
+            "y": 504,
+            "width": 18,
+            "height": 18
+        },
+        "rail-above-12": {
+            "x": 42,
+            "y": 504,
+            "width": 12,
+            "height": 12
+        },
+        "camera-24": {
+            "x": 54,
+            "y": 504,
+            "width": 24,
+            "height": 24
+        },
+        "camera-18": {
+            "x": 78,
+            "y": 504,
+            "width": 18,
+            "height": 18
+        },
+        "camera-12": {
+            "x": 96,
+            "y": 504,
+            "width": 12,
+            "height": 12
+        },
+        "laundry-24": {
+            "x": 108,
+            "y": 504,
+            "width": 24,
+            "height": 24
+        },
+        "laundry-18": {
+            "x": 132,
+            "y": 504,
+            "width": 18,
+            "height": 18
+        },
+        "laundry-12": {
+            "x": 150,
+            "y": 504,
+            "width": 12,
+            "height": 12
+        },
+        "car-24": {
+            "x": 162,
+            "y": 504,
+            "width": 24,
+            "height": 24
+        },
+        "car-18": {
+            "x": 186,
+            "y": 504,
+            "width": 18,
+            "height": 18
+        },
+        "car-12": {
+            "x": 204,
+            "y": 504,
+            "width": 12,
+            "height": 12
+        },
+        "suitcase-24": {
+            "x": 216,
+            "y": 504,
+            "width": 24,
+            "height": 24
+        },
+        "suitcase-18": {
+            "x": 240,
+            "y": 504,
+            "width": 18,
+            "height": 18
+        },
+        "suitcase-12": {
+            "x": 258,
+            "y": 504,
+            "width": 12,
+            "height": 12
+        },
+        "hairdresser-24": {
+            "x": 0,
+            "y": 528,
+            "width": 24,
+            "height": 24
+        },
+        "hairdresser-18": {
+            "x": 24,
+            "y": 528,
+            "width": 18,
+            "height": 18
+        },
+        "hairdresser-12": {
+            "x": 42,
+            "y": 528,
+            "width": 12,
+            "height": 12
+        },
+        "chemist-24": {
+            "x": 54,
+            "y": 528,
+            "width": 24,
+            "height": 24
+        },
+        "chemist-18": {
+            "x": 78,
+            "y": 528,
+            "width": 18,
+            "height": 18
+        },
+        "chemist-12": {
+            "x": 96,
+            "y": 528,
+            "width": 12,
+            "height": 12
+        },
+        "mobilephone-24": {
+            "x": 108,
+            "y": 528,
+            "width": 24,
+            "height": 24
+        },
+        "mobilephone-18": {
+            "x": 132,
+            "y": 528,
+            "width": 18,
+            "height": 18
+        },
+        "mobilephone-12": {
+            "x": 150,
+            "y": 528,
+            "width": 12,
+            "height": 12
+        },
+        "scooter-24": {
+            "x": 162,
+            "y": 528,
+            "width": 24,
+            "height": 24
+        },
+        "scooter-18": {
+            "x": 186,
+            "y": 528,
+            "width": 18,
+            "height": 18
+        },
+        "scooter-12": {
+            "x": 204,
+            "y": 528,
+            "width": 12,
+            "height": 12
+        },
+        "gift-24": {
+            "x": 216,
+            "y": 528,
+            "width": 24,
+            "height": 24
+        },
+        "gift-18": {
+            "x": 240,
+            "y": 528,
+            "width": 18,
+            "height": 18
+        },
+        "gift-12": {
+            "x": 258,
+            "y": 528,
+            "width": 12,
+            "height": 12
+        },
+        "ice-cream-24": {
+            "x": 0,
+            "y": 552,
+            "width": 24,
+            "height": 24
+        },
+        "ice-cream-18": {
+            "x": 24,
+            "y": 552,
+            "width": 18,
+            "height": 18
+        },
+        "ice-cream-12": {
+            "x": 42,
+            "y": 552,
+            "width": 12,
+            "height": 12
+        }
+    },
     "locales": [
         "af",
         "sq",
-        "sq-AL",
         "ar",
         "ar-AA",
         "hy",
@@ -47666,8 +52860,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "ca",
         "zh",
         "zh-CN",
-        "zh-CN.GB2312",
-        "gan",
         "zh-HK",
         "zh-TW",
         "yue",
@@ -47675,7 +52867,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "cs",
         "da",
         "nl",
-        "en-DE",
         "en-GB",
         "eo",
         "et",
@@ -47683,33 +52874,26 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "fr",
         "gl",
         "de",
-        "de-DE",
         "el",
-        "hi-IN",
         "hu",
         "is",
         "id",
         "it",
         "ja",
         "kn",
-        "km",
-        "km-KH",
         "ko",
         "ko-KR",
         "lv",
         "lt",
         "no",
-        "nn",
         "fa",
         "pl",
         "pt",
         "pt-BR",
-        "ro-RO",
+        "ro",
         "ru",
-        "ru-RU",
         "sc",
         "sr",
-        "sr-RS",
         "si",
         "sk",
         "sl",
@@ -47834,6 +53018,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "multiple": "Deleted {n} objects."
                 },
                 "incomplete_relation": "This feature can't be deleted because it hasn't been fully downloaded.",
+                "part_of_relation": "This feature can't be deleted because it's part of a larger relation. You must remove it from the relation first.",
                 "connected_to_hidden": "This can't be deleted because it is connected to a hidden feature."
             },
             "add_member": {
@@ -47866,7 +53051,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "not_eligible": "These features can't be merged.",
                 "not_adjacent": "These lines can't be merged because they aren't connected.",
                 "restriction": "These lines can't be merged because at least one is a member of a \"{relation}\" relation.",
-                "incomplete_relation": "These features can't be merged because at least one hasn't been fully downloaded."
+                "incomplete_relation": "These features can't be merged because at least one hasn't been fully downloaded.",
+                "conflicting_tags": "These lines can't be merged because some of their tags have conflicting values."
             },
             "move": {
                 "title": "Move",
@@ -47949,7 +53135,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "zoom_in_edit": "Zoom in to Edit",
         "logout": "logout",
         "loading_auth": "Connecting to OpenStreetMap...",
-        "report_a_bug": "report a bug",
+        "report_a_bug": "Report a bug",
+        "help_translate": "Help translate",
         "feature_info": {
             "hidden_warning": "{count} hidden features",
             "hidden_details": "These features are currently hidden: {details}"
@@ -47962,7 +53149,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         "commit": {
             "title": "Save Changes",
             "description_placeholder": "Brief description of your contributions",
-            "message_label": "Commit message",
+            "message_label": "Changeset comment",
             "upload_explanation": "The changes you upload will be visible on all maps that use OpenStreetMap data.",
             "upload_explanation_with_user": "The changes you upload as {user} will be visible on all maps that use OpenStreetMap data.",
             "save": "Save",
@@ -47977,6 +53164,26 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "list": "Edits by {users}",
             "truncated_list": "Edits by {users} and {count} others"
         },
+        "infobox": {
+            "selected": "{n} selected",
+            "geometry": "Geometry",
+            "closed": "closed",
+            "center": "Center",
+            "perimeter": "Perimeter",
+            "length": "Length",
+            "area": "Area",
+            "centroid": "Centroid",
+            "location": "Location",
+            "metric": "Metric",
+            "imperial": "Imperial"
+        },
+        "geometry": {
+            "point": "point",
+            "vertex": "vertex",
+            "line": "line",
+            "area": "area",
+            "relation": "relation"
+        },
         "geocoder": {
             "search": "Search worldwide...",
             "no_results_visible": "No results in visible map area",
@@ -48026,7 +53233,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "custom_button": "Edit custom background",
             "custom_prompt": "Enter a tile URL template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.",
             "fix_misalignment": "Fix alignment",
-            "reset": "reset"
+            "reset": "reset",
+            "minimap": {
+                "description": "Minimap",
+                "tooltip": "Show a zoomed out map to help locate the area currently displayed."
+            }
         },
         "map_data": {
             "title": "Map Data",
@@ -48110,10 +53321,33 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "title": "Save",
             "help": "Save changes to OpenStreetMap, making them visible to other users.",
             "no_changes": "No changes to save.",
-            "error": "An error occurred while trying to save",
+            "error": "Errors occurred while trying to save",
+            "status_code": "Server returned status code {code}",
             "unknown_error_details": "Please ensure you are connected to the internet.",
             "uploading": "Uploading changes to OpenStreetMap.",
-            "unsaved_changes": "You have unsaved changes"
+            "unsaved_changes": "You have unsaved changes",
+            "conflict": {
+                "header": "Resolve conflicting edits",
+                "count": "Conflict {num} of {total}",
+                "previous": "< Previous",
+                "next": "Next >",
+                "keep_local": "Keep mine",
+                "keep_remote": "Use theirs",
+                "restore": "Restore",
+                "delete": "Leave Deleted",
+                "download_changes": "Or download your changes.",
+                "done": "All conflicts resolved!",
+                "help": "Another user changed some of the same map features you changed.\nClick on each item below for more details about the conflict, and choose whether to keep\nyour changes or the other user's changes.\n"
+            }
+        },
+        "merge_remote_changes": {
+            "conflict": {
+                "deleted": "This object has been deleted by {user}.",
+                "location": "This object was moved by both you and {user}.",
+                "nodelist": "Nodes were changed by both you and {user}.",
+                "memberlist": "Relation members were changed by both you and {user}.",
+                "tags": "You changed the <b>{tag}</b> tag to \"{local}\" and {user} changed it to \"{remote}\"."
+            }
         },
         "success": {
             "edited_osm": "Edited OSM!",
@@ -48125,7 +53359,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "help_html": "Your changes should appear in the \"Standard\" layer in a few minutes. Other layers, and certain features, may take longer\n(<a href='https://help.openstreetmap.org/questions/4705/why-havent-my-changes-appeared-on-the-map' target='_blank'>details</a>).\n"
         },
         "confirm": {
-            "okay": "Okay"
+            "okay": "Okay",
+            "cancel": "Cancel"
         },
         "splash": {
             "welcome": "Welcome to the iD OpenStreetMap editor",
@@ -48159,6 +53394,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             "out": "Zoom Out"
         },
         "cannot_zoom": "Cannot zoom out further in current mode.",
+        "full_screen": "Toggle Full Screen",
         "gpx": {
             "local_layer": "Local GPX file",
             "drag_drop": "Drag and drop a .gpx file on the page, or click the button to the right to browse",
@@ -48172,13 +53408,13 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
         },
         "help": {
             "title": "Help",
-            "help": "# Help\n\nThis is an editor for [OpenStreetMap](http://www.openstreetmap.org/), the\nfree and editable map of the world. You can use it to add and update\ndata in your area, making an open-source and open-data map of the world\nbetter for everyone.\n\nEdits that you make on this map will be visible to everyone who uses\nOpenStreetMap. In order to make an edit, you'll need a\n[free OpenStreetMap account](https://www.openstreetmap.org/user/new).\n\nThe [iD editor](http://ideditor.com/) is a collaborative project with [source\ncode available on GitHub](https://github.com/openstreetmap/iD).\n",
-            "editing_saving": "# Editing & Saving\n\nThis editor is designed to work primarily online, and you're accessing\nit through a website right now.\n\n### Selecting Features\n\nTo select a map feature, like a road or point of interest, click\non it on the map. This will highlight the selected feature, open a panel with\ndetails about it, and show a menu of things you can do with the feature.\n\nTo select multiple features, hold down the 'Shift' key. Then either click\non the features you want to select, or drag on the map to draw a rectangle.\nThis will draw a box and select all the points within it.\n\n### Saving Edits\n\nWhen you make changes like editing roads, buildings, and places, these are\nstored locally until you save them to the server. Don't worry if you make\na mistake - you can undo changes by clicking the undo button, and redo\nchanges by clicking the redo button.\n\nClick 'Save' to finish a group of edits - for instance, if you've completed\nan area of town and would like to start on a new area. You'll have a chance\nto review what you've done, and the editor supplies helpful suggestions\nand warnings if something doesn't seem right about the changes.\n\nIf everything looks good, you can enter a short comment explaining the change\nyou made, and click 'Save' again to post the changes\nto [OpenStreetMap.org](http://www.openstreetmap.org/), where they are visible\nto all other users and available for others to build and improve upon.\n\nIf you can't finish your edits in one sitting, you can leave the editor\nwindow and come back (on the same browser and computer), and the\neditor application will offer to restore your work.\n",
+            "help": "# Help\n\nThis is an editor for [OpenStreetMap](http://www.openstreetmap.org/), the\nfree and editable map of the world. You can use it to add and update\ndata in your area, making an open-source and open-data map of the world\nbetter for everyone.\n\nEdits that you make on this map will be visible to everyone who uses\nOpenStreetMap. In order to make an edit, you'll need to\n[log in](https://www.openstreetmap.org/login).\n\nThe [iD editor](http://ideditor.com/) is a collaborative project with [source\ncode available on GitHub](https://github.com/openstreetmap/iD).\n",
+            "editing_saving": "# Editing & Saving\n\nThis editor is designed to work primarily online, and you're accessing\nit through a website right now.\n\n### Selecting Features\n\nTo select a map feature, like a road or point of interest, click\non it on the map. This will highlight the selected feature, open a panel with\ndetails about it, and show a menu of things you can do with the feature.\n\nTo select multiple features, hold down the 'Shift' key. Then either click\non the features you want to select, or drag on the map to draw a rectangle.\nThis will draw a box and select all the points within it.\n\n### Saving Edits\n\nWhen you make changes like editing roads, buildings, and places, these are\nstored locally until you save them to the server. Don't worry if you make\na mistake - you can undo changes by clicking the undo button, and redo\nchanges by clicking the redo button.\n\nClick 'Save' to finish a group of edits - for instance, if you've completed\nan area of town and would like to start on a new area. You'll have a chance\nto review what you've done, and the editor supplies helpful suggestions\nand warnings if something doesn't seem right about the changes.\n\nIf everything looks good, you can enter a short comment explaining the change\nyou made, and click 'Save' again to post the changes\nto [OpenStreetMap.org](http://www.openstreetmap.org/), where they are visible\nto all other users and available for others to build and improve upon.\n\nIf you can't finish your edits in one sitting, you can leave the editor\nwindow and come back (on the same browser and computer), and the\neditor application will offer to restore your work.\n\n### Using the editor\n\nA list of available keyboard shortcuts can be found [here](http://wiki.openstreetmap.org/wiki/ID/Shortcuts).\n",
             "roads": "# Roads\n\nYou can create, fix, and delete roads with this editor. Roads can be all\nkinds: paths, highways, trails, cycleways, and more - any often-crossed\nsegment should be mappable.\n\n### Selecting\n\nClick on a road to select it. An outline should become visible, along\nwith a small tools menu on the map and a sidebar showing more information\nabout the road.\n\n### Modifying\n\nOften you'll see roads that aren't aligned to the imagery behind them\nor to a GPS track. You can adjust these roads so they are in the correct\nplace.\n\nFirst click on the road you want to change. This will highlight it and show\ncontrol points along it that you can drag to better locations. If\nyou want to add new control points for more detail, double-click a part\nof the road without a node, and one will be added.\n\nIf the road connects to another road, but doesn't properly connect on\nthe map, you can drag one of its control points onto the other road in\norder to join them. Having roads connect is important for the map\nand essential for providing driving directions.\n\nYou can also click the 'Move' tool or press the `M` shortcut key to move the entire road at\none time, and then click again to save that movement.\n\n### Deleting\n\nIf a road is entirely incorrect - you can see that it doesn't exist in satellite\nimagery and ideally have confirmed locally that it's not present - you can delete\nit, which removes it from the map. Be cautious when deleting features -\nlike any other edit, the results are seen by everyone and satellite imagery\nis often out of date, so the road could simply be newly built.\n\nYou can delete a road by clicking on it to select it, then clicking the\ntrash can icon or pressing the 'Delete' key.\n\n### Creating\n\nFound somewhere there should be a road but there isn't? Click the 'Line'\nicon in the top-left of the editor or press the shortcut key `2` to start drawing\na line.\n\nClick on the start of the road on the map to start drawing. If the road\nbranches off from an existing road, start by clicking on the place where they connect.\n\nThen click on points along the road so that it follows the right path, according\nto satellite imagery or GPS. If the road you are drawing crosses another road, connect\nit by clicking on the intersection point. When you're done drawing, double-click\nor press 'Return' or 'Enter' on your keyboard.\n",
-            "gps": "# GPS\n\nGPS data is the most trusted source of data for OpenStreetMap. This editor\nsupports local traces - `.gpx` files on your local computer. You can collect\nthis kind of GPS trace with a number of smartphone applications as well as\npersonal GPS hardware.\n\nFor information on how to perform a GPS survey, read\n[Surveying with a GPS](http://learnosm.org/en/beginner/using-gps/).\n\nTo use a GPX track for mapping, drag and drop the GPX file onto the map\neditor. If it's recognized, it will be added to the map as a bright purple\nline. Click on the 'Map Data' menu on the right side to enable,\ndisable, or zoom to this new GPX-powered layer.\n\nThe GPX track isn't directly uploaded to OpenStreetMap - the best way to\nuse it is to draw on the map, using it as a guide for the new features that\nyou add, and also to [upload it to OpenStreetMap](http://www.openstreetmap.org/trace/create)\nfor other users to use.\n",
+            "gps": "# GPS\n\nCollected GPS traces are one valuable source of data for OpenStreetMap. This editor\nsupports local traces - `.gpx` files on your local computer. You can collect\nthis kind of GPS trace with a number of smartphone applications as well as\npersonal GPS hardware.\n\nFor information on how to perform a GPS survey, read\n[Mapping with a smartphone, GPS, or paper](http://learnosm.org/en/mobile-mapping/).\n\nTo use a GPX track for mapping, drag and drop the GPX file onto the map\neditor. If it's recognized, it will be added to the map as a bright purple\nline. Click on the 'Map Data' menu on the right side to enable,\ndisable, or zoom to this new GPX-powered layer.\n\nThe GPX track isn't directly uploaded to OpenStreetMap - the best way to\nuse it is to draw on the map, using it as a guide for the new features that\nyou add, and also to [upload it to OpenStreetMap](http://www.openstreetmap.org/trace/create)\nfor other users to use.\n",
             "imagery": "# Imagery\n\nAerial imagery is an important resource for mapping. A combination of\nairplane flyovers, satellite views, and freely-compiled sources are available\nin the editor under the 'Background Settings' menu on the right.\n\nBy default a [Bing Maps](http://www.bing.com/maps/) satellite layer is\npresented in the editor, but as you pan and zoom the map to new geographical\nareas, new sources will become available. Some countries, like the United\nStates, France, and Denmark have very high-quality imagery available for some areas.\n\nImagery is sometimes offset from the map data because of a mistake on the\nimagery provider's side. If you see a lot of roads shifted from the background,\ndon't immediately move them all to match the background. Instead you can adjust\nthe imagery so that it matches the existing data by clicking 'Fix alignment' at\nthe bottom of the Background Settings UI.\n",
             "addresses": "# Addresses\n\nAddresses are some of the most useful information for the map.\n\nAlthough addresses are often represented as parts of streets, in OpenStreetMap\nthey're recorded as attributes of buildings and places along streets.\n\nYou can add address information to places mapped as building outlines\nas well as those mapped as single points. The optimal source of address\ndata is from an on-the-ground survey or personal knowledge - as with any\nother feature, copying from commercial sources like Google Maps is strictly\nforbidden.\n",
-            "inspector": "# Using the Inspector\n\nThe inspector is the section on the left side of the page that allows you to\nedit the details of the selected feature.\n\n### Selecting a Feature Type\n\nAfter you add a point, line, or area, you can choose what type of feature it\nis, like whether it's a highway or residential road, supermarket or cafe.\nThe inspector will display buttons for common feature types, and you can\nfind others by typing what you're looking for in the search box.\n\nClick the 'i' in the bottom-right-hand corner of a feature type button to\nlearn more about it. Click a button to choose that type.\n\n### Using Forms and Editing Tags\n\nAfter you choose a feature type, or when you select a feature that already\nhas a type assigned, the inspector will display fields with details about\nthe feature like its name and address.\n\nBelow the fields you see, you can click icons to add other details,\nlike [Wikipedia](http://www.wikipedia.org/) information, wheelchair\naccess, and more.\n\nAt the bottom of the inspector, click 'Additional tags' to add arbitrary\nother tags to the element. [Taginfo](http://taginfo.openstreetmap.org/) is a\ngreat resource for learn more about popular tag combinations.\n\nChanges you make in the inspector are automatically applied to the map.\nYou can undo them at any time by clicking the 'Undo' button.\n",
+            "inspector": "# Using the Inspector\n\nThe inspector is the section on the left side of the page that allows you to\nedit the details of the selected feature.\n\n### Selecting a Feature Type\n\nAfter you add a point, line, or area, you can choose what type of feature it\nis, like whether it's a highway or residential road, supermarket or cafe.\nThe inspector will display buttons for common feature types, and you can\nfind others by typing what you're looking for in the search box.\n\nClick the 'i' in the bottom-right-hand corner of a feature type button to\nlearn more about it. Click a button to choose that type.\n\n### Using Forms and Editing Tags\n\nAfter you choose a feature type, or when you select a feature that already\nhas a type assigned, the inspector will display fields with details about\nthe feature like its name and address.\n\nBelow the fields you see, you can click the 'Add field' dropdown to add\nother details, like a Wikipedia link, wheelchair access, and more.\n\nAt the bottom of the inspector, click 'Additional tags' to add arbitrary\nother tags to the element. [Taginfo](http://taginfo.openstreetmap.org/) is a\ngreat resource for learn more about popular tag combinations.\n\nChanges you make in the inspector are automatically applied to the map.\nYou can undo them at any time by clicking the 'Undo' button.\n",
             "buildings": "# Buildings\n\nOpenStreetMap is the world's largest database of buildings. You can create\nand improve this database.\n\n### Selecting\n\nYou can select a building by clicking on its border. This will highlight the\nbuilding and open a small tools menu and a sidebar showing more information\nabout the building.\n\n### Modifying\n\nSometimes buildings are incorrectly placed or have incorrect tags.\n\nTo move an entire building, select it, then click the 'Move' tool. Move your\nmouse to shift the building, and click when it's correctly placed.\n\nTo fix the specific shape of a building, click and drag the nodes that form\nits border into better places.\n\n### Creating\n\nOne of the main questions around adding buildings to the map is that\nOpenStreetMap records buildings both as shapes and points. The rule of thumb\nis to _map a building as a shape whenever possible_, and map companies, homes,\namenities, and other things that operate out of buildings as points placed\nwithin the building shape.\n\nStart drawing a building as a shape by clicking the 'Area' button in the top\nleft of the interface, and end it either by pressing 'Return' on your keyboard\nor clicking on the first node drawn to close the shape.\n\n### Deleting\n\nIf a building is entirely incorrect - you can see that it doesn't exist in satellite\nimagery and ideally have confirmed locally that it's not present - you can delete\nit, which removes it from the map. Be cautious when deleting features -\nlike any other edit, the results are seen by everyone and satellite imagery\nis often out of date, so the building could simply be newly built.\n\nYou can delete a building by clicking on it to select it, then clicking the\ntrash can icon or pressing the 'Delete' key.\n",
             "relations": "# Relations\n\nA relation is a special type of feature in OpenStreetMap that groups together\nother features. For example, two common types of relations are *route relations*,\nwhich group together sections of road that belong to a specific freeway or\nhighway, and *multipolygons*, which group together several lines that define\na complex area (one with several pieces or holes in it like a donut).\n\nThe group of features in a relation are called *members*. In the sidebar, you can\nsee which relations a feature is a member of, and click on a relation there\nto select the it. When the relation is selected, you can see all of its\nmembers listed in the sidebar and highlighted on the map.\n\nFor the most part, iD will take care of maintaining relations automatically\nwhile you edit. The main thing you should be aware of is that if you delete a\nsection of road to redraw it more accurately, you should make sure that the\nnew section is a member of the same relations as the original.\n\n## Editing Relations\n\nIf you want to edit relations, here are the basics.\n\nTo add a feature to a relation, select the feature, click the \"+\" button in the\n\"All relations\" section of the sidebar, and select or type the name of the relation.\n\nTo create a new relation, select the first feature that should be a member,\nclick the \"+\" button in the \"All relations\" section, and select \"New relation...\".\n\nTo remove a feature from a relation, select the feature and click the trash\nbutton next to the relation you want to remove it from.\n\nYou can create multipolygons with holes using the \"Merge\" tool. Draw two areas (inner\nand outer), hold the Shift key and click on each of them to select them both, and then\nclick the \"Merge\" (+) button.\n"
         },
@@ -48266,10 +53502,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             },
             "fields": {
                 "access": {
-                    "label": "Access",
-                    "placeholder": "Unknown",
+                    "label": "Allowed Access",
+                    "placeholder": "Not Specified",
                     "types": {
-                        "access": "General",
+                        "access": "All",
                         "foot": "Foot",
                         "motor_vehicle": "Motor Vehicles",
                         "bicycle": "Bicycles",
@@ -48299,11 +53535,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "destination": {
                             "title": "Destination",
                             "description": "Access permitted only to reach a destination"
+                        },
+                        "dismount": {
+                            "title": "Dismount",
+                            "description": "Access permitted but rider must dismount"
                         }
                     }
                 },
                 "access_simple": {
-                    "label": "Access",
+                    "label": "Allowed Access",
                     "placeholder": "yes"
                 },
                 "access_toilets": {
@@ -48314,6 +53554,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "placeholders": {
                         "housename": "Housename",
                         "housenumber": "123",
+                        "conscriptionnumber": "123",
                         "street": "Street",
                         "city": "City",
                         "postcode": "Postcode",
@@ -48373,6 +53614,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "amenity": {
                     "label": "Type"
                 },
+                "area/highway": {
+                    "label": "Type"
+                },
                 "artist": {
                     "label": "Artist"
                 },
@@ -48444,6 +53688,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "construction": {
                     "label": "Type"
                 },
+                "content": {
+                    "label": "Contents"
+                },
                 "country": {
                     "label": "Country"
                 },
@@ -48462,6 +53709,44 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "cuisine": {
                     "label": "Cuisine"
                 },
+                "cycleway": {
+                    "label": "Bike Lanes",
+                    "placeholder": "none",
+                    "types": {
+                        "cycleway:left": "Left side",
+                        "cycleway:right": "Right side"
+                    },
+                    "options": {
+                        "none": {
+                            "title": "None",
+                            "description": "No bike lane"
+                        },
+                        "lane": {
+                            "title": "Standard bike lane",
+                            "description": "A bike lane separated from auto traffic by a painted line"
+                        },
+                        "shared_lane": {
+                            "title": "Shared bike lane",
+                            "description": "A bike lane with no separation from auto traffic"
+                        },
+                        "track": {
+                            "title": "Bike track",
+                            "description": "A bike lane separated from traffic by a physical barrier"
+                        },
+                        "share_busway": {
+                            "title": "Bike lane shared with bus",
+                            "description": "A bike lane shared with a bus lane"
+                        },
+                        "opposite_lane": {
+                            "title": "Opposite bike lane",
+                            "description": "A bike lane that travels in the opposite direction of traffic"
+                        },
+                        "opposite": {
+                            "title": "Contraflow bike lane",
+                            "description": "A bike lane that travels in both directions on a one-way street"
+                        }
+                    }
+                },
                 "delivery": {
                     "label": "Delivery"
                 },
@@ -48474,6 +53759,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "description": {
                     "label": "Description"
                 },
+                "drive_through": {
+                    "label": "Drive-Through"
+                },
                 "electrified": {
                     "label": "Electrification",
                     "placeholder": "Contact Line, Electrified Rail...",
@@ -48593,6 +53881,13 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "incline": {
                     "label": "Incline"
                 },
+                "incline_steps": {
+                    "label": "Incline",
+                    "options": {
+                        "up": "Up",
+                        "down": "Down"
+                    }
+                },
                 "information": {
                     "label": "Type"
                 },
@@ -48629,6 +53924,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "mixed": "Mixed"
                     }
                 },
+                "leaf_cycle_singular": {
+                    "label": "Leaf Cycle",
+                    "options": {
+                        "evergreen": "Evergreen",
+                        "deciduous": "Deciduous",
+                        "semi_evergreen": "Semi-Evergreen",
+                        "semi_deciduous": "Semi-Deciduous"
+                    }
+                },
                 "leaf_type": {
                     "label": "Leaf Type",
                     "options": {
@@ -48638,12 +53942,23 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "leafless": "Leafless"
                     }
                 },
+                "leaf_type_singular": {
+                    "label": "Leaf Type",
+                    "options": {
+                        "broadleaved": "Broadleaved",
+                        "needleleaved": "Needleleaved",
+                        "leafless": "Leafless"
+                    }
+                },
                 "leisure": {
                     "label": "Type"
                 },
                 "length": {
                     "label": "Length (Meters)"
                 },
+                "level": {
+                    "label": "Level"
+                },
                 "levels": {
                     "label": "Levels",
                     "placeholder": "2, 4, 6..."
@@ -48805,6 +54120,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "power": {
                     "label": "Type"
                 },
+                "power_supply": {
+                    "label": "Power Supply"
+                },
                 "railway": {
                     "label": "Type"
                 },
@@ -48817,9 +54135,22 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "recycling/glass": {
                     "label": "Accepts Glass"
                 },
+                "recycling/glass_bottles": {
+                    "label": "Accepts Glass Bottles"
+                },
                 "recycling/paper": {
                     "label": "Accepts Paper"
                 },
+                "recycling/plastic": {
+                    "label": "Accepts Plastic"
+                },
+                "recycling/type": {
+                    "label": "Recycling Type",
+                    "options": {
+                        "container": "Container",
+                        "centre": "Recycling Center"
+                    }
+                },
                 "ref": {
                     "label": "Reference"
                 },
@@ -48853,13 +54184,16 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "difficult_alpine_hiking": "T6: Difficult Alpine Hiking"
                     }
                 },
+                "sanitary_dump_station": {
+                    "label": "Toilet Disposal"
+                },
                 "seasonal": {
                     "label": "Seasonal"
                 },
                 "service": {
                     "label": "Type"
                 },
-                "service/bicycle/chaintool": {
+                "service/bicycle/chain_tool": {
                     "label": "Chain Tool",
                     "options": {
                         "undefined": "Assumed to be No",
@@ -48875,6 +54209,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "no": "No"
                     }
                 },
+                "service_rail": {
+                    "label": "Service Type",
+                    "options": {
+                        "spur": "Spur",
+                        "yard": "Yard",
+                        "siding": "Siding",
+                        "crossover": "Crossover"
+                    }
+                },
                 "shelter": {
                     "label": "Shelter"
                 },
@@ -48990,6 +54333,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                         "grade5": "Soft: soil/sand/grass"
                     }
                 },
+                "traffic_signals": {
+                    "label": "Type"
+                },
                 "trail_visibility": {
                     "label": "Trail Visibility",
                     "placeholder": "Excellent, Good, Bad...",
@@ -49014,6 +54360,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "water": {
                     "label": "Type"
                 },
+                "water_point": {
+                    "label": "Water Point"
+                },
                 "waterway": {
                     "label": "Type"
                 },
@@ -49155,6 +54504,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Bicycle Repair Station",
                     "terms": "bike"
                 },
+                "amenity/biergarten": {
+                    "name": "Beer Garden",
+                    "terms": "beer,bier,booze"
+                },
                 "amenity/boat_rental": {
                     "name": "Boat Rental",
                     "terms": ""
@@ -49183,6 +54536,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Car Wash",
                     "terms": ""
                 },
+                "amenity/casino": {
+                    "name": "Casino",
+                    "terms": "gambling,roulette,craps,poker,blackjack"
+                },
                 "amenity/charging_station": {
                     "name": "Charging Station",
                     "terms": "EV,Electric Vehicle,Supercharger"
@@ -49279,6 +54636,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Marketplace",
                     "terms": ""
                 },
+                "amenity/motorcycle_parking": {
+                    "name": "Motorcycle Parking",
+                    "terms": ""
+                },
                 "amenity/nightclub": {
                     "name": "Nightclub",
                     "terms": "disco*,night club,dancing,dance club"
@@ -49351,6 +54712,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Restaurant",
                     "terms": "bar,breakfast,cafe,café,canteen,coffee,dine,dining,dinner,drive-in,eat,grill,lunch,table"
                 },
+                "amenity/sanitary_dump_station": {
+                    "name": "RV Toilet Disposal",
+                    "terms": "Motor Home,Camper,Sanitary,Dump Station,Elsan,CDP,CTDP,Chemical Toilet"
+                },
                 "amenity/school": {
                     "name": "School Grounds",
                     "terms": "academy,elementary school,middle school,high school"
@@ -49423,6 +54788,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Area",
                     "terms": ""
                 },
+                "area/highway": {
+                    "name": "Road Surface",
+                    "terms": ""
+                },
                 "barrier": {
                     "name": "Barrier",
                     "terms": ""
@@ -49540,8 +54909,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": ""
                 },
                 "building/detached": {
-                    "name": "Detached Home",
-                    "terms": ""
+                    "name": "Detached House",
+                    "terms": "home,single,family,residence,dwelling"
                 },
                 "building/dormitory": {
                     "name": "Dormitory",
@@ -49573,7 +54942,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 },
                 "building/house": {
                     "name": "House",
-                    "terms": ""
+                    "terms": "home,family,residence,dwelling"
                 },
                 "building/hut": {
                     "name": "Hut",
@@ -49607,6 +54976,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "School Building",
                     "terms": "academy,elementary school,middle school,high school"
                 },
+                "building/semidetached_house": {
+                    "name": "Semi-Detached House",
+                    "terms": "home,double,duplex,twin,family,residence,dwelling"
+                },
                 "building/shed": {
                     "name": "Shed",
                     "terms": ""
@@ -49621,7 +54994,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 },
                 "building/terrace": {
                     "name": "Row Houses",
-                    "terms": ""
+                    "terms": "home,terrace,brownstone,family,residence,dwelling"
                 },
                 "building/train_station": {
                     "name": "Train Station",
@@ -49844,11 +55217,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": ""
                 },
                 "footway/crossing": {
-                    "name": "Crossing",
+                    "name": "Street Crossing",
                     "terms": ""
                 },
                 "footway/crosswalk": {
-                    "name": "Crosswalk",
+                    "name": "Pedestrian Crosswalk",
                     "terms": "zebra crossing"
                 },
                 "footway/sidewalk": {
@@ -49903,12 +55276,16 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Bus Stop",
                     "terms": ""
                 },
+                "highway/corridor": {
+                    "name": "Indoor Corridor",
+                    "terms": "gallery,hall,hallway,indoor,passage,passageway"
+                },
                 "highway/crossing": {
-                    "name": "Crossing",
+                    "name": "Street Crossing",
                     "terms": ""
                 },
                 "highway/crosswalk": {
-                    "name": "Crosswalk",
+                    "name": "Pedestrian Crosswalk",
                     "terms": "zebra crossing"
                 },
                 "highway/cycleway": {
@@ -49944,7 +55321,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": "hike,hiking,trackway,trail,walk"
                 },
                 "highway/pedestrian": {
-                    "name": "Pedestrian",
+                    "name": "Pedestrian Street",
                     "terms": ""
                 },
                 "highway/primary": {
@@ -50092,12 +55469,12 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": ""
                 },
                 "landuse": {
-                    "name": "Landuse",
+                    "name": "Land Use",
                     "terms": ""
                 },
                 "landuse/allotments": {
-                    "name": "Allotments",
-                    "terms": ""
+                    "name": "Community Garden",
+                    "terms": "allotment,garden"
                 },
                 "landuse/basin": {
                     "name": "Basin",
@@ -50163,6 +55540,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Orchard",
                     "terms": ""
                 },
+                "landuse/plant_nursery": {
+                    "name": "Plant Nursery",
+                    "terms": "vivero"
+                },
                 "landuse/quarry": {
                     "name": "Quarry",
                     "terms": ""
@@ -50183,6 +55564,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Leisure",
                     "terms": ""
                 },
+                "leisure/adult_gaming_centre": {
+                    "name": "Adult Gaming Center",
+                    "terms": "gambling,slot machine"
+                },
+                "leisure/bowling_alley": {
+                    "name": "Bowling Alley",
+                    "terms": ""
+                },
                 "leisure/common": {
                     "name": "Common",
                     "terms": "open space"
@@ -50239,6 +55628,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Basketball Court",
                     "terms": ""
                 },
+                "leisure/pitch/rugby_league": {
+                    "name": "Rugby League Field",
+                    "terms": ""
+                },
+                "leisure/pitch/rugby_union": {
+                    "name": "Rugby Union Field",
+                    "terms": ""
+                },
                 "leisure/pitch/skateboard": {
                     "name": "Skate Park",
                     "terms": ""
@@ -50291,6 +55688,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Man Made",
                     "terms": ""
                 },
+                "man_made/adit": {
+                    "name": "Adit",
+                    "terms": "entrance,underground,mine,cave"
+                },
                 "man_made/breakwater": {
                     "name": "Breakwater",
                     "terms": ""
@@ -50311,10 +55712,18 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Lighthouse",
                     "terms": ""
                 },
+                "man_made/mast": {
+                    "name": "Radio Mast",
+                    "terms": "broadcast tower,cell phone tower,cell tower,guyed tower,mobile phone tower,radio tower,television tower,transmission mast,transmission tower,tv tower"
+                },
                 "man_made/observation": {
                     "name": "Observation Tower",
                     "terms": "lookout tower,fire tower"
                 },
+                "man_made/petroleum_well": {
+                    "name": "Oil Well",
+                    "terms": "drilling rig,oil derrick,oil drill,oil horse,oil rig,oil pump,petroleum well,pumpjack"
+                },
                 "man_made/pier": {
                     "name": "Pier",
                     "terms": ""
@@ -50323,6 +55732,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Pipeline",
                     "terms": ""
                 },
+                "man_made/silo": {
+                    "name": "Silo",
+                    "terms": "grain,corn,wheat"
+                },
+                "man_made/storage_tank": {
+                    "name": "Storage Tank",
+                    "terms": "water,oil,gas,petrol"
+                },
                 "man_made/survey_point": {
                     "name": "Survey Point",
                     "terms": ""
@@ -50359,10 +55776,30 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Bunker",
                     "terms": ""
                 },
+                "military/checkpoint": {
+                    "name": "Checkpoint",
+                    "terms": ""
+                },
+                "military/danger_area": {
+                    "name": "Danger Area",
+                    "terms": ""
+                },
+                "military/naval_base": {
+                    "name": "Naval Base",
+                    "terms": ""
+                },
+                "military/obstacle_course": {
+                    "name": "Obstacle Course",
+                    "terms": ""
+                },
                 "military/range": {
                     "name": "Military Range",
                     "terms": ""
                 },
+                "military/training_area": {
+                    "name": "Training area",
+                    "terms": ""
+                },
                 "natural": {
                     "name": "Natural",
                     "terms": ""
@@ -50377,7 +55814,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 },
                 "natural/cave_entrance": {
                     "name": "Cave Entrance",
-                    "terms": ""
+                    "terms": "cavern,hollow,grotto,shelter,cavity"
                 },
                 "natural/cliff": {
                     "name": "Cliff",
@@ -50407,13 +55844,17 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Peak",
                     "terms": "acme,aiguille,alp,climax,crest,crown,hill,mount,mountain,pinnacle,summit,tip,top"
                 },
+                "natural/saddle": {
+                    "name": "Saddle",
+                    "terms": "pass,mountain pass,top"
+                },
                 "natural/scree": {
                     "name": "Scree",
                     "terms": "loose rocks"
                 },
                 "natural/scrub": {
                     "name": "Scrub",
-                    "terms": ""
+                    "terms": "bush,shrubs"
                 },
                 "natural/spring": {
                     "name": "Spring",
@@ -50423,6 +55864,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Tree",
                     "terms": ""
                 },
+                "natural/tree_row": {
+                    "name": "Tree row",
+                    "terms": ""
+                },
+                "natural/volcano": {
+                    "name": "Volcano",
+                    "terms": "mountain,crater"
+                },
                 "natural/water": {
                     "name": "Water",
                     "terms": ""
@@ -50543,6 +55992,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "City",
                     "terms": ""
                 },
+                "place/farm": {
+                    "name": "Farm",
+                    "terms": ""
+                },
                 "place/hamlet": {
                     "name": "Hamlet",
                     "terms": ""
@@ -50644,8 +56097,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "terms": "break,interrupt,rest,wait,interruption"
                 },
                 "railway/level_crossing": {
-                    "name": "Level Crossing",
-                    "terms": "crossing,railroad crossing,railway crossing,grade crossing,road through railroad,train crossing"
+                    "name": "Railway Crossing",
+                    "terms": "crossing,railroad crossing,level crossing,grade crossing,road through railroad,train crossing"
                 },
                 "railway/monorail": {
                     "name": "Monorail",
@@ -50683,6 +56136,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Relation",
                     "terms": ""
                 },
+                "roundabout": {
+                    "name": "Roundabout",
+                    "terms": ""
+                },
                 "route/ferry": {
                     "name": "Ferry Route",
                     "terms": ""
@@ -51141,11 +56598,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 },
                 "tourism/camp_site": {
                     "name": "Camp Site",
-                    "terms": ""
+                    "terms": "Tent"
                 },
                 "tourism/caravan_site": {
                     "name": "RV Park",
-                    "terms": ""
+                    "terms": "Motor Home,Camper"
                 },
                 "tourism/chalet": {
                     "name": "Chalet",
@@ -51327,6 +56784,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Drain",
                     "terms": ""
                 },
+                "waterway/fuel": {
+                    "name": "Marine Fuel Station",
+                    "terms": "petrol,gas,diesel,boat"
+                },
                 "waterway/river": {
                     "name": "River",
                     "terms": "beck,branch,brook,course,creek,estuary,rill,rivulet,run,runnel,stream,tributary,watercourse"
@@ -51335,6 +56796,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "name": "Riverbank",
                     "terms": ""
                 },
+                "waterway/sanitary_dump_station": {
+                    "name": "Marine Toilet Disposal",
+                    "terms": "Boat,Watercraft,Sanitary,Dump Station,Pumpout,Pump out,Elsan,CDP,CTDP,Chemical Toilet"
+                },
                 "waterway/stream": {
                     "name": "Stream",
                     "terms": "beck,branch,brook,burn,course,creek,current,drift,flood,flow,freshet,race,rill,rindle,rivulet,run,runnel,rush,spate,spritz,surge,tide,torrent,tributary,watercourse"
@@ -51781,9 +57246,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "ENEOS": {
                     "count": 736
                 },
-                "Stacja paliw": {
-                    "count": 94
-                },
                 "Bharat Petroleum": {
                     "count": 64
                 },
@@ -52194,7 +57656,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     }
                 },
                 "Taco Bell": {
-                    "count": 1423
+                    "count": 1423,
+                    "tags": {
+                        "cuisine": "mexican"
+                    }
                 },
                 "Pizza Nova": {
                     "count": 63
@@ -52211,9 +57676,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Mr. Sub": {
                     "count": 103
                 },
-                "Kebab": {
-                    "count": 182
-                },
                 "Макдоналдс": {
                     "count": 324,
                     "tags": {
@@ -52223,9 +57685,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Asia Imbiss": {
                     "count": 111
                 },
-                "Imbiss": {
-                    "count": 199
-                },
                 "Chipotle": {
                     "count": 290,
                     "tags": {
@@ -52295,7 +57754,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     }
                 },
                 "Panda Express": {
-                    "count": 238
+                    "count": 238,
+                    "tags": {
+                        "cuisine": "chinese"
+                    }
                 },
                 "Whataburger": {
                     "count": 364
@@ -52351,7 +57813,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
             },
             "restaurant": {
                 "Pizza Hut": {
-                    "count": 1180
+                    "count": 1180,
+                    "tags": {
+                        "cuisine": "pizza"
+                    }
                 },
                 "Little Chef": {
                     "count": 64
@@ -52425,12 +57890,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Hirschen": {
                     "count": 79
                 },
-                "Papa John's": {
-                    "count": 67,
-                    "tags": {
-                        "cuisine": "pizza"
-                    }
-                },
                 "Denny's": {
                     "count": 450
                 },
@@ -52740,9 +58199,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "ジョナサン": {
                     "count": 59
                 },
-                "Arby's": {
-                    "count": 51
-                },
                 "Longhorn Steakhouse": {
                     "count": 66
                 }
@@ -53309,7 +58765,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Security Bank": {
                     "count": 78
                 },
-                "Millenium Bank": {
+                "Millenium": {
                     "count": 60
                 },
                 "Bankia": {
@@ -53804,9 +59260,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Second Cup": {
                     "count": 193
                 },
-                "Eisdiele": {
-                    "count": 73
-                },
                 "Dunkin Donuts": {
                     "count": 428,
                     "tags": {
@@ -53902,10 +59355,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 547
                 },
                 "Lidl": {
-                    "count": 6208
+                    "count": 7130
                 },
-                "EDEKA": {
-                    "count": 506
+                "Edeka": {
+                    "count": 2293
                 },
                 "Coles": {
                     "count": 400
@@ -53914,7 +59367,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 315
                 },
                 "Coop": {
-                    "count": 1906
+                    "count": 2100
                 },
                 "Tesco": {
                     "count": 1297
@@ -53961,11 +59414,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Netto": {
                     "count": 4379
                 },
-                "REWE": {
-                    "count": 1474
-                },
                 "Rewe": {
-                    "count": 1171
+                    "count": 2645
                 },
                 "Aldi Süd": {
                     "count": 594
@@ -53982,9 +59432,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Kiwi": {
                     "count": 167
                 },
-                "Edeka": {
-                    "count": 1787
-                },
                 "Pick n Pay": {
                     "count": 241
                 },
@@ -54001,7 +59448,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 258
                 },
                 "Spar": {
-                    "count": 2100
+                    "count": 2386
                 },
                 "Hofer": {
                     "count": 442
@@ -54009,9 +59456,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "M-Preis": {
                     "count": 76
                 },
-                "LIDL": {
-                    "count": 922
-                },
                 "tegut": {
                     "count": 210
                 },
@@ -54084,9 +59528,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Hoogvliet": {
                     "count": 53
                 },
-                "COOP": {
-                    "count": 194
-                },
                 "Food Basics": {
                     "count": 75
                 },
@@ -54214,7 +59655,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 80
                 },
                 "Whole Foods": {
-                    "count": 210
+                    "count": 210,
+                    "tags": {
+                        "shop": "supermarket"
+                    }
                 },
                 "Pam": {
                     "count": 56
@@ -54333,8 +59777,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Unimarc": {
                     "count": 177
                 },
-                "Co-operative Food": {
-                    "count": 59
+                "The Co-operative Food": {
+                    "count": 190
                 },
                 "Santa Isabel": {
                     "count": 128
@@ -54417,9 +59861,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Carrefour Contact": {
                     "count": 83
                 },
-                "SPAR": {
-                    "count": 286
-                },
                 "No Frills": {
                     "count": 105
                 },
@@ -54435,9 +59876,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Biedronka": {
                     "count": 1335
                 },
-                "The Co-operative Food": {
-                    "count": 131
-                },
                 "Eurospin": {
                     "count": 155
                 },
@@ -54659,7 +60097,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 255
                 },
                 "Spar": {
-                    "count": 922
+                    "count": 1119
                 },
                 "McColl's": {
                     "count": 100
@@ -54689,7 +60127,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 135
                 },
                 "Coop": {
-                    "count": 538
+                    "count": 678
                 },
                 "Sale": {
                     "count": 80
@@ -54733,12 +60171,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Valintatalo": {
                     "count": 62
                 },
-                "SPAR": {
-                    "count": 197
-                },
-                "COOP": {
-                    "count": 140
-                },
                 "Casino": {
                     "count": 90
                 },
@@ -54874,9 +60306,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Гастроном": {
                     "count": 152
                 },
-                "Sklep spożywczy": {
-                    "count": 318
-                },
                 "Centra": {
                     "count": 111
                 },
@@ -54943,6 +60372,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Kiosk": {
                     "count": 55
                 },
+                "Sklep spożywczy": {
+                    "count": 130
+                },
                 "24 часа": {
                     "count": 58
                 },
@@ -54982,9 +60414,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "เซเว่นอีเลฟเว่น": {
                     "count": 185
                 },
-                "Spożywczy": {
-                    "count": 78
-                },
                 "Delikatesy Centrum": {
                     "count": 53
                 },
@@ -55146,14 +60575,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                     "count": 83
                 },
                 "Kwik Fit": {
-                    "count": 75
+                    "count": 128
                 },
                 "ATU": {
                     "count": 261
                 },
-                "Kwik-Fit": {
-                    "count": 53
-                },
                 "Midas": {
                     "count": 202
                 },
@@ -55202,9 +60628,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Firestone": {
                     "count": 88
                 },
-                "AutoZone": {
-                    "count": 82
-                },
                 "Автосервис": {
                     "count": 361
                 },
@@ -55838,9 +61261,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Backwerk": {
                     "count": 95
                 },
-                "Bäcker": {
-                    "count": 68
-                },
                 "Schäfer's": {
                     "count": 51
                 },
@@ -55862,9 +61282,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Хлеб": {
                     "count": 89
                 },
-                "Piekarnia": {
-                    "count": 62
-                },
                 "Пекарня": {
                     "count": 52
                 },
@@ -56151,9 +61568,6 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 "Стиль": {
                     "count": 51
                 },
-                "Fryzjer": {
-                    "count": 56
-                },
                 "Franck Provost": {
                     "count": 70
                 },
@@ -56227,6 +61641,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081],"
                 ],
                 [
                     "city"
+                ],
+                [
+                    "postcode"
                 ]
             ]
         },