diff --git a/CHANGES.md b/CHANGES.md
index 2023641..7fa6905 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,44 @@
# CHANGES
+## Filter by object version (unreleased)
+
+- API addition: Allow supplying objects to `filter()`
+
+## Schema version (unreleased)
+
+- API change (breaking): Will delete unused indexes by default; set a new
+ property `clearUnusedIndexes` if not desired (when using `schema` or
+ `whole`-type `schema` objects within `schemas`)
+- API addition: Support a `clearUnusedStores` option property to
+ conditionally avoid deleting old stores (when using `schema` or
+ `whole`-type `schema` objects within `schemas`).
+- API addition: Support a `schemas` object. Its keys are the schema versions
+ and its values are--if `schemaType` is `"mixed"` (the default, unless
+ `schema` is used, in which case, it will be treated as `"whole"`)--arrays
+ containing an object whose single key is the schema type for that version
+ (either `"idb-schema"`, `"merge"`, or `"whole"`) and whose values are
+ `schema` objects whose structure differs depending on the schema type.
+ If `schemaType` is not `"mixed"` (`"whole"`, `"idb-schema"`, or `"merge"`),
+ each `schemas` key will be a schema version and its value a single
+ "schema object" (or, in the case of `"idb-schema"`, the function that
+ will be passed the `IdbSchema` instance). Where an object is expected,
+ one may also use a function which resolves to a valid object.
+- API addition: Support `moveFrom` and `copyFrom` for moving/copying a store
+ wholesale to another new store.
+- API addition: Support a `schemaBuilder` callback which accepts an
+ [idb-schema](http://github.com/treojs/idb-schema) object for incremental,
+ versioned schema building and whose `addCallback` method will be
+ passed an enhanced `upgradeneeded` event object that will be passed a
+ `Server` object as its second argument for making db.js-style queries
+ (e.g., to modify store content). This option differs from `schemas` used
+ with `idb-schema` in that it adds the versions as well as stores and
+ indexes programmatically. Addresses issues #84/#109
+- API addition: If there is an upgrade problem, one can use a `retry` method
+ on the error event object
+- Fix: Add Promise rejection for `update()`.
+- Documentation: Update `version` to take `schemaBuilder` into account
+ (and document `schemaBuilder`).
+
## Unreleased
- Breaking change: Change `db.cmp()` to return a `Promise` to deliver
@@ -10,7 +49,8 @@
- Deprecated: on `schema.indexes`, in place of the index `key` property,
`keyPath` should be used.
- API fix: Disallow `map` on itself (only one will be used anyways);
-- API addition: Add Server aliases, `put` and `delete`.
+- API addition: Add Server aliases, `put` and `delete` (or `del`) and `db.del`
+ as a `db.delete` alias.
- API change: Allow `desc`, `distinct`, `filter`, `keys`, `map`, `modify`
on `limit`;
- API change: Allow `limit` on `distinct`, `desc`, `keys`;
@@ -18,7 +58,7 @@
- API change: Allow `add`/`update` items to be of any value including
`undefined` or `null`
- API change: Allow Mongoifying of `add`/`update`/`remove` keys
-- API change: Disallow key in `count()` if null;
+- API change: Disallow key in `count()` if `null`;
- Cross-browser support: Auto-wrap user-supplied `Server.error()` and
`Server.addEventListener('error', ...)` handlers with `preventDefault`
so as to avoid hard `ConstraintError` aborts in Firefox.
@@ -26,7 +66,7 @@
`onupgradeneeded` errors will not become reported in Firefox (though it
will occur regardless)
- Cross-browser support (minor): wrap `delete` `onblocked` event's
- `newVersion` (=null) with `Proxy` but avoid using using `Proxy`
+ `newVersion` (=`null`) with `Proxy` but avoid using using `Proxy`
if not present for sake of PhantomJS or older browsers (Firefox);
could not wrap `oldVersion`, however.
- Fix: Ensure there is a promise rejection for a bad schema callback,
diff --git a/Gruntfile.js b/Gruntfile.js
index fd4704d..6f1711e 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -76,7 +76,7 @@ module.exports = function (grunt) {
},
eslint: {
- target: ['src/db.js', 'src/test-worker.js']
+ target: ['src/db.js', 'src/test-worker.js', 'src/idb-import']
},
babel: {
@@ -86,7 +86,8 @@ module.exports = function (grunt) {
dist: {
files: {
'dist/db.js': 'src/db.js',
- 'tests/test-worker.js': 'src/test-worker.js'
+ 'tests/test-worker.js': 'src/test-worker.js',
+ 'dist/idb-import.js': 'src/idb-import.js'
}
}
},
@@ -101,6 +102,11 @@ module.exports = function (grunt) {
standalone: 'db'
}
}
+ },
+ dest: {
+ files: {
+ 'dist/idb-import.js': 'dist/idb-import.js'
+ }
}
},
@@ -117,6 +123,14 @@ module.exports = function (grunt) {
'dist/db.min.js': ['dist/db.js']
}
},
+ idbImport: {
+ options: {
+ sourceMapIn: 'dist/idb-import.js.map' // input sourcemap from a previous compilation
+ },
+ files: {
+ 'dist/idb-import.min.js': ['dist/idb-import.js']
+ }
+ },
testworker: {
options: {
sourceMapIn: 'tests/test-worker.js.map' // input sourcemap from a previous compilation
diff --git a/README.md b/README.md
index dc119db..17aab1b 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ db.open({
version: 1,
schema: {
people: {
+ // Optionally add parameters for creating the object store
key: {keyPath: 'id', autoIncrement: true},
// Optionally add indexes
indexes: {
@@ -53,25 +54,84 @@ Note that `open()` takes an options object with the following properties:
- *version* - The current version of the database to open.
Should be an integer. You can start with `1`. You must increase the `version`
if updating the schema or otherwise the `schema` property will have no effect.
+If the `schemaBuilder` property is used, `version` (if present) cannot be
+greater than the highest version built by `schemaBuilder`.
- *server* - The name of this server. Any subsequent attempt to open a server
with this name (and with the current version) will reuse the already opened
connection (unless it has been closed).
- *schema* - Expects an object, or, if a function is supplied, a schema
-object should be returned). A schema object optionally has store names as
+object should be returned). A `schema` object optionally has store names as
keys (these stores will be auto-created if not yet added and modified
-otherwise). The values of these schema objects should be objects, optionally
+otherwise). The values of these store objects should be objects, optionally
with the property "key" and/or "indexes". The "key" property, if present,
should contain valid [createObjectStore](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore)
-parameters (`keyPath` or `autoIncrement`). The "indexes" property should
+parameters (`keyPath` or `autoIncrement`)--or one may express `keyPath` and
+`autoIncrement` directly inside the store object. The "indexes" property should
contain an object whose keys are the desired index keys and whose values are
objects which can include the optional parameters and values available to [createIndex](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)
(`unique`, `multiEntry`, and, for Firefox-only, `locale`). Note that the
`keyPath` of the index will be set to the supplied index key, or if present,
a `keyPath` property on the provided parameter object. Note also that when a
schema is supplied for a new version, any object stores not present on
-the schema object will be deleted.
+the schema object will be deleted unless `clearUnusedStores` is set to `false`
+(the latter may be necessary if you may be sharing the domain with applications
+building their own stores) and any unused indexes will also be removed unless
+`clearUnusedIndexes` is set to `false`. One may also add a `moveFrom` or
+`copyFrom` property to the store object to point to the name of a preexisting
+store which one wishes to rename or copy.
+
+- *schemas* - `schemas` is keyed by schema version and its values are--if
+`schemaType` is `"mixed"` (the default, unless `schema` is used, in which
+case, its default type will be `"whole"`)--arrays containing an object whose
+single key is the schema type for that version (either `"idb-schema"`,
+`"merge"`, or `"whole"`) and whose values are `schema` objects whose structure
+differs depending on the schema type. If `schemaType` is not `"mixed"`
+(`"whole"`, `"idb-schema"`, or `"merge"`), each `schemas` key will be a schema
+version and its value a single "schema object" (or, in the case of
+`"idb-schema"`, the function that will be passed the `IdbSchema` instance),
+with no need to indicate type on an object. Where an object or array is
+expected, one may also use a function which resolves to a valid object or
+array. So, if the user was last on version 2 and now it is version 4, they will
+first be brought to version 3 and then 4, while, if they are already on version
+4, no further upgrading will occur but the connection will open. See the
+section on "schema types" for more details on the behavior of the different
+schema types.
+
+- *schemaType* - Determines how `schemas` will be interpreted. Possible values
+are `"whole"`, `"power"`, `"merge"`, or `"mixed"`. The default is `"mixed"`.
+See the discussion under `schemas`. Note that if `schema` is used, it will
+behave as `"whole"`.
+
+- *schemaBuilder* - While the use of `schema` works more simply by deleting
+whatever stores existed before which no longer exist in `schema` and creating
+those which do not yet exist, `schemaBuilder` is a callback which will be
+passed an [idb-schema](https://github.com/treojs/idb-schema)
+object which allows (as with the plural `schemas` property) for specifying
+an incremental path to upgrading a schema (as could be required if your
+users might have already opened say version 1 of your database and you
+have already made two upgrades to have a version 3 but the changes you have
+for version 2 must first be applied). Besides precise control of versioning
+(via `version()`) and, as with `schema`, the creating or deleting stores
+and indexes (via `addStore`, `delStore`, `getStore` (then `addIndex`, and
+`delIndex`)), `schemaBuilder` also offers `stores` for introspection on the
+existing stores and, more importantly, `addCallback` which is passed the
+`upgradeneeded` event and can be used for making queries such as modifying
+store values. See the [idb-schema](https://github.com/treojs/idb-schema)
+documentation for full details.
+
+Note that the event object which is passed as the first argument to
+`addCallback` is the underlying IndexedDB event, but in `db.js`, we call
+these callbacks with a second argument which is the db.js `Server` object,
+allowing for db.js-style queries during the `upgradeneeded` event as
+desired (e.g.,
+`.addCallback(function (e, server) {server.query(table).all().modify(...)});`)
+with the exception that `close` is disallowed as this should not occur within
+the `upgradeneeded` event. Note, however, that due to limitations with Promises
+and the nature of the IndexedDB specification with regard to this event,
+you may need to avoid use of Promises within these callbacks (though you can
+run `addCallback` multiple times).
A connection is intended to be persisted, and you can perform multiple
operations while it's kept open.
@@ -90,7 +150,10 @@ db.open({
// ...
}).catch(function (err) {
if (err.type === 'blocked') {
- oldConnection.close();
+ oldConnection.close(); // `versionchange` handlers set up for earlier
+ // versions (e.g., in other tabs) should have
+ // ideally anticipated this need already (see
+ // comment at end of this sample).
return err.resume;
}
// Handle other errors here
@@ -106,6 +169,170 @@ db.open({
Check out the `/tests/specs` folder for more examples.
+## Schema types
+
+Schemas can be expressed as one of the following types: `"whole"`,
+`"idb-schema"`, `"merge"`, or `"mixed"`.
+
+If `schema` is used, the default will be `"whole"`.
+
+If `schemas` is used, the default will be `"mixed"`, but this can
+be overridden with the `schemaType` property.
+
+### "whole" type schemas
+
+The `whole` type merge (the default for `schema`, but not for `schemas`)
+is to delete all unreferenced stores or indexes, creating anew those
+stores or indexes which did not exist previously, recreating those
+stores or indexes with differences). Unless the options `clearUnusedStores`
+or `clearUnusedIndexes` are set to `false`, unused stores and indexes
+will also be deleted.
+
+The advantage of this approach is that each "version" will give a clear
+snapshot of all stores and indexes currently in use at the time. The
+disadvantage is the same--namely, that it may end up being bulkier than
+the other types which only indicate differences from the previous version.
+
+The following will add a version 1 of the schema with a `person` store,
+and add a version 2 of the schema, containing a `people`
+store which begins with the data contained in the `person` store (though
+deleting the `person` store after migrated), but overriding the `keyPath`
+and `autoIncrement` information with its own and adding two indexes.
+The store `addresses` will be preserved since it is re-expressed in version 2,
+but `oldStore` will be removed since it is not re-expressed.
+
+```js
+schemaType: 'whole',
+schemas: {
+ 1: {
+ oldStore: {},
+ person: {},
+ addresses: {},
+ phoneNumbers: {}
+ },
+ 2: {
+ addresses: {},
+ phoneNumbers: {},
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }
+}
+```
+
+### "merge" type schemas
+
+The `merge` type schema allows one to exclusively indicate changes between
+versions without needing to redundantly indicate stores or indexes added
+from previous versions.
+
+`merge` type schemas behave similarly to [JSON Merge Patch](https://tools.ietf.org/html/rfc7396)
+in allowing one to re-express those parts of the JSON structure that one
+wishes to change, but with the enhancement that instead of overriding `null`
+for deletions (and preventing it from being used as a value), the NUL string
+`"\0"` will indicate deletions (if one wishes to add a value which actually
+begins with NUL, one should supply an extra NUL character at the beginning
+of the string).
+
+One could use the `merge` type to implement the example shown under the `whole`
+type section in the following manner:
+
+```js
+schemaType: 'merge',
+schemas: {
+ 1: {
+ oldStore: {},
+ person: {},
+ addresses: {},
+ phoneNumbers: {}
+ },
+ 2: {
+ oldStore: '\0',
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }
+}
+```
+
+### "idb-schema" type schemas
+
+This type of schema allows for sophisticated programmatic changes
+by use of `idb-schema`'s '`addEarlyCallback` and `addCallback` and
+other methods. One could use the `idb-schema` type to implement the
+example shown under the `whole` type section in the following manner:
+
+```js
+schemaType: 'idb-schema',
+schemas: {
+ 1: function (idbschema) {
+ idbschema.addStore('oldStore').addStore('person').addStore('addresses').addStore('phoneNumbers');
+ },
+ 2: function (idbschema) {
+ idbschema.delStore('oldStore').renameStore('person', 'people', {keyPath: 'id', autoIncrement: true})
+ .addIndex('firstName', 'firstName')
+ .addIndex('answer', 'answer', {unique: true});
+ }
+}
+```
+
+(Note that using the `schemaBuilder` function would behave similarly, except
+that the versions would also need to be built programmatically (via calls to
+`version()`).)
+
+### "mixed" type schemas
+
+The `mixed` type is the default type for `schemas` (but not for `schema`). It
+adds a little verbosity but allows you to combine any of the types across and
+even within a version.
+
+One could use the `mixed` type to implement the example shown under
+the `whole` type section in such as the following manner:
+
+```js
+schemas: {
+ 1: [
+ {'whole': {
+ addresses: {},
+ phoneNumbers: {}
+ }},
+ {'idb-schema': function (idbschema) {
+ idbschema.addStore('oldStore').addStore('person');
+ }}
+ ],
+ 2: [{'merge': {
+ oldStore: '\0',
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }}]
+}
+```
+
## General server/store methods
Note that by default the methods below (not including `close`,
@@ -267,6 +494,17 @@ server.people.query()
});
```
+###### Filter with object
+
+```js
+server.people.query()
+ .filter({firstName: 'Aaron', lastName: 'Powell'})
+ .execute()
+ .then(function (results) {
+ // do something with the results
+ });
+```
+
###### Filter with function
```js
@@ -293,7 +531,7 @@ server.people
});
```
-##### Querying with ranges
+##### Querying with ranges/keys
All ranges supported by `IDBKeyRange` can be used (`only`,
`bound`, `lowerBound`, `upperBound`).
@@ -336,7 +574,6 @@ your store with an array `keyPath` (and optionally with an index
`keyPath`).
```js
-
// The definition:
schema: {
people: {
@@ -353,10 +590,11 @@ schema: {
}
}
-// ...elsewhere...
+// ...elsewhere to add the data...
+s.people.add({lastName: 'Zamir', firstName: 'Brett'});
-// The query:
-s.test.query('name')
+// Then later, the query:
+s.people.query('name')
.only(['Zamir', 'Brett'])
.execute()
.then(function (results) {
@@ -364,6 +602,36 @@ s.test.query('name')
});
```
+Nested (dot-separated) key paths (with optional index)
+may also be queried:
+
+```js
+// The definition:
+schema: {
+ people: {
+ key: {
+ keyPath: 'person.name.lastName'
+ },
+ indexes: {
+ personName: {
+ keyPath: 'person.name.lastName'
+ }
+ }
+ }
+}
+
+// ...elsewhere to add the data...
+s.people.add({person: {name: {lastName: 'Zamir', firstName: 'Brett'}}});
+
+// Then later, the query:
+s.people.query('personName')
+ .only('Zamir')
+ .execute()
+ .then(function (results) {
+ // do something with the results
+ });
+```
+
##### Limiting cursor range
Unlike key ranges which filter by the range of present values,
@@ -518,7 +786,8 @@ server.profiles.query('name')
`modify` changes will be seen by any `map` functions.
`modify` can be used after: `all`, `filter`, ranges (`range`, `only`,
-`bound`, `upperBound`, and `lowerBound`), `desc`, `distinct`, and `map`.
+`bound`, `upperBound`, and `lowerBound`), `desc`, `distinct`, `limit`,
+and `map`.
## Other server methods
@@ -602,6 +871,8 @@ db.delete(dbName).catch(function (err) {
See the documentation on `open` for more on such recovery from blocking
connections.
+`del` is also available as an alias of `delete`.
+
## Comparing two keys
Returns `1` if the first key is greater than the second, `-1` if the first
diff --git a/dist/db.js b/dist/db.js
index 607dad5..2ec85a8 100644
--- a/dist/db.js
+++ b/dist/db.js
@@ -5,27 +5,36 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = [
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+var _idbImport = require('./idb-import');
+
+var _idbImport2 = _interopRequireDefault(_idbImport);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
(function (local) {
'use strict';
- var IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;
- var transactionModes = {
- readonly: 'readonly',
- readwrite: 'readwrite'
- };
var hasOwn = Object.prototype.hasOwnProperty;
- var defaultMapper = function defaultMapper(x) {
- return x;
- };
var indexedDB = local.indexedDB || local.webkitIndexedDB || local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB || local.shimIndexedDB || function () {
throw new Error('IndexedDB required');
}();
+ var IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;
- var dbCache = {};
+ var defaultMapper = function defaultMapper(x) {
+ return x;
+ };
var serverEvents = ['abort', 'error', 'versionchange'];
+ var transactionModes = {
+ readonly: 'readonly',
+ readwrite: 'readwrite'
+ };
+
+ var dbCache = {};
function isObject(item) {
return item && (typeof item === 'undefined' ? 'undefined' : _typeof(item)) === 'object';
@@ -90,13 +99,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
var runQuery = function runQuery(type, args, cursorType, direction, limitRange, filters, mapper) {
return new Promise(function (resolve, reject) {
- var keyRange = void 0;
- try {
- keyRange = type ? IDBKeyRange[type].apply(IDBKeyRange, _toConsumableArray(args)) : null;
- } catch (e) {
- reject(e);
- return;
- }
+ var keyRange = type ? IDBKeyRange[type].apply(IDBKeyRange, _toConsumableArray(args)) : null; // May throw
filters = filters || [];
limitRange = limitRange || null;
@@ -154,44 +157,36 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
var result = 'value' in cursor ? cursor.value : cursor.key;
try {
+ // We must manually catch for this promise as we are within an async event function
filters.forEach(function (filter) {
- if (typeof filter[0] === 'function') {
- matchFilter = matchFilter && filter[0](result);
+ var propObj = filter[0];
+ if (typeof propObj === 'function') {
+ matchFilter = matchFilter && propObj(result); // May throw with filter on non-object
} else {
- matchFilter = matchFilter && result[filter[0]] === filter[1];
- }
+ if (!propObj || (typeof propObj === 'undefined' ? 'undefined' : _typeof(propObj)) !== 'object') {
+ propObj = _defineProperty({}, propObj, filter[1]);
+ }
+ Object.keys(propObj).forEach(function (prop) {
+ matchFilter = matchFilter && result[prop] === propObj[prop]; // May throw with error in filter function
+ });
+ }
});
+
+ if (matchFilter) {
+ counter++;
+ // If we're doing a modify, run it now
+ if (modifyObj) {
+ result = modifyRecord(result); // May throw
+ cursor.update(result); // May throw as `result` should only be a "structured clone"-able object
+ }
+ results.push(mapper(result)); // May throw
+ }
} catch (err) {
- // Could be filter on non-object or error in filter function
reject(err);
return {
v: void 0
};
}
-
- if (matchFilter) {
- counter++;
- // If we're doing a modify, run it now
- if (modifyObj) {
- try {
- result = modifyRecord(result);
- cursor.update(result); // `result` should only be a "structured clone"-able object
- } catch (err) {
- reject(err);
- return {
- v: void 0
- };
- }
- }
- try {
- results.push(mapper(result));
- } catch (err) {
- reject(err);
- return {
- v: void 0
- };
- }
- }
cursor.continue();
}();
@@ -221,23 +216,12 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
var count = function count() {
direction = null;
cursorType = 'count';
-
- return {
- execute: execute
- };
+ return { execute: execute };
};
var keys = function keys() {
cursorType = 'openKeyCursor';
-
- return {
- desc: desc,
- distinct: distinct,
- execute: execute,
- filter: filter,
- limit: limit,
- map: map
- };
+ return { desc: desc, distinct: distinct, execute: execute, filter: filter, limit: limit, map: map };
};
var limit = function limit(start, end) {
@@ -245,94 +229,35 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
error = limitRange.some(function (val) {
return typeof val !== 'number';
}) ? new Error('limit() arguments must be numeric') : error;
-
- return {
- desc: desc,
- distinct: distinct,
- filter: filter,
- keys: keys,
- execute: execute,
- map: map,
- modify: modify
- };
+ return { desc: desc, distinct: distinct, filter: filter, keys: keys, execute: execute, map: map, modify: modify };
};
var filter = function filter(prop, val) {
filters.push([prop, val]);
-
- return {
- desc: desc,
- distinct: distinct,
- execute: execute,
- filter: filter,
- keys: keys,
- limit: limit,
- map: map,
- modify: modify
- };
+ return { desc: desc, distinct: distinct, execute: execute, filter: filter, keys: keys, limit: limit, map: map, modify: modify };
};
var desc = function desc() {
direction = 'prev';
-
- return {
- distinct: distinct,
- execute: execute,
- filter: filter,
- keys: keys,
- limit: limit,
- map: map,
- modify: modify
- };
+ return { distinct: distinct, execute: execute, filter: filter, keys: keys, limit: limit, map: map, modify: modify };
};
var distinct = function distinct() {
unique = true;
- return {
- count: count,
- desc: desc,
- execute: execute,
- filter: filter,
- keys: keys,
- limit: limit,
- map: map,
- modify: modify
- };
+ return { count: count, desc: desc, execute: execute, filter: filter, keys: keys, limit: limit, map: map, modify: modify };
};
var modify = function modify(update) {
modifyObj = update && (typeof update === 'undefined' ? 'undefined' : _typeof(update)) === 'object' ? update : null;
- return {
- execute: execute
- };
+ return { execute: execute };
};
var map = function map(fn) {
mapper = fn;
-
- return {
- count: count,
- desc: desc,
- distinct: distinct,
- execute: execute,
- filter: filter,
- keys: keys,
- limit: limit,
- modify: modify
- };
+ return { count: count, desc: desc, distinct: distinct, execute: execute, filter: filter, keys: keys, limit: limit, modify: modify };
};
- return {
- count: count,
- desc: desc,
- distinct: distinct,
- execute: execute,
- filter: filter,
- keys: keys,
- limit: limit,
- map: map,
- modify: modify
- };
+ return { count: count, desc: desc, distinct: distinct, execute: execute, filter: filter, keys: keys, limit: limit, map: map, modify: modify };
};
['only', 'bound', 'upperBound', 'lowerBound'].forEach(function (name) {
@@ -362,6 +287,23 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
};
};
+ var setupTransactionAndStore = function setupTransactionAndStore(db, table, records, resolve, reject, readonly) {
+ var transaction = db.transaction(table, readonly ? transactionModes.readonly : transactionModes.readwrite);
+ transaction.onerror = function (e) {
+ // prevent throwing aborting (hard)
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
+ e.preventDefault();
+ reject(e);
+ };
+ transaction.onabort = function (e) {
+ return reject(e);
+ };
+ transaction.oncomplete = function () {
+ return resolve(records);
+ };
+ return transaction.objectStore(table);
+ };
+
var Server = function Server(db, name, version, noServerMethods) {
var _this2 = this;
@@ -394,21 +336,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
return records.concat(aip);
}, []);
- var transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = function (e) {
- // prevent throwing a ConstraintError and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
- transaction.oncomplete = function () {
- return resolve(records);
- };
+ var store = setupTransactionAndStore(db, table, records, resolve, reject);
- var store = transaction.objectStore(table);
records.some(function (record) {
var req = void 0,
key = void 0;
@@ -416,25 +345,15 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
key = record.key;
record = record.item;
if (key != null) {
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return true;
- }
+ key = mongoifyKey(key); // May throw
}
}
- try {
- // Safe to add since in readwrite
- if (key != null) {
- req = store.add(record, key);
- } else {
- req = store.add(record);
- }
- } catch (e) {
- reject(e);
- return true;
+ // Safe to add since in readwrite, but may still throw
+ if (key != null) {
+ req = store.add(record, key);
+ } else {
+ req = store.add(record);
}
req.onsuccess = function (e) {
@@ -473,21 +392,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
return records.concat(aip);
}, []);
- var transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = function (e) {
- // prevent throwing aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
- transaction.oncomplete = function () {
- return resolve(records);
- };
-
- var store = transaction.objectStore(table);
+ var store = setupTransactionAndStore(db, table, records, resolve, reject);
records.some(function (record) {
var req = void 0,
@@ -496,24 +401,14 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
key = record.key;
record = record.item;
if (key != null) {
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return true;
- }
+ key = mongoifyKey(key); // May throw
}
}
- try {
- // These can throw DataError, e.g., if function passed in
- if (key != null) {
- req = store.put(record, key);
- } else {
- req = store.put(record);
- }
- } catch (err) {
- reject(err);
- return true;
+ // These can throw DataError, e.g., if function passed in
+ if (key != null) {
+ req = store.put(record, key);
+ } else {
+ req = store.put(record);
}
req.onsuccess = function (e) {
@@ -547,37 +442,15 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
+ key = mongoifyKey(key); // May throw
- var transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = function (e) {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
- transaction.oncomplete = function () {
- return resolve(key);
- };
+ var store = setupTransactionAndStore(db, table, key, resolve, reject);
- var store = transaction.objectStore(table);
- try {
- store.delete(key);
- } catch (err) {
- reject(err);
- }
+ store.delete(key); // May throw
});
};
- this.delete = function () {
+ this.del = this.delete = function () {
return this.remove.apply(this, arguments);
};
@@ -587,18 +460,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
reject(new Error('Database has been closed'));
return;
}
- var transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = function (e) {
- return reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
- transaction.oncomplete = function () {
- return resolve();
- };
-
- var store = transaction.objectStore(table);
+ var store = setupTransactionAndStore(db, table, undefined, resolve, reject);
store.clear();
});
};
@@ -609,9 +471,9 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
reject(new Error('Database has been closed'));
return;
}
- db.close();
closed = true;
delete dbCache[name][version];
+ db.close();
resolve();
});
};
@@ -622,32 +484,11 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
-
- var transaction = db.transaction(table);
- transaction.onerror = function (e) {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
+ key = mongoifyKey(key); // May throw
- var store = transaction.objectStore(table);
+ var store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);
- var req = void 0;
- try {
- req = store.get(key);
- } catch (err) {
- reject(err);
- }
+ var req = store.get(key);
req.onsuccess = function (e) {
return resolve(e.target.result);
};
@@ -660,31 +501,11 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
+ key = mongoifyKey(key); // May throw
- var transaction = db.transaction(table);
- transaction.onerror = function (e) {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = function (e) {
- return reject(e);
- };
+ var store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);
- var store = transaction.objectStore(table);
- var req = void 0;
- try {
- req = key == null ? store.count() : store.count(key);
- } catch (err) {
- reject(err);
- }
+ var req = key == null ? store.count() : store.count(key); // May throw
req.onsuccess = function (e) {
return resolve(e.target.result);
};
@@ -697,7 +518,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
}
if (eventName === 'error') {
db.addEventListener(eventName, function (e) {
- e.preventDefault(); // Needed by Firefox to prevent hard abort with ConstraintError
+ e.preventDefault(); // Needed to prevent hard abort with ConstraintError
handler(e);
});
return;
@@ -724,7 +545,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
}
var err = void 0;
- [].some.call(db.objectStoreNames, function (storeName) {
+ Array.from(db.objectStoreNames).some(function (storeName) {
if (_this2[storeName]) {
err = new Error('The store name, "' + storeName + '", which you have attempted to load, conflicts with db.js method names."');
_this2.close();
@@ -747,172 +568,128 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
return err;
};
- var createSchema = function createSchema(e, request, schema, db, server, version) {
- if (!schema || schema.length === 0) {
- return;
- }
-
- for (var i = 0; i < db.objectStoreNames.length; i++) {
- var name = db.objectStoreNames[i];
- if (!hasOwn.call(schema, name)) {
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction.
- // `TransactionInactiveError` (as by the upgrade having already
- // completed or somehow aborting) - since we've just started and
- // should be without risk in this loop
- // `NotFoundError` - since we are iterating the dynamically updated
- // `objectStoreNames`
- db.deleteObjectStore(name);
- }
- }
-
- var ret = void 0;
- Object.keys(schema).some(function (tableName) {
- var table = schema[tableName];
- var store = void 0;
- if (db.objectStoreNames.contains(tableName)) {
- store = request.transaction.objectStore(tableName); // Shouldn't throw
- } else {
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction.
- // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.
- // `ConstraintError` - The above condition should prevent the name already existing.
- //
- // Possible errors:
- // `TransactionInactiveError` - if the upgrade had already aborted,
- // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
- // the store but then abort the transaction.
- // `SyntaxError` - if an invalid `table.key.keyPath` is supplied.
- // `InvalidAccessError` - if `table.key.autoIncrement` is `true` and `table.key.keyPath` is an
- // empty string or any sequence (empty or otherwise).
- try {
- store = db.createObjectStore(tableName, table.key);
- } catch (err) {
- ret = err;
- return true;
- }
- }
-
- Object.keys(table.indexes || {}).some(function (indexKey) {
- try {
- store.index(indexKey);
- } catch (err) {
- var index = table.indexes[indexKey];
- index = index && (typeof index === 'undefined' ? 'undefined' : _typeof(index)) === 'object' ? index : {};
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.
- // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist
- //
- // Possible errors:
- // `TransactionInactiveError` - if the upgrade had already aborted,
- // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
- // the index object but then abort the transaction.
- // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path
- // `InvalidAccessError` - If `multiEntry` on `index` is `true` and
- // `keyPath` (second argument) is a sequence
- try {
- store.createIndex(indexKey, index.keyPath || index.key || indexKey, index);
- } catch (err2) {
- ret = err2;
- return true;
- }
- }
- });
- });
- return ret;
- };
-
- var _open = function _open(e, server, version, noServerMethods) {
- var db = e.target.result;
+ var _open = function _open(db, server, version, noServerMethods) {
dbCache[server][version] = db;
- var s = new Server(db, server, version, noServerMethods);
- return s instanceof Error ? Promise.reject(s) : Promise.resolve(s);
+ return new Server(db, server, version, noServerMethods);
};
var db = {
version: '0.15.0',
open: function open(options) {
var server = options.server;
+ var noServerMethods = options.noServerMethods;
+ var clearUnusedStores = options.clearUnusedStores !== false;
+ var clearUnusedIndexes = options.clearUnusedIndexes !== false;
var version = options.version || 1;
var schema = options.schema;
- var noServerMethods = options.noServerMethods;
-
+ var schemas = options.schemas;
+ var schemaType = options.schemaType || (schema ? 'whole' : 'mixed');
if (!dbCache[server]) {
dbCache[server] = {};
}
+ var openDb = function openDb(db) {
+ var s = _open(db, server, version, noServerMethods);
+ if (s instanceof Error) {
+ throw s;
+ }
+ return s;
+ };
+
return new Promise(function (resolve, reject) {
if (dbCache[server][version]) {
- _open({
- target: {
- result: dbCache[server][version]
- }
- }, server, version, noServerMethods).then(resolve, reject);
- } else {
- var _ret2 = function () {
- if (typeof schema === 'function') {
- try {
- schema = schema();
- } catch (e) {
- reject(e);
- return {
- v: void 0
- };
- }
- }
- var request = indexedDB.open(server, version);
-
- request.onsuccess = function (e) {
- return _open(e, server, version, noServerMethods).then(resolve, reject);
- };
- request.onerror = function (e) {
- // Prevent default for `BadVersion` and `AbortError` errors, etc.
- // These are not necessarily reported in console in Chrome but present; see
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- // http://stackoverflow.com/questions/36225779/aborterror-within-indexeddb-upgradeneeded-event/36266502
- e.preventDefault();
- reject(e);
- };
- request.onupgradeneeded = function (e) {
- var err = createSchema(e, request, schema, e.target.result, server, version);
- if (err) {
- reject(err);
+ var s = _open(dbCache[server][version], server, version, noServerMethods);
+ if (s instanceof Error) {
+ reject(s);
+ return;
+ }
+ resolve(s);
+ return;
+ }
+ var idbimport = new _idbImport2.default();
+ var p = Promise.resolve();
+ if (schema || schemas || options.schemaBuilder) {
+ (function () {
+ var _addCallback = idbimport.addCallback;
+ idbimport.addCallback = function (cb) {
+ function newCb(db) {
+ var s = _open(db, server, version, noServerMethods);
+ if (s instanceof Error) {
+ throw s;
+ }
+ return cb(db, s);
}
+ return _addCallback.call(idbimport, newCb);
};
- request.onblocked = function (e) {
- var resume = new Promise(function (res, rej) {
- // We overwrite handlers rather than make a new
- // open() since the original request is still
- // open and its onsuccess will still fire if
- // the user unblocks by closing the blocking
- // connection
- request.onsuccess = function (ev) {
- _open(ev, server, version, noServerMethods).then(res, rej);
- };
- request.onerror = function (e) {
- return rej(e);
- };
- });
- e.resume = resume;
- reject(e);
- };
- }();
- if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
+ p = p.then(function () {
+ if (options.schemaBuilder) {
+ return options.schemaBuilder(idbimport);
+ }
+ }).then(function () {
+ if (schema) {
+ switch (schemaType) {
+ case 'mixed':case 'idb-schema':case 'merge':case 'whole':
+ {
+ schemas = _defineProperty({}, version, schema);
+ break;
+ }
+ }
+ }
+ if (schemas) {
+ idbimport.createVersionedSchema(schemas, schemaType, clearUnusedStores, clearUnusedIndexes);
+ }
+ var idbschemaVersion = idbimport.version();
+ if (options.version && idbschemaVersion < version) {
+ throw new Error('Your highest schema building (IDBSchema) version (' + idbschemaVersion + ') ' + 'must not be less than your designated version (' + version + ').');
+ }
+ if (!options.version && idbschemaVersion > version) {
+ version = idbschemaVersion;
+ }
+ });
+ })();
}
+
+ p.then(function () {
+ return idbimport.open(server, version);
+ }).catch(function (err) {
+ if (err.resume) {
+ err.resume = err.resume.then(openDb);
+ }
+ if (err.retry) {
+ (function () {
+ var _retry = err.retry;
+ err.retry = function () {
+ _retry.call(err).then(openDb);
+ };
+ })();
+ }
+ throw err;
+ }).then(openDb).then(resolve).catch(function (e) {
+ reject(e);
+ });
});
},
+ del: function del(dbName) {
+ return this.delete(dbName);
+ },
delete: function _delete(dbName) {
return new Promise(function (resolve, reject) {
var request = indexedDB.deleteDatabase(dbName); // Does not throw
request.onsuccess = function (e) {
- return resolve(e);
+ // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in e)) {
+ e.newVersion = null;
+ }
+ resolve(e);
};
request.onerror = function (e) {
- return reject(e);
- }; // No errors currently
+ // No errors currently
+ e.preventDefault();
+ reject(e);
+ };
request.onblocked = function (e) {
// The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279
e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, { get: function get(target, name) {
@@ -937,7 +714,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
res(ev);
};
request.onerror = function (e) {
- return rej(e);
+ e.preventDefault();
+ rej(e);
};
});
e.resume = resume;
@@ -948,11 +726,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
cmp: function cmp(param1, param2) {
return new Promise(function (resolve, reject) {
- try {
- resolve(indexedDB.cmp(param1, param2));
- } catch (e) {
- reject(e);
- }
+ resolve(indexedDB.cmp(param1, param2)); // May throw
});
}
};
@@ -969,5 +743,7839 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
})(self);
+},{"./idb-import":2}],2:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _idbSchema = require('idb-schema');
+
+var _idbSchema2 = _interopRequireDefault(_idbSchema);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/*
+# Notes
+
+1. Could use/adapt [jtlt](https://github.com/brettz9/jtlt/) for changing JSON data
+
+# Possible to-dos
+
+1. Support data within adapted JSON Merge Patch
+1. Allow JSON Schema to be specified during import (and export): https://github.com/aaronpowell/db.js/issues/181
+1. JSON format above database level to allow for deleting or moving/copying of whole databases
+1. `copyFrom`/`moveFrom` for indexes
+*/
+
+self._babelPolyfill = false; // Need by Phantom in avoiding duplicate babel polyfill error
+
+
+var stringify = JSON.stringify;
+var hasOwn = function hasOwn(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+};
+var compareStringified = function compareStringified(a, b) {
+ return stringify(a) === stringify(b);
+};
+
+var IdbImport = function (_IdbSchema) {
+ _inherits(IdbImport, _IdbSchema);
+
+ function IdbImport() {
+ _classCallCheck(this, IdbImport);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(IdbImport).call(this));
+ }
+
+ _createClass(IdbImport, [{
+ key: '_setup',
+ value: function _setup(schema, cb, mergePatch) {
+ var _this2 = this;
+
+ var isNUL = schema === '\0';
+ if (!schema || (typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) !== 'object' && !(mergePatch && isNUL)) {
+ throw new Error('Bad schema object');
+ }
+ this.addEarlyCallback(function (e) {
+ var db = e.target.result;
+ var transaction = e.target.transaction;
+ if (mergePatch && isNUL) {
+ _this2._deleteAllUnused(db, transaction, {}, true);
+ return;
+ }
+ return cb(e, db, transaction);
+ });
+ }
+ }, {
+ key: '_deleteIndexes',
+ value: function _deleteIndexes(transaction, storeName, exceptionIndexes) {
+ var _this3 = this;
+
+ var store = transaction.objectStore(storeName); // Shouldn't throw
+ Array.from(store.indexNames).forEach(function (indexName) {
+ if (!exceptionIndexes || !hasOwn(exceptionIndexes, indexName)) {
+ _this3.delIndex(indexName);
+ }
+ });
+ }
+ }, {
+ key: '_deleteAllUnused',
+ value: function _deleteAllUnused(db, transaction, schema, clearUnusedStores, clearUnusedIndexes) {
+ var _this4 = this;
+
+ if (clearUnusedStores || clearUnusedIndexes) {
+ Array.from(db.objectStoreNames).forEach(function (storeName) {
+ if (clearUnusedStores && !hasOwn(schema, storeName)) {
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction.
+ // `TransactionInactiveError` (as by the upgrade having already
+ // completed or somehow aborting) - since we've just started and
+ // should be without risk in this loop
+ // `NotFoundError` - since we are iterating the dynamically updated
+ // `objectStoreNames`
+ // this._versions[version].dropStores.push({name: storeName});
+ // Avoid deleting if going to delete in a move/copy
+ if (!Object.keys(schema).some(function (key) {
+ return [schema[key].moveFrom, schema[key].copyFrom].includes(storeName);
+ })) {
+ _this4.delStore(storeName); // Shouldn't throw // Keep this and delete previous line if this PR is accepted: https://github.com/treojs/idb-schema/pull/14
+ }
+ } else if (clearUnusedIndexes) {
+ _this4._deleteIndexes(transaction, storeName, schema[storeName].indexes);
+ }
+ });
+ }
+ }
+ }, {
+ key: '_createStoreIfNotSame',
+ value: function _createStoreIfNotSame(db, transaction, schema, storeName, mergePatch) {
+ var newStore = schema[storeName];
+ var store = void 0;
+ var storeParams = {};
+ function setCanonicalProps(storeProp) {
+ var canonicalPropValue = void 0;
+ if (hasOwn(newStore, 'key')) {
+ // Support old approach of db.js
+ canonicalPropValue = newStore.key[storeProp];
+ } else if (hasOwn(newStore, storeProp)) {
+ canonicalPropValue = newStore[storeProp];
+ } else {
+ canonicalPropValue = storeProp === 'keyPath' ? null : false;
+ }
+ if (mergePatch && typeof canonicalPropValue === 'string') {
+ if (canonicalPropValue === '\0') {
+ canonicalPropValue = storeProp === 'keyPath' ? null : false;
+ } else {
+ canonicalPropValue = canonicalPropValue.replace(/^\0/, ''); // Remove escape if present
+ }
+ }
+ storeParams[storeProp] = canonicalPropValue;
+ }
+ var copyFrom = newStore.copyFrom;
+ var moveFrom = newStore.moveFrom;
+ try {
+ ['keyPath', 'autoIncrement'].forEach(setCanonicalProps);
+ if (!db.objectStoreNames.contains(storeName)) {
+ throw new Error('goto catch to build store');
+ }
+ store = transaction.objectStore(storeName); // Shouldn't throw
+ this.getStore(store);
+ if (!['keyPath', 'autoIncrement'].every(function (storeProp) {
+ return compareStringified(storeParams[storeProp], store[storeProp]);
+ })) {
+ // Avoid deleting if going to delete in a move/copy
+ if (!copyFrom && !moveFrom) this.delStore(storeName);
+ throw new Error('goto catch to build store');
+ }
+ } catch (err) {
+ if (err.message !== 'goto catch to build store') {
+ throw err;
+ }
+ if (copyFrom) {
+ this.copyStore(copyFrom, storeName, storeParams); // May throw
+ } else if (moveFrom) {
+ this.renameStore(moveFrom, storeName, storeParams); // May throw
+ } else {
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction.
+ // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.
+ // `ConstraintError` - The above condition should prevent the name already existing.
+ //
+ // Possible errors:
+ // `TransactionInactiveError` - if the upgrade had already aborted,
+ // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
+ // the store but then abort the transaction.
+ // `SyntaxError` - if an invalid `storeParams.keyPath` is supplied.
+ // `InvalidAccessError` - if `storeParams.autoIncrement` is `true` and `storeParams.keyPath` is an
+ // empty string or any sequence (empty or otherwise).
+ this.addStore(storeName, storeParams); // May throw
+ }
+ }
+ return [store, newStore];
+ }
+ }, {
+ key: '_createIndex',
+ value: function _createIndex(store, indexes, indexName, mergePatch) {
+ var _this5 = this;
+
+ var newIndex = indexes[indexName];
+ var indexParams = {};
+ function setCanonicalProps(indexProp) {
+ var canonicalPropValue = void 0;
+ if (hasOwn(newIndex, indexProp)) {
+ canonicalPropValue = newIndex[indexProp];
+ } else {
+ canonicalPropValue = indexProp === 'keyPath' ? null : false;
+ }
+ if (mergePatch && typeof canonicalPropValue === 'string') {
+ if (canonicalPropValue === '\0') {
+ canonicalPropValue = indexProp === 'keyPath' ? null : false;
+ } else {
+ canonicalPropValue = canonicalPropValue.replace(/^\0/, ''); // Remove escape if present
+ }
+ }
+ indexParams[indexProp] = canonicalPropValue;
+ }
+ try {
+ (function () {
+ ['keyPath', 'unique', 'multiEntry', 'locale'].forEach(setCanonicalProps);
+ if (!store || !store.indexNames.contains(indexName)) {
+ throw new Error('goto catch to build index');
+ }
+ var oldIndex = store.index(indexName);
+ if (!['keyPath', 'unique', 'multiEntry', 'locale'].every(function (indexProp) {
+ return compareStringified(indexParams[indexProp], oldIndex[indexProp]);
+ })) {
+ _this5.delIndex(indexName);
+ throw new Error('goto catch to build index');
+ }
+ })();
+ } catch (err) {
+ if (err.message !== 'goto catch to build index') {
+ throw err;
+ }
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.
+ // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist
+ //
+ // Possible errors:
+ // `TransactionInactiveError` - if the upgrade had already aborted,
+ // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
+ // the index object but then abort the transaction.
+ // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path
+ // `InvalidAccessError` - If `multiEntry` on `index` is `true` and
+ // `keyPath` (second argument) is a sequence
+ this.addIndex(indexName, indexParams.keyPath !== null ? indexParams.keyPath : indexName, indexParams);
+ }
+ }
+ }, {
+ key: 'createIdbSchemaPatchSchema',
+ value: function createIdbSchemaPatchSchema(schema) {
+ schema(this); // May throw
+ }
+ // Modified JSON Merge Patch type schemas: https://github.com/json-schema-org/json-schema-spec/issues/15#issuecomment-211142145
+
+ }, {
+ key: 'createMergePatchSchema',
+ value: function createMergePatchSchema(schema) {
+ var _this6 = this;
+
+ this._setup(schema, function (e, db, transaction) {
+ Object.keys(schema).forEach(function (storeName) {
+ var schemaObj = schema[storeName];
+ var isNUL = schemaObj === '\0';
+ if (isNUL) {
+ _this6.delStore(storeName);
+ return;
+ }
+ if (!schemaObj || (typeof schemaObj === 'undefined' ? 'undefined' : _typeof(schemaObj)) !== 'object') {
+ throw new Error('Invalid merge patch schema object (type: ' + (typeof schemaObj === 'undefined' ? 'undefined' : _typeof(schemaObj)) + '): ' + schemaObj);
+ }
+
+ var _createStoreIfNotSame2 = _this6._createStoreIfNotSame(db, transaction, schema, storeName, true);
+
+ var _createStoreIfNotSame3 = _slicedToArray(_createStoreIfNotSame2, 1);
+
+ var store = _createStoreIfNotSame3[0];
+
+ if (hasOwn(schemaObj, 'indexes')) {
+ var _ret2 = function () {
+ var indexes = schemaObj.indexes;
+ var isNUL = indexes === '\0';
+ if (isNUL) {
+ _this6._deleteIndexes(transaction, storeName);
+ return {
+ v: void 0
+ };
+ }
+ if (!indexes || (typeof indexes === 'undefined' ? 'undefined' : _typeof(indexes)) !== 'object') {
+ throw new Error('Invalid merge patch indexes object (type: ' + (typeof indexes === 'undefined' ? 'undefined' : _typeof(indexes)) + '): ' + indexes);
+ }
+ Object.keys(indexes).forEach(function (indexName) {
+ var indexObj = indexes[indexName];
+ var isNUL = indexObj === '\0';
+ if (isNUL) {
+ _this6.delIndex(indexName);
+ return;
+ }
+ if (!indexObj || (typeof indexObj === 'undefined' ? 'undefined' : _typeof(indexObj)) !== 'object') {
+ throw new Error('Invalid merge patch index object (type: ' + (typeof indexObj === 'undefined' ? 'undefined' : _typeof(indexObj)) + '): ' + indexObj);
+ }
+ _this6._createIndex(store, indexes, indexName, true);
+ });
+ }();
+
+ if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
+ }
+ });
+ });
+ }
+ }, {
+ key: 'createWholePatchSchema',
+ value: function createWholePatchSchema(schema) {
+ var _this7 = this;
+
+ var clearUnusedStores = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
+ var clearUnusedIndexes = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2];
+
+ this._setup(schema, function (e, db, transaction) {
+ _this7._deleteAllUnused(db, transaction, schema, clearUnusedStores, clearUnusedIndexes);
+
+ Object.keys(schema).forEach(function (storeName) {
+ var _createStoreIfNotSame4 = _this7._createStoreIfNotSame(db, transaction, schema, storeName);
+
+ var _createStoreIfNotSame5 = _slicedToArray(_createStoreIfNotSame4, 2);
+
+ var store = _createStoreIfNotSame5[0];
+ var newStore = _createStoreIfNotSame5[1];
+
+ var indexes = newStore.indexes;
+ Object.keys(indexes || {}).forEach(function (indexName) {
+ _this7._createIndex(store, indexes, indexName);
+ });
+ });
+ });
+ }
+ }, {
+ key: 'createVersionedSchema',
+ value: function createVersionedSchema(schemas, schemaType, clearUnusedStores, clearUnusedIndexes) {
+ var _this8 = this;
+
+ var createPatches = function createPatches(schemaObj, schemaType) {
+ switch (schemaType) {
+ case 'mixed':
+ {
+ schemaObj.forEach(function (mixedObj) {
+ var schemaType = Object.keys(mixedObj)[0];
+ var schema = mixedObj[schemaType];
+ if (schemaType !== 'idb-schema' && schema === 'function') {
+ schema = schema(_this8); // May throw
+ }
+ // These could immediately throw with a bad version
+ switch (schemaType) {
+ case 'idb-schema':
+ {
+ // Function called above
+ _this8.createIdbSchemaPatchSchema(schema);
+ break;
+ }
+ case 'merge':
+ {
+ _this8.createMergePatchSchema(schema);
+ break;
+ }
+ case 'whole':
+ {
+ _this8.createWholePatchSchema(schema, clearUnusedStores, clearUnusedIndexes);
+ break;
+ }
+ case 'mixed':
+ {
+ createPatches(schema, schemaType);
+ break;
+ }
+ default:
+ throw new Error('Unrecognized schema type');
+ }
+ });
+ break;
+ }
+ case 'merge':
+ {
+ _this8.createMergePatchSchema(schemaObj);
+ break;
+ }
+ case 'idb-schema':
+ {
+ _this8.createIdbSchemaPatchSchema(schemaObj);
+ break;
+ }
+ case 'whole':
+ {
+ _this8.createWholePatchSchema(schemaObj, clearUnusedStores, clearUnusedIndexes);
+ break;
+ }
+ }
+ };
+ Object.keys(schemas || {}).sort().forEach(function (schemaVersion) {
+ var version = parseInt(schemaVersion, 10);
+ var schemaObj = schemas[version];
+ if (schemaType !== 'idb-schema' && typeof schemaObj === 'function') {
+ schemaObj = schemaObj(_this8); // May throw
+ }
+ _this8.version(version);
+ createPatches(schemaObj, schemaType, version);
+ });
+ }
+ }]);
+
+ return IdbImport;
+}(_idbSchema2.default);
+
+exports.default = IdbImport;
+
+
+},{"idb-schema":288}],3:[function(require,module,exports){
+(function (global){
+/* eslint max-len: 0 */
+
+"use strict";
+
+var _Object$defineProperty = require("babel-runtime/core-js/object/define-property")["default"];
+
+require("core-js/shim");
+
+require("babel-regenerator-runtime");
+
+// Should be removed in the next major release:
+
+require("core-js/fn/regexp/escape");
+
+if (global._babelPolyfill) {
+ throw new Error("only one instance of babel-polyfill is allowed");
+}
+global._babelPolyfill = true;
+
+function define(O, key, value) {
+ O[key] || _Object$defineProperty(O, key, {
+ writable: true,
+ configurable: true,
+ value: value
+ });
+}
+
+define(String.prototype, "padLeft", "".padStart);
+define(String.prototype, "padRight", "".padEnd);
+
+"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
+ [][key] && define(Array, key, Function.call.bind([][key]));
+});
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"babel-regenerator-runtime":283,"babel-runtime/core-js/object/define-property":284,"core-js/fn/regexp/escape":4,"core-js/shim":282}],4:[function(require,module,exports){
+require('../../modules/core.regexp.escape');
+module.exports = require('../../modules/_core').RegExp.escape;
+},{"../../modules/_core":24,"../../modules/core.regexp.escape":116}],5:[function(require,module,exports){
+module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
+};
+},{}],6:[function(require,module,exports){
+var cof = require('./_cof');
+module.exports = function(it, msg){
+ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
+ return +it;
+};
+},{"./_cof":19}],7:[function(require,module,exports){
+// 22.1.3.31 Array.prototype[@@unscopables]
+var UNSCOPABLES = require('./_wks')('unscopables')
+ , ArrayProto = Array.prototype;
+if(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {});
+module.exports = function(key){
+ ArrayProto[UNSCOPABLES][key] = true;
+};
+},{"./_hide":39,"./_wks":113}],8:[function(require,module,exports){
+module.exports = function(it, Constructor, name, forbiddenField){
+ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
+ throw TypeError(name + ': incorrect invocation!');
+ } return it;
+};
+},{}],9:[function(require,module,exports){
+var isObject = require('./_is-object');
+module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
+};
+},{"./_is-object":48}],10:[function(require,module,exports){
+// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+'use strict';
+var toObject = require('./_to-object')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length');
+
+module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
+ var O = toObject(this)
+ , len = toLength(O.length)
+ , to = toIndex(target, len)
+ , from = toIndex(start, len)
+ , end = arguments.length > 2 ? arguments[2] : undefined
+ , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
+ , inc = 1;
+ if(from < to && to < from + count){
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while(count-- > 0){
+ if(from in O)O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+};
+},{"./_to-index":103,"./_to-length":106,"./_to-object":107}],11:[function(require,module,exports){
+// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+'use strict';
+var toObject = require('./_to-object')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length');
+module.exports = function fill(value /*, start = 0, end = @length */){
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , aLen = arguments.length
+ , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
+ , end = aLen > 2 ? arguments[2] : undefined
+ , endPos = end === undefined ? length : toIndex(end, length);
+ while(endPos > index)O[index++] = value;
+ return O;
+};
+},{"./_to-index":103,"./_to-length":106,"./_to-object":107}],12:[function(require,module,exports){
+var forOf = require('./_for-of');
+
+module.exports = function(iter, ITERATOR){
+ var result = [];
+ forOf(iter, false, result.push, result, ITERATOR);
+ return result;
+};
+
+},{"./_for-of":36}],13:[function(require,module,exports){
+// false -> Array#indexOf
+// true -> Array#includes
+var toIObject = require('./_to-iobject')
+ , toLength = require('./_to-length')
+ , toIndex = require('./_to-index');
+module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+};
+},{"./_to-index":103,"./_to-iobject":105,"./_to-length":106}],14:[function(require,module,exports){
+// 0 -> Array#forEach
+// 1 -> Array#map
+// 2 -> Array#filter
+// 3 -> Array#some
+// 4 -> Array#every
+// 5 -> Array#find
+// 6 -> Array#findIndex
+var ctx = require('./_ctx')
+ , IObject = require('./_iobject')
+ , toObject = require('./_to-object')
+ , toLength = require('./_to-length')
+ , asc = require('./_array-species-create');
+module.exports = function(TYPE, $create){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
+ , create = $create || asc;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+};
+},{"./_array-species-create":16,"./_ctx":25,"./_iobject":44,"./_to-length":106,"./_to-object":107}],15:[function(require,module,exports){
+var aFunction = require('./_a-function')
+ , toObject = require('./_to-object')
+ , IObject = require('./_iobject')
+ , toLength = require('./_to-length');
+
+module.exports = function(that, callbackfn, aLen, memo, isRight){
+ aFunction(callbackfn);
+ var O = toObject(that)
+ , self = IObject(O)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(aLen < 2)for(;;){
+ if(index in self){
+ memo = self[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
+ memo = callbackfn(memo, self[index], index, O);
+ }
+ return memo;
+};
+},{"./_a-function":5,"./_iobject":44,"./_to-length":106,"./_to-object":107}],16:[function(require,module,exports){
+// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+var isObject = require('./_is-object')
+ , isArray = require('./_is-array')
+ , SPECIES = require('./_wks')('species');
+module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
+};
+},{"./_is-array":46,"./_is-object":48,"./_wks":113}],17:[function(require,module,exports){
+'use strict';
+var aFunction = require('./_a-function')
+ , isObject = require('./_is-object')
+ , invoke = require('./_invoke')
+ , arraySlice = [].slice
+ , factories = {};
+
+var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ } return factories[len](F, args);
+};
+
+module.exports = Function.bind || function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+};
+},{"./_a-function":5,"./_invoke":43,"./_is-object":48}],18:[function(require,module,exports){
+// getting tag from 19.1.3.6 Object.prototype.toString()
+var cof = require('./_cof')
+ , TAG = require('./_wks')('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+
+// fallback for IE11 Script Access Denied error
+var tryGet = function(it, key){
+ try {
+ return it[key];
+ } catch(e){ /* empty */ }
+};
+
+module.exports = function(it){
+ var O, T, B;
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
+ // @@toStringTag case
+ : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ // builtinTag case
+ : ARG ? cof(O)
+ // ES3 arguments fallback
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
+};
+},{"./_cof":19,"./_wks":113}],19:[function(require,module,exports){
+var toString = {}.toString;
+
+module.exports = function(it){
+ return toString.call(it).slice(8, -1);
+};
+},{}],20:[function(require,module,exports){
+'use strict';
+var dP = require('./_object-dp').f
+ , create = require('./_object-create')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , ctx = require('./_ctx')
+ , anInstance = require('./_an-instance')
+ , defined = require('./_defined')
+ , forOf = require('./_for-of')
+ , $iterDefine = require('./_iter-define')
+ , step = require('./_iter-step')
+ , setSpecies = require('./_set-species')
+ , DESCRIPTORS = require('./_descriptors')
+ , fastKey = require('./_meta').fastKey
+ , SIZE = DESCRIPTORS ? '_s' : 'size';
+
+var getEntry = function(that, key){
+ // fast case
+ var index = fastKey(key), entry;
+ if(index !== 'F')return that._i[index];
+ // frozen object case
+ for(entry = that._f; entry; entry = entry.n){
+ if(entry.k == key)return entry;
+ }
+};
+
+module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear(){
+ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
+ entry.r = true;
+ if(entry.p)entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that._f = that._l = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function(key){
+ var that = this
+ , entry = getEntry(that, key);
+ if(entry){
+ var next = entry.n
+ , prev = entry.p;
+ delete that._i[entry.i];
+ entry.r = true;
+ if(prev)prev.n = next;
+ if(next)next.p = prev;
+ if(that._f == entry)that._f = next;
+ if(that._l == entry)that._l = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /*, that = undefined */){
+ anInstance(this, C, 'forEach');
+ var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
+ , entry;
+ while(entry = entry ? entry.n : this._f){
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key){
+ return !!getEntry(this, key);
+ }
+ });
+ if(DESCRIPTORS)dP(C.prototype, 'size', {
+ get: function(){
+ return defined(this[SIZE]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var entry = getEntry(that, key)
+ , prev, index;
+ // change existing entry
+ if(entry){
+ entry.v = value;
+ // create new entry
+ } else {
+ that._l = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that._l, // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if(!that._f)that._f = entry;
+ if(prev)prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if(index !== 'F')that._i[index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ setStrong: function(C, NAME, IS_MAP){
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ $iterDefine(C, NAME, function(iterated, kind){
+ this._t = iterated; // target
+ this._k = kind; // kind
+ this._l = undefined; // previous
+ }, function(){
+ var that = this
+ , kind = that._k
+ , entry = that._l;
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ // get next entry
+ if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
+ // or finish the iteration
+ that._t = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if(kind == 'keys' )return step(0, entry.k);
+ if(kind == 'values')return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
+
+ // add [@@species], 23.1.2.2, 23.2.2.2
+ setSpecies(NAME);
+ }
+};
+},{"./_an-instance":8,"./_ctx":25,"./_defined":26,"./_descriptors":27,"./_for-of":36,"./_hide":39,"./_iter-define":52,"./_iter-step":54,"./_meta":61,"./_object-create":65,"./_object-dp":66,"./_redefine-all":84,"./_set-species":89}],21:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var classof = require('./_classof')
+ , from = require('./_array-from-iterable');
+module.exports = function(NAME){
+ return function toJSON(){
+ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
+ return from(this);
+ };
+};
+},{"./_array-from-iterable":12,"./_classof":18}],22:[function(require,module,exports){
+'use strict';
+var redefineAll = require('./_redefine-all')
+ , getWeak = require('./_meta').getWeak
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , anInstance = require('./_an-instance')
+ , forOf = require('./_for-of')
+ , createArrayMethod = require('./_array-methods')
+ , $has = require('./_has')
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , id = 0;
+
+// fallback for uncaught frozen keys
+var uncaughtFrozenStore = function(that){
+ return that._l || (that._l = new UncaughtFrozenStore);
+};
+var UncaughtFrozenStore = function(){
+ this.a = [];
+};
+var findUncaughtFrozen = function(store, key){
+ return arrayFind(store.a, function(it){
+ return it[0] === key;
+ });
+};
+UncaughtFrozenStore.prototype = {
+ get: function(key){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)return entry[1];
+ },
+ has: function(key){
+ return !!findUncaughtFrozen(this, key);
+ },
+ set: function(key, value){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)entry[1] = value;
+ else this.a.push([key, value]);
+ },
+ 'delete': function(key){
+ var index = arrayFindIndex(this.a, function(it){
+ return it[0] === key;
+ });
+ if(~index)this.a.splice(index, 1);
+ return !!~index;
+ }
+};
+
+module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = id++; // collection id
+ that._l = undefined; // leak store for uncaught frozen objects
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this)['delete'](key);
+ return data && $has(data, this._i) && delete data[this._i];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).has(key);
+ return data && $has(data, this._i);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var data = getWeak(anObject(key), true);
+ if(data === true)uncaughtFrozenStore(that).set(key, value);
+ else data[that._i] = value;
+ return that;
+ },
+ ufstore: uncaughtFrozenStore
+};
+},{"./_an-instance":8,"./_an-object":9,"./_array-methods":14,"./_for-of":36,"./_has":38,"./_is-object":48,"./_meta":61,"./_redefine-all":84}],23:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , redefineAll = require('./_redefine-all')
+ , meta = require('./_meta')
+ , forOf = require('./_for-of')
+ , anInstance = require('./_an-instance')
+ , isObject = require('./_is-object')
+ , fails = require('./_fails')
+ , $iterDetect = require('./_iter-detect')
+ , setToStringTag = require('./_set-to-string-tag')
+ , inheritIfRequired = require('./_inherit-if-required');
+
+module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
+ var Base = global[NAME]
+ , C = Base
+ , ADDER = IS_MAP ? 'set' : 'add'
+ , proto = C && C.prototype
+ , O = {};
+ var fixMethod = function(KEY){
+ var fn = proto[KEY];
+ redefine(proto, KEY,
+ KEY == 'delete' ? function(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'has' ? function has(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'get' ? function get(a){
+ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
+ : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
+ );
+ };
+ if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
+ new C().entries().next();
+ }))){
+ // create collection constructor
+ C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
+ redefineAll(C.prototype, methods);
+ meta.NEED = true;
+ } else {
+ var instance = new C
+ // early implementations not supports chaining
+ , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
+ // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
+ , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
+ // most early implementations doesn't supports iterables, most modern - not close it correctly
+ , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
+ // for early implementations -0 and +0 not the same
+ , BUGGY_ZERO = !IS_WEAK && fails(function(){
+ // V8 ~ Chromium 42- fails only with 5+ elements
+ var $instance = new C()
+ , index = 5;
+ while(index--)$instance[ADDER](index, index);
+ return !$instance.has(-0);
+ });
+ if(!ACCEPT_ITERABLES){
+ C = wrapper(function(target, iterable){
+ anInstance(target, C, NAME);
+ var that = inheritIfRequired(new Base, target, C);
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ return that;
+ });
+ C.prototype = proto;
+ proto.constructor = C;
+ }
+ if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
+ fixMethod('delete');
+ fixMethod('has');
+ IS_MAP && fixMethod('get');
+ }
+ if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
+ // weak collections should not contains .clear method
+ if(IS_WEAK && proto.clear)delete proto.clear;
+ }
+
+ setToStringTag(C, NAME);
+
+ O[NAME] = C;
+ $export($export.G + $export.W + $export.F * (C != Base), O);
+
+ if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
+
+ return C;
+};
+},{"./_an-instance":8,"./_export":31,"./_fails":33,"./_for-of":36,"./_global":37,"./_inherit-if-required":42,"./_is-object":48,"./_iter-detect":53,"./_meta":61,"./_redefine":85,"./_redefine-all":84,"./_set-to-string-tag":90}],24:[function(require,module,exports){
+var core = module.exports = {version: '2.1.5'};
+if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+},{}],25:[function(require,module,exports){
+// optional / simple context binding
+var aFunction = require('./_a-function');
+module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+};
+},{"./_a-function":5}],26:[function(require,module,exports){
+// 7.2.1 RequireObjectCoercible(argument)
+module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+};
+},{}],27:[function(require,module,exports){
+// Thank's IE8 for his funny defineProperty
+module.exports = !require('./_fails')(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+});
+},{"./_fails":33}],28:[function(require,module,exports){
+var isObject = require('./_is-object')
+ , document = require('./_global').document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+module.exports = function(it){
+ return is ? document.createElement(it) : {};
+};
+},{"./_global":37,"./_is-object":48}],29:[function(require,module,exports){
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+).split(',');
+},{}],30:[function(require,module,exports){
+// all enumerable object keys, includes symbols
+var getKeys = require('./_object-keys')
+ , gOPS = require('./_object-gops')
+ , pIE = require('./_object-pie');
+module.exports = function(it){
+ var result = getKeys(it)
+ , getSymbols = gOPS.f;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = pIE.f
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
+ } return result;
+};
+},{"./_object-gops":71,"./_object-keys":74,"./_object-pie":75}],31:[function(require,module,exports){
+var global = require('./_global')
+ , core = require('./_core')
+ , hide = require('./_hide')
+ , redefine = require('./_redefine')
+ , ctx = require('./_ctx')
+ , PROTOTYPE = 'prototype';
+
+var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
+ , key, own, out, exp;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // extend global
+ if(target)redefine(target, key, out, type & $export.U);
+ // export
+ if(exports[key] != out)hide(exports, key, exp);
+ if(IS_PROTO && expProto[key] != out)expProto[key] = out;
+ }
+};
+global.core = core;
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+},{"./_core":24,"./_ctx":25,"./_global":37,"./_hide":39,"./_redefine":85}],32:[function(require,module,exports){
+var MATCH = require('./_wks')('match');
+module.exports = function(KEY){
+ var re = /./;
+ try {
+ '/./'[KEY](re);
+ } catch(e){
+ try {
+ re[MATCH] = false;
+ return !'/./'[KEY](re);
+ } catch(f){ /* empty */ }
+ } return true;
+};
+},{"./_wks":113}],33:[function(require,module,exports){
+module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+};
+},{}],34:[function(require,module,exports){
+'use strict';
+var hide = require('./_hide')
+ , redefine = require('./_redefine')
+ , fails = require('./_fails')
+ , defined = require('./_defined')
+ , wks = require('./_wks');
+
+module.exports = function(KEY, length, exec){
+ var SYMBOL = wks(KEY)
+ , fns = exec(defined, SYMBOL, ''[KEY])
+ , strfn = fns[0]
+ , rxfn = fns[1];
+ if(fails(function(){
+ var O = {};
+ O[SYMBOL] = function(){ return 7; };
+ return ''[KEY](O) != 7;
+ })){
+ redefine(String.prototype, KEY, strfn);
+ hide(RegExp.prototype, SYMBOL, length == 2
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
+ ? function(string, arg){ return rxfn.call(string, this, arg); }
+ // 21.2.5.6 RegExp.prototype[@@match](string)
+ // 21.2.5.9 RegExp.prototype[@@search](string)
+ : function(string){ return rxfn.call(string, this); }
+ );
+ }
+};
+},{"./_defined":26,"./_fails":33,"./_hide":39,"./_redefine":85,"./_wks":113}],35:[function(require,module,exports){
+'use strict';
+// 21.2.5.3 get RegExp.prototype.flags
+var anObject = require('./_an-object');
+module.exports = function(){
+ var that = anObject(this)
+ , result = '';
+ if(that.global) result += 'g';
+ if(that.ignoreCase) result += 'i';
+ if(that.multiline) result += 'm';
+ if(that.unicode) result += 'u';
+ if(that.sticky) result += 'y';
+ return result;
+};
+},{"./_an-object":9}],36:[function(require,module,exports){
+var ctx = require('./_ctx')
+ , call = require('./_iter-call')
+ , isArrayIter = require('./_is-array-iter')
+ , anObject = require('./_an-object')
+ , toLength = require('./_to-length')
+ , getIterFn = require('./core.get-iterator-method');
+module.exports = function(iterable, entries, fn, that, ITERATOR){
+ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
+ // fast case for arrays with default iterator
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
+ call(iterator, f, step.value, entries);
+ }
+};
+},{"./_an-object":9,"./_ctx":25,"./_is-array-iter":45,"./_iter-call":50,"./_to-length":106,"./core.get-iterator-method":114}],37:[function(require,module,exports){
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+},{}],38:[function(require,module,exports){
+var hasOwnProperty = {}.hasOwnProperty;
+module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+};
+},{}],39:[function(require,module,exports){
+var dP = require('./_object-dp')
+ , createDesc = require('./_property-desc');
+module.exports = require('./_descriptors') ? function(object, key, value){
+ return dP.f(object, key, createDesc(1, value));
+} : function(object, key, value){
+ object[key] = value;
+ return object;
+};
+},{"./_descriptors":27,"./_object-dp":66,"./_property-desc":83}],40:[function(require,module,exports){
+module.exports = require('./_global').document && document.documentElement;
+},{"./_global":37}],41:[function(require,module,exports){
+module.exports = !require('./_descriptors') && !require('./_fails')(function(){
+ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
+});
+},{"./_descriptors":27,"./_dom-create":28,"./_fails":33}],42:[function(require,module,exports){
+var isObject = require('./_is-object')
+ , setPrototypeOf = require('./_set-proto').set;
+module.exports = function(that, target, C){
+ var P, S = target.constructor;
+ if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
+ setPrototypeOf(that, P);
+ } return that;
+};
+},{"./_is-object":48,"./_set-proto":88}],43:[function(require,module,exports){
+// fast apply, http://jsperf.lnkit.com/fast-apply/5
+module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+};
+},{}],44:[function(require,module,exports){
+// fallback for non-array-like ES3 and non-enumerable old V8 strings
+var cof = require('./_cof');
+module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+};
+},{"./_cof":19}],45:[function(require,module,exports){
+// check on default Array iterator
+var Iterators = require('./_iterators')
+ , ITERATOR = require('./_wks')('iterator')
+ , ArrayProto = Array.prototype;
+
+module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+};
+},{"./_iterators":55,"./_wks":113}],46:[function(require,module,exports){
+// 7.2.2 IsArray(argument)
+var cof = require('./_cof');
+module.exports = Array.isArray || function isArray(arg){
+ return cof(arg) == 'Array';
+};
+},{"./_cof":19}],47:[function(require,module,exports){
+// 20.1.2.3 Number.isInteger(number)
+var isObject = require('./_is-object')
+ , floor = Math.floor;
+module.exports = function isInteger(it){
+ return !isObject(it) && isFinite(it) && floor(it) === it;
+};
+},{"./_is-object":48}],48:[function(require,module,exports){
+module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+},{}],49:[function(require,module,exports){
+// 7.2.8 IsRegExp(argument)
+var isObject = require('./_is-object')
+ , cof = require('./_cof')
+ , MATCH = require('./_wks')('match');
+module.exports = function(it){
+ var isRegExp;
+ return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
+};
+},{"./_cof":19,"./_is-object":48,"./_wks":113}],50:[function(require,module,exports){
+// call something on iterator step with safe closing on error
+var anObject = require('./_an-object');
+module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+};
+},{"./_an-object":9}],51:[function(require,module,exports){
+'use strict';
+var create = require('./_object-create')
+ , descriptor = require('./_property-desc')
+ , setToStringTag = require('./_set-to-string-tag')
+ , IteratorPrototype = {};
+
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });
+
+module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+};
+},{"./_hide":39,"./_object-create":65,"./_property-desc":83,"./_set-to-string-tag":90,"./_wks":113}],52:[function(require,module,exports){
+'use strict';
+var LIBRARY = require('./_library')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , hide = require('./_hide')
+ , has = require('./_has')
+ , Iterators = require('./_iterators')
+ , $iterCreate = require('./_iter-create')
+ , setToStringTag = require('./_set-to-string-tag')
+ , getPrototypeOf = require('./_object-gpo')
+ , ITERATOR = require('./_wks')('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+var returnThis = function(){ return this; };
+
+module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
+ , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
+ , methods, key, IteratorPrototype;
+ // Fix native
+ if($anyNative){
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
+ if(IteratorPrototype !== Object.prototype){
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+};
+},{"./_export":31,"./_has":38,"./_hide":39,"./_iter-create":51,"./_iterators":55,"./_library":57,"./_object-gpo":72,"./_redefine":85,"./_set-to-string-tag":90,"./_wks":113}],53:[function(require,module,exports){
+var ITERATOR = require('./_wks')('iterator')
+ , SAFE_CLOSING = false;
+
+try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+} catch(e){ /* empty */ }
+
+module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ safe = true; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+};
+},{"./_wks":113}],54:[function(require,module,exports){
+module.exports = function(done, value){
+ return {value: value, done: !!done};
+};
+},{}],55:[function(require,module,exports){
+module.exports = {};
+},{}],56:[function(require,module,exports){
+var getKeys = require('./_object-keys')
+ , toIObject = require('./_to-iobject');
+module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+};
+},{"./_object-keys":74,"./_to-iobject":105}],57:[function(require,module,exports){
+module.exports = false;
+},{}],58:[function(require,module,exports){
+// 20.2.2.14 Math.expm1(x)
+module.exports = Math.expm1 || function expm1(x){
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+};
+},{}],59:[function(require,module,exports){
+// 20.2.2.20 Math.log1p(x)
+module.exports = Math.log1p || function log1p(x){
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
+};
+},{}],60:[function(require,module,exports){
+// 20.2.2.28 Math.sign(x)
+module.exports = Math.sign || function sign(x){
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+};
+},{}],61:[function(require,module,exports){
+var META = require('./_uid')('meta')
+ , isObject = require('./_is-object')
+ , has = require('./_has')
+ , setDesc = require('./_object-dp').f
+ , id = 0;
+var isExtensible = Object.isExtensible || function(){
+ return true;
+};
+var FREEZE = !require('./_fails')(function(){
+ return isExtensible(Object.preventExtensions({}));
+});
+var setMeta = function(it){
+ setDesc(it, META, {value: {
+ i: 'O' + ++id, // object ID
+ w: {} // weak collections IDs
+ }});
+};
+var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add metadata
+ if(!create)return 'E';
+ // add missing metadata
+ setMeta(it);
+ // return object ID
+ } return it[META].i;
+};
+var getWeak = function(it, create){
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return true;
+ // not necessary to add metadata
+ if(!create)return false;
+ // add missing metadata
+ setMeta(it);
+ // return hash weak collections IDs
+ } return it[META].w;
+};
+// add metadata on freeze-family methods calling
+var onFreeze = function(it){
+ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
+ return it;
+};
+var meta = module.exports = {
+ KEY: META,
+ NEED: false,
+ fastKey: fastKey,
+ getWeak: getWeak,
+ onFreeze: onFreeze
+};
+},{"./_fails":33,"./_has":38,"./_is-object":48,"./_object-dp":66,"./_uid":112}],62:[function(require,module,exports){
+var Map = require('./es6.map')
+ , $export = require('./_export')
+ , shared = require('./_shared')('metadata')
+ , store = shared.store || (shared.store = new (require('./es6.weak-map')));
+
+var getOrCreateMetadataMap = function(target, targetKey, create){
+ var targetMetadata = store.get(target);
+ if(!targetMetadata){
+ if(!create)return undefined;
+ store.set(target, targetMetadata = new Map);
+ }
+ var keyMetadata = targetMetadata.get(targetKey);
+ if(!keyMetadata){
+ if(!create)return undefined;
+ targetMetadata.set(targetKey, keyMetadata = new Map);
+ } return keyMetadata;
+};
+var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
+};
+var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
+};
+var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
+ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
+};
+var ordinaryOwnMetadataKeys = function(target, targetKey){
+ var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
+ , keys = [];
+ if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
+ return keys;
+};
+var toMetaKey = function(it){
+ return it === undefined || typeof it == 'symbol' ? it : String(it);
+};
+var exp = function(O){
+ $export($export.S, 'Reflect', O);
+};
+
+module.exports = {
+ store: store,
+ map: getOrCreateMetadataMap,
+ has: ordinaryHasOwnMetadata,
+ get: ordinaryGetOwnMetadata,
+ set: ordinaryDefineOwnMetadata,
+ keys: ordinaryOwnMetadataKeys,
+ key: toMetaKey,
+ exp: exp
+};
+},{"./_export":31,"./_shared":92,"./es6.map":145,"./es6.weak-map":251}],63:[function(require,module,exports){
+var global = require('./_global')
+ , macrotask = require('./_task').set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = require('./_cof')(process) == 'process'
+ , head, last, notify;
+
+var flush = function(){
+ var parent, fn;
+ if(isNode && (parent = process.domain))parent.exit();
+ while(head){
+ fn = head.fn;
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+};
+
+// Node.js
+if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+// browsers with MutationObserver
+} else if(Observer){
+ var toggle = true
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = !toggle;
+ };
+// environments with maybe non-completely correct, but existent Promise
+} else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+// for other environments - macrotask based on:
+// - setImmediate
+// - MessageChannel
+// - window.postMessag
+// - onreadystatechange
+// - setTimeout
+} else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+}
+
+module.exports = function(fn){
+ var task = {fn: fn, next: undefined};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+};
+},{"./_cof":19,"./_global":37,"./_task":102}],64:[function(require,module,exports){
+'use strict';
+// 19.1.2.1 Object.assign(target, source, ...)
+var getKeys = require('./_object-keys')
+ , gOPS = require('./_object-gops')
+ , pIE = require('./_object-pie')
+ , toObject = require('./_to-object')
+ , IObject = require('./_iobject')
+ , $assign = Object.assign;
+
+// should work with symbols and should have deterministic property order (V8 bug)
+module.exports = !$assign || require('./_fails')(function(){
+ var A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function(k){ B[k] = k; });
+ return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , aLen = arguments.length
+ , index = 1
+ , getSymbols = gOPS.f
+ , isEnum = pIE.f;
+ while(aLen > index){
+ var S = IObject(arguments[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
+ } return T;
+} : $assign;
+},{"./_fails":33,"./_iobject":44,"./_object-gops":71,"./_object-keys":74,"./_object-pie":75,"./_to-object":107}],65:[function(require,module,exports){
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+var anObject = require('./_an-object')
+ , dPs = require('./_object-dps')
+ , enumBugKeys = require('./_enum-bug-keys')
+ , IE_PROTO = require('./_shared-key')('IE_PROTO')
+ , Empty = function(){ /* empty */ }
+ , PROTOTYPE = 'prototype';
+
+// Create object with fake `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = require('./_dom-create')('iframe')
+ , i = enumBugKeys.length
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ require('./_html').appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(' i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+};
+},{"./_an-object":9,"./_descriptors":27,"./_object-dp":66,"./_object-keys":74}],68:[function(require,module,exports){
+var pIE = require('./_object-pie')
+ , createDesc = require('./_property-desc')
+ , toIObject = require('./_to-iobject')
+ , toPrimitive = require('./_to-primitive')
+ , has = require('./_has')
+ , IE8_DOM_DEFINE = require('./_ie8-dom-define')
+ , gOPD = Object.getOwnPropertyDescriptor;
+
+exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){
+ O = toIObject(O);
+ P = toPrimitive(P, true);
+ if(IE8_DOM_DEFINE)try {
+ return gOPD(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+};
+},{"./_descriptors":27,"./_has":38,"./_ie8-dom-define":41,"./_object-pie":75,"./_property-desc":83,"./_to-iobject":105,"./_to-primitive":108}],69:[function(require,module,exports){
+// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+var toIObject = require('./_to-iobject')
+ , gOPN = require('./_object-gopn').f
+ , toString = {}.toString;
+
+var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
+
+var getWindowNames = function(it){
+ try {
+ return gOPN.f(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+};
+
+module.exports.f = function getOwnPropertyNames(it){
+ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+};
+},{"./_object-gopn":70,"./_to-iobject":105}],70:[function(require,module,exports){
+// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+var $keys = require('./_object-keys-internal')
+ , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
+
+exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
+ return $keys(O, hiddenKeys);
+};
+},{"./_enum-bug-keys":29,"./_object-keys-internal":73}],71:[function(require,module,exports){
+exports.f = Object.getOwnPropertySymbols;
+},{}],72:[function(require,module,exports){
+// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+var has = require('./_has')
+ , toObject = require('./_to-object')
+ , IE_PROTO = require('./_shared-key')('IE_PROTO')
+ , ObjectProto = Object.prototype;
+
+module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+};
+},{"./_has":38,"./_shared-key":91,"./_to-object":107}],73:[function(require,module,exports){
+var has = require('./_has')
+ , toIObject = require('./_to-iobject')
+ , arrayIndexOf = require('./_array-includes')(false)
+ , IE_PROTO = require('./_shared-key')('IE_PROTO');
+
+module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(names.length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+};
+},{"./_array-includes":13,"./_has":38,"./_shared-key":91,"./_to-iobject":105}],74:[function(require,module,exports){
+// 19.1.2.14 / 15.2.3.14 Object.keys(O)
+var $keys = require('./_object-keys-internal')
+ , enumBugKeys = require('./_enum-bug-keys');
+
+module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+};
+},{"./_enum-bug-keys":29,"./_object-keys-internal":73}],75:[function(require,module,exports){
+exports.f = {}.propertyIsEnumerable;
+},{}],76:[function(require,module,exports){
+// most Object methods by ES6 should accept primitives
+var $export = require('./_export')
+ , core = require('./_core')
+ , fails = require('./_fails');
+module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+};
+},{"./_core":24,"./_export":31,"./_fails":33}],77:[function(require,module,exports){
+var getKeys = require('./_object-keys')
+ , toIObject = require('./_to-iobject')
+ , isEnum = require('./_object-pie').f;
+module.exports = function(isEntries){
+ return function(it){
+ var O = toIObject(it)
+ , keys = getKeys(O)
+ , length = keys.length
+ , i = 0
+ , result = []
+ , key;
+ while(length > i)if(isEnum.call(O, key = keys[i++])){
+ result.push(isEntries ? [key, O[key]] : O[key]);
+ } return result;
+ };
+};
+},{"./_object-keys":74,"./_object-pie":75,"./_to-iobject":105}],78:[function(require,module,exports){
+// all object keys, includes non-enumerable and symbols
+var gOPN = require('./_object-gopn')
+ , gOPS = require('./_object-gops')
+ , anObject = require('./_an-object')
+ , Reflect = require('./_global').Reflect;
+module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
+ var keys = gOPN.f(anObject(it))
+ , getSymbols = gOPS.f;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+};
+},{"./_an-object":9,"./_global":37,"./_object-gopn":70,"./_object-gops":71}],79:[function(require,module,exports){
+var $parseFloat = require('./_global').parseFloat
+ , $trim = require('./_string-trim').trim;
+
+module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){
+ var string = $trim(String(str), 3)
+ , result = $parseFloat(string);
+ return result === 0 && string.charAt(0) == '-' ? -0 : result;
+} : $parseFloat;
+},{"./_global":37,"./_string-trim":100,"./_string-ws":101}],80:[function(require,module,exports){
+var $parseInt = require('./_global').parseInt
+ , $trim = require('./_string-trim').trim
+ , ws = require('./_string-ws')
+ , hex = /^[\-+]?0[xX]/;
+
+module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
+ var string = $trim(String(str), 3);
+ return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
+} : $parseInt;
+},{"./_global":37,"./_string-trim":100,"./_string-ws":101}],81:[function(require,module,exports){
+'use strict';
+var path = require('./_path')
+ , invoke = require('./_invoke')
+ , aFunction = require('./_a-function');
+module.exports = function(/* ...pargs */){
+ var fn = aFunction(this)
+ , length = arguments.length
+ , pargs = Array(length)
+ , i = 0
+ , _ = path._
+ , holder = false;
+ while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
+ return function(/* ...args */){
+ var that = this
+ , aLen = arguments.length
+ , j = 0, k = 0, args;
+ if(!holder && !aLen)return invoke(fn, pargs, that);
+ args = pargs.slice();
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
+ while(aLen > k)args.push(arguments[k++]);
+ return invoke(fn, args, that);
+ };
+};
+},{"./_a-function":5,"./_invoke":43,"./_path":82}],82:[function(require,module,exports){
+module.exports = require('./_global');
+},{"./_global":37}],83:[function(require,module,exports){
+module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+};
+},{}],84:[function(require,module,exports){
+var redefine = require('./_redefine');
+module.exports = function(target, src, safe){
+ for(var key in src)redefine(target, key, src[key], safe);
+ return target;
+};
+},{"./_redefine":85}],85:[function(require,module,exports){
+var global = require('./_global')
+ , hide = require('./_hide')
+ , has = require('./_has')
+ , SRC = require('./_uid')('src')
+ , TO_STRING = 'toString'
+ , $toString = Function[TO_STRING]
+ , TPL = ('' + $toString).split(TO_STRING);
+
+require('./_core').inspectSource = function(it){
+ return $toString.call(it);
+};
+
+(module.exports = function(O, key, val, safe){
+ var isFunction = typeof val == 'function';
+ if(isFunction)has(val, 'name') || hide(val, 'name', key);
+ if(O[key] === val)return;
+ if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ if(O === global){
+ O[key] = val;
+ } else {
+ if(!safe){
+ delete O[key];
+ hide(O, key, val);
+ } else {
+ if(O[key])O[key] = val;
+ else hide(O, key, val);
+ }
+ }
+// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+})(Function.prototype, TO_STRING, function toString(){
+ return typeof this == 'function' && this[SRC] || $toString.call(this);
+});
+},{"./_core":24,"./_global":37,"./_has":38,"./_hide":39,"./_uid":112}],86:[function(require,module,exports){
+module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+};
+},{}],87:[function(require,module,exports){
+// 7.2.9 SameValue(x, y)
+module.exports = Object.is || function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+};
+},{}],88:[function(require,module,exports){
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var isObject = require('./_is-object')
+ , anObject = require('./_an-object');
+var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
+};
+module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
+};
+},{"./_an-object":9,"./_ctx":25,"./_is-object":48,"./_object-gopd":68}],89:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , dP = require('./_object-dp')
+ , DESCRIPTORS = require('./_descriptors')
+ , SPECIES = require('./_wks')('species');
+
+module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
+};
+},{"./_descriptors":27,"./_global":37,"./_object-dp":66,"./_wks":113}],90:[function(require,module,exports){
+var def = require('./_object-dp').f
+ , has = require('./_has')
+ , TAG = require('./_wks')('toStringTag');
+
+module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+};
+},{"./_has":38,"./_object-dp":66,"./_wks":113}],91:[function(require,module,exports){
+var shared = require('./_shared')('keys')
+ , uid = require('./_uid');
+module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
+};
+},{"./_shared":92,"./_uid":112}],92:[function(require,module,exports){
+var global = require('./_global')
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+module.exports = function(key){
+ return store[key] || (store[key] = {});
+};
+},{"./_global":37}],93:[function(require,module,exports){
+// 7.3.20 SpeciesConstructor(O, defaultConstructor)
+var anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , SPECIES = require('./_wks')('species');
+module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+};
+},{"./_a-function":5,"./_an-object":9,"./_wks":113}],94:[function(require,module,exports){
+var fails = require('./_fails');
+
+module.exports = function(method, arg){
+ return !!method && fails(function(){
+ arg ? method.call(null, function(){}, 1) : method.call(null);
+ });
+};
+},{"./_fails":33}],95:[function(require,module,exports){
+var toInteger = require('./_to-integer')
+ , defined = require('./_defined');
+// true -> String#at
+// false -> String#codePointAt
+module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+};
+},{"./_defined":26,"./_to-integer":104}],96:[function(require,module,exports){
+// helper for String#{startsWith, endsWith, includes}
+var isRegExp = require('./_is-regexp')
+ , defined = require('./_defined');
+
+module.exports = function(that, searchString, NAME){
+ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
+ return String(defined(that));
+};
+},{"./_defined":26,"./_is-regexp":49}],97:[function(require,module,exports){
+var $export = require('./_export')
+ , fails = require('./_fails')
+ , defined = require('./_defined')
+ , quot = /"/g;
+// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
+var createHTML = function(string, tag, attribute, value) {
+ var S = String(defined(string))
+ , p1 = '<' + tag;
+ if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
+ return p1 + '>' + S + '' + tag + '>';
+};
+module.exports = function(NAME, exec){
+ var O = {};
+ O[NAME] = exec(createHTML);
+ $export($export.P + $export.F * fails(function(){
+ var test = ''[NAME]('"');
+ return test !== test.toLowerCase() || test.split('"').length > 3;
+ }), 'String', O);
+};
+},{"./_defined":26,"./_export":31,"./_fails":33}],98:[function(require,module,exports){
+// https://github.com/tc39/proposal-string-pad-start-end
+var toLength = require('./_to-length')
+ , repeat = require('./_string-repeat')
+ , defined = require('./_defined');
+
+module.exports = function(that, maxLength, fillString, left){
+ var S = String(defined(that))
+ , stringLength = S.length
+ , fillStr = fillString === undefined ? ' ' : String(fillString)
+ , intMaxLength = toLength(maxLength);
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
+ var fillLen = intMaxLength - stringLength
+ , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
+ if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
+ return left ? stringFiller + S : S + stringFiller;
+};
+
+},{"./_defined":26,"./_string-repeat":99,"./_to-length":106}],99:[function(require,module,exports){
+'use strict';
+var toInteger = require('./_to-integer')
+ , defined = require('./_defined');
+
+module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+};
+},{"./_defined":26,"./_to-integer":104}],100:[function(require,module,exports){
+var $export = require('./_export')
+ , defined = require('./_defined')
+ , fails = require('./_fails')
+ , spaces = require('./_string-ws')
+ , space = '[' + spaces + ']'
+ , non = '\u200b\u0085'
+ , ltrim = RegExp('^' + space + space + '*')
+ , rtrim = RegExp(space + space + '*$');
+
+var exporter = function(KEY, exec, ALIAS){
+ var exp = {};
+ var FORCE = fails(function(){
+ return !!spaces[KEY]() || non[KEY]() != non;
+ });
+ var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
+ if(ALIAS)exp[ALIAS] = fn;
+ $export($export.P + $export.F * FORCE, 'String', exp);
+};
+
+// 1 -> String#trimLeft
+// 2 -> String#trimRight
+// 3 -> String#trim
+var trim = exporter.trim = function(string, TYPE){
+ string = String(defined(string));
+ if(TYPE & 1)string = string.replace(ltrim, '');
+ if(TYPE & 2)string = string.replace(rtrim, '');
+ return string;
+};
+
+module.exports = exporter;
+},{"./_defined":26,"./_export":31,"./_fails":33,"./_string-ws":101}],101:[function(require,module,exports){
+module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+},{}],102:[function(require,module,exports){
+var ctx = require('./_ctx')
+ , invoke = require('./_invoke')
+ , html = require('./_html')
+ , cel = require('./_dom-create')
+ , global = require('./_global')
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+var run = function(){
+ var id = +this;
+ if(queue.hasOwnProperty(id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+};
+var listener = function(event){
+ run.call(event.data);
+};
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(require('./_cof')(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listener;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
+ global.postMessage(id + '', '*');
+ };
+ global.addEventListener('message', listener, false);
+ // IE8-
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+}
+module.exports = {
+ set: setTask,
+ clear: clearTask
+};
+},{"./_cof":19,"./_ctx":25,"./_dom-create":28,"./_global":37,"./_html":40,"./_invoke":43}],103:[function(require,module,exports){
+var toInteger = require('./_to-integer')
+ , max = Math.max
+ , min = Math.min;
+module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+};
+},{"./_to-integer":104}],104:[function(require,module,exports){
+// 7.1.4 ToInteger
+var ceil = Math.ceil
+ , floor = Math.floor;
+module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+};
+},{}],105:[function(require,module,exports){
+// to indexed object, toObject with fallback for non-array-like ES3 strings
+var IObject = require('./_iobject')
+ , defined = require('./_defined');
+module.exports = function(it){
+ return IObject(defined(it));
+};
+},{"./_defined":26,"./_iobject":44}],106:[function(require,module,exports){
+// 7.1.15 ToLength
+var toInteger = require('./_to-integer')
+ , min = Math.min;
+module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+};
+},{"./_to-integer":104}],107:[function(require,module,exports){
+// 7.1.13 ToObject(argument)
+var defined = require('./_defined');
+module.exports = function(it){
+ return Object(defined(it));
+};
+},{"./_defined":26}],108:[function(require,module,exports){
+// 7.1.1 ToPrimitive(input [, PreferredType])
+var isObject = require('./_is-object');
+// instead of the ES6 spec version, we didn't implement @@toPrimitive case
+// and the second argument - flag - preferred type is a string
+module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+};
+},{"./_is-object":48}],109:[function(require,module,exports){
+'use strict';
+if(require('./_descriptors')){
+ var LIBRARY = require('./_library')
+ , global = require('./_global')
+ , fails = require('./_fails')
+ , $export = require('./_export')
+ , $typed = require('./_typed')
+ , $buffer = require('./_typed-buffer')
+ , ctx = require('./_ctx')
+ , anInstance = require('./_an-instance')
+ , propertyDesc = require('./_property-desc')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , isInteger = require('./_is-integer')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length')
+ , toIndex = require('./_to-index')
+ , toPrimitive = require('./_to-primitive')
+ , has = require('./_has')
+ , same = require('./_same-value')
+ , classof = require('./_classof')
+ , isObject = require('./_is-object')
+ , toObject = require('./_to-object')
+ , isArrayIter = require('./_is-array-iter')
+ , create = require('./_object-create')
+ , getPrototypeOf = require('./_object-gpo')
+ , gOPN = require('./_object-gopn').f
+ , isIterable = require('./core.is-iterable')
+ , getIterFn = require('./core.get-iterator-method')
+ , uid = require('./_uid')
+ , wks = require('./_wks')
+ , createArrayMethod = require('./_array-methods')
+ , createArrayIncludes = require('./_array-includes')
+ , speciesConstructor = require('./_species-constructor')
+ , ArrayIterators = require('./es6.array.iterator')
+ , Iterators = require('./_iterators')
+ , $iterDetect = require('./_iter-detect')
+ , setSpecies = require('./_set-species')
+ , arrayFill = require('./_array-fill')
+ , arrayCopyWithin = require('./_array-copy-within')
+ , $DP = require('./_object-dp')
+ , $GOPD = require('./_object-gopd')
+ , dP = $DP.f
+ , gOPD = $GOPD.f
+ , RangeError = global.RangeError
+ , TypeError = global.TypeError
+ , Uint8Array = global.Uint8Array
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
+ , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
+ , PROTOTYPE = 'prototype'
+ , ArrayProto = Array[PROTOTYPE]
+ , $ArrayBuffer = $buffer.ArrayBuffer
+ , $DataView = $buffer.DataView
+ , arrayForEach = createArrayMethod(0)
+ , arrayFilter = createArrayMethod(2)
+ , arraySome = createArrayMethod(3)
+ , arrayEvery = createArrayMethod(4)
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , arrayIncludes = createArrayIncludes(true)
+ , arrayIndexOf = createArrayIncludes(false)
+ , arrayValues = ArrayIterators.values
+ , arrayKeys = ArrayIterators.keys
+ , arrayEntries = ArrayIterators.entries
+ , arrayLastIndexOf = ArrayProto.lastIndexOf
+ , arrayReduce = ArrayProto.reduce
+ , arrayReduceRight = ArrayProto.reduceRight
+ , arrayJoin = ArrayProto.join
+ , arraySort = ArrayProto.sort
+ , arraySlice = ArrayProto.slice
+ , arrayToString = ArrayProto.toString
+ , arrayToLocaleString = ArrayProto.toLocaleString
+ , ITERATOR = wks('iterator')
+ , TAG = wks('toStringTag')
+ , TYPED_CONSTRUCTOR = uid('typed_constructor')
+ , DEF_CONSTRUCTOR = uid('def_constructor')
+ , ALL_CONSTRUCTORS = $typed.CONSTR
+ , TYPED_ARRAY = $typed.TYPED
+ , VIEW = $typed.VIEW
+ , WRONG_LENGTH = 'Wrong length!';
+
+ var $map = createArrayMethod(1, function(O, length){
+ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
+ });
+
+ var LITTLE_ENDIAN = fails(function(){
+ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
+ });
+
+ var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
+ new Uint8Array(1).set({});
+ });
+
+ var strictToLength = function(it, SAME){
+ if(it === undefined)throw TypeError(WRONG_LENGTH);
+ var number = +it
+ , length = toLength(it);
+ if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
+ return length;
+ };
+
+ var toOffset = function(it, BYTES){
+ var offset = toInteger(it);
+ if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
+ return offset;
+ };
+
+ var validate = function(it){
+ if(isObject(it) && TYPED_ARRAY in it)return it;
+ throw TypeError(it + ' is not a typed array!');
+ };
+
+ var allocate = function(C, length){
+ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
+ throw TypeError('It is not a typed array constructor!');
+ } return new C(length);
+ };
+
+ var speciesFromList = function(O, list){
+ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
+ };
+
+ var fromList = function(C, list){
+ var index = 0
+ , length = list.length
+ , result = allocate(C, length);
+ while(length > index)result[index] = list[index++];
+ return result;
+ };
+
+ var addGetter = function(it, key, internal){
+ dP(it, key, {get: function(){ return this._d[internal]; }});
+ };
+
+ var $from = function from(source /*, mapfn, thisArg */){
+ var O = toObject(source)
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , iterFn = getIterFn(O)
+ , i, length, values, result, step, iterator;
+ if(iterFn != undefined && !isArrayIter(iterFn)){
+ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
+ values.push(step.value);
+ } O = values;
+ }
+ if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
+ for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
+ result[i] = mapping ? mapfn(O[i], i) : O[i];
+ }
+ return result;
+ };
+
+ var $of = function of(/*...items*/){
+ var index = 0
+ , length = arguments.length
+ , result = allocate(this, length);
+ while(length > index)result[index] = arguments[index++];
+ return result;
+ };
+
+ // iOS Safari 6.x fails here
+ var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
+
+ var $toLocaleString = function toLocaleString(){
+ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
+ };
+
+ var proto = {
+ copyWithin: function copyWithin(target, start /*, end */){
+ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
+ },
+ every: function every(callbackfn /*, thisArg */){
+ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
+ return arrayFill.apply(validate(this), arguments);
+ },
+ filter: function filter(callbackfn /*, thisArg */){
+ return speciesFromList(this, arrayFilter(validate(this), callbackfn,
+ arguments.length > 1 ? arguments[1] : undefined));
+ },
+ find: function find(predicate /*, thisArg */){
+ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ findIndex: function findIndex(predicate /*, thisArg */){
+ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ forEach: function forEach(callbackfn /*, thisArg */){
+ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ indexOf: function indexOf(searchElement /*, fromIndex */){
+ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ includes: function includes(searchElement /*, fromIndex */){
+ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ join: function join(separator){ // eslint-disable-line no-unused-vars
+ return arrayJoin.apply(validate(this), arguments);
+ },
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
+ return arrayLastIndexOf.apply(validate(this), arguments);
+ },
+ map: function map(mapfn /*, thisArg */){
+ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduce.apply(validate(this), arguments);
+ },
+ reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduceRight.apply(validate(this), arguments);
+ },
+ reverse: function reverse(){
+ var that = this
+ , length = validate(that).length
+ , middle = Math.floor(length / 2)
+ , index = 0
+ , value;
+ while(index < middle){
+ value = that[index];
+ that[index++] = that[--length];
+ that[length] = value;
+ } return that;
+ },
+ slice: function slice(start, end){
+ return speciesFromList(this, arraySlice.call(validate(this), start, end));
+ },
+ some: function some(callbackfn /*, thisArg */){
+ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ sort: function sort(comparefn){
+ return arraySort.call(validate(this), comparefn);
+ },
+ subarray: function subarray(begin, end){
+ var O = validate(this)
+ , length = O.length
+ , $begin = toIndex(begin, length);
+ return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
+ O.buffer,
+ O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
+ toLength((end === undefined ? length : toIndex(end, length)) - $begin)
+ );
+ }
+ };
+
+ var $set = function set(arrayLike /*, offset */){
+ validate(this);
+ var offset = toOffset(arguments[1], 1)
+ , length = this.length
+ , src = toObject(arrayLike)
+ , len = toLength(src.length)
+ , index = 0;
+ if(len + offset > length)throw RangeError(WRONG_LENGTH);
+ while(index < len)this[offset + index] = src[index++];
+ };
+
+ var $iterators = {
+ entries: function entries(){
+ return arrayEntries.call(validate(this));
+ },
+ keys: function keys(){
+ return arrayKeys.call(validate(this));
+ },
+ values: function values(){
+ return arrayValues.call(validate(this));
+ }
+ };
+
+ var isTAIndex = function(target, key){
+ return isObject(target)
+ && target[TYPED_ARRAY]
+ && typeof key != 'symbol'
+ && key in target
+ && String(+key) == String(key);
+ };
+ var $getDesc = function getOwnPropertyDescriptor(target, key){
+ return isTAIndex(target, key = toPrimitive(key, true))
+ ? propertyDesc(2, target[key])
+ : gOPD(target, key);
+ };
+ var $setDesc = function defineProperty(target, key, desc){
+ if(isTAIndex(target, key = toPrimitive(key, true))
+ && isObject(desc)
+ && has(desc, 'value')
+ && !has(desc, 'get')
+ && !has(desc, 'set')
+ // TODO: add validation descriptor w/o calling accessors
+ && !desc.configurable
+ && (!has(desc, 'writable') || desc.writable)
+ && (!has(desc, 'enumerable') || desc.enumerable)
+ ){
+ target[key] = desc.value;
+ return target;
+ } else return dP(target, key, desc);
+ };
+
+ if(!ALL_CONSTRUCTORS){
+ $GOPD.f = $getDesc;
+ $DP.f = $setDesc;
+ }
+
+ $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
+ getOwnPropertyDescriptor: $getDesc,
+ defineProperty: $setDesc
+ });
+
+ if(fails(function(){ arrayToString.call({}); })){
+ arrayToString = arrayToLocaleString = function toString(){
+ return arrayJoin.call(this);
+ }
+ }
+
+ var $TypedArrayPrototype$ = redefineAll({}, proto);
+ redefineAll($TypedArrayPrototype$, $iterators);
+ hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
+ redefineAll($TypedArrayPrototype$, {
+ set: $set,
+ constructor: function(){ /* noop */ },
+ toString: arrayToString,
+ toLocaleString: $toLocaleString
+ });
+ addGetter($TypedArrayPrototype$, 'buffer', 'b');
+ addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
+ addGetter($TypedArrayPrototype$, 'byteLength', 'l');
+ addGetter($TypedArrayPrototype$, 'length', 'e');
+ dP($TypedArrayPrototype$, TAG, {
+ get: function(){ return this[TYPED_ARRAY]; }
+ });
+
+ module.exports = function(KEY, BYTES, wrapper, CLAMPED){
+ CLAMPED = !!CLAMPED;
+ var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
+ , ISNT_UINT8 = NAME != 'Uint8Array'
+ , GETTER = 'get' + KEY
+ , SETTER = 'set' + KEY
+ , TypedArray = global[NAME]
+ , Base = TypedArray || {}
+ , TAC = TypedArray && getPrototypeOf(TypedArray)
+ , FORCED = !TypedArray || !$typed.ABV
+ , O = {}
+ , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
+ var getter = function(that, index){
+ var data = that._d;
+ return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
+ };
+ var setter = function(that, index, value){
+ var data = that._d;
+ if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
+ data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
+ };
+ var addElement = function(that, index){
+ dP(that, index, {
+ get: function(){
+ return getter(this, index);
+ },
+ set: function(value){
+ return setter(this, index, value);
+ },
+ enumerable: true
+ });
+ };
+ if(FORCED){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME, '_d');
+ var index = 0
+ , offset = 0
+ , buffer, byteLength, length, klass;
+ if(!isObject(data)){
+ length = strictToLength(data, true)
+ byteLength = length * BYTES;
+ buffer = new $ArrayBuffer(byteLength);
+ } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ buffer = data;
+ offset = toOffset($offset, BYTES);
+ var $len = data.byteLength;
+ if($length === undefined){
+ if($len % BYTES)throw RangeError(WRONG_LENGTH);
+ byteLength = $len - offset;
+ if(byteLength < 0)throw RangeError(WRONG_LENGTH);
+ } else {
+ byteLength = toLength($length) * BYTES;
+ if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
+ }
+ length = byteLength / BYTES;
+ } else if(TYPED_ARRAY in data){
+ return fromList(TypedArray, data);
+ } else {
+ return $from.call(TypedArray, data);
+ }
+ hide(that, '_d', {
+ b: buffer,
+ o: offset,
+ l: byteLength,
+ e: length,
+ v: new $DataView(buffer)
+ });
+ while(index < length)addElement(that, index++);
+ });
+ TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
+ hide(TypedArrayPrototype, 'constructor', TypedArray);
+ } else if(!$iterDetect(function(iter){
+ // V8 works with iterators, but fails in many other cases
+ // https://code.google.com/p/v8/issues/detail?id=4552
+ new TypedArray(null); // eslint-disable-line no-new
+ new TypedArray(iter); // eslint-disable-line no-new
+ }, true)){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME);
+ var klass;
+ // `ws` module bug, temporarily remove validation length for Uint8Array
+ // https://github.com/websockets/ws/pull/645
+ if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
+ if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ return $length !== undefined
+ ? new Base(data, toOffset($offset, BYTES), $length)
+ : $offset !== undefined
+ ? new Base(data, toOffset($offset, BYTES))
+ : new Base(data);
+ }
+ if(TYPED_ARRAY in data)return fromList(TypedArray, data);
+ return $from.call(TypedArray, data);
+ });
+ arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
+ if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
+ });
+ TypedArray[PROTOTYPE] = TypedArrayPrototype;
+ if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
+ }
+ var $nativeIterator = TypedArrayPrototype[ITERATOR]
+ , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
+ , $iterator = $iterators.values;
+ hide(TypedArray, TYPED_CONSTRUCTOR, true);
+ hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
+ hide(TypedArrayPrototype, VIEW, true);
+ hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
+
+ if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
+ dP(TypedArrayPrototype, TAG, {
+ get: function(){ return NAME; }
+ });
+ }
+
+ O[NAME] = TypedArray;
+
+ $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
+
+ $export($export.S, NAME, {
+ BYTES_PER_ELEMENT: BYTES,
+ from: $from,
+ of: $of
+ });
+
+ if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
+
+ $export($export.P, NAME, proto);
+
+ $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
+
+ $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
+
+ $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
+
+ $export($export.P + $export.F * (fails(function(){
+ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
+ }) || !fails(function(){
+ TypedArrayPrototype.toLocaleString.call([1, 2]);
+ })), NAME, {toLocaleString: $toLocaleString});
+
+ Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
+ if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
+
+ setSpecies(NAME);
+ };
+} else module.exports = function(){ /* empty */ };
+},{"./_an-instance":8,"./_array-copy-within":10,"./_array-fill":11,"./_array-includes":13,"./_array-methods":14,"./_classof":18,"./_ctx":25,"./_descriptors":27,"./_export":31,"./_fails":33,"./_global":37,"./_has":38,"./_hide":39,"./_is-array-iter":45,"./_is-integer":47,"./_is-object":48,"./_iter-detect":53,"./_iterators":55,"./_library":57,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_object-gpo":72,"./_property-desc":83,"./_redefine-all":84,"./_same-value":87,"./_set-species":89,"./_species-constructor":93,"./_to-index":103,"./_to-integer":104,"./_to-length":106,"./_to-object":107,"./_to-primitive":108,"./_typed":111,"./_typed-buffer":110,"./_uid":112,"./_wks":113,"./core.get-iterator-method":114,"./core.is-iterable":115,"./es6.array.iterator":127}],110:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , DESCRIPTORS = require('./_descriptors')
+ , LIBRARY = require('./_library')
+ , $typed = require('./_typed')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , fails = require('./_fails')
+ , anInstance = require('./_an-instance')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length')
+ , gOPN = require('./_object-gopn').f
+ , dP = require('./_object-dp').f
+ , arrayFill = require('./_array-fill')
+ , setToStringTag = require('./_set-to-string-tag')
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , DATA_VIEW = 'DataView'
+ , PROTOTYPE = 'prototype'
+ , WRONG_LENGTH = 'Wrong length!'
+ , WRONG_INDEX = 'Wrong index!'
+ , $ArrayBuffer = global[ARRAY_BUFFER]
+ , $DataView = global[DATA_VIEW]
+ , Math = global.Math
+ , parseInt = global.parseInt
+ , RangeError = global.RangeError
+ , Infinity = global.Infinity
+ , BaseBuffer = $ArrayBuffer
+ , abs = Math.abs
+ , pow = Math.pow
+ , min = Math.min
+ , floor = Math.floor
+ , log = Math.log
+ , LN2 = Math.LN2
+ , BUFFER = 'buffer'
+ , BYTE_LENGTH = 'byteLength'
+ , BYTE_OFFSET = 'byteOffset'
+ , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
+ , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
+ , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
+
+// IEEE754 conversions based on https://github.com/feross/ieee754
+var packIEEE754 = function(value, mLen, nBytes){
+ var buffer = Array(nBytes)
+ , eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
+ , i = 0
+ , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
+ , e, m, c;
+ value = abs(value)
+ if(value != value || value === Infinity){
+ m = value != value ? 1 : 0;
+ e = eMax;
+ } else {
+ e = floor(log(value) / LN2);
+ if(value * (c = pow(2, -e)) < 1){
+ e--;
+ c *= 2;
+ }
+ if(e + eBias >= 1){
+ value += rt / c;
+ } else {
+ value += rt * pow(2, 1 - eBias);
+ }
+ if(value * c >= 2){
+ e++;
+ c /= 2;
+ }
+ if(e + eBias >= eMax){
+ m = 0;
+ e = eMax;
+ } else if(e + eBias >= 1){
+ m = (value * c - 1) * pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * pow(2, eBias - 1) * pow(2, mLen);
+ e = 0;
+ }
+ }
+ for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
+ e = e << mLen | m;
+ eLen += mLen;
+ for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
+ buffer[--i] |= s * 128;
+ return buffer;
+};
+var unpackIEEE754 = function(buffer, mLen, nBytes){
+ var eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , nBits = eLen - 7
+ , i = nBytes - 1
+ , s = buffer[i--]
+ , e = s & 127
+ , m;
+ s >>= 7;
+ for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+ for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
+ if(e === 0){
+ e = 1 - eBias;
+ } else if(e === eMax){
+ return m ? NaN : s ? -Infinity : Infinity;
+ } else {
+ m = m + pow(2, mLen);
+ e = e - eBias;
+ } return (s ? -1 : 1) * m * pow(2, e - mLen);
+};
+
+var unpackI32 = function(bytes){
+ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
+};
+var packI8 = function(it){
+ return [it & 0xff];
+};
+var packI16 = function(it){
+ return [it & 0xff, it >> 8 & 0xff];
+};
+var packI32 = function(it){
+ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
+};
+var packF64 = function(it){
+ return packIEEE754(it, 52, 8);
+};
+var packF32 = function(it){
+ return packIEEE754(it, 23, 4);
+};
+
+var addGetter = function(C, key, internal){
+ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
+};
+
+var get = function(view, bytes, index, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = store.slice(start, start + bytes);
+ return isLittleEndian ? pack : pack.reverse();
+};
+var set = function(view, bytes, index, conversion, value, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = conversion(+value);
+ for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
+};
+
+var validateArrayBufferArguments = function(that, length){
+ anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
+ var numberLength = +length
+ , byteLength = toLength(numberLength);
+ if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
+ return byteLength;
+};
+
+if(!$typed.ABV){
+ $ArrayBuffer = function ArrayBuffer(length){
+ var byteLength = validateArrayBufferArguments(this, length);
+ this._b = arrayFill.call(Array(byteLength), 0);
+ this[$LENGTH] = byteLength;
+ };
+
+ $DataView = function DataView(buffer, byteOffset, byteLength){
+ anInstance(this, $DataView, DATA_VIEW);
+ anInstance(buffer, $ArrayBuffer, DATA_VIEW);
+ var bufferLength = buffer[$LENGTH]
+ , offset = toInteger(byteOffset);
+ if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
+ byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
+ if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
+ this[$BUFFER] = buffer;
+ this[$OFFSET] = offset;
+ this[$LENGTH] = byteLength;
+ };
+
+ if(DESCRIPTORS){
+ addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
+ addGetter($DataView, BUFFER, '_b');
+ addGetter($DataView, BYTE_LENGTH, '_l');
+ addGetter($DataView, BYTE_OFFSET, '_o');
+ }
+
+ redefineAll($DataView[PROTOTYPE], {
+ getInt8: function getInt8(byteOffset){
+ return get(this, 1, byteOffset)[0] << 24 >> 24;
+ },
+ getUint8: function getUint8(byteOffset){
+ return get(this, 1, byteOffset)[0];
+ },
+ getInt16: function getInt16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
+ },
+ getUint16: function getUint16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return bytes[1] << 8 | bytes[0];
+ },
+ getInt32: function getInt32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1]));
+ },
+ getUint32: function getUint32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
+ },
+ getFloat32: function getFloat32(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
+ },
+ getFloat64: function getFloat64(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
+ },
+ setInt8: function setInt8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setInt16: function setInt16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setUint16: function setUint16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setInt32: function setInt32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setUint32: function setUint32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packF32, value, arguments[2]);
+ },
+ setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
+ set(this, 8, byteOffset, packF64, value, arguments[2]);
+ }
+ });
+} else {
+ if(!fails(function(){
+ new $ArrayBuffer; // eslint-disable-line no-new
+ }) || !fails(function(){
+ new $ArrayBuffer(.5); // eslint-disable-line no-new
+ })){
+ $ArrayBuffer = function ArrayBuffer(length){
+ return new BaseBuffer(validateArrayBufferArguments(this, length));
+ };
+ var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
+ for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
+ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
+ };
+ if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
+ }
+ // iOS Safari 7.x bug
+ var view = new $DataView(new $ArrayBuffer(2))
+ , $setInt8 = $DataView[PROTOTYPE].setInt8;
+ view.setInt8(0, 2147483648);
+ view.setInt8(1, 2147483649);
+ if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
+ setInt8: function setInt8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ }
+ }, true);
+}
+setToStringTag($ArrayBuffer, ARRAY_BUFFER);
+setToStringTag($DataView, DATA_VIEW);
+hide($DataView[PROTOTYPE], $typed.VIEW, true);
+exports[ARRAY_BUFFER] = $ArrayBuffer;
+exports[DATA_VIEW] = $DataView;
+},{"./_an-instance":8,"./_array-fill":11,"./_descriptors":27,"./_fails":33,"./_global":37,"./_hide":39,"./_library":57,"./_object-dp":66,"./_object-gopn":70,"./_redefine-all":84,"./_set-to-string-tag":90,"./_to-integer":104,"./_to-length":106,"./_typed":111}],111:[function(require,module,exports){
+var global = require('./_global')
+ , hide = require('./_hide')
+ , uid = require('./_uid')
+ , TYPED = uid('typed_array')
+ , VIEW = uid('view')
+ , ABV = !!(global.ArrayBuffer && global.DataView)
+ , CONSTR = ABV
+ , i = 0, l = 9, Typed;
+
+var TypedArrayConstructors = (
+ 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
+).split(',');
+
+while(i < l){
+ if(Typed = global[TypedArrayConstructors[i++]]){
+ hide(Typed.prototype, TYPED, true);
+ hide(Typed.prototype, VIEW, true);
+ } else CONSTR = false;
+}
+
+module.exports = {
+ ABV: ABV,
+ CONSTR: CONSTR,
+ TYPED: TYPED,
+ VIEW: VIEW
+};
+},{"./_global":37,"./_hide":39,"./_uid":112}],112:[function(require,module,exports){
+var id = 0
+ , px = Math.random();
+module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+};
+},{}],113:[function(require,module,exports){
+var store = require('./_shared')('wks')
+ , uid = require('./_uid')
+ , Symbol = require('./_global').Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
+module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+},{"./_global":37,"./_shared":92,"./_uid":112}],114:[function(require,module,exports){
+var classof = require('./_classof')
+ , ITERATOR = require('./_wks')('iterator')
+ , Iterators = require('./_iterators');
+module.exports = require('./_core').getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+};
+},{"./_classof":18,"./_core":24,"./_iterators":55,"./_wks":113}],115:[function(require,module,exports){
+var classof = require('./_classof')
+ , ITERATOR = require('./_wks')('iterator')
+ , Iterators = require('./_iterators');
+module.exports = require('./_core').isIterable = function(it){
+ var O = Object(it);
+ return O[ITERATOR] !== undefined
+ || '@@iterator' in O
+ || Iterators.hasOwnProperty(classof(O));
+};
+},{"./_classof":18,"./_core":24,"./_iterators":55,"./_wks":113}],116:[function(require,module,exports){
+// https://github.com/benjamingr/RexExp.escape
+var $export = require('./_export')
+ , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+
+$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
+
+},{"./_export":31,"./_replacer":86}],117:[function(require,module,exports){
+// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+var $export = require('./_export');
+
+$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')});
+
+require('./_add-to-unscopables')('copyWithin');
+},{"./_add-to-unscopables":7,"./_array-copy-within":10,"./_export":31}],118:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $every = require('./_array-methods')(4);
+
+$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: function every(callbackfn /* , thisArg */){
+ return $every(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],119:[function(require,module,exports){
+// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+var $export = require('./_export');
+
+$export($export.P, 'Array', {fill: require('./_array-fill')});
+
+require('./_add-to-unscopables')('fill');
+},{"./_add-to-unscopables":7,"./_array-fill":11,"./_export":31}],120:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $filter = require('./_array-methods')(2);
+
+$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: function filter(callbackfn /* , thisArg */){
+ return $filter(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],121:[function(require,module,exports){
+'use strict';
+// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
+var $export = require('./_export')
+ , $find = require('./_array-methods')(6)
+ , KEY = 'findIndex'
+ , forced = true;
+// Shouldn't skip holes
+if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+$export($export.P + $export.F * forced, 'Array', {
+ findIndex: function findIndex(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+require('./_add-to-unscopables')(KEY);
+},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":31}],122:[function(require,module,exports){
+'use strict';
+// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
+var $export = require('./_export')
+ , $find = require('./_array-methods')(5)
+ , KEY = 'find'
+ , forced = true;
+// Shouldn't skip holes
+if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+$export($export.P + $export.F * forced, 'Array', {
+ find: function find(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+require('./_add-to-unscopables')(KEY);
+},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":31}],123:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $forEach = require('./_array-methods')(0)
+ , STRICT = require('./_strict-method')([].forEach, true);
+
+$export($export.P + $export.F * !STRICT, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: function forEach(callbackfn /* , thisArg */){
+ return $forEach(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],124:[function(require,module,exports){
+'use strict';
+var ctx = require('./_ctx')
+ , $export = require('./_export')
+ , toObject = require('./_to-object')
+ , call = require('./_iter-call')
+ , isArrayIter = require('./_is-array-iter')
+ , toLength = require('./_to-length')
+ , getIterFn = require('./core.get-iterator-method');
+$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = toObject(arrayLike)
+ , C = typeof this == 'function' ? this : Array
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , index = 0
+ , iterFn = getIterFn(O)
+ , length, result, step, iterator;
+ if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ // if object isn't iterable or it's array with default iterator - use simple case
+ if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
+ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
+ }
+ } else {
+ length = toLength(O.length);
+ for(result = new C(length); length > index; index++){
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
+ }
+ }
+ result.length = index;
+ return result;
+ }
+});
+
+},{"./_ctx":25,"./_export":31,"./_is-array-iter":45,"./_iter-call":50,"./_iter-detect":53,"./_to-length":106,"./_to-object":107,"./core.get-iterator-method":114}],125:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $indexOf = require('./_array-includes')(false);
+
+$export($export.P + $export.F * !require('./_strict-method')([].indexOf), 'Array', {
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
+ return $indexOf(this, searchElement, arguments[1]);
+ }
+});
+},{"./_array-includes":13,"./_export":31,"./_strict-method":94}],126:[function(require,module,exports){
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+var $export = require('./_export');
+
+$export($export.S, 'Array', {isArray: require('./_is-array')});
+},{"./_export":31,"./_is-array":46}],127:[function(require,module,exports){
+'use strict';
+var addToUnscopables = require('./_add-to-unscopables')
+ , step = require('./_iter-step')
+ , Iterators = require('./_iterators')
+ , toIObject = require('./_to-iobject');
+
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
+
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
+
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
+},{"./_add-to-unscopables":7,"./_iter-define":52,"./_iter-step":54,"./_iterators":55,"./_to-iobject":105}],128:[function(require,module,exports){
+'use strict';
+// 22.1.3.13 Array.prototype.join(separator)
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , arrayJoin = [].join;
+
+// fallback for not array-like strings
+$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
+ }
+});
+},{"./_export":31,"./_iobject":44,"./_strict-method":94,"./_to-iobject":105}],129:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length');
+
+$export($export.P + $export.F * !require('./_strict-method')([].lastIndexOf), 'Array', {
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
+ if(index < 0)index = length + index;
+ for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index;
+ return -1;
+ }
+});
+},{"./_export":31,"./_strict-method":94,"./_to-integer":104,"./_to-iobject":105,"./_to-length":106}],130:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $map = require('./_array-methods')(1);
+
+$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: function map(callbackfn /* , thisArg */){
+ return $map(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],131:[function(require,module,exports){
+'use strict';
+var $export = require('./_export');
+
+// WebKit Array.of isn't generic
+$export($export.S + $export.F * require('./_fails')(function(){
+ function F(){}
+ return !(Array.of.call(F) instanceof F);
+}), 'Array', {
+ // 22.1.2.3 Array.of( ...items)
+ of: function of(/* ...args */){
+ var index = 0
+ , aLen = arguments.length
+ , result = new (typeof this == 'function' ? this : Array)(aLen);
+ while(aLen > index)result[index] = arguments[index++];
+ result.length = aLen;
+ return result;
+ }
+});
+},{"./_export":31,"./_fails":33}],132:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $reduce = require('./_array-reduce');
+
+$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: function reduceRight(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], true);
+ }
+});
+},{"./_array-reduce":15,"./_export":31,"./_strict-method":94}],133:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $reduce = require('./_array-reduce');
+
+$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: function reduce(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], false);
+ }
+});
+},{"./_array-reduce":15,"./_export":31,"./_strict-method":94}],134:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , html = require('./_html')
+ , cof = require('./_cof')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length')
+ , arraySlice = [].slice;
+
+// fallback for not array-like ES3 strings and DOM objects
+$export($export.P + $export.F * require('./_fails')(function(){
+ if(html)arraySlice.call(html);
+}), 'Array', {
+ slice: function slice(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+});
+},{"./_cof":19,"./_export":31,"./_fails":33,"./_html":40,"./_to-index":103,"./_to-length":106}],135:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $some = require('./_array-methods')(3);
+
+$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: function some(callbackfn /* , thisArg */){
+ return $some(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],136:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , aFunction = require('./_a-function')
+ , toObject = require('./_to-object')
+ , fails = require('./_fails')
+ , $sort = [].sort
+ , test = [1, 2, 3];
+
+$export($export.P + $export.F * (fails(function(){
+ // IE8-
+ test.sort(undefined);
+}) || !fails(function(){
+ // V8 bug
+ test.sort(null);
+ // Old WebKit
+}) || !require('./_strict-method')($sort)), 'Array', {
+ // 22.1.3.25 Array.prototype.sort(comparefn)
+ sort: function sort(comparefn){
+ return comparefn === undefined
+ ? $sort.call(toObject(this))
+ : $sort.call(toObject(this), aFunction(comparefn));
+ }
+});
+},{"./_a-function":5,"./_export":31,"./_fails":33,"./_strict-method":94,"./_to-object":107}],137:[function(require,module,exports){
+require('./_set-species')('Array');
+},{"./_set-species":89}],138:[function(require,module,exports){
+// 20.3.3.1 / 15.9.4.4 Date.now()
+var $export = require('./_export');
+
+$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
+},{"./_export":31}],139:[function(require,module,exports){
+'use strict';
+// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+var $export = require('./_export')
+ , fails = require('./_fails')
+ , getTime = Date.prototype.getTime;
+
+var lz = function(num){
+ return num > 9 ? num : '0' + num;
+};
+
+// PhantomJS / old WebKit has a broken implementations
+$export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+}) || !fails(function(){
+ new Date(NaN).toISOString();
+})), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+});
+},{"./_export":31,"./_fails":33}],140:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , toObject = require('./_to-object')
+ , toPrimitive = require('./_to-primitive');
+
+$export($export.P + $export.F * require('./_fails')(function(){
+ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
+}), 'Date', {
+ toJSON: function toJSON(key){
+ var O = toObject(this)
+ , pv = toPrimitive(O);
+ return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
+ }
+});
+},{"./_export":31,"./_fails":33,"./_to-object":107,"./_to-primitive":108}],141:[function(require,module,exports){
+var DateProto = Date.prototype
+ , INVALID_DATE = 'Invalid Date'
+ , TO_STRING = 'toString'
+ , $toString = DateProto[TO_STRING]
+ , getTime = DateProto.getTime;
+if(new Date(NaN) + '' != INVALID_DATE){
+ require('./_redefine')(DateProto, TO_STRING, function toString(){
+ var value = getTime.call(this);
+ return value === value ? $toString.call(this) : INVALID_DATE;
+ });
+}
+},{"./_redefine":85}],142:[function(require,module,exports){
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+var $export = require('./_export');
+
+$export($export.P, 'Function', {bind: require('./_bind')});
+},{"./_bind":17,"./_export":31}],143:[function(require,module,exports){
+'use strict';
+var isObject = require('./_is-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , HAS_INSTANCE = require('./_wks')('hasInstance')
+ , FunctionProto = Function.prototype;
+// 19.2.3.6 Function.prototype[@@hasInstance](V)
+if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(typeof this != 'function' || !isObject(O))return false;
+ if(!isObject(this.prototype))return O instanceof this;
+ // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
+ while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ return false;
+}});
+},{"./_is-object":48,"./_object-dp":66,"./_object-gpo":72,"./_wks":113}],144:[function(require,module,exports){
+var dP = require('./_object-dp').f
+ , createDesc = require('./_property-desc')
+ , has = require('./_has')
+ , FProto = Function.prototype
+ , nameRE = /^\s*function ([^ (]*)/
+ , NAME = 'name';
+// 19.2.4.2 name
+NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
+ configurable: true,
+ get: function(){
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || dP(this, NAME, createDesc(5, name));
+ return name;
+ }
+});
+},{"./_descriptors":27,"./_has":38,"./_object-dp":66,"./_property-desc":83}],145:[function(require,module,exports){
+'use strict';
+var strong = require('./_collection-strong');
+
+// 23.1 Map Objects
+module.exports = require('./_collection')('Map', function(get){
+ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key){
+ var entry = strong.getEntry(this, key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value){
+ return strong.def(this, key === 0 ? 0 : key, value);
+ }
+}, strong, true);
+},{"./_collection":23,"./_collection-strong":20}],146:[function(require,module,exports){
+// 20.2.2.3 Math.acosh(x)
+var $export = require('./_export')
+ , log1p = require('./_math-log1p')
+ , sqrt = Math.sqrt
+ , $acosh = Math.acosh;
+
+// V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
+ acosh: function acosh(x){
+ return (x = +x) < 1 ? NaN : x > 94906265.62425156
+ ? Math.log(x) + Math.LN2
+ : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
+ }
+});
+},{"./_export":31,"./_math-log1p":59}],147:[function(require,module,exports){
+// 20.2.2.5 Math.asinh(x)
+var $export = require('./_export');
+
+function asinh(x){
+ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
+}
+
+$export($export.S, 'Math', {asinh: asinh});
+},{"./_export":31}],148:[function(require,module,exports){
+// 20.2.2.7 Math.atanh(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ atanh: function atanh(x){
+ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
+ }
+});
+},{"./_export":31}],149:[function(require,module,exports){
+// 20.2.2.9 Math.cbrt(x)
+var $export = require('./_export')
+ , sign = require('./_math-sign');
+
+$export($export.S, 'Math', {
+ cbrt: function cbrt(x){
+ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
+ }
+});
+},{"./_export":31,"./_math-sign":60}],150:[function(require,module,exports){
+// 20.2.2.11 Math.clz32(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ clz32: function clz32(x){
+ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
+ }
+});
+},{"./_export":31}],151:[function(require,module,exports){
+// 20.2.2.12 Math.cosh(x)
+var $export = require('./_export')
+ , exp = Math.exp;
+
+$export($export.S, 'Math', {
+ cosh: function cosh(x){
+ return (exp(x = +x) + exp(-x)) / 2;
+ }
+});
+},{"./_export":31}],152:[function(require,module,exports){
+// 20.2.2.14 Math.expm1(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {expm1: require('./_math-expm1')});
+},{"./_export":31,"./_math-expm1":58}],153:[function(require,module,exports){
+// 20.2.2.16 Math.fround(x)
+var $export = require('./_export')
+ , sign = require('./_math-sign')
+ , pow = Math.pow
+ , EPSILON = pow(2, -52)
+ , EPSILON32 = pow(2, -23)
+ , MAX32 = pow(2, 127) * (2 - EPSILON32)
+ , MIN32 = pow(2, -126);
+
+var roundTiesToEven = function(n){
+ return n + 1 / EPSILON - 1 / EPSILON;
+};
+
+
+$export($export.S, 'Math', {
+ fround: function fround(x){
+ var $abs = Math.abs(x)
+ , $sign = sign(x)
+ , a, result;
+ if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ if(result > MAX32 || result != result)return $sign * Infinity;
+ return $sign * result;
+ }
+});
+},{"./_export":31,"./_math-sign":60}],154:[function(require,module,exports){
+// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
+var $export = require('./_export')
+ , abs = Math.abs;
+
+$export($export.S, 'Math', {
+ hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
+ var sum = 0
+ , i = 0
+ , aLen = arguments.length
+ , larg = 0
+ , arg, div;
+ while(i < aLen){
+ arg = abs(arguments[i++]);
+ if(larg < arg){
+ div = larg / arg;
+ sum = sum * div * div + 1;
+ larg = arg;
+ } else if(arg > 0){
+ div = arg / larg;
+ sum += div * div;
+ } else sum += arg;
+ }
+ return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
+ }
+});
+},{"./_export":31}],155:[function(require,module,exports){
+// 20.2.2.18 Math.imul(x, y)
+var $export = require('./_export')
+ , $imul = Math.imul;
+
+// some WebKit versions fails with big numbers, some has wrong arity
+$export($export.S + $export.F * require('./_fails')(function(){
+ return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
+}), 'Math', {
+ imul: function imul(x, y){
+ var UINT16 = 0xffff
+ , xn = +x
+ , yn = +y
+ , xl = UINT16 & xn
+ , yl = UINT16 & yn;
+ return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
+ }
+});
+},{"./_export":31,"./_fails":33}],156:[function(require,module,exports){
+// 20.2.2.21 Math.log10(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ log10: function log10(x){
+ return Math.log(x) / Math.LN10;
+ }
+});
+},{"./_export":31}],157:[function(require,module,exports){
+// 20.2.2.20 Math.log1p(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {log1p: require('./_math-log1p')});
+},{"./_export":31,"./_math-log1p":59}],158:[function(require,module,exports){
+// 20.2.2.22 Math.log2(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ log2: function log2(x){
+ return Math.log(x) / Math.LN2;
+ }
+});
+},{"./_export":31}],159:[function(require,module,exports){
+// 20.2.2.28 Math.sign(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {sign: require('./_math-sign')});
+},{"./_export":31,"./_math-sign":60}],160:[function(require,module,exports){
+// 20.2.2.30 Math.sinh(x)
+var $export = require('./_export')
+ , expm1 = require('./_math-expm1')
+ , exp = Math.exp;
+
+// V8 near Chromium 38 has a problem with very small numbers
+$export($export.S + $export.F * require('./_fails')(function(){
+ return !Math.sinh(-2e-17) != -2e-17;
+}), 'Math', {
+ sinh: function sinh(x){
+ return Math.abs(x = +x) < 1
+ ? (expm1(x) - expm1(-x)) / 2
+ : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
+ }
+});
+},{"./_export":31,"./_fails":33,"./_math-expm1":58}],161:[function(require,module,exports){
+// 20.2.2.33 Math.tanh(x)
+var $export = require('./_export')
+ , expm1 = require('./_math-expm1')
+ , exp = Math.exp;
+
+$export($export.S, 'Math', {
+ tanh: function tanh(x){
+ var a = expm1(x = +x)
+ , b = expm1(-x);
+ return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
+ }
+});
+},{"./_export":31,"./_math-expm1":58}],162:[function(require,module,exports){
+// 20.2.2.34 Math.trunc(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ trunc: function trunc(it){
+ return (it > 0 ? Math.floor : Math.ceil)(it);
+ }
+});
+},{"./_export":31}],163:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , has = require('./_has')
+ , cof = require('./_cof')
+ , inheritIfRequired = require('./_inherit-if-required')
+ , toPrimitive = require('./_to-primitive')
+ , fails = require('./_fails')
+ , gOPN = require('./_object-gopn').f
+ , gOPD = require('./_object-gopd').f
+ , dP = require('./_object-dp').f
+ , $trim = require('./_string-trim').trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
+ // Opera ~12 has broken Object#toString
+ , BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
+
+// 7.1.3 ToNumber(argument)
+var toNumber = function(argument){
+ var it = toPrimitive(argument, false);
+ if(typeof it == 'string' && it.length > 2){
+ it = TRIM ? it.trim() : $trim(it, 3);
+ var first = it.charCodeAt(0)
+ , third, radix, maxCode;
+ if(first === 43 || first === 45){
+ third = it.charCodeAt(2);
+ if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix
+ } else if(first === 48){
+ switch(it.charCodeAt(1)){
+ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
+ case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
+ default : return +it;
+ }
+ for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){
+ code = digits.charCodeAt(i);
+ // parseInt parses a string to a first unavailable symbol
+ // but ToNumber should return NaN if a string contains unavailable symbols
+ if(code < 48 || code > maxCode)return NaN;
+ } return parseInt(digits, radix);
+ }
+ } return +it;
+};
+
+if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
+ $Number = function Number(value){
+ var it = arguments.length < 1 ? 0 : value
+ , that = this;
+ return that instanceof $Number
+ // check on 1..constructor(foo) case
+ && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
+ ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ };
+ for(var keys = require('./_descriptors') ? gOPN(Base) : (
+ // ES3:
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+ // ES6 (in case, if modules with ES6 Number statics required before):
+ 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ ).split(','), j = 0, key; keys.length > j; j++){
+ if(has(Base, key = keys[j]) && !has($Number, key)){
+ dP($Number, key, gOPD(Base, key));
+ }
+ }
+ $Number.prototype = proto;
+ proto.constructor = $Number;
+ require('./_redefine')(global, NUMBER, $Number);
+}
+},{"./_cof":19,"./_descriptors":27,"./_fails":33,"./_global":37,"./_has":38,"./_inherit-if-required":42,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_redefine":85,"./_string-trim":100,"./_to-primitive":108}],164:[function(require,module,exports){
+// 20.1.2.1 Number.EPSILON
+var $export = require('./_export');
+
+$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
+},{"./_export":31}],165:[function(require,module,exports){
+// 20.1.2.2 Number.isFinite(number)
+var $export = require('./_export')
+ , _isFinite = require('./_global').isFinite;
+
+$export($export.S, 'Number', {
+ isFinite: function isFinite(it){
+ return typeof it == 'number' && _isFinite(it);
+ }
+});
+},{"./_export":31,"./_global":37}],166:[function(require,module,exports){
+// 20.1.2.3 Number.isInteger(number)
+var $export = require('./_export');
+
+$export($export.S, 'Number', {isInteger: require('./_is-integer')});
+},{"./_export":31,"./_is-integer":47}],167:[function(require,module,exports){
+// 20.1.2.4 Number.isNaN(number)
+var $export = require('./_export');
+
+$export($export.S, 'Number', {
+ isNaN: function isNaN(number){
+ return number != number;
+ }
+});
+},{"./_export":31}],168:[function(require,module,exports){
+// 20.1.2.5 Number.isSafeInteger(number)
+var $export = require('./_export')
+ , isInteger = require('./_is-integer')
+ , abs = Math.abs;
+
+$export($export.S, 'Number', {
+ isSafeInteger: function isSafeInteger(number){
+ return isInteger(number) && abs(number) <= 0x1fffffffffffff;
+ }
+});
+},{"./_export":31,"./_is-integer":47}],169:[function(require,module,exports){
+// 20.1.2.6 Number.MAX_SAFE_INTEGER
+var $export = require('./_export');
+
+$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
+},{"./_export":31}],170:[function(require,module,exports){
+// 20.1.2.10 Number.MIN_SAFE_INTEGER
+var $export = require('./_export');
+
+$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
+},{"./_export":31}],171:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 20.1.2.12 Number.parseFloat(string)
+$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
+},{"./_export":31,"./_parse-float":79}],172:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 20.1.2.13 Number.parseInt(string, radix)
+$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
+},{"./_export":31,"./_parse-int":80}],173:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , anInstance = require('./_an-instance')
+ , toInteger = require('./_to-integer')
+ , aNumberValue = require('./_a-number-value')
+ , repeat = require('./_string-repeat')
+ , $toFixed = 1..toFixed
+ , floor = Math.floor
+ , data = [0, 0, 0, 0, 0, 0]
+ , ERROR = 'Number.toFixed: incorrect invocation!'
+ , ZERO = '0';
+
+var multiply = function(n, c){
+ var i = -1
+ , c2 = c;
+ while(++i < 6){
+ c2 += n * data[i];
+ data[i] = c2 % 1e7;
+ c2 = floor(c2 / 1e7);
+ }
+};
+var divide = function(n){
+ var i = 6
+ , c = 0;
+ while(--i >= 0){
+ c += data[i];
+ data[i] = floor(c / n);
+ c = (c % n) * 1e7;
+ }
+};
+var numToString = function(){
+ var i = 6
+ , s = '';
+ while(--i >= 0){
+ if(s !== '' || i === 0 || data[i] !== 0){
+ var t = String(data[i]);
+ s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
+ }
+ } return s;
+};
+var pow = function(x, n, acc){
+ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
+};
+var log = function(x){
+ var n = 0
+ , x2 = x;
+ while(x2 >= 4096){
+ n += 12;
+ x2 /= 4096;
+ }
+ while(x2 >= 2){
+ n += 1;
+ x2 /= 2;
+ } return n;
+};
+
+$export($export.P + $export.F * (!!$toFixed && (
+ 0.00008.toFixed(3) !== '0.000' ||
+ 0.9.toFixed(0) !== '1' ||
+ 1.255.toFixed(2) !== '1.25' ||
+ 1000000000000000128..toFixed(0) !== '1000000000000000128'
+) || !require('./_fails')(function(){
+ // V8 ~ Android 4.3-
+ $toFixed.call({});
+})), 'Number', {
+ toFixed: function toFixed(fractionDigits){
+ var x = aNumberValue(this, ERROR)
+ , f = toInteger(fractionDigits)
+ , s = ''
+ , m = ZERO
+ , e, z, j, k;
+ if(f < 0 || f > 20)throw RangeError(ERROR);
+ if(x != x)return 'NaN';
+ if(x <= -1e21 || x >= 1e21)return String(x);
+ if(x < 0){
+ s = '-';
+ x = -x;
+ }
+ if(x > 1e-21){
+ e = log(x * pow(2, 69, 1)) - 69;
+ z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
+ z *= 0x10000000000000;
+ e = 52 - e;
+ if(e > 0){
+ multiply(0, z);
+ j = f;
+ while(j >= 7){
+ multiply(1e7, 0);
+ j -= 7;
+ }
+ multiply(pow(10, j, 1), 0);
+ j = e - 1;
+ while(j >= 23){
+ divide(1 << 23);
+ j -= 23;
+ }
+ divide(1 << j);
+ multiply(1, 1);
+ divide(2);
+ m = numToString();
+ } else {
+ multiply(0, z);
+ multiply(1 << -e, 0);
+ m = numToString() + repeat.call(ZERO, f);
+ }
+ }
+ if(f > 0){
+ k = m.length;
+ m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
+ } else {
+ m = s + m;
+ } return m;
+ }
+});
+},{"./_a-number-value":6,"./_an-instance":8,"./_export":31,"./_fails":33,"./_string-repeat":99,"./_to-integer":104}],174:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $fails = require('./_fails')
+ , aNumberValue = require('./_a-number-value')
+ , $toPrecision = 1..toPrecision;
+
+$export($export.P + $export.F * ($fails(function(){
+ // IE7-
+ return $toPrecision.call(1, undefined) !== '1';
+}) || !$fails(function(){
+ // V8 ~ Android 4.3-
+ $toPrecision.call({});
+})), 'Number', {
+ toPrecision: function toPrecision(precision){
+ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
+ return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
+ }
+});
+},{"./_a-number-value":6,"./_export":31,"./_fails":33}],175:[function(require,module,exports){
+// 19.1.3.1 Object.assign(target, source)
+var $export = require('./_export');
+
+$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});
+},{"./_export":31,"./_object-assign":64}],176:[function(require,module,exports){
+var $export = require('./_export')
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+$export($export.S, 'Object', {create: require('./_object-create')});
+},{"./_export":31,"./_object-create":65}],177:[function(require,module,exports){
+var $export = require('./_export');
+// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')});
+},{"./_descriptors":27,"./_export":31,"./_object-dps":67}],178:[function(require,module,exports){
+var $export = require('./_export');
+// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});
+},{"./_descriptors":27,"./_export":31,"./_object-dp":66}],179:[function(require,module,exports){
+// 19.1.2.5 Object.freeze(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(meta(it)) : it;
+ };
+});
+},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],180:[function(require,module,exports){
+// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+var toIObject = require('./_to-iobject')
+ , $getOwnPropertyDescriptor = require('./_object-gopd').f;
+
+require('./_object-sap')('getOwnPropertyDescriptor', function(){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+});
+},{"./_object-gopd":68,"./_object-sap":76,"./_to-iobject":105}],181:[function(require,module,exports){
+// 19.1.2.7 Object.getOwnPropertyNames(O)
+require('./_object-sap')('getOwnPropertyNames', function(){
+ return require('./_object-gopn-ext').f;
+});
+},{"./_object-gopn-ext":69,"./_object-sap":76}],182:[function(require,module,exports){
+// 19.1.2.9 Object.getPrototypeOf(O)
+var toObject = require('./_to-object')
+ , $getPrototypeOf = require('./_object-gpo');
+
+require('./_object-sap')('getPrototypeOf', function(){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+});
+},{"./_object-gpo":72,"./_object-sap":76,"./_to-object":107}],183:[function(require,module,exports){
+// 19.1.2.11 Object.isExtensible(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+});
+},{"./_is-object":48,"./_object-sap":76}],184:[function(require,module,exports){
+// 19.1.2.12 Object.isFrozen(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+});
+},{"./_is-object":48,"./_object-sap":76}],185:[function(require,module,exports){
+// 19.1.2.13 Object.isSealed(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+});
+},{"./_is-object":48,"./_object-sap":76}],186:[function(require,module,exports){
+// 19.1.3.10 Object.is(value1, value2)
+var $export = require('./_export');
+$export($export.S, 'Object', {is: require('./_same-value')});
+},{"./_export":31,"./_same-value":87}],187:[function(require,module,exports){
+// 19.1.2.14 Object.keys(O)
+var toObject = require('./_to-object')
+ , $keys = require('./_object-keys');
+
+require('./_object-sap')('keys', function(){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+});
+},{"./_object-keys":74,"./_object-sap":76,"./_to-object":107}],188:[function(require,module,exports){
+// 19.1.2.15 Object.preventExtensions(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ };
+});
+},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],189:[function(require,module,exports){
+// 19.1.2.17 Object.seal(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(meta(it)) : it;
+ };
+});
+},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],190:[function(require,module,exports){
+// 19.1.3.19 Object.setPrototypeOf(O, proto)
+var $export = require('./_export');
+$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});
+},{"./_export":31,"./_set-proto":88}],191:[function(require,module,exports){
+'use strict';
+// 19.1.3.6 Object.prototype.toString()
+var classof = require('./_classof')
+ , test = {};
+test[require('./_wks')('toStringTag')] = 'z';
+if(test + '' != '[object z]'){
+ require('./_redefine')(Object.prototype, 'toString', function toString(){
+ return '[object ' + classof(this) + ']';
+ }, true);
+}
+},{"./_classof":18,"./_redefine":85,"./_wks":113}],192:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 18.2.4 parseFloat(string)
+$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
+},{"./_export":31,"./_parse-float":79}],193:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 18.2.5 parseInt(string, radix)
+$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
+},{"./_export":31,"./_parse-int":80}],194:[function(require,module,exports){
+'use strict';
+var LIBRARY = require('./_library')
+ , global = require('./_global')
+ , ctx = require('./_ctx')
+ , classof = require('./_classof')
+ , $export = require('./_export')
+ , isObject = require('./_is-object')
+ , anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , anInstance = require('./_an-instance')
+ , forOf = require('./_for-of')
+ , setProto = require('./_set-proto').set
+ , speciesConstructor = require('./_species-constructor')
+ , task = require('./_task').set
+ , microtask = require('./_microtask')
+ , PROMISE = 'Promise'
+ , TypeError = global.TypeError
+ , process = global.process
+ , $Promise = global[PROMISE]
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , empty = function(){ /* empty */ }
+ , Internal, GenericPromiseCapability, Wrapper;
+
+var USE_NATIVE = !!function(){
+ try {
+ // correct subclassing with @@species support
+ var promise = $Promise.resolve(1)
+ , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };
+ // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
+ return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
+ } catch(e){ /* empty */ }
+}();
+
+// helpers
+var sameConstructor = function(a, b){
+ // with library wrapper special case
+ return a === b || a === $Promise && b === Wrapper;
+};
+var isThenable = function(it){
+ var then;
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+};
+var newPromiseCapability = function(C){
+ return sameConstructor($Promise, C)
+ ? new PromiseCapability(C)
+ : new GenericPromiseCapability(C);
+};
+var PromiseCapability = GenericPromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+};
+var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+};
+var notify = function(promise, isReject){
+ if(promise._n)return;
+ promise._n = true;
+ var chain = promise._c;
+ microtask(function(){
+ var value = promise._v
+ , ok = promise._s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , domain = reaction.domain
+ , result, then;
+ try {
+ if(handler){
+ if(!ok){
+ if(promise._h == 2)onHandleUnhandled(promise);
+ promise._h = 1;
+ }
+ if(handler === true)result = value;
+ else {
+ if(domain)domain.enter();
+ result = handler(value);
+ if(domain)domain.exit();
+ }
+ if(result === reaction.promise){
+ reject(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(result)){
+ then.call(result, resolve, reject);
+ } else resolve(result);
+ } else reject(value);
+ } catch(e){
+ reject(e);
+ }
+ };
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
+ promise._c = [];
+ promise._n = false;
+ if(isReject && !promise._h)onUnhandled(promise);
+ });
+};
+var onUnhandled = function(promise){
+ task.call(global, function(){
+ var value = promise._v
+ , abrupt, handler, console;
+ if(isUnhandled(promise)){
+ abrupt = perform(function(){
+ if(isNode){
+ process.emit('unhandledRejection', value, promise);
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
+ console.error('Unhandled promise rejection', value);
+ }
+ });
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
+ promise._h = isNode || isUnhandled(promise) ? 2 : 1;
+ } promise._a = undefined;
+ if(abrupt)throw abrupt.error;
+ });
+};
+var isUnhandled = function(promise){
+ if(promise._h == 1)return false;
+ var chain = promise._a || promise._c
+ , i = 0
+ , reaction;
+ while(chain.length > i){
+ reaction = chain[i++];
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
+ } return true;
+};
+var onHandleUnhandled = function(promise){
+ task.call(global, function(){
+ var handler;
+ if(isNode){
+ process.emit('rejectionHandled', promise);
+ } else if(handler = global.onrejectionhandled){
+ handler({promise: promise, reason: promise._v});
+ }
+ });
+};
+var $reject = function(value){
+ var promise = this;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ promise._v = value;
+ promise._s = 2;
+ if(!promise._a)promise._a = promise._c.slice();
+ notify(promise, true);
+};
+var $resolve = function(value){
+ var promise = this
+ , then;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ try {
+ if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ microtask(function(){
+ var wrapper = {_w: promise, _d: false}; // wrap
+ try {
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } catch(e){
+ $reject.call(wrapper, e);
+ }
+ });
+ } else {
+ promise._v = value;
+ promise._s = 1;
+ notify(promise, false);
+ }
+ } catch(e){
+ $reject.call({_w: promise, _d: false}, e); // wrap
+ }
+};
+
+// constructor polyfill
+if(!USE_NATIVE){
+ // 25.4.3.1 Promise(executor)
+ $Promise = function Promise(executor){
+ anInstance(this, $Promise, PROMISE, '_h');
+ aFunction(executor);
+ Internal.call(this);
+ try {
+ executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ } catch(err){
+ $reject.call(this, err);
+ }
+ };
+ Internal = function Promise(executor){
+ this._c = []; // <- awaiting reactions
+ this._a = undefined; // <- checked in isUnhandled reactions
+ this._s = 0; // <- state
+ this._d = false; // <- done
+ this._v = undefined; // <- value
+ this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
+ this._n = false; // <- notify
+ };
+ Internal.prototype = require('./_redefine-all')($Promise.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ reaction.domain = isNode ? process.domain : undefined;
+ this._c.push(reaction);
+ if(this._a)this._a.push(reaction);
+ if(this._s)notify(this, false);
+ return reaction.promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+ PromiseCapability = function(){
+ var promise = new Internal;
+ this.promise = promise;
+ this.resolve = ctx($resolve, promise, 1);
+ this.reject = ctx($reject, promise, 1);
+ };
+}
+
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
+require('./_set-to-string-tag')($Promise, PROMISE);
+require('./_set-species')(PROMISE);
+Wrapper = require('./_core')[PROMISE];
+
+// statics
+$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ var capability = newPromiseCapability(this)
+ , $$reject = capability.reject;
+ $$reject(r);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ // instanceof instead of internal slot check because we should fix it without replacement native Promise core
+ if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
+ var capability = newPromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){
+ $Promise.all(iter)['catch'](empty);
+})), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ var values = []
+ , index = 0
+ , remaining = 1;
+ forOf(iterable, false, function(promise){
+ var $index = index++
+ , alreadyCalled = false;
+ values.push(undefined);
+ remaining++;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
+ values[$index] = value;
+ --remaining || resolve(values);
+ }, reject);
+ });
+ --remaining || resolve(values);
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(capability.resolve, reject);
+ });
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ }
+});
+},{"./_a-function":5,"./_an-instance":8,"./_an-object":9,"./_classof":18,"./_core":24,"./_ctx":25,"./_export":31,"./_for-of":36,"./_global":37,"./_is-object":48,"./_iter-detect":53,"./_library":57,"./_microtask":63,"./_redefine-all":84,"./_set-proto":88,"./_set-species":89,"./_set-to-string-tag":90,"./_species-constructor":93,"./_task":102,"./_wks":113}],195:[function(require,module,exports){
+// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
+var $export = require('./_export')
+ , _apply = Function.apply;
+
+$export($export.S, 'Reflect', {
+ apply: function apply(target, thisArgument, argumentsList){
+ return _apply.call(target, thisArgument, argumentsList);
+ }
+});
+},{"./_export":31}],196:[function(require,module,exports){
+// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
+var $export = require('./_export')
+ , create = require('./_object-create')
+ , aFunction = require('./_a-function')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , bind = require('./_bind');
+
+// MS Edge supports only 2 arguments
+// FF Nightly sets third argument as `new.target`, but does not create `this` from it
+$export($export.S + $export.F * require('./_fails')(function(){
+ function F(){}
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), 'Reflect', {
+ construct: function construct(Target, args /*, newTarget*/){
+ aFunction(Target);
+ var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
+ if(Target == newTarget){
+ // w/o altered newTarget, optimization for 0-4 arguments
+ if(args != undefined)switch(anObject(args).length){
+ case 0: return new Target;
+ case 1: return new Target(args[0]);
+ case 2: return new Target(args[0], args[1]);
+ case 3: return new Target(args[0], args[1], args[2]);
+ case 4: return new Target(args[0], args[1], args[2], args[3]);
+ }
+ // w/o altered newTarget, lot of arguments case
+ var $args = [null];
+ $args.push.apply($args, args);
+ return new (bind.apply(Target, $args));
+ }
+ // with altered newTarget, not support built-in constructors
+ var proto = newTarget.prototype
+ , instance = create(isObject(proto) ? proto : Object.prototype)
+ , result = Function.apply.call(Target, instance, args);
+ return isObject(result) ? result : instance;
+ }
+});
+},{"./_a-function":5,"./_an-object":9,"./_bind":17,"./_export":31,"./_fails":33,"./_is-object":48,"./_object-create":65}],197:[function(require,module,exports){
+// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
+var dP = require('./_object-dp')
+ , $export = require('./_export')
+ , anObject = require('./_an-object')
+ , toPrimitive = require('./_to-primitive');
+
+// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
+$export($export.S + $export.F * require('./_fails')(function(){
+ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+}), 'Reflect', {
+ defineProperty: function defineProperty(target, propertyKey, attributes){
+ anObject(target);
+ propertyKey = toPrimitive(propertyKey, true);
+ anObject(attributes);
+ try {
+ dP.f(target, propertyKey, attributes);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_an-object":9,"./_export":31,"./_fails":33,"./_object-dp":66,"./_to-primitive":108}],198:[function(require,module,exports){
+// 26.1.4 Reflect.deleteProperty(target, propertyKey)
+var $export = require('./_export')
+ , gOPD = require('./_object-gopd').f
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ deleteProperty: function deleteProperty(target, propertyKey){
+ var desc = gOPD(anObject(target), propertyKey);
+ return desc && !desc.configurable ? false : delete target[propertyKey];
+ }
+});
+},{"./_an-object":9,"./_export":31,"./_object-gopd":68}],199:[function(require,module,exports){
+'use strict';
+// 26.1.5 Reflect.enumerate(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object');
+var Enumerate = function(iterated){
+ this._t = anObject(iterated); // target
+ this._i = 0; // next index
+ var keys = this._k = [] // keys
+ , key;
+ for(key in iterated)keys.push(key);
+};
+require('./_iter-create')(Enumerate, 'Object', function(){
+ var that = this
+ , keys = that._k
+ , key;
+ do {
+ if(that._i >= keys.length)return {value: undefined, done: true};
+ } while(!((key = keys[that._i++]) in that._t));
+ return {value: key, done: false};
+});
+
+$export($export.S, 'Reflect', {
+ enumerate: function enumerate(target){
+ return new Enumerate(target);
+ }
+});
+},{"./_an-object":9,"./_export":31,"./_iter-create":51}],200:[function(require,module,exports){
+// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
+var gOPD = require('./_object-gopd')
+ , $export = require('./_export')
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
+ return gOPD.f(anObject(target), propertyKey);
+ }
+});
+},{"./_an-object":9,"./_export":31,"./_object-gopd":68}],201:[function(require,module,exports){
+// 26.1.8 Reflect.getPrototypeOf(target)
+var $export = require('./_export')
+ , getProto = require('./_object-gpo')
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ getPrototypeOf: function getPrototypeOf(target){
+ return getProto(anObject(target));
+ }
+});
+},{"./_an-object":9,"./_export":31,"./_object-gpo":72}],202:[function(require,module,exports){
+// 26.1.6 Reflect.get(target, propertyKey [, receiver])
+var gOPD = require('./_object-gopd')
+ , getPrototypeOf = require('./_object-gpo')
+ , has = require('./_has')
+ , $export = require('./_export')
+ , isObject = require('./_is-object')
+ , anObject = require('./_an-object');
+
+function get(target, propertyKey/*, receiver*/){
+ var receiver = arguments.length < 3 ? target : arguments[2]
+ , desc, proto;
+ if(anObject(target) === receiver)return target[propertyKey];
+ if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ ? desc.value
+ : desc.get !== undefined
+ ? desc.get.call(receiver)
+ : undefined;
+ if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+}
+
+$export($export.S, 'Reflect', {get: get});
+},{"./_an-object":9,"./_export":31,"./_has":38,"./_is-object":48,"./_object-gopd":68,"./_object-gpo":72}],203:[function(require,module,exports){
+// 26.1.9 Reflect.has(target, propertyKey)
+var $export = require('./_export');
+
+$export($export.S, 'Reflect', {
+ has: function has(target, propertyKey){
+ return propertyKey in target;
+ }
+});
+},{"./_export":31}],204:[function(require,module,exports){
+// 26.1.10 Reflect.isExtensible(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object')
+ , $isExtensible = Object.isExtensible;
+
+$export($export.S, 'Reflect', {
+ isExtensible: function isExtensible(target){
+ anObject(target);
+ return $isExtensible ? $isExtensible(target) : true;
+ }
+});
+},{"./_an-object":9,"./_export":31}],205:[function(require,module,exports){
+// 26.1.11 Reflect.ownKeys(target)
+var $export = require('./_export');
+
+$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});
+},{"./_export":31,"./_own-keys":78}],206:[function(require,module,exports){
+// 26.1.12 Reflect.preventExtensions(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object')
+ , $preventExtensions = Object.preventExtensions;
+
+$export($export.S, 'Reflect', {
+ preventExtensions: function preventExtensions(target){
+ anObject(target);
+ try {
+ if($preventExtensions)$preventExtensions(target);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_an-object":9,"./_export":31}],207:[function(require,module,exports){
+// 26.1.14 Reflect.setPrototypeOf(target, proto)
+var $export = require('./_export')
+ , setProto = require('./_set-proto');
+
+if(setProto)$export($export.S, 'Reflect', {
+ setPrototypeOf: function setPrototypeOf(target, proto){
+ setProto.check(target, proto);
+ try {
+ setProto.set(target, proto);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_export":31,"./_set-proto":88}],208:[function(require,module,exports){
+// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
+var dP = require('./_object-dp')
+ , gOPD = require('./_object-gopd')
+ , getPrototypeOf = require('./_object-gpo')
+ , has = require('./_has')
+ , $export = require('./_export')
+ , createDesc = require('./_property-desc')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object');
+
+function set(target, propertyKey, V/*, receiver*/){
+ var receiver = arguments.length < 4 ? target : arguments[3]
+ , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , existingDescriptor, proto;
+ if(!ownDesc){
+ if(isObject(proto = getPrototypeOf(target))){
+ return set(proto, propertyKey, V, receiver);
+ }
+ ownDesc = createDesc(0);
+ }
+ if(has(ownDesc, 'value')){
+ if(ownDesc.writable === false || !isObject(receiver))return false;
+ existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor.value = V;
+ dP.f(receiver, propertyKey, existingDescriptor);
+ return true;
+ }
+ return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
+}
+
+$export($export.S, 'Reflect', {set: set});
+},{"./_an-object":9,"./_export":31,"./_has":38,"./_is-object":48,"./_object-dp":66,"./_object-gopd":68,"./_object-gpo":72,"./_property-desc":83}],209:[function(require,module,exports){
+var global = require('./_global')
+ , inheritIfRequired = require('./_inherit-if-required')
+ , dP = require('./_object-dp').f
+ , gOPN = require('./_object-gopn').f
+ , isRegExp = require('./_is-regexp')
+ , $flags = require('./_flags')
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
+ // "new" creates a new object, old webkit buggy here
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
+
+if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){
+ re2[require('./_wks')('match')] = false;
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
+ return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
+}))){
+ $RegExp = function RegExp(p, f){
+ var tiRE = this instanceof $RegExp
+ , piRE = isRegExp(p)
+ , fiU = f === undefined;
+ return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
+ : inheritIfRequired(CORRECT_NEW
+ ? new Base(piRE && !fiU ? p.source : p, f)
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
+ , tiRE ? this : proto, $RegExp);
+ };
+ var proxy = function(key){
+ key in $RegExp || dP($RegExp, key, {
+ configurable: true,
+ get: function(){ return Base[key]; },
+ set: function(it){ Base[key] = it; }
+ });
+ };
+ for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ proto.constructor = $RegExp;
+ $RegExp.prototype = proto;
+ require('./_redefine')(global, 'RegExp', $RegExp);
+}
+
+require('./_set-species')('RegExp');
+},{"./_descriptors":27,"./_fails":33,"./_flags":35,"./_global":37,"./_inherit-if-required":42,"./_is-regexp":49,"./_object-dp":66,"./_object-gopn":70,"./_redefine":85,"./_set-species":89,"./_wks":113}],210:[function(require,module,exports){
+// 21.2.5.3 get RegExp.prototype.flags()
+if(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', {
+ configurable: true,
+ get: require('./_flags')
+});
+},{"./_descriptors":27,"./_flags":35,"./_object-dp":66}],211:[function(require,module,exports){
+// @@match logic
+require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
+ // 21.1.3.11 String.prototype.match(regexp)
+ return [function match(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[MATCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
+ }, $match];
+});
+},{"./_fix-re-wks":34}],212:[function(require,module,exports){
+// @@replace logic
+require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
+ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
+ return [function replace(searchValue, replaceValue){
+ 'use strict';
+ var O = defined(this)
+ , fn = searchValue == undefined ? undefined : searchValue[REPLACE];
+ return fn !== undefined
+ ? fn.call(searchValue, O, replaceValue)
+ : $replace.call(String(O), searchValue, replaceValue);
+ }, $replace];
+});
+},{"./_fix-re-wks":34}],213:[function(require,module,exports){
+// @@search logic
+require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
+ // 21.1.3.15 String.prototype.search(regexp)
+ return [function search(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[SEARCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+ }, $search];
+});
+},{"./_fix-re-wks":34}],214:[function(require,module,exports){
+// @@split logic
+require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
+ 'use strict';
+ var isRegExp = require('./_is-regexp')
+ , _split = $split
+ , $push = [].push
+ , $SPLIT = 'split'
+ , LENGTH = 'length'
+ , LAST_INDEX = 'lastIndex';
+ if(
+ 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
+ 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
+ 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
+ '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
+ '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
+ ''[$SPLIT](/.?/)[LENGTH]
+ ){
+ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
+ // based on es5-shim implementation, need to rework it
+ $split = function(separator, limit){
+ var string = String(this);
+ if(separator === undefined && limit === 0)return [];
+ // If `separator` is not a regex, use native split
+ if(!isRegExp(separator))return _split.call(string, separator, limit);
+ var output = [];
+ var flags = (separator.ignoreCase ? 'i' : '') +
+ (separator.multiline ? 'm' : '') +
+ (separator.unicode ? 'u' : '') +
+ (separator.sticky ? 'y' : '');
+ var lastLastIndex = 0;
+ var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
+ // Make `global` and avoid `lastIndex` issues by working with a copy
+ var separatorCopy = new RegExp(separator.source, flags + 'g');
+ var separator2, match, lastIndex, lastLength, i;
+ // Doesn't need flags gy, but they don't hurt
+ if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
+ while(match = separatorCopy.exec(string)){
+ // `separatorCopy.lastIndex` is not reliable cross-browser
+ lastIndex = match.index + match[0][LENGTH];
+ if(lastIndex > lastLastIndex){
+ output.push(string.slice(lastLastIndex, match.index));
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
+ if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
+ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
+ });
+ if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
+ lastLength = match[0][LENGTH];
+ lastLastIndex = lastIndex;
+ if(output[LENGTH] >= splitLimit)break;
+ }
+ if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
+ }
+ if(lastLastIndex === string[LENGTH]){
+ if(lastLength || !separatorCopy.test(''))output.push('');
+ } else output.push(string.slice(lastLastIndex));
+ return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
+ };
+ // Chakra, V8
+ } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
+ $split = function(separator, limit){
+ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
+ };
+ }
+ // 21.1.3.17 String.prototype.split(separator, limit)
+ return [function split(separator, limit){
+ var O = defined(this)
+ , fn = separator == undefined ? undefined : separator[SPLIT];
+ return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
+ }, $split];
+});
+},{"./_fix-re-wks":34,"./_is-regexp":49}],215:[function(require,module,exports){
+'use strict';
+require('./es6.regexp.flags');
+var anObject = require('./_an-object')
+ , $flags = require('./_flags')
+ , DESCRIPTORS = require('./_descriptors')
+ , TO_STRING = 'toString'
+ , $toString = /./[TO_STRING];
+
+var define = function(fn){
+ require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);
+};
+
+// 21.2.5.14 RegExp.prototype.toString()
+if(require('./_fails')(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
+ define(function toString(){
+ var R = anObject(this);
+ return '/'.concat(R.source, '/',
+ 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
+ });
+// FF44- RegExp#toString has a wrong name
+} else if($toString.name != TO_STRING){
+ define(function toString(){
+ return $toString.call(this);
+ });
+}
+},{"./_an-object":9,"./_descriptors":27,"./_fails":33,"./_flags":35,"./_redefine":85,"./es6.regexp.flags":210}],216:[function(require,module,exports){
+'use strict';
+var strong = require('./_collection-strong');
+
+// 23.2 Set Objects
+module.exports = require('./_collection')('Set', function(get){
+ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value){
+ return strong.def(this, value = value === 0 ? 0 : value, value);
+ }
+}, strong);
+},{"./_collection":23,"./_collection-strong":20}],217:[function(require,module,exports){
+'use strict';
+// B.2.3.2 String.prototype.anchor(name)
+require('./_string-html')('anchor', function(createHTML){
+ return function anchor(name){
+ return createHTML(this, 'a', 'name', name);
+ }
+});
+},{"./_string-html":97}],218:[function(require,module,exports){
+'use strict';
+// B.2.3.3 String.prototype.big()
+require('./_string-html')('big', function(createHTML){
+ return function big(){
+ return createHTML(this, 'big', '', '');
+ }
+});
+},{"./_string-html":97}],219:[function(require,module,exports){
+'use strict';
+// B.2.3.4 String.prototype.blink()
+require('./_string-html')('blink', function(createHTML){
+ return function blink(){
+ return createHTML(this, 'blink', '', '');
+ }
+});
+},{"./_string-html":97}],220:[function(require,module,exports){
+'use strict';
+// B.2.3.5 String.prototype.bold()
+require('./_string-html')('bold', function(createHTML){
+ return function bold(){
+ return createHTML(this, 'b', '', '');
+ }
+});
+},{"./_string-html":97}],221:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $at = require('./_string-at')(false);
+$export($export.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: function codePointAt(pos){
+ return $at(this, pos);
+ }
+});
+},{"./_export":31,"./_string-at":95}],222:[function(require,module,exports){
+// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
+'use strict';
+var $export = require('./_export')
+ , toLength = require('./_to-length')
+ , context = require('./_string-context')
+ , ENDS_WITH = 'endsWith'
+ , $endsWith = ''[ENDS_WITH];
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {
+ endsWith: function endsWith(searchString /*, endPosition = @length */){
+ var that = context(this, searchString, ENDS_WITH)
+ , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , len = toLength(that.length)
+ , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
+ , search = String(searchString);
+ return $endsWith
+ ? $endsWith.call(that, search, end)
+ : that.slice(end - search.length, end) === search;
+ }
+});
+},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96,"./_to-length":106}],223:[function(require,module,exports){
+'use strict';
+// B.2.3.6 String.prototype.fixed()
+require('./_string-html')('fixed', function(createHTML){
+ return function fixed(){
+ return createHTML(this, 'tt', '', '');
+ }
+});
+},{"./_string-html":97}],224:[function(require,module,exports){
+'use strict';
+// B.2.3.7 String.prototype.fontcolor(color)
+require('./_string-html')('fontcolor', function(createHTML){
+ return function fontcolor(color){
+ return createHTML(this, 'font', 'color', color);
+ }
+});
+},{"./_string-html":97}],225:[function(require,module,exports){
+'use strict';
+// B.2.3.8 String.prototype.fontsize(size)
+require('./_string-html')('fontsize', function(createHTML){
+ return function fontsize(size){
+ return createHTML(this, 'font', 'size', size);
+ }
+});
+},{"./_string-html":97}],226:[function(require,module,exports){
+var $export = require('./_export')
+ , toIndex = require('./_to-index')
+ , fromCharCode = String.fromCharCode
+ , $fromCodePoint = String.fromCodePoint;
+
+// length should be 1, old FF problem
+$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
+ var res = []
+ , aLen = arguments.length
+ , i = 0
+ , code;
+ while(aLen > i){
+ code = +arguments[i++];
+ if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+});
+},{"./_export":31,"./_to-index":103}],227:[function(require,module,exports){
+// 21.1.3.7 String.prototype.includes(searchString, position = 0)
+'use strict';
+var $export = require('./_export')
+ , context = require('./_string-context')
+ , INCLUDES = 'includes';
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
+ includes: function includes(searchString /*, position = 0 */){
+ return !!~context(this, searchString, INCLUDES)
+ .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96}],228:[function(require,module,exports){
+'use strict';
+// B.2.3.9 String.prototype.italics()
+require('./_string-html')('italics', function(createHTML){
+ return function italics(){
+ return createHTML(this, 'i', '', '');
+ }
+});
+},{"./_string-html":97}],229:[function(require,module,exports){
+'use strict';
+var $at = require('./_string-at')(true);
+
+// 21.1.3.27 String.prototype[@@iterator]()
+require('./_iter-define')(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+// 21.1.5.2.1 %StringIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+});
+},{"./_iter-define":52,"./_string-at":95}],230:[function(require,module,exports){
+'use strict';
+// B.2.3.10 String.prototype.link(url)
+require('./_string-html')('link', function(createHTML){
+ return function link(url){
+ return createHTML(this, 'a', 'href', url);
+ }
+});
+},{"./_string-html":97}],231:[function(require,module,exports){
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , toLength = require('./_to-length');
+
+$export($export.S, 'String', {
+ // 21.1.2.4 String.raw(callSite, ...substitutions)
+ raw: function raw(callSite){
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , aLen = arguments.length
+ , res = []
+ , i = 0;
+ while(len > i){
+ res.push(String(tpl[i++]));
+ if(i < aLen)res.push(String(arguments[i]));
+ } return res.join('');
+ }
+});
+},{"./_export":31,"./_to-iobject":105,"./_to-length":106}],232:[function(require,module,exports){
+var $export = require('./_export');
+
+$export($export.P, 'String', {
+ // 21.1.3.13 String.prototype.repeat(count)
+ repeat: require('./_string-repeat')
+});
+},{"./_export":31,"./_string-repeat":99}],233:[function(require,module,exports){
+'use strict';
+// B.2.3.11 String.prototype.small()
+require('./_string-html')('small', function(createHTML){
+ return function small(){
+ return createHTML(this, 'small', '', '');
+ }
+});
+},{"./_string-html":97}],234:[function(require,module,exports){
+// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
+'use strict';
+var $export = require('./_export')
+ , toLength = require('./_to-length')
+ , context = require('./_string-context')
+ , STARTS_WITH = 'startsWith'
+ , $startsWith = ''[STARTS_WITH];
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {
+ startsWith: function startsWith(searchString /*, position = 0 */){
+ var that = context(this, searchString, STARTS_WITH)
+ , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , search = String(searchString);
+ return $startsWith
+ ? $startsWith.call(that, search, index)
+ : that.slice(index, index + search.length) === search;
+ }
+});
+},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96,"./_to-length":106}],235:[function(require,module,exports){
+'use strict';
+// B.2.3.12 String.prototype.strike()
+require('./_string-html')('strike', function(createHTML){
+ return function strike(){
+ return createHTML(this, 'strike', '', '');
+ }
+});
+},{"./_string-html":97}],236:[function(require,module,exports){
+'use strict';
+// B.2.3.13 String.prototype.sub()
+require('./_string-html')('sub', function(createHTML){
+ return function sub(){
+ return createHTML(this, 'sub', '', '');
+ }
+});
+},{"./_string-html":97}],237:[function(require,module,exports){
+'use strict';
+// B.2.3.14 String.prototype.sup()
+require('./_string-html')('sup', function(createHTML){
+ return function sup(){
+ return createHTML(this, 'sup', '', '');
+ }
+});
+},{"./_string-html":97}],238:[function(require,module,exports){
+'use strict';
+// 21.1.3.25 String.prototype.trim()
+require('./_string-trim')('trim', function($trim){
+ return function trim(){
+ return $trim(this, 3);
+ };
+});
+},{"./_string-trim":100}],239:[function(require,module,exports){
+'use strict';
+// ECMAScript 6 symbols shim
+var global = require('./_global')
+ , core = require('./_core')
+ , has = require('./_has')
+ , DESCRIPTORS = require('./_descriptors')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , META = require('./_meta').KEY
+ , $fails = require('./_fails')
+ , shared = require('./_shared')
+ , setToStringTag = require('./_set-to-string-tag')
+ , uid = require('./_uid')
+ , wks = require('./_wks')
+ , keyOf = require('./_keyof')
+ , enumKeys = require('./_enum-keys')
+ , isArray = require('./_is-array')
+ , anObject = require('./_an-object')
+ , toIObject = require('./_to-iobject')
+ , toPrimitive = require('./_to-primitive')
+ , createDesc = require('./_property-desc')
+ , _create = require('./_object-create')
+ , gOPNExt = require('./_object-gopn-ext')
+ , $GOPD = require('./_object-gopd')
+ , $DP = require('./_object-dp')
+ , gOPD = $GOPD.f
+ , dP = $DP.f
+ , gOPN = gOPNExt.f
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = {}.propertyIsEnumerable
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , ObjectProto = Object.prototype
+ , USE_NATIVE = typeof $Symbol == 'function'
+ , QObject = global.QObject;
+
+// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(dP({}, 'a', {
+ get: function(){ return dP(this, 'a', {value: 7}).a; }
+ })).a != 7;
+}) ? function(it, key, D){
+ var protoDesc = gOPD(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ dP(it, key, D);
+ if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
+} : dP;
+
+var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
+};
+
+var isSymbol = function(it){
+ return typeof it == 'symbol';
+};
+
+var $defineProperty = function defineProperty(it, key, D){
+ anObject(it);
+ key = toPrimitive(key, true);
+ anObject(D);
+ if(has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return dP(it, key, D);
+};
+var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+};
+var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+};
+var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key = toPrimitive(key, true));
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+};
+var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+};
+var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
+ return result;
+};
+var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+};
+var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , replacer, $replacer;
+ while(arguments.length > i)args.push(arguments[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+};
+var BUGGY_JSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+});
+
+// 19.4.1.1 Symbol([description])
+if(!USE_NATIVE){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
+ };
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
+
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
+
+ $GOPD.f = $getOwnPropertyDescriptor;
+ $DP.f = $defineProperty;
+ require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
+ require('./_object-pie').f = $propertyIsEnumerable
+ require('./_object-gops').f = $getOwnPropertySymbols;
+
+ if(DESCRIPTORS && !require('./_library')){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+}
+
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
+
+// 19.4.2.2 Symbol.hasInstance
+// 19.4.2.3 Symbol.isConcatSpreadable
+// 19.4.2.4 Symbol.iterator
+// 19.4.2.6 Symbol.match
+// 19.4.2.8 Symbol.replace
+// 19.4.2.9 Symbol.search
+// 19.4.2.10 Symbol.species
+// 19.4.2.11 Symbol.split
+// 19.4.2.12 Symbol.toPrimitive
+// 19.4.2.13 Symbol.toStringTag
+// 19.4.2.14 Symbol.unscopables
+for(var symbols = (
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
+).split(','), i = 0; symbols.length > i; ){
+ var key = symbols[i++]
+ , Wrapper = core.Symbol
+ , sym = wks(key);
+ if(!(key in Wrapper))dP(Wrapper, key, {value: USE_NATIVE ? sym : wrap(sym)});
+};
+
+// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
+if(!QObject || !QObject.prototype || !QObject.prototype.findChild)setter = true;
+
+$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+});
+
+$export($export.S + $export.F * !USE_NATIVE, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+});
+
+// 24.3.2 JSON.stringify(value [, replacer [, space]])
+$JSON && $export($export.S + $export.F * (!USE_NATIVE || BUGGY_JSON), 'JSON', {stringify: $stringify});
+
+// 19.4.3.5 Symbol.prototype[@@toStringTag]
+setToStringTag($Symbol, 'Symbol');
+// 20.2.1.9 Math[@@toStringTag]
+setToStringTag(Math, 'Math', true);
+// 24.3.3 JSON[@@toStringTag]
+setToStringTag(global.JSON, 'JSON', true);
+},{"./_an-object":9,"./_core":24,"./_descriptors":27,"./_enum-keys":30,"./_export":31,"./_fails":33,"./_global":37,"./_has":38,"./_is-array":46,"./_keyof":56,"./_library":57,"./_meta":61,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_object-gopn-ext":69,"./_object-gops":71,"./_object-pie":75,"./_property-desc":83,"./_redefine":85,"./_set-to-string-tag":90,"./_shared":92,"./_to-iobject":105,"./_to-primitive":108,"./_uid":112,"./_wks":113}],240:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $typed = require('./_typed')
+ , buffer = require('./_typed-buffer')
+ , anObject = require('./_an-object')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length')
+ , isObject = require('./_is-object')
+ , TYPED_ARRAY = require('./_wks')('typed_array')
+ , ArrayBuffer = require('./_global').ArrayBuffer
+ , speciesConstructor = require('./_species-constructor')
+ , $ArrayBuffer = buffer.ArrayBuffer
+ , $DataView = buffer.DataView
+ , $isView = $typed.ABV && ArrayBuffer.isView
+ , $slice = $ArrayBuffer.prototype.slice
+ , VIEW = $typed.VIEW
+ , ARRAY_BUFFER = 'ArrayBuffer';
+
+$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
+
+$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
+ // 24.1.3.1 ArrayBuffer.isView(arg)
+ isView: function isView(it){
+ return $isView && $isView(it) || isObject(it) && VIEW in it;
+ }
+});
+
+$export($export.P + $export.U + $export.F * require('./_fails')(function(){
+ return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
+}), ARRAY_BUFFER, {
+ // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
+ slice: function slice(start, end){
+ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
+ var len = anObject(this).byteLength
+ , first = toIndex(start, len)
+ , final = toIndex(end === undefined ? len : end, len)
+ , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
+ , viewS = new $DataView(this)
+ , viewT = new $DataView(result)
+ , index = 0;
+ while(first < final){
+ viewT.setUint8(index++, viewS.getUint8(first++));
+ } return result;
+ }
+});
+
+require('./_set-species')(ARRAY_BUFFER);
+},{"./_an-object":9,"./_export":31,"./_fails":33,"./_global":37,"./_is-object":48,"./_set-species":89,"./_species-constructor":93,"./_to-index":103,"./_to-length":106,"./_typed":111,"./_typed-buffer":110,"./_wks":113}],241:[function(require,module,exports){
+var $export = require('./_export');
+$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
+ DataView: require('./_typed-buffer').DataView
+});
+},{"./_export":31,"./_typed":111,"./_typed-buffer":110}],242:[function(require,module,exports){
+require('./_typed-array')('Float32', 4, function(init){
+ return function Float32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],243:[function(require,module,exports){
+require('./_typed-array')('Float64', 8, function(init){
+ return function Float64Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],244:[function(require,module,exports){
+require('./_typed-array')('Int16', 2, function(init){
+ return function Int16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],245:[function(require,module,exports){
+require('./_typed-array')('Int32', 4, function(init){
+ return function Int32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],246:[function(require,module,exports){
+require('./_typed-array')('Int8', 1, function(init){
+ return function Int8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],247:[function(require,module,exports){
+require('./_typed-array')('Uint16', 2, function(init){
+ return function Uint16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],248:[function(require,module,exports){
+require('./_typed-array')('Uint32', 4, function(init){
+ return function Uint32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],249:[function(require,module,exports){
+require('./_typed-array')('Uint8', 1, function(init){
+ return function Uint8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":109}],250:[function(require,module,exports){
+require('./_typed-array')('Uint8', 1, function(init){
+ return function Uint8ClampedArray(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+}, true);
+},{"./_typed-array":109}],251:[function(require,module,exports){
+'use strict';
+var each = require('./_array-methods')(0)
+ , redefine = require('./_redefine')
+ , meta = require('./_meta')
+ , assign = require('./_object-assign')
+ , weak = require('./_collection-weak')
+ , isObject = require('./_is-object')
+ , has = require('./_has')
+ , getWeak = meta.getWeak
+ , isExtensible = Object.isExtensible
+ , uncaughtFrozenStore = weak.ufstore
+ , tmp = {}
+ , InternalMap;
+
+var wrapper = function(get){
+ return function WeakMap(){
+ return get(this, arguments.length > 0 ? arguments[0] : undefined);
+ };
+};
+
+var methods = {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key){
+ if(isObject(key)){
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).get(key);
+ return data ? data[this._i] : undefined;
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value){
+ return weak.def(this, key, value);
+ }
+};
+
+// 23.3 WeakMap Objects
+var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true);
+
+// IE11 WeakMap frozen keys fix
+if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
+ InternalMap = weak.getConstructor(wrapper);
+ assign(InternalMap.prototype, methods);
+ meta.NEED = true;
+ each(['delete', 'has', 'get', 'set'], function(key){
+ var proto = $WeakMap.prototype
+ , method = proto[key];
+ redefine(proto, key, function(a, b){
+ // store frozen objects on internal weakmap shim
+ if(isObject(a) && !isExtensible(a)){
+ if(!this._f)this._f = new InternalMap;
+ var result = this._f[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ });
+ });
+}
+},{"./_array-methods":14,"./_collection":23,"./_collection-weak":22,"./_has":38,"./_is-object":48,"./_meta":61,"./_object-assign":64,"./_redefine":85}],252:[function(require,module,exports){
+'use strict';
+var weak = require('./_collection-weak');
+
+// 23.4 WeakSet Objects
+require('./_collection')('WeakSet', function(get){
+ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.4.3.1 WeakSet.prototype.add(value)
+ add: function add(value){
+ return weak.def(this, value, true);
+ }
+}, weak, false, true);
+},{"./_collection":23,"./_collection-weak":22}],253:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $includes = require('./_array-includes')(true);
+
+$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
+ includes: function includes(el /*, fromIndex = 0 */){
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+
+require('./_add-to-unscopables')('includes');
+},{"./_add-to-unscopables":7,"./_array-includes":13,"./_export":31}],254:[function(require,module,exports){
+// https://github.com/ljharb/proposal-is-error
+var $export = require('./_export')
+ , cof = require('./_cof');
+
+$export($export.S, 'Error', {
+ isError: function isError(it){
+ return cof(it) === 'Error';
+ }
+});
+},{"./_cof":19,"./_export":31}],255:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var $export = require('./_export');
+
+$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});
+},{"./_collection-to-json":21,"./_export":31}],256:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ iaddh: function iaddh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
+ }
+});
+},{"./_export":31}],257:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ imulh: function imulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >> 16
+ , v1 = $v >> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
+ }
+});
+},{"./_export":31}],258:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ isubh: function isubh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
+ }
+});
+},{"./_export":31}],259:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ umulh: function umulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >>> 16
+ , v1 = $v >>> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
+ }
+});
+},{"./_export":31}],260:[function(require,module,exports){
+// http://goo.gl/XkBrjD
+var $export = require('./_export')
+ , $entries = require('./_object-to-array')(true);
+
+$export($export.S, 'Object', {
+ entries: function entries(it){
+ return $entries(it);
+ }
+});
+},{"./_export":31,"./_object-to-array":77}],261:[function(require,module,exports){
+// https://gist.github.com/WebReflection/9353781
+var $export = require('./_export')
+ , ownKeys = require('./_own-keys')
+ , toIObject = require('./_to-iobject')
+ , createDesc = require('./_property-desc')
+ , gOPD = require('./_object-gopd')
+ , dP = require('./_object-dp');
+
+$export($export.S, 'Object', {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
+ var O = toIObject(object)
+ , getDesc = gOPD.f
+ , keys = ownKeys(O)
+ , result = {}
+ , i = 0
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)dP.f(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
+ }
+});
+},{"./_export":31,"./_object-dp":66,"./_object-gopd":68,"./_own-keys":78,"./_property-desc":83,"./_to-iobject":105}],262:[function(require,module,exports){
+// http://goo.gl/XkBrjD
+var $export = require('./_export')
+ , $values = require('./_object-to-array')(false);
+
+$export($export.S, 'Object', {
+ values: function values(it){
+ return $values(it);
+ }
+});
+},{"./_export":31,"./_object-to-array":77}],263:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
+ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
+}});
+},{"./_an-object":9,"./_metadata":62}],264:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , toMetaKey = metadata.key
+ , getOrCreateMetadataMap = metadata.map
+ , store = metadata.store;
+
+metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
+ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
+ , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
+ if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
+ if(metadataMap.size)return true;
+ var targetMetadata = store.get(target);
+ targetMetadata['delete'](targetKey);
+ return !!targetMetadata.size || store['delete'](target);
+}});
+},{"./_an-object":9,"./_metadata":62}],265:[function(require,module,exports){
+var Set = require('./es6.set')
+ , from = require('./_array-from-iterable')
+ , metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+var ordinaryMetadataKeys = function(O, P){
+ var oKeys = ordinaryOwnMetadataKeys(O, P)
+ , parent = getPrototypeOf(O);
+ if(parent === null)return oKeys;
+ var pKeys = ordinaryMetadataKeys(parent, P);
+ return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
+};
+
+metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
+ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+}});
+},{"./_an-object":9,"./_array-from-iterable":12,"./_metadata":62,"./_object-gpo":72,"./es6.set":216}],266:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryHasOwnMetadata = metadata.has
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+var ordinaryGetMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
+};
+
+metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":9,"./_metadata":62,"./_object-gpo":72}],267:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
+ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+}});
+},{"./_an-object":9,"./_metadata":62}],268:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":9,"./_metadata":62}],269:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+var ordinaryHasMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return true;
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
+};
+
+metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":9,"./_metadata":62,"./_object-gpo":72}],270:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":9,"./_metadata":62}],271:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+metadata.exp({metadata: function metadata(metadataKey, metadataValue){
+ return function decorator(target, targetKey){
+ ordinaryDefineOwnMetadata(
+ metadataKey, metadataValue,
+ (targetKey !== undefined ? anObject : aFunction)(target),
+ toMetaKey(targetKey)
+ );
+ };
+}});
+},{"./_a-function":5,"./_an-object":9,"./_metadata":62}],272:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var $export = require('./_export');
+
+$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});
+},{"./_collection-to-json":21,"./_export":31}],273:[function(require,module,exports){
+'use strict';
+// https://github.com/mathiasbynens/String.prototype.at
+var $export = require('./_export')
+ , $at = require('./_string-at')(true);
+
+$export($export.P, 'String', {
+ at: function at(pos){
+ return $at(this, pos);
+ }
+});
+},{"./_export":31,"./_string-at":95}],274:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $pad = require('./_string-pad');
+
+$export($export.P, 'String', {
+ padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
+ }
+});
+},{"./_export":31,"./_string-pad":98}],275:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $pad = require('./_string-pad');
+
+$export($export.P, 'String', {
+ padStart: function padStart(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
+ }
+});
+},{"./_export":31,"./_string-pad":98}],276:[function(require,module,exports){
+'use strict';
+// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+require('./_string-trim')('trimLeft', function($trim){
+ return function trimLeft(){
+ return $trim(this, 1);
+ };
+}, 'trimStart');
+},{"./_string-trim":100}],277:[function(require,module,exports){
+'use strict';
+// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+require('./_string-trim')('trimRight', function($trim){
+ return function trimRight(){
+ return $trim(this, 2);
+ };
+}, 'trimEnd');
+},{"./_string-trim":100}],278:[function(require,module,exports){
+// https://github.com/ljharb/proposal-global
+var $export = require('./_export');
+
+$export($export.S, 'System', {global: require('./_global')});
+},{"./_export":31,"./_global":37}],279:[function(require,module,exports){
+var $iterators = require('./es6.array.iterator')
+ , redefine = require('./_redefine')
+ , global = require('./_global')
+ , hide = require('./_hide')
+ , Iterators = require('./_iterators')
+ , wks = require('./_wks')
+ , ITERATOR = wks('iterator')
+ , TO_STRING_TAG = wks('toStringTag')
+ , ArrayValues = Iterators.Array;
+
+for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype
+ , key;
+ if(proto){
+ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
+ if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ Iterators[NAME] = ArrayValues;
+ for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
+ }
+}
+},{"./_global":37,"./_hide":39,"./_iterators":55,"./_redefine":85,"./_wks":113,"./es6.array.iterator":127}],280:[function(require,module,exports){
+var $export = require('./_export')
+ , $task = require('./_task');
+$export($export.G + $export.B, {
+ setImmediate: $task.set,
+ clearImmediate: $task.clear
+});
+},{"./_export":31,"./_task":102}],281:[function(require,module,exports){
+// ie9- setTimeout & setInterval additional parameters fix
+var global = require('./_global')
+ , $export = require('./_export')
+ , invoke = require('./_invoke')
+ , partial = require('./_partial')
+ , navigator = global.navigator
+ , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+var wrap = function(set){
+ return MSIE ? function(fn, time /*, ...args */){
+ return set(invoke(
+ partial,
+ [].slice.call(arguments, 2),
+ typeof fn == 'function' ? fn : Function(fn)
+ ), time);
+ } : set;
+};
+$export($export.G + $export.B + $export.F * MSIE, {
+ setTimeout: wrap(global.setTimeout),
+ setInterval: wrap(global.setInterval)
+});
+},{"./_export":31,"./_global":37,"./_invoke":43,"./_partial":81}],282:[function(require,module,exports){
+require('./modules/es6.symbol');
+require('./modules/es6.object.create');
+require('./modules/es6.object.define-property');
+require('./modules/es6.object.define-properties');
+require('./modules/es6.object.get-own-property-descriptor');
+require('./modules/es6.object.get-prototype-of');
+require('./modules/es6.object.keys');
+require('./modules/es6.object.get-own-property-names');
+require('./modules/es6.object.freeze');
+require('./modules/es6.object.seal');
+require('./modules/es6.object.prevent-extensions');
+require('./modules/es6.object.is-frozen');
+require('./modules/es6.object.is-sealed');
+require('./modules/es6.object.is-extensible');
+require('./modules/es6.object.assign');
+require('./modules/es6.object.is');
+require('./modules/es6.object.set-prototype-of');
+require('./modules/es6.object.to-string');
+require('./modules/es6.function.bind');
+require('./modules/es6.function.name');
+require('./modules/es6.function.has-instance');
+require('./modules/es6.parse-int');
+require('./modules/es6.parse-float');
+require('./modules/es6.number.constructor');
+require('./modules/es6.number.to-fixed');
+require('./modules/es6.number.to-precision');
+require('./modules/es6.number.epsilon');
+require('./modules/es6.number.is-finite');
+require('./modules/es6.number.is-integer');
+require('./modules/es6.number.is-nan');
+require('./modules/es6.number.is-safe-integer');
+require('./modules/es6.number.max-safe-integer');
+require('./modules/es6.number.min-safe-integer');
+require('./modules/es6.number.parse-float');
+require('./modules/es6.number.parse-int');
+require('./modules/es6.math.acosh');
+require('./modules/es6.math.asinh');
+require('./modules/es6.math.atanh');
+require('./modules/es6.math.cbrt');
+require('./modules/es6.math.clz32');
+require('./modules/es6.math.cosh');
+require('./modules/es6.math.expm1');
+require('./modules/es6.math.fround');
+require('./modules/es6.math.hypot');
+require('./modules/es6.math.imul');
+require('./modules/es6.math.log10');
+require('./modules/es6.math.log1p');
+require('./modules/es6.math.log2');
+require('./modules/es6.math.sign');
+require('./modules/es6.math.sinh');
+require('./modules/es6.math.tanh');
+require('./modules/es6.math.trunc');
+require('./modules/es6.string.from-code-point');
+require('./modules/es6.string.raw');
+require('./modules/es6.string.trim');
+require('./modules/es6.string.iterator');
+require('./modules/es6.string.code-point-at');
+require('./modules/es6.string.ends-with');
+require('./modules/es6.string.includes');
+require('./modules/es6.string.repeat');
+require('./modules/es6.string.starts-with');
+require('./modules/es6.string.anchor');
+require('./modules/es6.string.big');
+require('./modules/es6.string.blink');
+require('./modules/es6.string.bold');
+require('./modules/es6.string.fixed');
+require('./modules/es6.string.fontcolor');
+require('./modules/es6.string.fontsize');
+require('./modules/es6.string.italics');
+require('./modules/es6.string.link');
+require('./modules/es6.string.small');
+require('./modules/es6.string.strike');
+require('./modules/es6.string.sub');
+require('./modules/es6.string.sup');
+require('./modules/es6.date.now');
+require('./modules/es6.date.to-string');
+require('./modules/es6.date.to-iso-string');
+require('./modules/es6.date.to-json');
+require('./modules/es6.array.is-array');
+require('./modules/es6.array.from');
+require('./modules/es6.array.of');
+require('./modules/es6.array.join');
+require('./modules/es6.array.slice');
+require('./modules/es6.array.sort');
+require('./modules/es6.array.for-each');
+require('./modules/es6.array.map');
+require('./modules/es6.array.filter');
+require('./modules/es6.array.some');
+require('./modules/es6.array.every');
+require('./modules/es6.array.reduce');
+require('./modules/es6.array.reduce-right');
+require('./modules/es6.array.index-of');
+require('./modules/es6.array.last-index-of');
+require('./modules/es6.array.copy-within');
+require('./modules/es6.array.fill');
+require('./modules/es6.array.find');
+require('./modules/es6.array.find-index');
+require('./modules/es6.array.species');
+require('./modules/es6.array.iterator');
+require('./modules/es6.regexp.constructor');
+require('./modules/es6.regexp.to-string');
+require('./modules/es6.regexp.flags');
+require('./modules/es6.regexp.match');
+require('./modules/es6.regexp.replace');
+require('./modules/es6.regexp.search');
+require('./modules/es6.regexp.split');
+require('./modules/es6.promise');
+require('./modules/es6.map');
+require('./modules/es6.set');
+require('./modules/es6.weak-map');
+require('./modules/es6.weak-set');
+require('./modules/es6.typed.array-buffer');
+require('./modules/es6.typed.data-view');
+require('./modules/es6.typed.int8-array');
+require('./modules/es6.typed.uint8-array');
+require('./modules/es6.typed.uint8-clamped-array');
+require('./modules/es6.typed.int16-array');
+require('./modules/es6.typed.uint16-array');
+require('./modules/es6.typed.int32-array');
+require('./modules/es6.typed.uint32-array');
+require('./modules/es6.typed.float32-array');
+require('./modules/es6.typed.float64-array');
+require('./modules/es6.reflect.apply');
+require('./modules/es6.reflect.construct');
+require('./modules/es6.reflect.define-property');
+require('./modules/es6.reflect.delete-property');
+require('./modules/es6.reflect.enumerate');
+require('./modules/es6.reflect.get');
+require('./modules/es6.reflect.get-own-property-descriptor');
+require('./modules/es6.reflect.get-prototype-of');
+require('./modules/es6.reflect.has');
+require('./modules/es6.reflect.is-extensible');
+require('./modules/es6.reflect.own-keys');
+require('./modules/es6.reflect.prevent-extensions');
+require('./modules/es6.reflect.set');
+require('./modules/es6.reflect.set-prototype-of');
+require('./modules/es7.array.includes');
+require('./modules/es7.string.at');
+require('./modules/es7.string.pad-start');
+require('./modules/es7.string.pad-end');
+require('./modules/es7.string.trim-left');
+require('./modules/es7.string.trim-right');
+require('./modules/es7.object.get-own-property-descriptors');
+require('./modules/es7.object.values');
+require('./modules/es7.object.entries');
+require('./modules/es7.map.to-json');
+require('./modules/es7.set.to-json');
+require('./modules/es7.system.global');
+require('./modules/es7.error.is-error');
+require('./modules/es7.math.iaddh');
+require('./modules/es7.math.isubh');
+require('./modules/es7.math.imulh');
+require('./modules/es7.math.umulh');
+require('./modules/es7.reflect.define-metadata');
+require('./modules/es7.reflect.delete-metadata');
+require('./modules/es7.reflect.get-metadata');
+require('./modules/es7.reflect.get-metadata-keys');
+require('./modules/es7.reflect.get-own-metadata');
+require('./modules/es7.reflect.get-own-metadata-keys');
+require('./modules/es7.reflect.has-metadata');
+require('./modules/es7.reflect.has-own-metadata');
+require('./modules/es7.reflect.metadata');
+require('./modules/web.timers');
+require('./modules/web.immediate');
+require('./modules/web.dom.iterable');
+module.exports = require('./modules/_core');
+},{"./modules/_core":24,"./modules/es6.array.copy-within":117,"./modules/es6.array.every":118,"./modules/es6.array.fill":119,"./modules/es6.array.filter":120,"./modules/es6.array.find":122,"./modules/es6.array.find-index":121,"./modules/es6.array.for-each":123,"./modules/es6.array.from":124,"./modules/es6.array.index-of":125,"./modules/es6.array.is-array":126,"./modules/es6.array.iterator":127,"./modules/es6.array.join":128,"./modules/es6.array.last-index-of":129,"./modules/es6.array.map":130,"./modules/es6.array.of":131,"./modules/es6.array.reduce":133,"./modules/es6.array.reduce-right":132,"./modules/es6.array.slice":134,"./modules/es6.array.some":135,"./modules/es6.array.sort":136,"./modules/es6.array.species":137,"./modules/es6.date.now":138,"./modules/es6.date.to-iso-string":139,"./modules/es6.date.to-json":140,"./modules/es6.date.to-string":141,"./modules/es6.function.bind":142,"./modules/es6.function.has-instance":143,"./modules/es6.function.name":144,"./modules/es6.map":145,"./modules/es6.math.acosh":146,"./modules/es6.math.asinh":147,"./modules/es6.math.atanh":148,"./modules/es6.math.cbrt":149,"./modules/es6.math.clz32":150,"./modules/es6.math.cosh":151,"./modules/es6.math.expm1":152,"./modules/es6.math.fround":153,"./modules/es6.math.hypot":154,"./modules/es6.math.imul":155,"./modules/es6.math.log10":156,"./modules/es6.math.log1p":157,"./modules/es6.math.log2":158,"./modules/es6.math.sign":159,"./modules/es6.math.sinh":160,"./modules/es6.math.tanh":161,"./modules/es6.math.trunc":162,"./modules/es6.number.constructor":163,"./modules/es6.number.epsilon":164,"./modules/es6.number.is-finite":165,"./modules/es6.number.is-integer":166,"./modules/es6.number.is-nan":167,"./modules/es6.number.is-safe-integer":168,"./modules/es6.number.max-safe-integer":169,"./modules/es6.number.min-safe-integer":170,"./modules/es6.number.parse-float":171,"./modules/es6.number.parse-int":172,"./modules/es6.number.to-fixed":173,"./modules/es6.number.to-precision":174,"./modules/es6.object.assign":175,"./modules/es6.object.create":176,"./modules/es6.object.define-properties":177,"./modules/es6.object.define-property":178,"./modules/es6.object.freeze":179,"./modules/es6.object.get-own-property-descriptor":180,"./modules/es6.object.get-own-property-names":181,"./modules/es6.object.get-prototype-of":182,"./modules/es6.object.is":186,"./modules/es6.object.is-extensible":183,"./modules/es6.object.is-frozen":184,"./modules/es6.object.is-sealed":185,"./modules/es6.object.keys":187,"./modules/es6.object.prevent-extensions":188,"./modules/es6.object.seal":189,"./modules/es6.object.set-prototype-of":190,"./modules/es6.object.to-string":191,"./modules/es6.parse-float":192,"./modules/es6.parse-int":193,"./modules/es6.promise":194,"./modules/es6.reflect.apply":195,"./modules/es6.reflect.construct":196,"./modules/es6.reflect.define-property":197,"./modules/es6.reflect.delete-property":198,"./modules/es6.reflect.enumerate":199,"./modules/es6.reflect.get":202,"./modules/es6.reflect.get-own-property-descriptor":200,"./modules/es6.reflect.get-prototype-of":201,"./modules/es6.reflect.has":203,"./modules/es6.reflect.is-extensible":204,"./modules/es6.reflect.own-keys":205,"./modules/es6.reflect.prevent-extensions":206,"./modules/es6.reflect.set":208,"./modules/es6.reflect.set-prototype-of":207,"./modules/es6.regexp.constructor":209,"./modules/es6.regexp.flags":210,"./modules/es6.regexp.match":211,"./modules/es6.regexp.replace":212,"./modules/es6.regexp.search":213,"./modules/es6.regexp.split":214,"./modules/es6.regexp.to-string":215,"./modules/es6.set":216,"./modules/es6.string.anchor":217,"./modules/es6.string.big":218,"./modules/es6.string.blink":219,"./modules/es6.string.bold":220,"./modules/es6.string.code-point-at":221,"./modules/es6.string.ends-with":222,"./modules/es6.string.fixed":223,"./modules/es6.string.fontcolor":224,"./modules/es6.string.fontsize":225,"./modules/es6.string.from-code-point":226,"./modules/es6.string.includes":227,"./modules/es6.string.italics":228,"./modules/es6.string.iterator":229,"./modules/es6.string.link":230,"./modules/es6.string.raw":231,"./modules/es6.string.repeat":232,"./modules/es6.string.small":233,"./modules/es6.string.starts-with":234,"./modules/es6.string.strike":235,"./modules/es6.string.sub":236,"./modules/es6.string.sup":237,"./modules/es6.string.trim":238,"./modules/es6.symbol":239,"./modules/es6.typed.array-buffer":240,"./modules/es6.typed.data-view":241,"./modules/es6.typed.float32-array":242,"./modules/es6.typed.float64-array":243,"./modules/es6.typed.int16-array":244,"./modules/es6.typed.int32-array":245,"./modules/es6.typed.int8-array":246,"./modules/es6.typed.uint16-array":247,"./modules/es6.typed.uint32-array":248,"./modules/es6.typed.uint8-array":249,"./modules/es6.typed.uint8-clamped-array":250,"./modules/es6.weak-map":251,"./modules/es6.weak-set":252,"./modules/es7.array.includes":253,"./modules/es7.error.is-error":254,"./modules/es7.map.to-json":255,"./modules/es7.math.iaddh":256,"./modules/es7.math.imulh":257,"./modules/es7.math.isubh":258,"./modules/es7.math.umulh":259,"./modules/es7.object.entries":260,"./modules/es7.object.get-own-property-descriptors":261,"./modules/es7.object.values":262,"./modules/es7.reflect.define-metadata":263,"./modules/es7.reflect.delete-metadata":264,"./modules/es7.reflect.get-metadata":266,"./modules/es7.reflect.get-metadata-keys":265,"./modules/es7.reflect.get-own-metadata":268,"./modules/es7.reflect.get-own-metadata-keys":267,"./modules/es7.reflect.has-metadata":269,"./modules/es7.reflect.has-own-metadata":270,"./modules/es7.reflect.metadata":271,"./modules/es7.set.to-json":272,"./modules/es7.string.at":273,"./modules/es7.string.pad-end":274,"./modules/es7.string.pad-start":275,"./modules/es7.string.trim-left":276,"./modules/es7.string.trim-right":277,"./modules/es7.system.global":278,"./modules/web.dom.iterable":279,"./modules/web.immediate":280,"./modules/web.timers":281}],283:[function(require,module,exports){
+(function (process,global){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+!(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var iteratorSymbol =
+ typeof Symbol === "function" && Symbol.iterator || "@@iterator";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided, then outerFn.prototype instanceof Generator.
+ var generator = Object.create((outerFn || Generator).prototype);
+ var context = new Context(tryLocsList || []);
+
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `value instanceof AwaitArgument` to determine if the yielded value is
+ // meant to be awaited. Some may consider the name of this method too
+ // cutesy, but they are curmudgeons.
+ runtime.awrap = function(arg) {
+ return new AwaitArgument(arg);
+ };
+
+ function AwaitArgument(arg) {
+ this.arg = arg;
+ }
+
+ function AsyncIterator(generator) {
+ // This invoke function is written in a style that assumes some
+ // calling function (or Promise) will handle exceptions.
+ function invoke(method, arg) {
+ var result = generator[method](arg);
+ var value = result.value;
+ return value instanceof AwaitArgument
+ ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)
+ : Promise.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration. If the Promise is rejected, however, the
+ // result for this iteration will be rejected with the same
+ // reason. Note that rejections of yielded Promises are not
+ // thrown back into the generator function, as is the case
+ // when an awaited Promise is rejected. This difference in
+ // behavior between yield and await is important, because it
+ // allows the consumer to decide what to do with the yielded
+ // rejection (swallow it and continue, manually .throw it back
+ // into the generator, abandon iteration, whatever). With
+ // await, by contrast, there is no opportunity to examine the
+ // rejection reason outside the generator function, so the
+ // only option is to throw it from the await expression, and
+ // let the generator function handle the exception.
+ result.value = unwrapped;
+ return result;
+ });
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var invokeNext = invoke.bind(generator, "next");
+ var invokeThrow = invoke.bind(generator, "throw");
+ var invokeReturn = invoke.bind(generator, "return");
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return invoke(method, arg);
+ }
+
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : new Promise(function (resolve) {
+ resolve(callInvokeWithMethodAndArg());
+ });
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
+
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ context._sent = arg;
+
+ if (state === GenStateSuspendedYield) {
+ context.sent = arg;
+ } else {
+ context.sent = undefined;
+ }
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ this.sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+})(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+);
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"_process":290}],284:[function(require,module,exports){
+module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true };
+},{"core-js/library/fn/object/define-property":285}],285:[function(require,module,exports){
+var $ = require('../../modules/$');
+module.exports = function defineProperty(it, key, desc){
+ return $.setDesc(it, key, desc);
+};
+},{"../../modules/$":286}],286:[function(require,module,exports){
+var $Object = Object;
+module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
+};
+},{}],287:[function(require,module,exports){
+(function (global){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.open = open;
+exports.del = del;
+exports.cmp = cmp;
+
+/**
+ * Open IndexedDB database with `name`.
+ * Retry logic allows to avoid issues in tests env,
+ * when db with the same name delete/open repeatedly and can be blocked.
+ *
+ * @param {String} dbName
+ * @param {Number} [version]
+ * @param {Function} [upgradeCallback]
+ * @return {Promise}
+ */
+
+function open(dbName, version, upgradeCallback) {
+ return new Promise(function (resolve, reject) {
+ if (typeof version === 'function') {
+ upgradeCallback = version;
+ version = undefined;
+ }
+ // don't call open with 2 arguments, when version is not set
+ var req = version ? idb().open(dbName, version) : idb().open(dbName);
+ req.onblocked = function (e) {
+ var resume = new Promise(function (res, rej) {
+ // We overwrite handlers rather than make a new
+ // open() since the original request is still
+ // open and its onsuccess will still fire if
+ // the user unblocks by closing the blocking
+ // connection
+ req.onsuccess = function (ev) {
+ return res(ev.target.result);
+ };
+ req.onerror = function (ev) {
+ ev.preventDefault();
+ rej(ev);
+ };
+ });
+ e.resume = resume;
+ reject(e);
+ };
+ if (typeof upgradeCallback === 'function') {
+ req.onupgradeneeded = function (e) {
+ try {
+ upgradeCallback(e);
+ } catch (err) {
+ // We allow the callback to throw its own error
+ e.target.result.close();
+ reject(err);
+ }
+ };
+ }
+ req.onerror = function (e) {
+ e.preventDefault();
+ reject(e);
+ };
+ req.onsuccess = function (e) {
+ resolve(e.target.result);
+ };
+ });
+}
+
+/**
+ * Delete `db` properly:
+ * - close it and wait 100ms to disk flush (Safari, older Chrome, Firefox)
+ * - if database is locked, due to inconsistent exectution of `versionchange`,
+ * try again in 100ms
+ *
+ * @param {IDBDatabase|String} db
+ * @return {Promise}
+ */
+
+function del(db) {
+ var dbName = typeof db !== 'string' ? db.name : db;
+
+ return new Promise(function (resolve, reject) {
+ var delDb = function delDb() {
+ var req = idb().deleteDatabase(dbName);
+ req.onblocked = function (e) {
+ // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279
+ e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, { get: function get(target, name) {
+ return name === 'newVersion' ? null : target[name];
+ } });
+ var resume = new Promise(function (res, rej) {
+ // We overwrite handlers rather than make a new
+ // delete() since the original request is still
+ // open and its onsuccess will still fire if
+ // the user unblocks by closing the blocking
+ // connection
+ req.onsuccess = function (ev) {
+ // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in ev)) {
+ ev.newVersion = e.newVersion;
+ }
+
+ if (!('oldVersion' in ev)) {
+ ev.oldVersion = e.oldVersion;
+ }
+
+ res(ev);
+ };
+ req.onerror = function (ev) {
+ ev.preventDefault();
+ rej(ev);
+ };
+ });
+ e.resume = resume;
+ reject(e);
+ };
+ req.onerror = function (e) {
+ e.preventDefault();
+ reject(e);
+ };
+ req.onsuccess = function (e) {
+ // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in e)) {
+ e.newVersion = null;
+ }
+
+ resolve(e);
+ };
+ };
+
+ if (typeof db !== 'string') {
+ db.close();
+ setTimeout(delDb, 100);
+ } else {
+ delDb();
+ }
+ });
+}
+
+/**
+ * Compare `first` and `second`.
+ * Added for consistency with official API.
+ *
+ * @param {Any} first
+ * @param {Any} second
+ * @return {Number} -1|0|1
+ */
+
+function cmp(first, second) {
+ return idb().cmp(first, second);
+}
+
+/**
+ * Get globally available IDBFactory instance.
+ * - it uses `global`, so it can work in any env.
+ * - it tries to use `global.forceIndexedDB` first,
+ * so you can rewrite `global.indexedDB` with polyfill
+ * https://bugs.webkit.org/show_bug.cgi?id=137034
+ * - it fallbacks to all possibly available implementations
+ * https://github.com/axemclion/IndexedDBShim#ios
+ * - function allows to have dynamic link,
+ * which can be changed after module's initial exectution
+ *
+ * @return {IDBFactory}
+ */
+
+function idb() {
+ return global.forceIndexedDB || global.indexedDB || global.webkitIndexedDB || global.mozIndexedDB || global.msIndexedDB || global.shimIndexedDB;
+}
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],288:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Object.values, etc.
+
+
+require('babel-polyfill');
+
+var _idbFactory = require('./idb-factory');
+
+var _isPlainObj = require('is-plain-obj');
+
+var _isPlainObj2 = _interopRequireDefault(_isPlainObj);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var values = Object.values;
+var isInteger = Number.isInteger;
+var localStorageExists = typeof window !== 'undefined' && window.localStorage;
+
+var getJSONStorage = function getJSONStorage(item) {
+ var dflt = arguments.length <= 1 || arguments[1] === undefined ? '{}' : arguments[1];
+
+ return JSON.parse(localStorage.getItem(item) || dflt);
+};
+var setJSONStorage = function setJSONStorage(item, value) {
+ localStorage.setItem(item, JSON.stringify(value));
+};
+
+/**
+ * Maximum version value (unsigned long long)
+ * http://www.w3.org/TR/IndexedDB/#events
+ */
+
+var MAX_VERSION = Math.pow(2, 32) - 1;
+
+/**
+ * Export `Schema`.
+ */
+
+var Schema = function () {
+ function Schema() {
+ _classCallCheck(this, Schema);
+
+ this._stores = {};
+ this._current = {};
+ this._versions = {};
+ this.version(1);
+ }
+
+ _createClass(Schema, [{
+ key: 'lastEnteredVersion',
+ value: function lastEnteredVersion() {
+ return this._current.version;
+ }
+ }, {
+ key: 'setCurrentVersion',
+ value: function setCurrentVersion(version) {
+ this._current = { version: version, store: null };
+ }
+
+ /**
+ * Get/Set new version.
+ *
+ * @param {Number} [version]
+ * @return {Schema|Number}
+ */
+
+ }, {
+ key: 'version',
+ value: function version(_version) {
+ if (!arguments.length) return parseInt(Object.keys(this._versions).sort().pop(), 10);
+ if (!isInteger(_version) || _version < 1 || _version > MAX_VERSION) {
+ throw new TypeError('invalid version');
+ }
+
+ this.setCurrentVersion(_version);
+ this._versions[_version] = {
+ stores: [], // db.createObjectStore
+ dropStores: [], // db.deleteObjectStore
+ indexes: [], // store.createIndex
+ dropIndexes: [], // store.deleteIndex
+ callbacks: [],
+ earlyCallbacks: [],
+ version: _version };
+
+ // version
+ return this;
+ }
+
+ /**
+ * Add store.
+ *
+ * @param {String} name
+ * @param {Object} [opts] { key: null, increment: false, copyFrom: null }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addStore',
+ value: function addStore(name) {
+ var _this = this;
+
+ var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ if (this._stores[name]) throw new DOMException('"' + name + '" store is already defined', 'ConstraintError');
+ if ((0, _isPlainObj2.default)(opts) && (0, _isPlainObj2.default)(opts.copyFrom)) {
+ (function () {
+ var copyFrom = opts.copyFrom;
+ var copyFromName = copyFrom.name;
+ if (typeof copyFromName !== 'string') throw new TypeError('"copyFrom.name" is required when `copyFrom` is present'); // idb-schema requirement
+ if (_this._versions[_this.lastEnteredVersion()].dropStores.some(function (dropStore) {
+ return dropStore.name === copyFromName;
+ })) {
+ throw new TypeError('"copyFrom.name" must not be a store slated for deletion.'); // idb-schema requirement
+ }
+ if (copyFrom.deleteOld) {
+ var copyFromStore = _this._stores[copyFromName];
+ if (copyFromStore) {
+ // We don't throw here if non-existing since it may have been created outside of idb-schema
+ delete _this._stores[copyFromName];
+ }
+ }
+ })();
+ }
+ var store = {
+ name: name,
+ indexes: {},
+ keyPath: opts.key || opts.keyPath,
+ autoIncrement: opts.increment || opts.autoIncrement || false,
+ copyFrom: opts.copyFrom || null };
+ // We don't check here for existence of a copyFrom store as might be copying from preexisting store
+ if (!store.keyPath && store.keyPath !== '') {
+ store.keyPath = null;
+ }
+ if (store.autoIncrement && (store.keyPath === '' || Array.isArray(store.keyPath))) {
+ throw new DOMException('keyPath must not be the empty string or a sequence if autoIncrement is in use', 'InvalidAccessError');
+ }
+
+ this._stores[name] = store;
+ this._versions[this.lastEnteredVersion()].stores.push(store);
+ this._current.store = store;
+
+ return this;
+ }
+
+ /**
+ * Delete store.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'delStore',
+ value: function delStore(name) {
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ this._versions[this.lastEnteredVersion()].stores.forEach(function (store) {
+ var copyFrom = store.copyFrom;
+ if ((0, _isPlainObj2.default)(copyFrom) && name === copyFrom.name) {
+ if (copyFrom.deleteOld) {
+ throw new TypeError('"name" is already slated for deletion'); // idb-schema requirement
+ }
+ throw new TypeError('set `deleteOld` on `copyFrom` to delete this store.'); // idb-schema requirement
+ }
+ });
+ var store = this._stores[name];
+ if (store) {
+ delete this._stores[name];
+ } else {
+ store = { name: name };
+ }
+ this._versions[this.lastEnteredVersion()].dropStores.push(store);
+ this._current.store = null;
+ return this;
+ }
+
+ /**
+ * Rename store.
+ *
+ * @param {String} oldName Old name
+ * @param {String} newName New name
+ * @param {Object} [opts] { key: null, increment: false }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'renameStore',
+ value: function renameStore(oldName, newName, options) {
+ return this.copyStore(oldName, newName, options, true);
+ }
+
+ /**
+ * Copy store.
+ *
+ * @param {String} oldName Old name
+ * @param {String} newName New name
+ * @param {Object} [opts] { key: null, increment: false }
+ * @param {Boolean} [deleteOld=false] Whether to delete the old store or not
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'copyStore',
+ value: function copyStore(oldName, newName, options) {
+ var deleteOld = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
+
+ if (typeof oldName !== 'string') throw new TypeError('"oldName" is required'); // idb-schema requirement
+ if (typeof newName !== 'string') throw new TypeError('"newName" is required'); // idb-schema requirement
+
+ options = (0, _isPlainObj2.default)(options) ? _clone(options) : {};
+ options.copyFrom = { name: oldName, deleteOld: deleteOld, options: options };
+
+ return this.addStore(newName, options);
+ }
+
+ /**
+ * Change current store.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'getStore',
+ value: function getStore(name) {
+ var _this2 = this;
+
+ if (name && (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object' && 'name' in name && 'indexNames' in name) {
+ (function () {
+ var storeObj = name;
+ name = storeObj.name;
+ var store = {
+ name: name,
+ indexes: Array.from(storeObj.indexNames).reduce(function (obj, iName) {
+ var indexObj = storeObj.index(iName);
+ obj[iName] = {
+ name: iName,
+ storeName: name,
+ field: indexObj.keyPath,
+ unique: indexObj.unique,
+ multiEntry: indexObj.multiEntry
+ };
+ return obj;
+ }, {}),
+ keyPath: storeObj.keyPath,
+ autoIncrement: storeObj.autoIncrement,
+ copyFrom: null
+ };
+ _this2._stores[name] = store;
+ })();
+ }
+ if (typeof name !== 'string') throw new DOMException('"name" is required', 'NotFoundError');
+ if (!this._stores[name]) throw new TypeError('"' + name + '" store is not defined');
+ this._current.store = this._stores[name];
+ return this;
+ }
+
+ /**
+ * Add index.
+ *
+ * @param {String} name
+ * @param {String|Array} field
+ * @param {Object} [opts] { unique: false, multi: false }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addIndex',
+ value: function addIndex(name, field) {
+ var opts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ if (typeof field !== 'string' && !Array.isArray(field)) {
+ throw new SyntaxError('"field" is required');
+ }
+ var store = this._current.store;
+ if (!store) throw new TypeError('set current store using "getStore" or "addStore"');
+ if (store.indexes[name]) throw new DOMException('"' + name + '" index is already defined', 'ConstraintError');
+
+ var index = {
+ name: name,
+ field: field,
+ storeName: store.name,
+ multiEntry: opts.multi || opts.multiEntry || false,
+ unique: opts.unique || false
+ };
+ store.indexes[name] = index;
+ this._versions[this.lastEnteredVersion()].indexes.push(index);
+
+ return this;
+ }
+
+ /**
+ * Delete index.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'delIndex',
+ value: function delIndex(name) {
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ var index = this._current.store.indexes[name];
+ if (!index) throw new DOMException('"' + name + '" index is not defined', 'NotFoundError');
+ delete this._current.store.indexes[name];
+ this._versions[this.lastEnteredVersion()].dropIndexes.push(index);
+ return this;
+ }
+
+ /**
+ * Add a callback to be executed at the end of the `upgradeneeded` event.
+ * Callback will be supplied the `upgradeneeded` event object.
+ *
+ * @param {Function} cb
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addCallback',
+ value: function addCallback(cb) {
+ this._versions[this.lastEnteredVersion()].callbacks.push(cb);
+ return this;
+ }
+ }, {
+ key: 'addEarlyCallback',
+ value: function addEarlyCallback(cb) {
+ this._versions[this.lastEnteredVersion()].earlyCallbacks.push(cb);
+ return this;
+ }
+
+ /**
+ * Flushes storage pertaining to incomplete upgrades
+ *
+ * @return {}
+ */
+
+ }, {
+ key: 'flushIncomplete',
+ value: function flushIncomplete(dbName) {
+ var incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ delete incompleteUpgrades[dbName];
+ setJSONStorage('idb-incompleteUpgrades', incompleteUpgrades);
+ }
+
+ /**
+ * Generate open connection running a sequence of upgrades, keeping the connection open.
+ *
+ * @return {Promise}
+ */
+
+ }, {
+ key: 'open',
+ value: function open(dbName, version) {
+ return this.upgrade(dbName, version, true);
+ }
+
+ /**
+ * Generate open connection running a sequence of upgrades.
+ *
+ * @return {Promise}
+ */
+
+ }, {
+ key: 'upgrade',
+ value: function upgrade(dbName, version, keepOpen) {
+ var _this3 = this;
+
+ var currentVersion = void 0;
+ var versions = void 0;
+ var afterOpen = void 0;
+ var setVersions = function setVersions() {
+ versions = values(_this3._versions).sort(function (a, b) {
+ return a.version - b.version;
+ }).map(function (obj) {
+ return obj.version;
+ }).values();
+ };
+ var blockRecover = function blockRecover(reject) {
+ return function (err) {
+ if (err && err.type === 'blocked') {
+ reject(err);
+ return;
+ }
+ throw err;
+ };
+ };
+ setVersions();
+ var thenableUpgradeVersion = function thenableUpgradeVersion(dbLast, res, rej, start) {
+ var lastVers = dbLast.version;
+ var ready = true;
+ var lastGoodVersion = void 0;
+ var versionIter = void 0;
+ for (versionIter = versions.next(); !versionIter.done && versionIter.value <= lastVers; versionIter = versions.next()) {
+ lastGoodVersion = versionIter.value;
+ }
+ currentVersion = versionIter.value;
+ if (versionIter.done || currentVersion > version) {
+ if (start !== undefined) {
+ currentVersion = lastGoodVersion;
+ afterOpen(dbLast, res, rej, start);
+ } else if (!keepOpen) {
+ dbLast.close();
+ res();
+ } else {
+ res(dbLast);
+ }
+ return;
+ }
+ dbLast.close();
+
+ setTimeout(function () {
+ (0, _idbFactory.open)(dbName, currentVersion, upgradeneeded(function () {
+ for (var _len = arguments.length, dbInfo = Array(_len), _key = 0; _key < _len; _key++) {
+ dbInfo[_key] = arguments[_key];
+ }
+
+ ready = false;
+ upgradeVersion.call.apply(upgradeVersion, [_this3, currentVersion].concat(dbInfo, [function () {
+ ready = true;
+ }]));
+ })).then(function (db) {
+ var intvl = setInterval(function () {
+ if (ready) {
+ clearInterval(intvl);
+ afterOpen(db, res, rej, start);
+ }
+ }, 100);
+ }).catch(function (err) {
+ rej(err);
+ });
+ });
+ };
+ afterOpen = function afterOpen(db, res, rej, start) {
+ // We run callbacks in `success` so promises can be used without fear of the (upgrade) transaction expiring
+ var processReject = function processReject(err, callbackIndex) {
+ err = typeof err === 'string' ? new Error(err) : err;
+ err.retry = function () {
+ return new Promise(function (resolv, rejct) {
+ var resolver = function resolver(item) {
+ _this3.flushIncomplete(dbName);
+ resolv(item);
+ };
+ db.close();
+ // db.transaction can't execute as closing by now, so we close and reopen
+ (0, _idbFactory.open)(dbName).catch(blockRecover(rejct)).then(function (dbs) {
+ setVersions();
+ thenableUpgradeVersion(dbs, resolver, rejct, callbackIndex);
+ }).catch(rejct);
+ });
+ };
+ if (localStorageExists) {
+ var incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ incompleteUpgrades[dbName] = {
+ version: db.version,
+ error: err.message,
+ callbackIndex: callbackIndex
+ };
+ setJSONStorage('idb-incompleteUpgrades', incompleteUpgrades);
+ }
+ db.close();
+ rej(err);
+ };
+ var promise = Promise.resolve();
+ var lastIndex = void 0;
+ var versionSchema = _this3._versions[currentVersion]; // We can safely cache as these callbacks do not need to access schema info
+ var cbFailed = versionSchema.callbacks.some(function (cb, i) {
+ if (start !== undefined && i < start) {
+ return false;
+ }
+ var ret = void 0;
+ try {
+ ret = cb(db);
+ } catch (err) {
+ processReject(err, i);
+ return true;
+ }
+ if (ret && ret.then) {
+ // We need to treat the rest as promises so that they do not
+ // continue to execute before the current one has a chance to
+ // execute or fail
+ promise = versionSchema.callbacks.slice(i + 1).reduce(function (p, cb2) {
+ return p.then(function () {
+ return cb2(db);
+ });
+ }, ret);
+ lastIndex = i;
+ return true;
+ }
+ });
+ var complete = lastIndex !== undefined;
+ if (cbFailed && !complete) return;
+ promise = promise.then(function () {
+ return thenableUpgradeVersion(db, res, rej);
+ });
+ if (complete) {
+ promise = promise.catch(function (err) {
+ processReject(err, lastIndex);
+ });
+ }
+ };
+ // If needed, open higher versions until fully upgraded (noting any transaction failures)
+ return new Promise(function (resolve, reject) {
+ version = version || _this3.version();
+ if (typeof version !== 'number' || version < 1) {
+ reject(new Error('Bad version supplied for idb-schema upgrade'));
+ return;
+ }
+
+ var incompleteUpgrades = void 0;
+ var iudb = void 0;
+ if (localStorageExists) {
+ incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ iudb = incompleteUpgrades[dbName];
+ }
+ if (iudb) {
+ var _ret3 = function () {
+ var err = new Error('An upgrade previously failed to complete for version: ' + iudb.version + ' due to reason: ' + iudb.error);
+ err.badVersion = iudb.version;
+ err.retry = function () {
+ var versionIter = versions.next();
+ while (!versionIter.done && versionIter.value < err.badVersion) {
+ versionIter = versions.next();
+ }
+ currentVersion = versionIter.value;
+ return new Promise(function (resolv, rejct) {
+ var resolver = function resolver(item) {
+ _this3.flushIncomplete(dbName);
+ resolv(item);
+ };
+ // If there was a prior failure, we don't need to worry about `upgradeneeded` yet
+ (0, _idbFactory.open)(dbName).catch(blockRecover(rejct)).then(function (dbs) {
+ afterOpen(dbs, resolver, rejct, iudb.callbackIndex);
+ }).catch(rejct);
+ });
+ };
+ reject(err);
+ return {
+ v: void 0
+ };
+ }();
+
+ if ((typeof _ret3 === 'undefined' ? 'undefined' : _typeof(_ret3)) === "object") return _ret3.v;
+ }
+ var ready = true;
+ var upgrade = upgradeneeded(function () {
+ for (var _len2 = arguments.length, dbInfo = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ dbInfo[_key2] = arguments[_key2];
+ }
+
+ // Upgrade from 0 to version 1
+ ready = false;
+ var versionIter = versions.next();
+ if (versionIter.done) {
+ throw new Error('No schema versions added for upgrade');
+ }
+ currentVersion = versionIter.value;
+ upgradeVersion.call.apply(upgradeVersion, [_this3, currentVersion].concat(dbInfo, [function () {
+ ready = true;
+ }]));
+ });
+ (0, _idbFactory.open)(dbName, upgrade).catch(blockRecover(reject)).then(function (db) {
+ var intvl = setInterval(function () {
+ if (!ready) {
+ return;
+ }
+ clearInterval(intvl);
+ if (version < db.version) {
+ db.close();
+ reject(new DOMException('The requested version (' + version + ') is less than the existing version (' + db.version + ').', 'VersionError'));
+ return;
+ }
+ if (currentVersion !== undefined) {
+ afterOpen(db, resolve, reject);
+ return;
+ }
+ thenableUpgradeVersion(db, resolve, reject);
+ }, 100);
+ }).catch(function (err) {
+ return reject(err);
+ });
+ });
+ }
+
+ /**
+ * Generate onupgradeneeded callback running a sequence of upgrades.
+ *
+ * @return {Function}
+ */
+
+ }, {
+ key: 'callback',
+ value: function callback(_callback, errBack) {
+ var _this4 = this;
+
+ var versions = values(this._versions).sort(function (a, b) {
+ return a.version - b.version;
+ }).map(function (obj) {
+ return obj.version;
+ }).values();
+ var tryCatch = function tryCatch(e, cb) {
+ try {
+ cb();
+ } catch (err) {
+ if (errBack) {
+ errBack(err, e);
+ return true;
+ }
+ throw err;
+ }
+ };
+ var upgrade = function upgrade(e, oldVersion) {
+ var versionIter = versions.next();
+ while (!versionIter.done && versionIter.value <= oldVersion) {
+ versionIter = versions.next();
+ }
+
+ if (versionIter.done) {
+ if (_callback) _callback(e);
+ return;
+ }
+ var version = versionIter.value;
+ var lev = _this4.lastEnteredVersion();
+
+ tryCatch(e, function () {
+ upgradeVersion.call(_this4, version, e, oldVersion, function () {
+ tryCatch(e, function () {
+ _this4._versions[version].callbacks.forEach(function (cb) {
+ _this4.setCurrentVersion(version); // Reset current version for callback to be able to operate on this version rather than the last added one
+ cb.call(_this4, e); // Call on `this` as can still modify schema in these callbacks
+ });
+ _this4.setCurrentVersion(lev);
+ upgrade(e, oldVersion);
+ });
+ });
+ });
+ };
+ return upgradeneeded(upgrade);
+ }
+
+ /**
+ * Get a description of the stores.
+ * It creates a deep clone of `this._stores` object
+ * and transform it to an array.
+ *
+ * @return {Array}
+ */
+
+ }, {
+ key: 'stores',
+ value: function stores() {
+ return values(_clone(this._stores)).map(function (store) {
+ store.indexes = values(store.indexes).map(function (index) {
+ delete index.storeName;
+ return index;
+ });
+ return store;
+ });
+ }
+
+ /**
+ * Clone `this` to new schema object.
+ *
+ * @return {Schema} - new object
+ */
+
+ }, {
+ key: 'clone',
+ value: function clone() {
+ var _this5 = this;
+
+ var schema = new Schema();
+ Object.keys(this).forEach(function (key) {
+ return schema[key] = _clone(_this5[key]);
+ });
+ return schema;
+ }
+ }]);
+
+ return Schema;
+}();
+
+/**
+ * Clone `obj`.
+ * https://github.com/component/clone/blob/master/index.js
+ */
+
+exports.default = Schema;
+function _clone(obj) {
+ if (Array.isArray(obj)) {
+ return obj.map(function (val) {
+ return _clone(val);
+ });
+ }
+ if ((0, _isPlainObj2.default)(obj)) {
+ return Object.keys(obj).reduce(function (copy, key) {
+ copy[key] = _clone(obj[key]);
+ return copy;
+ }, {});
+ }
+ return obj;
+}
+
+/**
+ * Utility for `upgradeneeded`.
+ * @todo Can `oldVersion` be overwritten and this utility exposed within idb-factory?
+ */
+
+function upgradeneeded(cb) {
+ return function (e) {
+ var oldVersion = e.oldVersion > MAX_VERSION ? 0 : e.oldVersion; // Safari bug: https://bugs.webkit.org/show_bug.cgi?id=136888
+ cb(e, oldVersion);
+ };
+}
+
+function upgradeVersion(version, e, oldVersion, finishedCb) {
+ var _this6 = this;
+
+ if (oldVersion >= version) return;
+
+ var db = e.target.result;
+ var tr = e.target.transaction;
+
+ var lev = this.lastEnteredVersion();
+ this._versions[version].earlyCallbacks.forEach(function (cb) {
+ _this6.setCurrentVersion(version); // Reset current version for callback to be able to operate on this version rather than the last added one
+ cb.call(_this6, e);
+ });
+ this.setCurrentVersion(lev);
+
+ // Now we can cache as no more callbacks to modify this._versions data
+ var versionSchema = this._versions[version];
+ versionSchema.dropStores.forEach(function (s) {
+ db.deleteObjectStore(s.name);
+ });
+
+ // We wait for addition of old data and then for the deleting of the old
+ // store before iterating to add the next store (in case the user may
+ // create a new store of the same name as an old deleted store)
+ var stores = versionSchema.stores.values();
+ function iterateStores() {
+ var storeIter = stores.next();
+ if (storeIter.done) {
+ versionSchema.dropIndexes.forEach(function (i) {
+ tr.objectStore(i.storeName).deleteIndex(i.name);
+ });
+
+ versionSchema.indexes.forEach(function (i) {
+ tr.objectStore(i.storeName).createIndex(i.name, i.field, {
+ unique: i.unique,
+ multiEntry: i.multiEntry
+ });
+ });
+ if (finishedCb) finishedCb();
+ return;
+ }
+ var s = storeIter.value;
+
+ // Only pass the options that are explicitly specified to createObjectStore() otherwise IE/Edge
+ // can throw an InvalidAccessError - see https://msdn.microsoft.com/en-us/library/hh772493(v=vs.85).aspx
+ var opts = {};
+ var oldStoreName = void 0;
+ var oldObjStore = void 0;
+ if (s.copyFrom) {
+ // Store props not set yet as need reflection (and may be store not in idb-schema)
+ oldStoreName = s.copyFrom.name;
+ oldObjStore = tr.objectStore(oldStoreName);
+ var oldObjStoreOptions = s.copyFrom.options || {};
+ if (oldObjStoreOptions.keyPath !== null && oldObjStoreOptions.keyPath !== undefined) opts.keyPath = oldObjStoreOptions.keyPath;else if (oldObjStore.keyPath !== null && s.keyPath !== undefined) opts.keyPath = oldObjStore.keyPath;
+ if (oldObjStoreOptions.autoIncrement !== undefined) opts.autoIncrement = oldObjStoreOptions.autoIncrement;else if (oldObjStore.autoIncrement) opts.autoIncrement = oldObjStore.autoIncrement;
+ } else {
+ if (s.keyPath !== null && s.keyPath !== undefined) opts.keyPath = s.keyPath;
+ if (s.autoIncrement) opts.autoIncrement = s.autoIncrement;
+ }
+
+ var newObjStore = db.createObjectStore(s.name, opts);
+ if (!s.copyFrom) {
+ iterateStores();
+ return;
+ }
+ var req = oldObjStore.getAll();
+ req.onsuccess = function () {
+ var oldContents = req.result;
+ var ct = 0;
+
+ if (!oldContents.length && s.copyFrom.deleteOld) {
+ db.deleteObjectStore(oldStoreName);
+ iterateStores();
+ return;
+ }
+ oldContents.forEach(function (oldContent) {
+ var addReq = newObjStore.add(oldContent);
+ addReq.onsuccess = function () {
+ ct++;
+ if (ct === oldContents.length) {
+ if (s.copyFrom.deleteOld) {
+ db.deleteObjectStore(oldStoreName);
+ }
+ iterateStores();
+ }
+ };
+ });
+ };
+ }
+ iterateStores();
+}
+module.exports = exports['default'];
+},{"./idb-factory":287,"babel-polyfill":3,"is-plain-obj":289}],289:[function(require,module,exports){
+'use strict';
+var toString = Object.prototype.toString;
+
+module.exports = function (x) {
+ var prototype;
+ return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
+};
+
+},{}],290:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
},{}]},{},[1])(1)
});
\ No newline at end of file
diff --git a/dist/db.js.map b/dist/db.js.map
index efa7e45..0ef963c 100644
--- a/dist/db.js.map
+++ b/dist/db.js.map
@@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":"db.js","sourcesContent":["(function (local) {\r\n 'use strict';\r\n\r\n const IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;\r\n const transactionModes = {\r\n readonly: 'readonly',\r\n readwrite: 'readwrite'\r\n };\r\n const hasOwn = Object.prototype.hasOwnProperty;\r\n const defaultMapper = x => x;\r\n\r\n const indexedDB = local.indexedDB || local.webkitIndexedDB ||\r\n local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB ||\r\n local.shimIndexedDB || (function () {\r\n throw new Error('IndexedDB required');\r\n }());\r\n\r\n const dbCache = {};\r\n const serverEvents = ['abort', 'error', 'versionchange'];\r\n\r\n function isObject (item) {\r\n return item && typeof item === 'object';\r\n }\r\n\r\n function mongoDBToKeyRangeArgs (opts) {\r\n const keys = Object.keys(opts).sort();\r\n if (keys.length === 1) {\r\n const key = keys[0];\r\n const val = opts[key];\r\n let name, inclusive;\r\n switch (key) {\r\n case 'eq': name = 'only'; break;\r\n case 'gt':\r\n name = 'lowerBound';\r\n inclusive = true;\r\n break;\r\n case 'lt':\r\n name = 'upperBound';\r\n inclusive = true;\r\n break;\r\n case 'gte': name = 'lowerBound'; break;\r\n case 'lte': name = 'upperBound'; break;\r\n default: throw new TypeError('`' + key + '` is not a valid key');\r\n }\r\n return [name, [val, inclusive]];\r\n }\r\n const x = opts[keys[0]];\r\n const y = opts[keys[1]];\r\n const pattern = keys.join('-');\r\n\r\n switch (pattern) {\r\n case 'gt-lt': case 'gt-lte': case 'gte-lt': case 'gte-lte':\r\n return ['bound', [x, y, keys[0] === 'gt', keys[1] === 'lt']];\r\n default: throw new TypeError(\r\n '`' + pattern + '` are conflicted keys'\r\n );\r\n }\r\n }\r\n function mongoifyKey (key) {\r\n if (key && typeof key === 'object' && !(key instanceof IDBKeyRange)) {\r\n let [type, args] = mongoDBToKeyRangeArgs(key);\r\n return IDBKeyRange[type](...args);\r\n }\r\n return key;\r\n }\r\n\r\n const IndexQuery = function (table, db, indexName, preexistingError) {\r\n let modifyObj = null;\r\n\r\n const runQuery = function (type, args, cursorType, direction, limitRange, filters, mapper) {\r\n return new Promise(function (resolve, reject) {\r\n let keyRange;\r\n try {\r\n keyRange = type ? IDBKeyRange[type](...args) : null;\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n filters = filters || [];\r\n limitRange = limitRange || null;\r\n\r\n let results = [];\r\n let counter = 0;\r\n const indexArgs = [keyRange];\r\n\r\n const transaction = db.transaction(table, modifyObj ? transactionModes.readwrite : transactionModes.readonly);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(results);\r\n\r\n const store = transaction.objectStore(table); // if bad, db.transaction will reject first\r\n const index = typeof indexName === 'string' ? store.index(indexName) : store;\r\n\r\n if (cursorType !== 'count') {\r\n indexArgs.push(direction || 'next');\r\n }\r\n\r\n // Create a function that will set in the modifyObj properties into\r\n // the passed record.\r\n const modifyKeys = modifyObj ? Object.keys(modifyObj) : [];\r\n\r\n const modifyRecord = function (record) {\r\n modifyKeys.forEach(key => {\r\n let val = modifyObj[key];\r\n if (typeof val === 'function') { val = val(record); }\r\n record[key] = val;\r\n });\r\n return record;\r\n };\r\n\r\n index[cursorType](...indexArgs).onsuccess = function (e) { // indexArgs are already validated\r\n const cursor = e.target.result;\r\n if (typeof cursor === 'number') {\r\n results = cursor;\r\n } else if (cursor) {\r\n if (limitRange !== null && limitRange[0] > counter) {\r\n counter = limitRange[0];\r\n cursor.advance(limitRange[0]); // Will throw on 0, but condition above prevents since counter always 0+\r\n } else if (limitRange !== null && counter >= (limitRange[0] + limitRange[1])) {\r\n // Out of limit range... skip\r\n } else {\r\n let matchFilter = true;\r\n let result = 'value' in cursor ? cursor.value : cursor.key;\r\n\r\n try {\r\n filters.forEach(function (filter) {\r\n if (typeof filter[0] === 'function') {\r\n matchFilter = matchFilter && filter[0](result);\r\n } else {\r\n matchFilter = matchFilter && (result[filter[0]] === filter[1]);\r\n }\r\n });\r\n } catch (err) { // Could be filter on non-object or error in filter function\r\n reject(err);\r\n return;\r\n }\r\n\r\n if (matchFilter) {\r\n counter++;\r\n // If we're doing a modify, run it now\r\n if (modifyObj) {\r\n try {\r\n result = modifyRecord(result);\r\n cursor.update(result); // `result` should only be a \"structured clone\"-able object\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n }\r\n try {\r\n results.push(mapper(result));\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n }\r\n cursor.continue();\r\n }\r\n }\r\n };\r\n });\r\n };\r\n\r\n const Query = function (type, args, queuedError) {\r\n const filters = [];\r\n let direction = 'next';\r\n let cursorType = 'openCursor';\r\n let limitRange = null;\r\n let mapper = defaultMapper;\r\n let unique = false;\r\n let error = preexistingError || queuedError;\r\n\r\n const execute = function () {\r\n if (error) {\r\n return Promise.reject(error);\r\n }\r\n return runQuery(type, args, cursorType, unique ? direction + 'unique' : direction, limitRange, filters, mapper);\r\n };\r\n\r\n const count = function () {\r\n direction = null;\r\n cursorType = 'count';\r\n\r\n return {\r\n execute\r\n };\r\n };\r\n\r\n const keys = function () {\r\n cursorType = 'openKeyCursor';\r\n\r\n return {\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n limit,\r\n map\r\n };\r\n };\r\n\r\n const limit = function (start, end) {\r\n limitRange = !end ? [0, start] : [start, end];\r\n error = limitRange.some(val => typeof val !== 'number') ? new Error('limit() arguments must be numeric') : error;\r\n\r\n return {\r\n desc,\r\n distinct,\r\n filter,\r\n keys,\r\n execute,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const filter = function (prop, val) {\r\n filters.push([prop, val]);\r\n\r\n return {\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const desc = function () {\r\n direction = 'prev';\r\n\r\n return {\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const distinct = function () {\r\n unique = true;\r\n return {\r\n count,\r\n desc,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const modify = function (update) {\r\n modifyObj = update && typeof update === 'object' ? update : null;\r\n return {\r\n execute\r\n };\r\n };\r\n\r\n const map = function (fn) {\r\n mapper = fn;\r\n\r\n return {\r\n count,\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n modify\r\n };\r\n };\r\n\r\n return {\r\n count,\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n ['only', 'bound', 'upperBound', 'lowerBound'].forEach((name) => {\r\n this[name] = function () {\r\n return Query(name, arguments);\r\n };\r\n });\r\n\r\n this.range = function (opts) {\r\n let error;\r\n let keyRange = [null, null];\r\n try {\r\n keyRange = mongoDBToKeyRangeArgs(opts);\r\n } catch (e) {\r\n error = e;\r\n }\r\n return Query(...keyRange, error);\r\n };\r\n\r\n this.filter = function (...args) {\r\n const query = Query(null, null);\r\n return query.filter(...args);\r\n };\r\n\r\n this.all = function () {\r\n return this.filter();\r\n };\r\n };\r\n\r\n const Server = function (db, name, version, noServerMethods) {\r\n let closed = false;\r\n\r\n this.getIndexedDB = () => db;\r\n this.isClosed = () => closed;\r\n\r\n this.query = function (table, index) {\r\n const error = closed ? new Error('Database has been closed') : null;\r\n return new IndexQuery(table, db, index, error); // Does not throw by itself\r\n };\r\n\r\n this.add = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing a ConstraintError and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n\r\n const store = transaction.objectStore(table);\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n try {\r\n // Safe to add since in readwrite\r\n if (key != null) {\r\n req = store.add(record, key);\r\n } else {\r\n req = store.add(record);\r\n }\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.update = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n\r\n const store = transaction.objectStore(table);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n }\r\n }\r\n try {\r\n // These can throw DataError, e.g., if function passed in\r\n if (key != null) {\r\n req = store.put(record, key);\r\n } else {\r\n req = store.put(record);\r\n }\r\n } catch (err) {\r\n reject(err);\r\n return true;\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.put = function (...args) {\r\n return this.update(...args);\r\n };\r\n\r\n this.remove = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(key);\r\n\r\n const store = transaction.objectStore(table);\r\n try {\r\n store.delete(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n });\r\n };\r\n\r\n this.delete = function (...args) {\r\n return this.remove(...args);\r\n };\r\n\r\n this.clear = function (table) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve();\r\n\r\n const store = transaction.objectStore(table);\r\n store.clear();\r\n });\r\n };\r\n\r\n this.close = function () {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n db.close();\r\n closed = true;\r\n delete dbCache[name][version];\r\n resolve();\r\n });\r\n };\r\n\r\n this.get = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n\r\n const store = transaction.objectStore(table);\r\n\r\n let req;\r\n try {\r\n req = store.get(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.count = function (table, key) {\r\n return new Promise((resolve, reject) => {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n\r\n const store = transaction.objectStore(table);\r\n let req;\r\n try {\r\n req = key == null ? store.count() : store.count(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.addEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n if (eventName === 'error') {\r\n db.addEventListener(eventName, function (e) {\r\n e.preventDefault(); // Needed by Firefox to prevent hard abort with ConstraintError\r\n handler(e);\r\n });\r\n return;\r\n }\r\n db.addEventListener(eventName, handler);\r\n };\r\n\r\n this.removeEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n db.removeEventListener(eventName, handler);\r\n };\r\n\r\n serverEvents.forEach(function (evName) {\r\n this[evName] = function (handler) {\r\n this.addEventListener(evName, handler);\r\n return this;\r\n };\r\n }, this);\r\n\r\n if (noServerMethods) {\r\n return;\r\n }\r\n\r\n let err;\r\n [].some.call(db.objectStoreNames, storeName => {\r\n if (this[storeName]) {\r\n err = new Error('The store name, \"' + storeName + '\", which you have attempted to load, conflicts with db.js method names.\"');\r\n this.close();\r\n return true;\r\n }\r\n this[storeName] = {};\r\n const keys = Object.keys(this);\r\n keys.filter(key => !(([...serverEvents, 'close', 'addEventListener', 'removeEventListener']).includes(key)))\r\n .map(key =>\r\n this[storeName][key] = (...args) => this[key](storeName, ...args)\r\n );\r\n });\r\n return err;\r\n };\r\n\r\n const createSchema = function (e, request, schema, db, server, version) {\r\n if (!schema || schema.length === 0) {\r\n return;\r\n }\r\n\r\n for (let i = 0; i < db.objectStoreNames.length; i++) {\r\n const name = db.objectStoreNames[i];\r\n if (!hasOwn.call(schema, name)) {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `TransactionInactiveError` (as by the upgrade having already\r\n // completed or somehow aborting) - since we've just started and\r\n // should be without risk in this loop\r\n // `NotFoundError` - since we are iterating the dynamically updated\r\n // `objectStoreNames`\r\n db.deleteObjectStore(name);\r\n }\r\n }\r\n\r\n let ret;\r\n Object.keys(schema).some(function (tableName) {\r\n const table = schema[tableName];\r\n let store;\r\n if (db.objectStoreNames.contains(tableName)) {\r\n store = request.transaction.objectStore(tableName); // Shouldn't throw\r\n } else {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.\r\n // `ConstraintError` - The above condition should prevent the name already existing.\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the store but then abort the transaction.\r\n // `SyntaxError` - if an invalid `table.key.keyPath` is supplied.\r\n // `InvalidAccessError` - if `table.key.autoIncrement` is `true` and `table.key.keyPath` is an\r\n // empty string or any sequence (empty or otherwise).\r\n try {\r\n store = db.createObjectStore(tableName, table.key);\r\n } catch (err) {\r\n ret = err;\r\n return true;\r\n }\r\n }\r\n\r\n Object.keys(table.indexes || {}).some(function (indexKey) {\r\n try {\r\n store.index(indexKey);\r\n } catch (err) {\r\n let index = table.indexes[indexKey];\r\n index = index && typeof index === 'object' ? index : {};\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.\r\n // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the index object but then abort the transaction.\r\n // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path\r\n // `InvalidAccessError` - If `multiEntry` on `index` is `true` and\r\n // `keyPath` (second argument) is a sequence\r\n try {\r\n store.createIndex(indexKey, index.keyPath || index.key || indexKey, index);\r\n } catch (err2) {\r\n ret = err2;\r\n return true;\r\n }\r\n }\r\n });\r\n });\r\n return ret;\r\n };\r\n\r\n const open = function (e, server, version, noServerMethods) {\r\n const db = e.target.result;\r\n dbCache[server][version] = db;\r\n\r\n const s = new Server(db, server, version, noServerMethods);\r\n return s instanceof Error ? Promise.reject(s) : Promise.resolve(s);\r\n };\r\n\r\n const db = {\r\n version: '0.15.0',\r\n open: function (options) {\r\n let server = options.server;\r\n let version = options.version || 1;\r\n let schema = options.schema;\r\n let noServerMethods = options.noServerMethods;\r\n\r\n if (!dbCache[server]) {\r\n dbCache[server] = {};\r\n }\r\n return new Promise(function (resolve, reject) {\r\n if (dbCache[server][version]) {\r\n open({\r\n target: {\r\n result: dbCache[server][version]\r\n }\r\n }, server, version, noServerMethods)\r\n .then(resolve, reject);\r\n } else {\r\n if (typeof schema === 'function') {\r\n try {\r\n schema = schema();\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n }\r\n const request = indexedDB.open(server, version);\r\n\r\n request.onsuccess = e => open(e, server, version, noServerMethods).then(resolve, reject);\r\n request.onerror = e => {\r\n // Prevent default for `BadVersion` and `AbortError` errors, etc.\r\n // These are not necessarily reported in console in Chrome but present; see\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n // http://stackoverflow.com/questions/36225779/aborterror-within-indexeddb-upgradeneeded-event/36266502\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n request.onupgradeneeded = e => {\r\n let err = createSchema(e, request, schema, e.target.result, server, version);\r\n if (err) {\r\n reject(err);\r\n }\r\n };\r\n request.onblocked = e => {\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // open() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = (ev) => {\r\n open(ev, server, version, noServerMethods)\r\n .then(res, rej);\r\n };\r\n request.onerror = e => rej(e);\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n }\r\n });\r\n },\r\n\r\n delete: function (dbName) {\r\n return new Promise(function (resolve, reject) {\r\n const request = indexedDB.deleteDatabase(dbName); // Does not throw\r\n\r\n request.onsuccess = e => resolve(e);\r\n request.onerror = e => reject(e); // No errors currently\r\n request.onblocked = e => {\r\n // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279\r\n e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, {get: function (target, name) {\r\n return name === 'newVersion' ? null : target[name];\r\n }});\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // delete() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = ev => {\r\n // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in ev)) {\r\n ev.newVersion = e.newVersion;\r\n }\r\n\r\n if (!('oldVersion' in ev)) {\r\n ev.oldVersion = e.oldVersion;\r\n }\r\n\r\n res(ev);\r\n };\r\n request.onerror = e => rej(e);\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n });\r\n },\r\n\r\n cmp: function (param1, param2) {\r\n return new Promise(function (resolve, reject) {\r\n try {\r\n resolve(indexedDB.cmp(param1, param2));\r\n } catch (e) {\r\n reject(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\r\n module.exports = db;\r\n } else if (typeof define === 'function' && define.amd) {\r\n define(function () { return db; });\r\n } else {\r\n local.db = db;\r\n }\r\n}(self));\r\n"]}
\ No newline at end of file
+{"version":3,"sources":["../src/db.js"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;AAEA,CAAC,UAAU,KAAV,EAAiB;AACd,iBADc;;AAGd,QAAM,SAAS,OAAO,SAAP,CAAiB,cAAjB,CAHD;;AAKd,QAAM,YAAY,MAAM,SAAN,IAAmB,MAAM,eAAN,IACjC,MAAM,YAAN,IAAsB,MAAM,UAAN,IAAoB,MAAM,WAAN,IAC1C,MAAM,aAAN,IAAwB,YAAY;AAChC,cAAM,IAAI,KAAJ,CAAU,oBAAV,CAAN,CADgC;KAAZ,EAFV,CALJ;AAUd,QAAM,cAAc,MAAM,WAAN,IAAqB,MAAM,iBAAN,CAV3B;;AAYd,QAAM,gBAAgB,SAAhB,aAAgB;eAAK;KAAL,CAZR;AAad,QAAM,eAAe,CAAC,OAAD,EAAU,OAAV,EAAmB,eAAnB,CAAf,CAbQ;AAcd,QAAM,mBAAmB;AACrB,kBAAU,UAAV;AACA,mBAAW,WAAX;KAFE,CAdQ;;AAmBd,QAAM,UAAU,EAAV,CAnBQ;;AAqBd,aAAS,QAAT,CAAmB,IAAnB,EAAyB;AACrB,eAAO,QAAQ,QA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B,EAAE,UAAF,CADO;6BAA3B;;AAIA,gCAAI,EAAE,gBAAgB,EAAhB,CAAF,EAAuB;AACvB,mCAAG,UAAH,GAAgB,EAAE,UAAF,CADO;6BAA3B;;AAIA,gCAAI,EAAJ,EAVsB;yBAAN,CANuB;AAkB3C,gCAAQ,OAAR,GAAkB,aAAK;AACnB,8BAAE,cAAF,GADmB;AAEnB,gCAAI,CAAJ,EAFmB;yBAAL,CAlByB;qBAApB,CAArB,CALe;AA4BrB,sBAAE,MAAF,GAAW,MAAX,CA5BqB;AA6BrB,2BAAO,CAAP,EA7BqB;iBAAL,CAdsB;aAA3B,CAAnB,CADsB;SAAlB;;AAiDR,aAAK,aAAU,MAAV,EAAkB,MAAlB,EAA0B;AAC3B,mBAAO,IAAI,OAAJ,CAAY,UAAU,OAAV,EAAmB,MAAnB,EAA2B;AAC1C,wBAAQ,UAAU,GAAV,CAAc,MAAd,EAAsB,MAAtB,CAAR;AAD0C,aAA3B,CAAnB,CAD2B;SAA1B;KAnJH,CAlfQ;;AA4oBd,QAAI,OAAO,MAAP,KAAkB,WAAlB,IAAiC,OAAO,OAAO,OAAP,KAAmB,WAA1B,EAAuC;AACxE,eAAO,OAAP,GAAiB,EAAjB,CADwE;KAA5E,MAEO,IAAI,OAAO,MAAP,KAAkB,UAAlB,IAAgC,OAAO,GAAP,EAAY;AACnD,eAAO,YAAY;AAAE,mBAAO,EAAP,CAAF;SAAZ,CAAP,CADmD;KAAhD,MAEA;AACH,cAAM,EAAN,GAAW,EAAX,CADG;KAFA;CA9oBV,EAmpBC,IAnpBD,CAAD","file":"db.js","sourcesContent":["import IdbImport from './idb-import';\r\n\r\n(function (local) {\r\n 'use strict';\r\n\r\n const hasOwn = Object.prototype.hasOwnProperty;\r\n\r\n const indexedDB = local.indexedDB || local.webkitIndexedDB ||\r\n local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB ||\r\n local.shimIndexedDB || (function () {\r\n throw new Error('IndexedDB required');\r\n }());\r\n const IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;\r\n\r\n const defaultMapper = x => x;\r\n const serverEvents = ['abort', 'error', 'versionchange'];\r\n const transactionModes = {\r\n readonly: 'readonly',\r\n readwrite: 'readwrite'\r\n };\r\n\r\n const dbCache = {};\r\n\r\n function isObject (item) {\r\n return item && typeof item === 'object';\r\n }\r\n\r\n function mongoDBToKeyRangeArgs (opts) {\r\n const keys = Object.keys(opts).sort();\r\n if (keys.length === 1) {\r\n const key = keys[0];\r\n const val = opts[key];\r\n let name, inclusive;\r\n switch (key) {\r\n case 'eq': name = 'only'; break;\r\n case 'gt':\r\n name = 'lowerBound';\r\n inclusive = true;\r\n break;\r\n case 'lt':\r\n name = 'upperBound';\r\n inclusive = true;\r\n break;\r\n case 'gte': name = 'lowerBound'; break;\r\n case 'lte': name = 'upperBound'; break;\r\n default: throw new TypeError('`' + key + '` is not a valid key');\r\n }\r\n return [name, [val, inclusive]];\r\n }\r\n const x = opts[keys[0]];\r\n const y = opts[keys[1]];\r\n const pattern = keys.join('-');\r\n\r\n switch (pattern) {\r\n case 'gt-lt': case 'gt-lte': case 'gte-lt': case 'gte-lte':\r\n return ['bound', [x, y, keys[0] === 'gt', keys[1] === 'lt']];\r\n default: throw new TypeError(\r\n '`' + pattern + '` are conflicted keys'\r\n );\r\n }\r\n }\r\n function mongoifyKey (key) {\r\n if (key && typeof key === 'object' && !(key instanceof IDBKeyRange)) {\r\n const [type, args] = mongoDBToKeyRangeArgs(key);\r\n return IDBKeyRange[type](...args);\r\n }\r\n return key;\r\n }\r\n\r\n const IndexQuery = function (table, db, indexName, preexistingError) {\r\n let modifyObj = null;\r\n\r\n const runQuery = function (type, args, cursorType, direction, limitRange, filters, mapper) {\r\n return new Promise(function (resolve, reject) {\r\n const keyRange = type ? IDBKeyRange[type](...args) : null; // May throw\r\n filters = filters || [];\r\n limitRange = limitRange || null;\r\n\r\n let results = [];\r\n let counter = 0;\r\n const indexArgs = [keyRange];\r\n\r\n const transaction = db.transaction(table, modifyObj ? transactionModes.readwrite : transactionModes.readonly);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(results);\r\n\r\n const store = transaction.objectStore(table); // if bad, db.transaction will reject first\r\n const index = typeof indexName === 'string' ? store.index(indexName) : store;\r\n\r\n if (cursorType !== 'count') {\r\n indexArgs.push(direction || 'next');\r\n }\r\n\r\n // Create a function that will set in the modifyObj properties into\r\n // the passed record.\r\n const modifyKeys = modifyObj ? Object.keys(modifyObj) : [];\r\n\r\n const modifyRecord = function (record) {\r\n modifyKeys.forEach(key => {\r\n let val = modifyObj[key];\r\n if (typeof val === 'function') { val = val(record); }\r\n record[key] = val;\r\n });\r\n return record;\r\n };\r\n\r\n index[cursorType](...indexArgs).onsuccess = function (e) { // indexArgs are already validated\r\n const cursor = e.target.result;\r\n if (typeof cursor === 'number') {\r\n results = cursor;\r\n } else if (cursor) {\r\n if (limitRange !== null && limitRange[0] > counter) {\r\n counter = limitRange[0];\r\n cursor.advance(limitRange[0]); // Will throw on 0, but condition above prevents since counter always 0+\r\n } else if (limitRange !== null && counter >= (limitRange[0] + limitRange[1])) {\r\n // Out of limit range... skip\r\n } else {\r\n let matchFilter = true;\r\n let result = 'value' in cursor ? cursor.value : cursor.key;\r\n\r\n try { // We must manually catch for this promise as we are within an async event function\r\n filters.forEach(function (filter) {\r\n let propObj = filter[0];\r\n if (typeof propObj === 'function') {\r\n matchFilter = matchFilter && propObj(result); // May throw with filter on non-object\r\n } else {\r\n if (!propObj || typeof propObj !== 'object') {\r\n propObj = {[propObj]: filter[1]};\r\n }\r\n Object.keys(propObj).forEach((prop) => {\r\n matchFilter = matchFilter && (result[prop] === propObj[prop]); // May throw with error in filter function\r\n });\r\n }\r\n });\r\n\r\n if (matchFilter) {\r\n counter++;\r\n // If we're doing a modify, run it now\r\n if (modifyObj) {\r\n result = modifyRecord(result); // May throw\r\n cursor.update(result); // May throw as `result` should only be a \"structured clone\"-able object\r\n }\r\n results.push(mapper(result)); // May throw\r\n }\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n cursor.continue();\r\n }\r\n }\r\n };\r\n });\r\n };\r\n\r\n const Query = function (type, args, queuedError) {\r\n const filters = [];\r\n let direction = 'next';\r\n let cursorType = 'openCursor';\r\n let limitRange = null;\r\n let mapper = defaultMapper;\r\n let unique = false;\r\n let error = preexistingError || queuedError;\r\n\r\n const execute = function () {\r\n if (error) {\r\n return Promise.reject(error);\r\n }\r\n return runQuery(type, args, cursorType, unique ? direction + 'unique' : direction, limitRange, filters, mapper);\r\n };\r\n\r\n const count = function () {\r\n direction = null;\r\n cursorType = 'count';\r\n return {execute};\r\n };\r\n\r\n const keys = function () {\r\n cursorType = 'openKeyCursor';\r\n return {desc, distinct, execute, filter, limit, map};\r\n };\r\n\r\n const limit = function (start, end) {\r\n limitRange = !end ? [0, start] : [start, end];\r\n error = limitRange.some(val => typeof val !== 'number') ? new Error('limit() arguments must be numeric') : error;\r\n return {desc, distinct, filter, keys, execute, map, modify};\r\n };\r\n\r\n const filter = function (prop, val) {\r\n filters.push([prop, val]);\r\n return {desc, distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const desc = function () {\r\n direction = 'prev';\r\n return {distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const distinct = function () {\r\n unique = true;\r\n return {count, desc, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const modify = function (update) {\r\n modifyObj = update && typeof update === 'object' ? update : null;\r\n return {execute};\r\n };\r\n\r\n const map = function (fn) {\r\n mapper = fn;\r\n return {count, desc, distinct, execute, filter, keys, limit, modify};\r\n };\r\n\r\n return {count, desc, distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n ['only', 'bound', 'upperBound', 'lowerBound'].forEach((name) => {\r\n this[name] = function () {\r\n return Query(name, arguments);\r\n };\r\n });\r\n\r\n this.range = function (opts) {\r\n let error;\r\n let keyRange = [null, null];\r\n try {\r\n keyRange = mongoDBToKeyRangeArgs(opts);\r\n } catch (e) {\r\n error = e;\r\n }\r\n return Query(...keyRange, error);\r\n };\r\n\r\n this.filter = function (...args) {\r\n const query = Query(null, null);\r\n return query.filter(...args);\r\n };\r\n\r\n this.all = function () {\r\n return this.filter();\r\n };\r\n };\r\n\r\n const setupTransactionAndStore = (db, table, records, resolve, reject, readonly) => {\r\n const transaction = db.transaction(table, readonly ? transactionModes.readonly : transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n return transaction.objectStore(table);\r\n };\r\n\r\n const Server = function (db, name, version, noServerMethods) {\r\n let closed = false;\r\n\r\n this.getIndexedDB = () => db;\r\n this.isClosed = () => closed;\r\n\r\n this.query = function (table, index) {\r\n const error = closed ? new Error('Database has been closed') : null;\r\n return new IndexQuery(table, db, index, error); // Does not throw by itself\r\n };\r\n\r\n this.add = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const store = setupTransactionAndStore(db, table, records, resolve, reject);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n key = mongoifyKey(key); // May throw\r\n }\r\n }\r\n\r\n // Safe to add since in readwrite, but may still throw\r\n if (key != null) {\r\n req = store.add(record, key);\r\n } else {\r\n req = store.add(record);\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.update = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const store = setupTransactionAndStore(db, table, records, resolve, reject);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n key = mongoifyKey(key); // May throw\r\n }\r\n }\r\n // These can throw DataError, e.g., if function passed in\r\n if (key != null) {\r\n req = store.put(record, key);\r\n } else {\r\n req = store.put(record);\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.put = function (...args) {\r\n return this.update(...args);\r\n };\r\n\r\n this.remove = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, key, resolve, reject);\r\n\r\n store.delete(key); // May throw\r\n });\r\n };\r\n\r\n this.del = this.delete = function (...args) {\r\n return this.remove(...args);\r\n };\r\n\r\n this.clear = function (table) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject);\r\n store.clear();\r\n });\r\n };\r\n\r\n this.close = function () {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n closed = true;\r\n delete dbCache[name][version];\r\n db.close();\r\n resolve();\r\n });\r\n };\r\n\r\n this.get = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);\r\n\r\n const req = store.get(key);\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.count = function (table, key) {\r\n return new Promise((resolve, reject) => {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);\r\n\r\n const req = key == null ? store.count() : store.count(key); // May throw\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.addEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n if (eventName === 'error') {\r\n db.addEventListener(eventName, function (e) {\r\n e.preventDefault(); // Needed to prevent hard abort with ConstraintError\r\n handler(e);\r\n });\r\n return;\r\n }\r\n db.addEventListener(eventName, handler);\r\n };\r\n\r\n this.removeEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n db.removeEventListener(eventName, handler);\r\n };\r\n\r\n serverEvents.forEach(function (evName) {\r\n this[evName] = function (handler) {\r\n this.addEventListener(evName, handler);\r\n return this;\r\n };\r\n }, this);\r\n\r\n if (noServerMethods) {\r\n return;\r\n }\r\n\r\n let err;\r\n Array.from(db.objectStoreNames).some(storeName => {\r\n if (this[storeName]) {\r\n err = new Error('The store name, \"' + storeName + '\", which you have attempted to load, conflicts with db.js method names.\"');\r\n this.close();\r\n return true;\r\n }\r\n this[storeName] = {};\r\n const keys = Object.keys(this);\r\n keys.filter(key => !(([...serverEvents, 'close', 'addEventListener', 'removeEventListener']).includes(key)))\r\n .map(key =>\r\n this[storeName][key] = (...args) => this[key](storeName, ...args)\r\n );\r\n });\r\n return err;\r\n };\r\n\r\n const open = function (db, server, version, noServerMethods) {\r\n dbCache[server][version] = db;\r\n\r\n return new Server(db, server, version, noServerMethods);\r\n };\r\n\r\n const db = {\r\n version: '0.15.0',\r\n open: function (options) {\r\n const server = options.server;\r\n const noServerMethods = options.noServerMethods;\r\n const clearUnusedStores = options.clearUnusedStores !== false;\r\n const clearUnusedIndexes = options.clearUnusedIndexes !== false;\r\n let version = options.version || 1;\r\n let schema = options.schema;\r\n let schemas = options.schemas;\r\n let schemaType = options.schemaType || (schema ? 'whole' : 'mixed');\r\n if (!dbCache[server]) {\r\n dbCache[server] = {};\r\n }\r\n const openDb = function (db) {\r\n const s = open(db, server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n throw s;\r\n }\r\n return s;\r\n };\r\n\r\n return new Promise(function (resolve, reject) {\r\n if (dbCache[server][version]) {\r\n const s = open(dbCache[server][version], server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n reject(s);\r\n return;\r\n }\r\n resolve(s);\r\n return;\r\n }\r\n const idbimport = new IdbImport();\r\n let p = Promise.resolve();\r\n if (schema || schemas || options.schemaBuilder) {\r\n const _addCallback = idbimport.addCallback;\r\n idbimport.addCallback = function (cb) {\r\n function newCb (db) {\r\n const s = open(db, server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n throw s;\r\n }\r\n return cb(db, s);\r\n }\r\n return _addCallback.call(idbimport, newCb);\r\n };\r\n\r\n p = p.then(() => {\r\n if (options.schemaBuilder) {\r\n return options.schemaBuilder(idbimport);\r\n }\r\n }).then(() => {\r\n if (schema) {\r\n switch (schemaType) {\r\n case 'mixed': case 'idb-schema': case 'merge': case 'whole': {\r\n schemas = {[version]: schema};\r\n break;\r\n }\r\n }\r\n }\r\n if (schemas) {\r\n idbimport.createVersionedSchema(schemas, schemaType, clearUnusedStores, clearUnusedIndexes);\r\n }\r\n const idbschemaVersion = idbimport.version();\r\n if (options.version && idbschemaVersion < version) {\r\n throw new Error(\r\n 'Your highest schema building (IDBSchema) version (' + idbschemaVersion + ') ' +\r\n 'must not be less than your designated version (' + version + ').'\r\n );\r\n }\r\n if (!options.version && idbschemaVersion > version) {\r\n version = idbschemaVersion;\r\n }\r\n });\r\n }\r\n\r\n p.then(() => {\r\n return idbimport.open(server, version);\r\n }).catch((err) => {\r\n if (err.resume) {\r\n err.resume = err.resume.then(openDb);\r\n }\r\n if (err.retry) {\r\n const _retry = err.retry;\r\n err.retry = function () {\r\n _retry.call(err).then(openDb);\r\n };\r\n }\r\n throw err;\r\n }).then(openDb).then(resolve).catch((e) => {\r\n reject(e);\r\n });\r\n });\r\n },\r\n\r\n del: function (dbName) {\r\n return this.delete(dbName);\r\n },\r\n delete: function (dbName) {\r\n return new Promise(function (resolve, reject) {\r\n const request = indexedDB.deleteDatabase(dbName); // Does not throw\r\n\r\n request.onsuccess = e => {\r\n // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in e)) {\r\n e.newVersion = null;\r\n }\r\n resolve(e);\r\n };\r\n request.onerror = e => { // No errors currently\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n request.onblocked = e => {\r\n // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279\r\n e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, {get: function (target, name) {\r\n return name === 'newVersion' ? null : target[name];\r\n }});\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // delete() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = ev => {\r\n // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in ev)) {\r\n ev.newVersion = e.newVersion;\r\n }\r\n\r\n if (!('oldVersion' in ev)) {\r\n ev.oldVersion = e.oldVersion;\r\n }\r\n\r\n res(ev);\r\n };\r\n request.onerror = e => {\r\n e.preventDefault();\r\n rej(e);\r\n };\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n });\r\n },\r\n\r\n cmp: function (param1, param2) {\r\n return new Promise(function (resolve, reject) {\r\n resolve(indexedDB.cmp(param1, param2)); // May throw\r\n });\r\n }\r\n };\r\n\r\n if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\r\n module.exports = db;\r\n } else if (typeof define === 'function' && define.amd) {\r\n define(function () { return db; });\r\n } else {\r\n local.db = db;\r\n }\r\n}(self));\r\n"]}
\ No newline at end of file
diff --git a/dist/db.min.js b/dist/db.min.js
index f5cdd74..6b0d910 100644
--- a/dist/db.min.js
+++ b/dist/db.min.js
@@ -1,2 +1,6 @@
-!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.db=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gu)u=m[0],b.advance(m[0]);else if(null!==m&&u>=m[0]+m[1]);else{var c=function(){var a=!0,c="value"in b?b.value:b.key;try{n.forEach(function(b){a="function"==typeof b[0]?a&&b[0](c):a&&c[b[0]]===b[1]})}catch(d){return q(d),{v:void 0}}if(a){if(u++,i)try{c=A(c),b.update(c)}catch(d){return q(d),{v:void 0}}try{t.push(o(c))}catch(d){return q(d),{v:void 0}}}b["continue"]()}();if("object"===("undefined"==typeof c?"undefined":g(c)))return c.v}}})},n=function(a,b,c){var e=[],f="next",h="openCursor",j=null,k=m,n=!1,o=d||c,p=function(){return o?Promise.reject(o):l(a,b,h,n?f+"unique":f,j,e,k)},q=function(){return f=null,h="count",{execute:p}},r=function(){return h="openKeyCursor",{desc:u,distinct:v,execute:p,filter:t,limit:s,map:x}},s=function(a,b){return j=b?[a,b]:[0,a],o=j.some(function(a){return"number"!=typeof a})?new Error("limit() arguments must be numeric"):o,{desc:u,distinct:v,filter:t,keys:r,execute:p,map:x,modify:w}},t=function y(a,b){return e.push([a,b]),{desc:u,distinct:v,execute:p,filter:y,keys:r,limit:s,map:x,modify:w}},u=function(){return f="prev",{distinct:v,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}},v=function(){return n=!0,{count:q,desc:u,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}},w=function(a){return i=a&&"object"===("undefined"==typeof a?"undefined":g(a))?a:null,{execute:p}},x=function(a){return k=a,{count:q,desc:u,distinct:v,execute:p,filter:t,keys:r,limit:s,modify:w}};return{count:q,desc:u,distinct:v,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}};["only","bound","upperBound","lowerBound"].forEach(function(a){f[a]=function(){return n(a,arguments)}}),this.range=function(a){var b=void 0,c=[null,null];try{c=h(a)}catch(d){b=d}return n.apply(void 0,e(c).concat([b]))},this.filter=function(){var a=n(null,null);return a.filter.apply(a,arguments)},this.all=function(){return this.filter()}},r=function(a,b,c,e){var f=this,g=!1;if(this.getIndexedDB=function(){return a},this.isClosed=function(){return g},this.query=function(b,c){var d=g?new Error("Database has been closed"):null;return new q(b,a,c,d)},this.add=function(b){for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];return new Promise(function(c,f){if(g)return void f(new Error("Database has been closed"));var h=e.reduce(function(a,b){return a.concat(b)},[]),j=a.transaction(b,k.readwrite);j.onerror=function(a){a.preventDefault(),f(a)},j.onabort=function(a){return f(a)},j.oncomplete=function(){return c(h)};var m=j.objectStore(b);h.some(function(a){var b=void 0,c=void 0;if(d(a)&&l.call(a,"item")&&(c=a.key,a=a.item,null!=c))try{c=i(c)}catch(e){return f(e),!0}try{b=null!=c?m.add(a,c):m.add(a)}catch(e){return f(e),!0}b.onsuccess=function(b){if(d(a)){var c=b.target,e=c.source.keyPath;null===e&&(e="__id__"),l.call(a,e)||Object.defineProperty(a,e,{value:c.result,enumerable:!0})}}})})},this.update=function(b){for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];return new Promise(function(c,f){if(g)return void f(new Error("Database has been closed"));var h=e.reduce(function(a,b){return a.concat(b)},[]),j=a.transaction(b,k.readwrite);j.onerror=function(a){a.preventDefault(),f(a)},j.onabort=function(a){return f(a)},j.oncomplete=function(){return c(h)};var m=j.objectStore(b);h.some(function(a){var b=void 0,c=void 0;if(d(a)&&l.call(a,"item")&&(c=a.key,a=a.item,null!=c))try{c=i(c)}catch(e){return f(e),!0}try{b=null!=c?m.put(a,c):m.put(a)}catch(g){return f(g),!0}b.onsuccess=function(b){if(d(a)){var c=b.target,e=c.source.keyPath;null===e&&(e="__id__"),l.call(a,e)||Object.defineProperty(a,e,{value:c.result,enumerable:!0})}}})})},this.put=function(){return this.update.apply(this,arguments)},this.remove=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));try{c=i(c)}catch(f){return void e(f)}var h=a.transaction(b,k.readwrite);h.onerror=function(a){a.preventDefault(),e(a)},h.onabort=function(a){return e(a)},h.oncomplete=function(){return d(c)};var j=h.objectStore(b);try{j["delete"](c)}catch(l){e(l)}})},this["delete"]=function(){return this.remove.apply(this,arguments)},this.clear=function(b){return new Promise(function(c,d){if(g)return void d(new Error("Database has been closed"));var e=a.transaction(b,k.readwrite);e.onerror=function(a){return d(a)},e.onabort=function(a){return d(a)},e.oncomplete=function(){return c()};var f=e.objectStore(b);f.clear()})},this.close=function(){return new Promise(function(d,e){return g?void e(new Error("Database has been closed")):(a.close(),g=!0,delete o[b][c],void d())})},this.get=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));try{c=i(c)}catch(f){return void e(f)}var h=a.transaction(b);h.onerror=function(a){a.preventDefault(),e(a)},h.onabort=function(a){return e(a)};var j=h.objectStore(b),k=void 0;try{k=j.get(c)}catch(l){e(l)}k.onsuccess=function(a){return d(a.target.result)}})},this.count=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));try{c=i(c)}catch(f){return void e(f)}var h=a.transaction(b);h.onerror=function(a){a.preventDefault(),e(a)},h.onabort=function(a){return e(a)};var j=h.objectStore(b),k=void 0;try{k=null==c?j.count():j.count(c)}catch(l){e(l)}k.onsuccess=function(a){return d(a.target.result)}})},this.addEventListener=function(b,c){if(!p.includes(b))throw new Error("Unrecognized event type "+b);return"error"===b?void a.addEventListener(b,function(a){a.preventDefault(),c(a)}):void a.addEventListener(b,c)},this.removeEventListener=function(b,c){if(!p.includes(b))throw new Error("Unrecognized event type "+b);a.removeEventListener(b,c)},p.forEach(function(a){this[a]=function(b){return this.addEventListener(a,b),this}},this),!e){var h=void 0;return[].some.call(a.objectStoreNames,function(a){if(f[a])return h=new Error('The store name, "'+a+'", which you have attempted to load, conflicts with db.js method names."'),f.close(),!0;f[a]={};var b=Object.keys(f);b.filter(function(a){return![].concat(p,["close","addEventListener","removeEventListener"]).includes(a)}).map(function(b){return f[a][b]=function(){for(var c=arguments.length,d=Array(c),e=0;c>e;e++)d[e]=arguments[e];return f[b].apply(f,[a].concat(d))}})}),h}},s=function(a,b,c,d,e,f){if(c&&0!==c.length){for(var h=0;hu)u=l[0],b.advance(l[0]);else if(null!==l&&u>=l[0]+l[1]);else{var c=function(){var a=!0,c="value"in b?b.value:b.key;try{m.forEach(function(b){var d=b[0];"function"==typeof d?a=a&&d(c):(d&&"object"===("undefined"==typeof d?"undefined":i(d))||(d=f({},d,b[1])),Object.keys(d).forEach(function(b){a=a&&c[b]===d[b]}))}),a&&(u++,j&&(c=A(c),b.update(c)),t.push(o(c)))}catch(d){return r(d),{v:void 0}}b["continue"]()}();if("object"===("undefined"==typeof c?"undefined":i(c)))return c.v}}})},l=function(a,b,c){var e=[],f="next",g="openCursor",h=null,l=o,m=!1,n=d||c,p=function(){return n?Promise.reject(n):k(a,b,g,m?f+"unique":f,h,e,l)},q=function(){return f=null,g="count",{execute:p}},r=function(){return g="openKeyCursor",{desc:u,distinct:v,execute:p,filter:t,limit:s,map:x}},s=function(a,b){return h=b?[a,b]:[0,a],n=h.some(function(a){return"number"!=typeof a})?new Error("limit() arguments must be numeric"):n,{desc:u,distinct:v,filter:t,keys:r,execute:p,map:x,modify:w}},t=function y(a,b){return e.push([a,b]),{desc:u,distinct:v,execute:p,filter:y,keys:r,limit:s,map:x,modify:w}},u=function(){return f="prev",{distinct:v,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}},v=function(){return m=!0,{count:q,desc:u,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}},w=function(a){return j=a&&"object"===("undefined"==typeof a?"undefined":i(a))?a:null,{execute:p}},x=function(a){return l=a,{count:q,desc:u,distinct:v,execute:p,filter:t,keys:r,limit:s,modify:w}};return{count:q,desc:u,distinct:v,execute:p,filter:t,keys:r,limit:s,map:x,modify:w}};["only","bound","upperBound","lowerBound"].forEach(function(a){h[a]=function(){return l(a,arguments)}}),this.range=function(a){var b=void 0,c=[null,null];try{c=e(a)}catch(d){b=d}return l.apply(void 0,g(c).concat([b]))},this.filter=function(){var a=l(null,null);return a.filter.apply(a,arguments)},this.all=function(){return this.filter()}},t=function(a,b,c,d,e,f){var g=a.transaction(b,f?q.readonly:q.readwrite);return g.onerror=function(a){a.preventDefault(),e(a)},g.onabort=function(a){return e(a)},g.oncomplete=function(){return d(c)},g.objectStore(b)},u=function(a,b,c,e){var f=this,g=!1;if(this.getIndexedDB=function(){return a},this.isClosed=function(){return g},this.query=function(b,c){var d=g?new Error("Database has been closed"):null;return new s(b,a,c,d)},this.add=function(b){for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];return new Promise(function(c,f){if(g)return void f(new Error("Database has been closed"));var h=e.reduce(function(a,b){return a.concat(b)},[]),i=t(a,b,h,c,f);h.some(function(a){var b=void 0,c=void 0;d(a)&&l.call(a,"item")&&(c=a.key,a=a.item,null!=c&&(c=j(c))),b=null!=c?i.add(a,c):i.add(a),b.onsuccess=function(b){if(d(a)){var c=b.target,e=c.source.keyPath;null===e&&(e="__id__"),l.call(a,e)||Object.defineProperty(a,e,{value:c.result,enumerable:!0})}}})})},this.update=function(b){for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;c>f;f++)e[f-1]=arguments[f];return new Promise(function(c,f){if(g)return void f(new Error("Database has been closed"));var h=e.reduce(function(a,b){return a.concat(b)},[]),i=t(a,b,h,c,f);h.some(function(a){var b=void 0,c=void 0;d(a)&&l.call(a,"item")&&(c=a.key,a=a.item,null!=c&&(c=j(c))),b=null!=c?i.put(a,c):i.put(a),b.onsuccess=function(b){if(d(a)){var c=b.target,e=c.source.keyPath;null===e&&(e="__id__"),l.call(a,e)||Object.defineProperty(a,e,{value:c.result,enumerable:!0})}}})})},this.put=function(){return this.update.apply(this,arguments)},this.remove=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));c=j(c);var f=t(a,b,c,d,e);f["delete"](c)})},this.del=this["delete"]=function(){return this.remove.apply(this,arguments)},this.clear=function(b){return new Promise(function(c,d){if(g)return void d(new Error("Database has been closed"));var e=t(a,b,void 0,c,d);e.clear()})},this.close=function(){return new Promise(function(d,e){return g?void e(new Error("Database has been closed")):(g=!0,delete r[b][c],a.close(),void d())})},this.get=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));c=j(c);var f=t(a,b,void 0,d,e,!0),h=f.get(c);h.onsuccess=function(a){return d(a.target.result)}})},this.count=function(b,c){return new Promise(function(d,e){if(g)return void e(new Error("Database has been closed"));c=j(c);var f=t(a,b,void 0,d,e,!0),h=null==c?f.count():f.count(c);h.onsuccess=function(a){return d(a.target.result)}})},this.addEventListener=function(b,c){if(!p.includes(b))throw new Error("Unrecognized event type "+b);return"error"===b?void a.addEventListener(b,function(a){a.preventDefault(),c(a)}):void a.addEventListener(b,c)},this.removeEventListener=function(b,c){if(!p.includes(b))throw new Error("Unrecognized event type "+b);a.removeEventListener(b,c)},p.forEach(function(a){this[a]=function(b){return this.addEventListener(a,b),this}},this),!e){var h=void 0;return Array.from(a.objectStoreNames).some(function(a){if(f[a])return h=new Error('The store name, "'+a+'", which you have attempted to load, conflicts with db.js method names."'),f.close(),!0;f[a]={};var b=Object.keys(f);b.filter(function(a){return![].concat(p,["close","addEventListener","removeEventListener"]).includes(a)}).map(function(b){return f[a][b]=function(){for(var c=arguments.length,d=Array(c),e=0;c>e;e++)d[e]=arguments[e];return f[b].apply(f,[a].concat(d))}})}),h}},v=function(a,b,c,d){return r[b][c]=a,new u(a,b,c,d)},w={version:"0.15.0",open:function(a){var b=a.server,c=a.noServerMethods,d=a.clearUnusedStores!==!1,e=a.clearUnusedIndexes!==!1,g=a.version||1,h=a.schema,i=a.schemas,j=a.schemaType||(h?"whole":"mixed");r[b]||(r[b]={});var l=function(a){var d=v(a,b,g,c);if(d instanceof Error)throw d;return d};return new Promise(function(m,n){if(r[b][g]){var o=v(r[b][g],b,g,c);return o instanceof Error?void n(o):void m(o)}var p=new k["default"],q=Promise.resolve();(h||i||a.schemaBuilder)&&!function(){var k=p.addCallback;p.addCallback=function(a){function d(d){var e=v(d,b,g,c);if(e instanceof Error)throw e;return a(d,e)}return k.call(p,d)},q=q.then(function(){return a.schemaBuilder?a.schemaBuilder(p):void 0}).then(function(){if(h)switch(j){case"mixed":case"idb-schema":case"merge":case"whole":i=f({},g,h)}i&&p.createVersionedSchema(i,j,d,e);var b=p.version();if(a.version&&g>b)throw new Error("Your highest schema building (IDBSchema) version ("+b+") must not be less than your designated version ("+g+").");!a.version&&b>g&&(g=b)})}(),q.then(function(){return p.open(b,g)})["catch"](function(a){throw a.resume&&(a.resume=a.resume.then(l)),a.retry&&!function(){var b=a.retry;a.retry=function(){b.call(a).then(l)}}(),a}).then(l).then(m)["catch"](function(a){n(a)})})},del:function(a){return this["delete"](a)},"delete":function(a){return new Promise(function(b,c){var d=m.deleteDatabase(a);d.onsuccess=function(a){"newVersion"in a||(a.newVersion=null),b(a)},d.onerror=function(a){a.preventDefault(),c(a)},d.onblocked=function(a){a=null===a.newVersion||"undefined"==typeof Proxy?a:new Proxy(a,{get:function(a,b){return"newVersion"===b?null:a[b]}});var b=new Promise(function(b,c){d.onsuccess=function(c){"newVersion"in c||(c.newVersion=a.newVersion),"oldVersion"in c||(c.oldVersion=a.oldVersion),b(c)},d.onerror=function(a){a.preventDefault(),c(a)}});a.resume=b,c(a)}})},cmp:function(a,b){return new Promise(function(c,d){c(m.cmp(a,b))})}};"undefined"!=typeof c&&"undefined"!=typeof c.exports?c.exports=w:"function"==typeof a&&a.amd?a(function(){return w}):b.db=w}(self)},{"./idb-import":2}],2:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(c,"__esModule",{value:!0});var h=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;c2?arguments[2]:void 0,k=Math.min((void 0===j?g:e(j,g))-i,g-h),l=1;for(h>i&&i+k>h&&(l=-1,i+=k-1,h+=k-1);k-->0;)i in c?c[h]=c[i]:delete c[h],h+=l,i+=l;return c}},{"./_to-index":103,"./_to-length":106,"./_to-object":107}],11:[function(a,b,c){"use strict";var d=a("./_to-object"),e=a("./_to-index"),f=a("./_to-length");b.exports=function(a){for(var b=d(this),c=f(b.length),g=arguments.length,h=e(g>1?arguments[1]:void 0,c),i=g>2?arguments[2]:void 0,j=void 0===i?c:e(i,c);j>h;)b[h++]=a;return b}},{"./_to-index":103,"./_to-length":106,"./_to-object":107}],12:[function(a,b,c){var d=a("./_for-of");b.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},{"./_for-of":36}],13:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_to-length"),f=a("./_to-index");b.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k;return!a&&-1}}},{"./_to-index":103,"./_to-iobject":105,"./_to-length":106}],14:[function(a,b,c){var d=a("./_ctx"),e=a("./_iobject"),f=a("./_to-object"),g=a("./_to-length"),h=a("./_array-species-create");b.exports=function(a,b){var c=1==a,i=2==a,j=3==a,k=4==a,l=6==a,m=5==a||l,n=b||h;return function(b,h,o){for(var p,q,r=f(b),s=e(r),t=d(h,o,3),u=g(s.length),v=0,w=c?n(b,u):i?n(b,0):void 0;u>v;v++)if((m||v in s)&&(p=s[v],q=t(p,v,r),a))if(c)w[v]=q;else if(q)switch(a){case 3:return!0;case 5:return p;case 6:return v;case 2:w.push(p)}else if(k)return!1;return l?-1:j||k?k:w}}},{"./_array-species-create":16,"./_ctx":25,"./_iobject":44,"./_to-length":106,"./_to-object":107}],15:[function(a,b,c){var d=a("./_a-function"),e=a("./_to-object"),f=a("./_iobject"),g=a("./_to-length");b.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(2>c)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?0>m:m>=l)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},{"./_a-function":5,"./_iobject":44,"./_to-length":106,"./_to-object":107}],16:[function(a,b,c){var d=a("./_is-object"),e=a("./_is-array"),f=a("./_wks")("species");b.exports=function(a,b){var c;return e(a)&&(c=a.constructor,"function"!=typeof c||c!==Array&&!e(c.prototype)||(c=void 0),d(c)&&(c=c[f],null===c&&(c=void 0))),new(void 0===c?Array:c)(b)}},{"./_is-array":46,"./_is-object":48,"./_wks":113}],17:[function(a,b,c){"use strict";var d=a("./_a-function"),e=a("./_is-object"),f=a("./_invoke"),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;b>e;e++)d[e]="a["+e+"]";h[b]=Function("F,a","return new F("+d.join(",")+")")}return h[b](a,c)};b.exports=Function.bind||function(a){var b=d(this),c=g.call(arguments,1),h=function(){var d=c.concat(g.call(arguments));return this instanceof h?i(b,d.length,d):f(b,d,a)};return e(b.prototype)&&(h.prototype=b.prototype),h}},{"./_a-function":5,"./_invoke":43,"./_is-object":48}],18:[function(a,b,c){var d=a("./_cof"),e=a("./_wks")("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(c){}};b.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},{"./_cof":19,"./_wks":113}],19:[function(a,b,c){var d={}.toString;b.exports=function(a){return d.call(a).slice(8,-1)}},{}],20:[function(a,b,c){"use strict";var d=a("./_object-dp").f,e=a("./_object-create"),f=(a("./_hide"),a("./_redefine-all")),g=a("./_ctx"),h=a("./_an-instance"),i=a("./_defined"),j=a("./_for-of"),k=a("./_iter-define"),l=a("./_iter-step"),m=a("./_set-species"),n=a("./_descriptors"),o=a("./_meta").fastKey,p=n?"_s":"size",q=function(a,b){var c,d=o(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};b.exports={getConstructor:function(a,b,c,k){var l=a(function(a,d){h(a,l,b,"_i"),a._i=e(null),a._f=void 0,a._l=void 0,a[p]=0,void 0!=d&&j(d,c,a[k],a)});return f(l.prototype,{clear:function(){for(var a=this,b=a._i,c=a._f;c;c=c.n)c.r=!0,c.p&&(c.p=c.p.n=void 0),delete b[c.i];a._f=a._l=void 0,a[p]=0},"delete":function(a){var b=this,c=q(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[p]--}return!!c},forEach:function(a){h(this,l,"forEach");for(var b,c=g(a,arguments.length>1?arguments[1]:void 0,3);b=b?b.n:this._f;)for(c(b.v,b.k,this);b&&b.r;)b=b.p},has:function(a){return!!q(this,a)}}),n&&d(l.prototype,"size",{get:function(){return i(this[p])}}),l},def:function(a,b,c){var d,e,f=q(a,b);return f?f.v=c:(a._l=f={i:e=o(b,!0),k:b,v:c,p:d=a._l,n:void 0,r:!1},a._f||(a._f=f),d&&(d.n=f),a[p]++,"F"!==e&&(a._i[e]=f)),a},getEntry:q,setStrong:function(a,b,c){k(a,b,function(a,b){this._t=a,this._k=b,this._l=void 0},function(){for(var a=this,b=a._k,c=a._l;c&&c.r;)c=c.p;return a._t&&(a._l=c=c?c.n:a._t._f)?"keys"==b?l(0,c.k):"values"==b?l(0,c.v):l(0,[c.k,c.v]):(a._t=void 0,l(1))},c?"entries":"values",!c,!0),m(b)}}},{"./_an-instance":8,"./_ctx":25,"./_defined":26,"./_descriptors":27,"./_for-of":36,"./_hide":39,"./_iter-define":52,"./_iter-step":54,"./_meta":61,"./_object-create":65,"./_object-dp":66,"./_redefine-all":84,"./_set-species":89}],21:[function(a,b,c){var d=a("./_classof"),e=a("./_array-from-iterable");b.exports=function(a){return function(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},{"./_array-from-iterable":12,"./_classof":18}],22:[function(a,b,c){"use strict";var d=a("./_redefine-all"),e=a("./_meta").getWeak,f=a("./_an-object"),g=a("./_is-object"),h=a("./_an-instance"),i=a("./_for-of"),j=a("./_array-methods"),k=a("./_has"),l=j(5),m=j(6),n=0,o=function(a){return a._l||(a._l=new p)},p=function(){this.a=[]},q=function(a,b){return l(a.a,function(a){return a[0]===b})};p.prototype={get:function(a){var b=q(this,a);return b?b[1]:void 0},has:function(a){return!!q(this,a)},set:function(a,b){var c=q(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=m(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},b.exports={getConstructor:function(a,b,c,f){var j=a(function(a,d){h(a,j,b,"_i"),a._i=n++,a._l=void 0,void 0!=d&&i(d,c,a[f],a)});return d(j.prototype,{"delete":function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this)["delete"](a):b&&k(b,this._i)&&delete b[this._i]},has:function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this).has(a):b&&k(b,this._i)}}),j},def:function(a,b,c){var d=e(f(b),!0);return d===!0?o(a).set(b,c):d[a._i]=c,a},ufstore:o}},{"./_an-instance":8,"./_an-object":9,"./_array-methods":14,"./_for-of":36,"./_has":38,"./_is-object":48,"./_meta":61,"./_redefine-all":84}],23:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_export"),f=a("./_redefine"),g=a("./_redefine-all"),h=a("./_meta"),i=a("./_for-of"),j=a("./_an-instance"),k=a("./_is-object"),l=a("./_fails"),m=a("./_iter-detect"),n=a("./_set-to-string-tag"),o=a("./_inherit-if-required");b.exports=function(a,b,c,p,q,r){var s=d[a],t=s,u=q?"set":"add",v=t&&t.prototype,w={},x=function(a){var b=v[a];f(v,a,"delete"==a?function(a){return r&&!k(a)?!1:b.call(this,0===a?0:a)}:"has"==a?function(a){return r&&!k(a)?!1:b.call(this,0===a?0:a)}:"get"==a?function(a){return r&&!k(a)?void 0:b.call(this,0===a?0:a)}:"add"==a?function(a){return b.call(this,0===a?0:a),this}:function(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof t&&(r||v.forEach&&!l(function(){(new t).entries().next()}))){var y=new t,z=y[u](r?{}:-0,1)!=y,A=l(function(){y.has(1)}),B=m(function(a){new t(a)}),C=!r&&l(function(){for(var a=new t,b=5;b--;)a[u](b,b);return!a.has(-0)});B||(t=b(function(b,c){j(b,t,a);var d=o(new s,b,t);return void 0!=c&&i(c,q,d[u],d),d}),t.prototype=v,v.constructor=t),(A||C)&&(x("delete"),x("has"),q&&x("get")),(C||z)&&x(u),r&&v.clear&&delete v.clear}else t=p.getConstructor(b,a,q,u),g(t.prototype,c),h.NEED=!0;return n(t,a),w[a]=t,e(e.G+e.W+e.F*(t!=s),w),r||p.setStrong(t,a,q),t}},{"./_an-instance":8,"./_export":31,"./_fails":33,"./_for-of":36,"./_global":37,"./_inherit-if-required":42,"./_is-object":48,"./_iter-detect":53,"./_meta":61,"./_redefine":85,"./_redefine-all":84,"./_set-to-string-tag":90}],24:[function(a,b,c){var d=b.exports={version:"2.1.5"};"number"==typeof __e&&(__e=d)},{}],25:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":5}],26:[function(a,b,c){b.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},{}],27:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":33}],28:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":37,"./_is-object":48}],29:[function(a,b,c){b.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],30:[function(a,b,c){var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie");b.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},{"./_object-gops":71,"./_object-keys":74,"./_object-pie":75}],31:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_hide"),g=a("./_redefine"),h=a("./_ctx"),i="prototype",j=function(a,b,c){var k,l,m,n,o=a&j.F,p=a&j.G,q=a&j.S,r=a&j.P,s=a&j.B,t=p?d:q?d[b]||(d[b]={}):(d[b]||{})[i],u=p?e:e[b]||(e[b]={}),v=u[i]||(u[i]={});p&&(c=b);for(k in c)l=!o&&t&&void 0!==t[k],m=(l?t:c)[k],n=s&&l?h(m,d):r&&"function"==typeof m?h(Function.call,m):m,t&&g(t,k,m,a&j.U),u[k]!=m&&f(u,k,n),r&&v[k]!=m&&(v[k]=m)};d.core=e,j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,b.exports=j},{"./_core":24,"./_ctx":25,"./_global":37,"./_hide":39,"./_redefine":85}],32:[function(a,b,c){var d=a("./_wks")("match");b.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},{"./_wks":113}],33:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(b){return!0}}},{}],34:[function(a,b,c){"use strict";var d=a("./_hide"),e=a("./_redefine"),f=a("./_fails"),g=a("./_defined"),h=a("./_wks");b.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},{"./_defined":26,"./_fails":33,"./_hide":39,"./_redefine":85,"./_wks":113}],35:[function(a,b,c){"use strict";var d=a("./_an-object");b.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},{"./_an-object":9}],36:[function(a,b,c){var d=a("./_ctx"),e=a("./_iter-call"),f=a("./_is-array-iter"),g=a("./_an-object"),h=a("./_to-length"),i=a("./core.get-iterator-method");b.exports=function(a,b,c,j,k){var l,m,n,o=k?function(){return a}:i(a),p=d(c,j,b?2:1),q=0;if("function"!=typeof o)throw TypeError(a+" is not iterable!");if(f(o))for(l=h(a.length);l>q;q++)b?p(g(m=a[q])[0],m[1]):p(a[q]);else for(n=o.call(a);!(m=n.next()).done;)e(n,p,m.value,b)}},{"./_an-object":9,"./_ctx":25,"./_is-array-iter":45,"./_iter-call":50,"./_to-length":106,"./core.get-iterator-method":114}],37:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],38:[function(a,b,c){var d={}.hasOwnProperty;b.exports=function(a,b){return d.call(a,b)}},{}],39:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":27,"./_object-dp":66,"./_property-desc":83}],40:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":37}],41:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":27,"./_dom-create":28,"./_fails":33}],42:[function(a,b,c){var d=a("./_is-object"),e=a("./_set-proto").set;b.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},{"./_is-object":48,"./_set-proto":88}],43:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;
+switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],44:[function(a,b,c){var d=a("./_cof");b.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},{"./_cof":19}],45:[function(a,b,c){var d=a("./_iterators"),e=a("./_wks")("iterator"),f=Array.prototype;b.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},{"./_iterators":55,"./_wks":113}],46:[function(a,b,c){var d=a("./_cof");b.exports=Array.isArray||function(a){return"Array"==d(a)}},{"./_cof":19}],47:[function(a,b,c){var d=a("./_is-object"),e=Math.floor;b.exports=function(a){return!d(a)&&isFinite(a)&&e(a)===a}},{"./_is-object":48}],48:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],49:[function(a,b,c){var d=a("./_is-object"),e=a("./_cof"),f=a("./_wks")("match");b.exports=function(a){var b;return d(a)&&(void 0!==(b=a[f])?!!b:"RegExp"==e(a))}},{"./_cof":19,"./_is-object":48,"./_wks":113}],50:[function(a,b,c){var d=a("./_an-object");b.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(f){var g=a["return"];throw void 0!==g&&d(g.call(a)),f}}},{"./_an-object":9}],51:[function(a,b,c){"use strict";var d=a("./_object-create"),e=a("./_property-desc"),f=a("./_set-to-string-tag"),g={};a("./_hide")(g,a("./_wks")("iterator"),function(){return this}),b.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},{"./_hide":39,"./_object-create":65,"./_property-desc":83,"./_set-to-string-tag":90,"./_wks":113}],52:[function(a,b,c){"use strict";var d=a("./_library"),e=a("./_export"),f=a("./_redefine"),g=a("./_hide"),h=a("./_has"),i=a("./_iterators"),j=a("./_iter-create"),k=a("./_set-to-string-tag"),l=a("./_object-gpo"),m=a("./_wks")("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};b.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y,z=function(a){if(!n&&a in D)return D[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},A=b+" Iterator",B=t==q,C=!1,D=a.prototype,E=D[m]||D[o]||t&&D[t],F=E||z(t),G=t?B?z("entries"):F:void 0,H="Array"==b?D.entries||E:E;if(H&&(y=l(H.call(new a)),y!==Object.prototype&&(k(y,A,!0),d||h(y,m)||g(y,m,r))),B&&E&&E.name!==q&&(C=!0,F=function(){return E.call(this)}),d&&!v||!n&&!C&&D[m]||g(D,m,F),i[b]=F,i[A]=r,t)if(w={values:B?F:z(q),keys:u?F:z(p),entries:G},v)for(x in w)x in D||f(D,x,w[x]);else e(e.P+e.F*(n||C),b,w);return w}},{"./_export":31,"./_has":38,"./_hide":39,"./_iter-create":51,"./_iterators":55,"./_library":57,"./_object-gpo":72,"./_redefine":85,"./_set-to-string-tag":90,"./_wks":113}],53:[function(a,b,c){var d=a("./_wks")("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}b.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){c=!0},f[d]=function(){return g},a(f)}catch(h){}return c}},{"./_wks":113}],54:[function(a,b,c){b.exports=function(a,b){return{value:b,done:!!a}}},{}],55:[function(a,b,c){b.exports={}},{}],56:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject");b.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},{"./_object-keys":74,"./_to-iobject":105}],57:[function(a,b,c){b.exports=!1},{}],58:[function(a,b,c){b.exports=Math.expm1||function(a){return 0==(a=+a)?a:a>-1e-6&&1e-6>a?a+a*a/2:Math.exp(a)-1}},{}],59:[function(a,b,c){b.exports=Math.log1p||function(a){return(a=+a)>-1e-8&&1e-8>a?a-a*a/2:Math.log(1+a)}},{}],60:[function(a,b,c){b.exports=Math.sign||function(a){return 0==(a=+a)||a!=a?a:0>a?-1:1}},{}],61:[function(a,b,c){var d=a("./_uid")("meta"),e=a("./_is-object"),f=a("./_has"),g=a("./_object-dp").f,h=0,i=Object.isExtensible||function(){return!0},j=!a("./_fails")(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=b.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},{"./_fails":33,"./_has":38,"./_is-object":48,"./_object-dp":66,"./_uid":112}],62:[function(a,b,c){var d=a("./es6.map"),e=a("./_export"),f=a("./_shared")("metadata"),g=f.store||(f.store=new(a("./es6.weak-map"))),h=function(a,b,c){var e=g.get(a);if(!e){if(!c)return void 0;g.set(a,e=new d)}var f=e.get(b);if(!f){if(!c)return void 0;e.set(b,f=new d)}return f},i=function(a,b,c){var d=h(b,c,!1);return void 0===d?!1:d.has(a)},j=function(a,b,c){var d=h(b,c,!1);return void 0===d?void 0:d.get(a)},k=function(a,b,c,d){h(c,d,!0).set(a,b)},l=function(a,b){var c=h(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},m=function(a){return void 0===a||"symbol"==typeof a?a:String(a)},n=function(a){e(e.S,"Reflect",a)};b.exports={store:g,map:h,has:i,get:j,set:k,keys:l,key:m,exp:n}},{"./_export":31,"./_shared":92,"./es6.map":145,"./es6.weak-map":251}],63:[function(a,b,c){var d,e,f,g=a("./_global"),h=a("./_task").set,i=g.MutationObserver||g.WebKitMutationObserver,j=g.process,k=g.Promise,l="process"==a("./_cof")(j),m=function(){var a,b;for(l&&(a=j.domain)&&a.exit();d;)b=d.fn,b(),d=d.next;e=void 0,a&&a.enter()};if(l)f=function(){j.nextTick(m)};else if(i){var n=!0,o=document.createTextNode("");new i(m).observe(o,{characterData:!0}),f=function(){o.data=n=!n}}else f=k&&k.resolve?function(){k.resolve().then(m)}:function(){h.call(g,m)};b.exports=function(a){var b={fn:a,next:void 0};e&&(e.next=b),d||(d=b,f()),e=b}},{"./_cof":19,"./_global":37,"./_task":102}],64:[function(a,b,c){"use strict";var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie"),g=a("./_to-object"),h=a("./_iobject"),i=Object.assign;b.exports=!i||a("./_fails")(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},{"./_fails":33,"./_iobject":44,"./_object-gops":71,"./_object-keys":74,"./_object-pie":75,"./_to-object":107}],65:[function(a,b,c){var d=a("./_an-object"),e=a("./_object-dps"),f=a("./_enum-bug-keys"),g=a("./_shared-key")("IE_PROTO"),h=function(){},i="prototype",j=function(){var b,c=a("./_dom-create")("iframe"),d=f.length,e=">";for(c.style.display="none",a("./_html").appendChild(c),c.src="javascript:",b=c.contentWindow.document,b.open(),b.write("i;)d.f(a,c=g[i++],b[c]);return a}},{"./_an-object":9,"./_descriptors":27,"./_object-dp":66,"./_object-keys":74}],68:[function(a,b,c){var d=a("./_object-pie"),e=a("./_property-desc"),f=a("./_to-iobject"),g=a("./_to-primitive"),h=a("./_has"),i=a("./_ie8-dom-define"),j=Object.getOwnPropertyDescriptor;c.f=a("./_descriptors")?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}return h(a,b)?e(!d.f.call(a,b),a[b]):void 0}},{"./_descriptors":27,"./_has":38,"./_ie8-dom-define":41,"./_object-pie":75,"./_property-desc":83,"./_to-iobject":105,"./_to-primitive":108}],69:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopn").f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e.f(a)}catch(b){return g.slice()}};b.exports.f=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},{"./_object-gopn":70,"./_to-iobject":105}],70:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(a){return d(a,e)}},{"./_enum-bug-keys":29,"./_object-keys-internal":73}],71:[function(a,b,c){c.f=Object.getOwnPropertySymbols},{}],72:[function(a,b,c){var d=a("./_has"),e=a("./_to-object"),f=a("./_shared-key")("IE_PROTO"),g=Object.prototype;b.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},{"./_has":38,"./_shared-key":91,"./_to-object":107}],73:[function(a,b,c){var d=a("./_has"),e=a("./_to-iobject"),f=a("./_array-includes")(!1),g=a("./_shared-key")("IE_PROTO");b.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},{"./_array-includes":13,"./_has":38,"./_shared-key":91,"./_to-iobject":105}],74:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys");b.exports=Object.keys||function(a){return d(a,e)}},{"./_enum-bug-keys":29,"./_object-keys-internal":73}],75:[function(a,b,c){c.f={}.propertyIsEnumerable},{}],76:[function(a,b,c){var d=a("./_export"),e=a("./_core"),f=a("./_fails");b.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},{"./_core":24,"./_export":31,"./_fails":33}],77:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject"),f=a("./_object-pie").f;b.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},{"./_object-keys":74,"./_object-pie":75,"./_to-iobject":105}],78:[function(a,b,c){var d=a("./_object-gopn"),e=a("./_object-gops"),f=a("./_an-object"),g=a("./_global").Reflect;b.exports=g&&g.ownKeys||function(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},{"./_an-object":9,"./_global":37,"./_object-gopn":70,"./_object-gops":71}],79:[function(a,b,c){var d=a("./_global").parseFloat,e=a("./_string-trim").trim;b.exports=1/d(a("./_string-ws")+"-0")!==-(1/0)?function(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},{"./_global":37,"./_string-trim":100,"./_string-ws":101}],80:[function(a,b,c){var d=a("./_global").parseInt,e=a("./_string-trim").trim,f=a("./_string-ws"),g=/^[\-+]?0[xX]/;b.exports=8!==d(f+"08")||22!==d(f+"0x16")?function(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},{"./_global":37,"./_string-trim":100,"./_string-ws":101}],81:[function(a,b,c){"use strict";var d=a("./_path"),e=a("./_invoke"),f=a("./_a-function");b.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},{"./_a-function":5,"./_invoke":43,"./_path":82}],82:[function(a,b,c){b.exports=a("./_global")},{"./_global":37}],83:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],84:[function(a,b,c){var d=a("./_redefine");b.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},{"./_redefine":85}],85:[function(a,b,c){var d=a("./_global"),e=a("./_hide"),f=a("./_has"),g=a("./_uid")("src"),h="toString",i=Function[h],j=(""+i).split(h);a("./_core").inspectSource=function(a){return i.call(a)},(b.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function(){return"function"==typeof this&&this[g]||i.call(this)})},{"./_core":24,"./_global":37,"./_has":38,"./_hide":39,"./_uid":112}],86:[function(a,b,c){b.exports=function(a,b){var c=b===Object(b)?function(a){return b[a]}:b;return function(b){return String(b).replace(a,c)}}},{}],87:[function(a,b,c){b.exports=Object.is||function(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},{}],88:[function(a,b,c){var d=a("./_is-object"),e=a("./_an-object"),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};b.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c,d){try{d=a("./_ctx")(Function.call,a("./_object-gopd").f(Object.prototype,"__proto__").set,2),d(b,[]),c=!(b instanceof Array)}catch(e){c=!0}return function(a,b){return f(a,b),c?a.__proto__=b:d(a,b),a}}({},!1):void 0),check:f}},{"./_an-object":9,"./_ctx":25,"./_is-object":48,"./_object-gopd":68}],89:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_object-dp"),f=a("./_descriptors"),g=a("./_wks")("species");b.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},{"./_descriptors":27,"./_global":37,"./_object-dp":66,"./_wks":113}],90:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_has"),f=a("./_wks")("toStringTag");b.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},{"./_has":38,"./_object-dp":66,"./_wks":113}],91:[function(a,b,c){var d=a("./_shared")("keys"),e=a("./_uid");b.exports=function(a){return d[a]||(d[a]=e(a))}},{"./_shared":92,"./_uid":112}],92:[function(a,b,c){var d=a("./_global"),e="__core-js_shared__",f=d[e]||(d[e]={});b.exports=function(a){return f[a]||(f[a]={})}},{"./_global":37}],93:[function(a,b,c){var d=a("./_an-object"),e=a("./_a-function"),f=a("./_wks")("species");b.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},{"./_a-function":5,"./_an-object":9,"./_wks":113}],94:[function(a,b,c){var d=a("./_fails");b.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},{"./_fails":33}],95:[function(a,b,c){var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return 0>i||i>=j?a?"":void 0:(f=h.charCodeAt(i),55296>f||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},{"./_defined":26,"./_to-integer":104}],96:[function(a,b,c){var d=a("./_is-regexp"),e=a("./_defined");b.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},{"./_defined":26,"./_is-regexp":49}],97:[function(a,b,c){var d=a("./_export"),e=a("./_fails"),f=a("./_defined"),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""+b+">"};b.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},{"./_defined":26,"./_export":31,"./_fails":33}],98:[function(a,b,c){var d=a("./_to-length"),e=a("./_string-repeat"),f=a("./_defined");b.exports=function(a,b,c,g){var h=String(f(a)),i=h.length,j=void 0===c?" ":String(c),k=d(b);if(i>=k)return h;""==j&&(j=" ");var l=k-i,m=e.call(j,Math.ceil(l/j.length));return m.length>l&&(m=m.slice(0,l)),g?m+h:h+m}},{"./_defined":26,"./_string-repeat":99,"./_to-length":106}],99:[function(a,b,c){"use strict";var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){var b=String(e(this)),c="",f=d(a);if(0>f||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},{"./_defined":26,"./_to-integer":104}],100:[function(a,b,c){var d=a("./_export"),e=a("./_defined"),f=a("./_fails"),g=a("./_string-ws"),h="["+g+"]",i="
",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};b.exports=l},{"./_defined":26,"./_export":31,"./_fails":33,"./_string-ws":101}],101:[function(a,b,c){b.exports=" \n\f\r \u2028\u2029\ufeff"},{}],102:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":19,"./_ctx":25,"./_dom-create":28,"./_global":37,"./_html":40,"./_invoke":43}],103:[function(a,b,c){var d=a("./_to-integer"),e=Math.max,f=Math.min;b.exports=function(a,b){return a=d(a),0>a?e(a+b,0):f(a,b)}},{"./_to-integer":104}],104:[function(a,b,c){var d=Math.ceil,e=Math.floor;b.exports=function(a){return isNaN(a=+a)?0:(a>0?e:d)(a)}},{}],105:[function(a,b,c){var d=a("./_iobject"),e=a("./_defined");b.exports=function(a){return d(e(a))}},{"./_defined":26,"./_iobject":44}],106:[function(a,b,c){var d=a("./_to-integer"),e=Math.min;b.exports=function(a){return a>0?e(d(a),9007199254740991):0}},{"./_to-integer":104}],107:[function(a,b,c){var d=a("./_defined");b.exports=function(a){return Object(d(a))}},{"./_defined":26}],108:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":48}],109:[function(a,b,c){"use strict";if(a("./_descriptors")){var d=a("./_library"),e=a("./_global"),f=a("./_fails"),g=a("./_export"),h=a("./_typed"),i=a("./_typed-buffer"),j=a("./_ctx"),k=a("./_an-instance"),l=a("./_property-desc"),m=a("./_hide"),n=a("./_redefine-all"),o=(a("./_is-integer"),a("./_to-integer")),p=a("./_to-length"),q=a("./_to-index"),r=a("./_to-primitive"),s=a("./_has"),t=a("./_same-value"),u=a("./_classof"),v=a("./_is-object"),w=a("./_to-object"),x=a("./_is-array-iter"),y=a("./_object-create"),z=a("./_object-gpo"),A=a("./_object-gopn").f,B=(a("./core.is-iterable"),a("./core.get-iterator-method")),C=a("./_uid"),D=a("./_wks"),E=a("./_array-methods"),F=a("./_array-includes"),G=a("./_species-constructor"),H=a("./es6.array.iterator"),I=a("./_iterators"),J=a("./_iter-detect"),K=a("./_set-species"),L=a("./_array-fill"),M=a("./_array-copy-within"),N=a("./_object-dp"),O=a("./_object-gopd"),P=N.f,Q=O.f,R=e.RangeError,S=e.TypeError,T=e.Uint8Array,U="ArrayBuffer",V="Shared"+U,W="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],Z=i.ArrayBuffer,$=i.DataView,_=E(0),aa=E(2),ba=E(3),ca=E(4),da=E(5),ea=E(6),fa=F(!0),ga=F(!1),ha=H.values,ia=H.keys,ja=H.entries,ka=Y.lastIndexOf,la=Y.reduce,ma=Y.reduceRight,na=Y.join,oa=Y.sort,pa=Y.slice,qa=Y.toString,ra=Y.toLocaleString,sa=D("iterator"),ta=D("toStringTag"),ua=C("typed_constructor"),va=C("def_constructor"),wa=h.CONSTR,xa=h.TYPED,ya=h.VIEW,za="Wrong length!",Aa=E(1,function(a,b){return Ga(G(a,a[va]),b)}),Ba=f(function(){return 1===new T(new Uint16Array([1]).buffer)[0]}),Ca=!!T&&!!T[X].set&&f(function(){new T(1).set({})}),Da=function(a,b){if(void 0===a)throw S(za);var c=+a,d=p(a);if(b&&!t(c,d))throw R(za);return d},Ea=function(a,b){var c=o(a);if(0>c||c%b)throw R("Wrong offset!");return c},Fa=function(a){if(v(a)&&xa in a)return a;throw S(a+" is not a typed array!")},Ga=function(a,b){if(!(v(a)&&ua in a))throw S("It is not a typed array constructor!");return new a(b)},Ha=function(a,b){return Ia(G(a,a[va]),b)},Ia=function(a,b){for(var c=0,d=b.length,e=Ga(a,d);d>c;)e[c]=b[c++];return e},Ja=function(a,b,c){P(a,b,{get:function(){return this._d[c]}})},Ka=function(a){var b,c,d,e,f,g,h=w(a),i=arguments.length,k=i>1?arguments[1]:void 0,l=void 0!==k,m=B(h);if(void 0!=m&&!x(m)){for(g=m.call(h),d=[],b=0;!(f=g.next()).done;b++)d.push(f.value);h=d}for(l&&i>2&&(k=j(k,arguments[2],2)),b=0,c=p(h.length),e=Ga(this,c);c>b;b++)e[b]=l?k(h[b],b):h[b];return e},La=function(){for(var a=0,b=arguments.length,c=Ga(this,b);b>a;)c[a]=arguments[a++];return c},Ma=!!T&&f(function(){ra.call(new T(1))}),Na=function(){return ra.apply(Ma?pa.call(Fa(this)):Fa(this),arguments)},Oa={copyWithin:function(a,b){return M.call(Fa(this),a,b,arguments.length>2?arguments[2]:void 0)},every:function(a){return ca(Fa(this),a,arguments.length>1?arguments[1]:void 0)},fill:function(a){return L.apply(Fa(this),arguments)},filter:function(a){return Ha(this,aa(Fa(this),a,arguments.length>1?arguments[1]:void 0))},find:function(a){return da(Fa(this),a,arguments.length>1?arguments[1]:void 0)},findIndex:function(a){return ea(Fa(this),a,arguments.length>1?arguments[1]:void 0)},forEach:function(a){_(Fa(this),a,arguments.length>1?arguments[1]:void 0)},indexOf:function(a){return ga(Fa(this),a,arguments.length>1?arguments[1]:void 0)},includes:function(a){return fa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},join:function(a){return na.apply(Fa(this),arguments)},lastIndexOf:function(a){return ka.apply(Fa(this),arguments)},map:function(a){return Aa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},reduce:function(a){return la.apply(Fa(this),arguments)},reduceRight:function(a){return ma.apply(Fa(this),arguments)},reverse:function(){for(var a,b=this,c=Fa(b).length,d=Math.floor(c/2),e=0;d>e;)a=b[e],b[e++]=b[--c],b[c]=a;return b},slice:function(a,b){return Ha(this,pa.call(Fa(this),a,b))},some:function(a){return ba(Fa(this),a,arguments.length>1?arguments[1]:void 0)},sort:function(a){return oa.call(Fa(this),a)},subarray:function(a,b){var c=Fa(this),d=c.length,e=q(a,d);return new(G(c,c[va]))(c.buffer,c.byteOffset+e*c.BYTES_PER_ELEMENT,p((void 0===b?d:q(b,d))-e))}},Pa=function(a){Fa(this);var b=Ea(arguments[1],1),c=this.length,d=w(a),e=p(d.length),f=0;if(e+b>c)throw R(za);for(;e>f;)this[b+f]=d[f++]},Qa={entries:function(){return ja.call(Fa(this))},keys:function(){return ia.call(Fa(this))},values:function(){return ha.call(Fa(this))}},Ra=function(a,b){return v(a)&&a[xa]&&"symbol"!=typeof b&&b in a&&String(+b)==String(b)},Sa=function(a,b){return Ra(a,b=r(b,!0))?l(2,a[b]):Q(a,b)},Ta=function(a,b,c){return!(Ra(a,b=r(b,!0))&&v(c)&&s(c,"value"))||s(c,"get")||s(c,"set")||c.configurable||s(c,"writable")&&!c.writable||s(c,"enumerable")&&!c.enumerable?P(a,b,c):(a[b]=c.value,a)};wa||(O.f=Sa,N.f=Ta),g(g.S+g.F*!wa,"Object",{getOwnPropertyDescriptor:Sa,defineProperty:Ta}),f(function(){qa.call({})})&&(qa=ra=function(){return na.call(this)});var Ua=n({},Oa);n(Ua,Qa),m(Ua,sa,Qa.values),n(Ua,{set:Pa,constructor:function(){},toString:qa,toLocaleString:Na}),Ja(Ua,"buffer","b"),Ja(Ua,"byteOffset","o"),Ja(Ua,"byteLength","l"),Ja(Ua,"length","e"),P(Ua,ta,{get:function(){return this[xa]}}),b.exports=function(a,b,c,i){i=!!i;var j=a+(i?"Clamped":"")+"Array",l="Uint8Array"!=j,n="get"+a,o="set"+a,q=e[j],r=q||{},s=q&&z(q),t=!q||!h.ABV,w={},x=q&&q[X],B=function(a,c){var d=a._d;return d.v[n](c*b+d.o,Ba)},C=function(a,c,d){var e=a._d;i&&(d=(d=Math.round(d))<0?0:d>255?255:255&d),e.v[o](c*b+e.o,d,Ba)},D=function(a,b){P(a,b,{get:function(){return B(this,b)},set:function(a){return C(this,b,a)},enumerable:!0})};t?(q=c(function(a,c,d,e){k(a,q,j,"_d");var f,g,h,i,l=0,n=0;if(v(c)){if(!(c instanceof Z||(i=u(c))==U||i==V))return xa in c?Ia(q,c):Ka.call(q,c);f=c,n=Ea(d,b);var o=c.byteLength;if(void 0===e){if(o%b)throw R(za);if(g=o-n,0>g)throw R(za)}else if(g=p(e)*b,g+n>o)throw R(za);h=g/b}else h=Da(c,!0),g=h*b,f=new Z(g);for(m(a,"_d",{b:f,o:n,l:g,e:h,v:new $(f)});h>l;)D(a,l++)}),x=q[X]=y(Ua),m(x,"constructor",q)):J(function(a){new q(null),new q(a)},!0)||(q=c(function(a,c,d,e){k(a,q,j);var f;return v(c)?c instanceof Z||(f=u(c))==U||f==V?void 0!==e?new r(c,Ea(d,b),e):void 0!==d?new r(c,Ea(d,b)):new r(c):xa in c?Ia(q,c):Ka.call(q,c):new r(Da(c,l))}),_(s!==Function.prototype?A(r).concat(A(s)):A(r),function(a){a in q||m(q,a,r[a])}),q[X]=x,d||(x.constructor=q));var E=x[sa],F=!!E&&("values"==E.name||void 0==E.name),G=Qa.values;m(q,ua,!0),m(x,xa,j),m(x,ya,!0),m(x,va,q),(i?new q(1)[ta]==j:ta in x)||P(x,ta,{get:function(){return j}}),w[j]=q,g(g.G+g.W+g.F*(q!=r),w),g(g.S,j,{BYTES_PER_ELEMENT:b,from:Ka,of:La}),W in x||m(x,W,b),g(g.P,j,Oa),g(g.P+g.F*Ca,j,{set:Pa}),g(g.P+g.F*!F,j,Qa),g(g.P+g.F*(x.toString!=qa),j,{toString:qa}),g(g.P+g.F*(f(function(){return[1,2].toLocaleString()!=new q([1,2]).toLocaleString()})||!f(function(){x.toLocaleString.call([1,2])})),j,{toLocaleString:Na}),I[j]=F?E:G,d||F||m(x,sa,G),K(j)}}else b.exports=function(){}},{"./_an-instance":8,"./_array-copy-within":10,"./_array-fill":11,"./_array-includes":13,"./_array-methods":14,"./_classof":18,"./_ctx":25,"./_descriptors":27,"./_export":31,"./_fails":33,"./_global":37,"./_has":38,"./_hide":39,"./_is-array-iter":45,"./_is-integer":47,"./_is-object":48,"./_iter-detect":53,"./_iterators":55,"./_library":57,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_object-gpo":72,"./_property-desc":83,"./_redefine-all":84,"./_same-value":87,"./_set-species":89,"./_species-constructor":93,"./_to-index":103,"./_to-integer":104,"./_to-length":106,"./_to-object":107,"./_to-primitive":108,"./_typed":111,"./_typed-buffer":110,"./_uid":112,"./_wks":113,"./core.get-iterator-method":114,"./core.is-iterable":115,"./es6.array.iterator":127}],110:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_descriptors"),f=a("./_library"),g=a("./_typed"),h=a("./_hide"),i=a("./_redefine-all"),j=a("./_fails"),k=a("./_an-instance"),l=a("./_to-integer"),m=a("./_to-length"),n=a("./_object-gopn").f,o=a("./_object-dp").f,p=a("./_array-fill"),q=a("./_set-to-string-tag"),r="ArrayBuffer",s="DataView",t="prototype",u="Wrong length!",v="Wrong index!",w=d[r],x=d[s],y=d.Math,z=(d.parseInt,d.RangeError),A=d.Infinity,B=w,C=y.abs,D=y.pow,E=(y.min,y.floor),F=y.log,G=y.LN2,H="buffer",I="byteLength",J="byteOffset",K=e?"_b":H,L=e?"_l":I,M=e?"_o":J,N=function(a,b,c){var d,e,f,g=Array(c),h=8*c-b-1,i=(1<>1,k=23===b?D(2,-24)-D(2,-77):0,l=0,m=0>a||0===a&&0>1/a?1:0;for(a=C(a),a!=a||a===A?(e=a!=a?1:0,d=i):(d=E(F(a)/G),a*(f=D(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*D(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*D(2,b),d+=j):(e=a*D(2,j-1)*D(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},O=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-A:A;d+=D(2,b),k-=g}return(j?-1:1)*d*D(2,k-b)},P=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},Q=function(a){return[255&a]},R=function(a){return[255&a,a>>8&255]},S=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},T=function(a){return N(a,52,8)},U=function(a){return N(a,23,4)},V=function(a,b,c){o(a[t],b,{get:function(){return this[c]}})},W=function(a,b,c,d){var e=+c,f=l(e);if(e!=f||0>f||f+b>a[L])throw z(v);var g=a[K]._b,h=f+a[M],i=g.slice(h,h+b);return d?i:i.reverse()},X=function(a,b,c,d,e,f){var g=+c,h=l(g);if(g!=h||0>h||h+b>a[L])throw z(v);for(var i=a[K]._b,j=h+a[M],k=d(+e),m=0;b>m;m++)i[j+m]=k[f?m:b-m-1]},Y=function(a,b){k(a,w,r);var c=+b,d=m(c);if(c!=d)throw z(u);return d};if(g.ABV){if(!j(function(){new w})||!j(function(){new w(.5)})){w=function(a){return new B(Y(this,a))};for(var Z,$=w[t]=B[t],_=n(B),aa=0;_.length>aa;)(Z=_[aa++])in w||h(w,Z,B[Z]);f||($.constructor=w)}var ba=new x(new w(2)),ca=x[t].setInt8;ba.setInt8(0,2147483648),ba.setInt8(1,2147483649),(ba.getInt8(0)||!ba.getInt8(1))&&i(x[t],{setInt8:function(a,b){ca.call(this,a,b<<24>>24)},setUint8:function(a,b){ca.call(this,a,b<<24>>24)}},!0)}else w=function(a){var b=Y(this,a);this._b=p.call(Array(b),0),this[L]=b},x=function(a,b,c){k(this,x,s),k(a,w,s);var d=a[L],e=l(b);if(0>e||e>d)throw z("Wrong offset!");if(c=void 0===c?d-e:m(c),e+c>d)throw z(u);this[K]=a,this[M]=e,this[L]=c},e&&(V(w,I,"_l"),V(x,H,"_b"),V(x,I,"_l"),V(x,J,"_o")),i(x[t],{getInt8:function(a){return W(this,1,a)[0]<<24>>24},getUint8:function(a){return W(this,1,a)[0]},getInt16:function(a){var b=W(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function(a){var b=W(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function(a){return P(W(this,4,a,arguments[1]))},getUint32:function(a){return P(W(this,4,a,arguments[1]))>>>0},getFloat32:function(a){return O(W(this,4,a,arguments[1]),23,4)},getFloat64:function(a){return O(W(this,8,a,arguments[1]),52,8)},setInt8:function(a,b){X(this,1,a,Q,b)},setUint8:function(a,b){X(this,1,a,Q,b)},setInt16:function(a,b){X(this,2,a,R,b,arguments[2])},setUint16:function(a,b){X(this,2,a,R,b,arguments[2])},setInt32:function(a,b){X(this,4,a,S,b,arguments[2])},setUint32:function(a,b){X(this,4,a,S,b,arguments[2])},setFloat32:function(a,b){X(this,4,a,U,b,arguments[2])},setFloat64:function(a,b){X(this,8,a,T,b,arguments[2])}});q(w,r),q(x,s),h(x[t],g.VIEW,!0),c[r]=w,c[s]=x},{"./_an-instance":8,"./_array-fill":11,"./_descriptors":27,"./_fails":33,"./_global":37,"./_hide":39,"./_library":57,"./_object-dp":66,"./_object-gopn":70,"./_redefine-all":84,"./_set-to-string-tag":90,"./_to-integer":104,"./_to-length":106,"./_typed":111}],111:[function(a,b,c){for(var d,e=a("./_global"),f=a("./_hide"),g=a("./_uid"),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");m>l;)(d=e[n[l++]])?(f(d.prototype,h,!0),f(d.prototype,i,!0)):k=!1;b.exports={ABV:j,CONSTR:k,TYPED:h,VIEW:i}},{"./_global":37,"./_hide":39,"./_uid":112}],112:[function(a,b,c){var d=0,e=Math.random();b.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++d+e).toString(36))}},{}],113:[function(a,b,c){var d=a("./_shared")("wks"),e=a("./_uid"),f=a("./_global").Symbol,g="function"==typeof f;b.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}},{"./_global":37,"./_shared":92,"./_uid":112}],114:[function(a,b,c){var d=a("./_classof"),e=a("./_wks")("iterator"),f=a("./_iterators");b.exports=a("./_core").getIteratorMethod=function(a){return void 0!=a?a[e]||a["@@iterator"]||f[d(a)]:void 0}},{"./_classof":18,"./_core":24,"./_iterators":55,"./_wks":113}],115:[function(a,b,c){var d=a("./_classof"),e=a("./_wks")("iterator"),f=a("./_iterators");b.exports=a("./_core").isIterable=function(a){var b=Object(a);return void 0!==b[e]||"@@iterator"in b||f.hasOwnProperty(d(b))}},{"./_classof":18,"./_core":24,"./_iterators":55,"./_wks":113}],116:[function(a,b,c){var d=a("./_export"),e=a("./_replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&");d(d.S,"RegExp",{escape:function(a){return e(a)}})},{"./_export":31,
+"./_replacer":86}],117:[function(a,b,c){var d=a("./_export");d(d.P,"Array",{copyWithin:a("./_array-copy-within")}),a("./_add-to-unscopables")("copyWithin")},{"./_add-to-unscopables":7,"./_array-copy-within":10,"./_export":31}],118:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(4);d(d.P+d.F*!a("./_strict-method")([].every,!0),"Array",{every:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],119:[function(a,b,c){var d=a("./_export");d(d.P,"Array",{fill:a("./_array-fill")}),a("./_add-to-unscopables")("fill")},{"./_add-to-unscopables":7,"./_array-fill":11,"./_export":31}],120:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(2);d(d.P+d.F*!a("./_strict-method")([].filter,!0),"Array",{filter:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],121:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(6),f="findIndex",g=!0;f in[]&&Array(1)[f](function(){g=!1}),d(d.P+d.F*g,"Array",{findIndex:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":31}],122:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(5),f="find",g=!0;f in[]&&Array(1)[f](function(){g=!1}),d(d.P+d.F*g,"Array",{find:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":7,"./_array-methods":14,"./_export":31}],123:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(0),f=a("./_strict-method")([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],124:[function(a,b,c){"use strict";var d=a("./_ctx"),e=a("./_export"),f=a("./_to-object"),g=a("./_iter-call"),h=a("./_is-array-iter"),i=a("./_to-length"),j=a("./core.get-iterator-method");e(e.S+e.F*!a("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(a){var b,c,e,k,l=f(a),m="function"==typeof this?this:Array,n=arguments.length,o=n>1?arguments[1]:void 0,p=void 0!==o,q=0,r=j(l);if(p&&(o=d(o,n>2?arguments[2]:void 0,2)),void 0==r||m==Array&&h(r))for(b=i(l.length),c=new m(b);b>q;q++)c[q]=p?o(l[q],q):l[q];else for(k=r.call(l),c=new m;!(e=k.next()).done;q++)c[q]=p?g(k,o,[e.value,q],!0):e.value;return c.length=q,c}})},{"./_ctx":25,"./_export":31,"./_is-array-iter":45,"./_iter-call":50,"./_iter-detect":53,"./_to-length":106,"./_to-object":107,"./core.get-iterator-method":114}],125:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!1);d(d.P+d.F*!a("./_strict-method")([].indexOf),"Array",{indexOf:function(a){return e(this,a,arguments[1])}})},{"./_array-includes":13,"./_export":31,"./_strict-method":94}],126:[function(a,b,c){var d=a("./_export");d(d.S,"Array",{isArray:a("./_is-array")})},{"./_export":31,"./_is-array":46}],127:[function(a,b,c){"use strict";var d=a("./_add-to-unscopables"),e=a("./_iter-step"),f=a("./_iterators"),g=a("./_to-iobject");b.exports=a("./_iter-define")(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},{"./_add-to-unscopables":7,"./_iter-define":52,"./_iter-step":54,"./_iterators":55,"./_to-iobject":105}],128:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=[].join;d(d.P+d.F*(a("./_iobject")!=Object||!a("./_strict-method")(f)),"Array",{join:function(a){return f.call(e(this),void 0===a?",":a)}})},{"./_export":31,"./_iobject":44,"./_strict-method":94,"./_to-iobject":105}],129:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-integer"),g=a("./_to-length");d(d.P+d.F*!a("./_strict-method")([].lastIndexOf),"Array",{lastIndexOf:function(a){var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),0>d&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d;return-1}})},{"./_export":31,"./_strict-method":94,"./_to-integer":104,"./_to-iobject":105,"./_to-length":106}],130:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(1);d(d.P+d.F*!a("./_strict-method")([].map,!0),"Array",{map:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],131:[function(a,b,c){"use strict";var d=a("./_export");d(d.S+d.F*a("./_fails")(function(){function a(){}return!(Array.of.call(a)instanceof a)}),"Array",{of:function(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)c[a]=arguments[a++];return c.length=b,c}})},{"./_export":31,"./_fails":33}],132:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(a){return e(this,a,arguments.length,arguments[1],!0)}})},{"./_array-reduce":15,"./_export":31,"./_strict-method":94}],133:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduce,!0),"Array",{reduce:function(a){return e(this,a,arguments.length,arguments[1],!1)}})},{"./_array-reduce":15,"./_export":31,"./_strict-method":94}],134:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_html"),f=a("./_cof"),g=a("./_to-index"),h=a("./_to-length"),i=[].slice;d(d.P+d.F*a("./_fails")(function(){e&&i.call(e)}),"Array",{slice:function(a,b){var c=h(this.length),d=f(this);if(b=void 0===b?c:b,"Array"==d)return i.call(this,a,b);for(var e=g(a,c),j=g(b,c),k=h(j-e),l=Array(k),m=0;k>m;m++)l[m]="String"==d?this.charAt(e+m):this[e+m];return l}})},{"./_cof":19,"./_export":31,"./_fails":33,"./_html":40,"./_to-index":103,"./_to-length":106}],135:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(3);d(d.P+d.F*!a("./_strict-method")([].some,!0),"Array",{some:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":14,"./_export":31,"./_strict-method":94}],136:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_a-function"),f=a("./_to-object"),g=a("./_fails"),h=[].sort,i=[1,2,3];d(d.P+d.F*(g(function(){i.sort(void 0)})||!g(function(){i.sort(null)})||!a("./_strict-method")(h)),"Array",{sort:function(a){return void 0===a?h.call(f(this)):h.call(f(this),e(a))}})},{"./_a-function":5,"./_export":31,"./_fails":33,"./_strict-method":94,"./_to-object":107}],137:[function(a,b,c){a("./_set-species")("Array")},{"./_set-species":89}],138:[function(a,b,c){var d=a("./_export");d(d.S,"Date",{now:function(){return(new Date).getTime()}})},{"./_export":31}],139:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_fails"),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},{"./_export":31,"./_fails":33}],140:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_to-primitive");d(d.P+d.F*a("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},{"./_export":31,"./_fails":33,"./_to-object":107,"./_to-primitive":108}],141:[function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&a("./_redefine")(d,f,function(){var a=h.call(this);return a===a?g.call(this):e})},{"./_redefine":85}],142:[function(a,b,c){var d=a("./_export");d(d.P,"Function",{bind:a("./_bind")})},{"./_bind":17,"./_export":31}],143:[function(a,b,c){"use strict";var d=a("./_is-object"),e=a("./_object-gpo"),f=a("./_wks")("hasInstance"),g=Function.prototype;f in g||a("./_object-dp").f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},{"./_is-object":48,"./_object-dp":66,"./_object-gpo":72,"./_wks":113}],144:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_property-desc"),f=a("./_has"),g=Function.prototype,h=/^\s*function ([^ (]*)/,i="name";i in g||a("./_descriptors")&&d(g,i,{configurable:!0,get:function(){var a=(""+this).match(h),b=a?a[1]:"";return f(this,i)||d(this,i,e(5,b)),b}})},{"./_descriptors":27,"./_has":38,"./_object-dp":66,"./_property-desc":83}],145:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Map",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{get:function(a){var b=d.getEntry(this,a);return b&&b.v},set:function(a,b){return d.def(this,0===a?0:a,b)}},d,!0)},{"./_collection":23,"./_collection-strong":20}],146:[function(a,b,c){var d=a("./_export"),e=a("./_math-log1p"),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))),"Math",{acosh:function(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},{"./_export":31,"./_math-log1p":59}],147:[function(a,b,c){function d(a){return isFinite(a=+a)&&0!=a?0>a?-d(-a):Math.log(a+Math.sqrt(a*a+1)):a}var e=a("./_export");e(e.S,"Math",{asinh:d})},{"./_export":31}],148:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{atanh:function(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},{"./_export":31}],149:[function(a,b,c){var d=a("./_export"),e=a("./_math-sign");d(d.S,"Math",{cbrt:function(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},{"./_export":31,"./_math-sign":60}],150:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{clz32:function(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},{"./_export":31}],151:[function(a,b,c){var d=a("./_export"),e=Math.exp;d(d.S,"Math",{cosh:function(a){return(e(a=+a)+e(-a))/2}})},{"./_export":31}],152:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{expm1:a("./_math-expm1")})},{"./_export":31,"./_math-expm1":58}],153:[function(a,b,c){var d=a("./_export"),e=a("./_math-sign"),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function(a){var b,c,d=Math.abs(a),f=e(a);return j>d?f*k(d/j/h)*j*h:(b=(1+h/g)*d,c=b-(b-d),c>i||c!=c?f*(1/0):f*c)}})},{"./_export":31,"./_math-sign":60}],154:[function(a,b,c){var d=a("./_export"),e=Math.abs;d(d.S,"Math",{hypot:function(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;h>g;)c=e(arguments[g++]),c>i?(d=i/c,f=f*d*d+1,i=c):c>0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},{"./_export":31}],155:[function(a,b,c){var d=a("./_export"),e=Math.imul;d(d.S+d.F*a("./_fails")(function(){return-5!=e(4294967295,5)||2!=e.length}),"Math",{imul:function(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},{"./_export":31,"./_fails":33}],156:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log10:function(a){return Math.log(a)/Math.LN10}})},{"./_export":31}],157:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log1p:a("./_math-log1p")})},{"./_export":31,"./_math-log1p":59}],158:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log2:function(a){return Math.log(a)/Math.LN2}})},{"./_export":31}],159:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{sign:a("./_math-sign")})},{"./_export":31,"./_math-sign":60}],160:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S+d.F*a("./_fails")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},{"./_export":31,"./_fails":33,"./_math-expm1":58}],161:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S,"Math",{tanh:function(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},{"./_export":31,"./_math-expm1":58}],162:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{trunc:function(a){return(a>0?Math.floor:Math.ceil)(a)}})},{"./_export":31}],163:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_has"),f=a("./_cof"),g=a("./_inherit-if-required"),h=a("./_to-primitive"),i=a("./_fails"),j=a("./_object-gopn").f,k=a("./_object-gopd").f,l=a("./_object-dp").f,m=a("./_string-trim").trim,n="Number",o=d[n],p=o,q=o.prototype,r=f(a("./_object-create")(q))==n,s="trim"in String.prototype,t=function(a){var b=h(a,!1);if("string"==typeof b&&b.length>2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;k>j;j++)if(g=i.charCodeAt(j),48>g||g>e)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=a("./_descriptors")?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,a("./_redefine")(d,n,o)}},{"./_cof":19,"./_descriptors":27,"./_fails":33,"./_global":37,"./_has":38,"./_inherit-if-required":42,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_redefine":85,"./_string-trim":100,"./_to-primitive":108}],164:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":31}],165:[function(a,b,c){var d=a("./_export"),e=a("./_global").isFinite;d(d.S,"Number",{isFinite:function(a){return"number"==typeof a&&e(a)}})},{"./_export":31,"./_global":37}],166:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isInteger:a("./_is-integer")})},{"./_export":31,"./_is-integer":47}],167:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isNaN:function(a){return a!=a}})},{"./_export":31}],168:[function(a,b,c){var d=a("./_export"),e=a("./_is-integer"),f=Math.abs;d(d.S,"Number",{isSafeInteger:function(a){return e(a)&&f(a)<=9007199254740991}})},{"./_export":31,"./_is-integer":47}],169:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":31}],170:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":31}],171:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},{"./_export":31,"./_parse-float":79}],172:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},{"./_export":31,"./_parse-int":80}],173:[function(a,b,c){"use strict";var d=a("./_export"),e=(a("./_an-instance"),a("./_to-integer")),f=a("./_a-number-value"),g=a("./_string-repeat"),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!a("./_fails")(function(){h.call({})})),"Number",{toFixed:function(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(0>j||j>20)throw RangeError(k);if(i!=i)return"NaN";if(-1e21>=i||i>=1e21)return String(i);if(0>i&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=0>b?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(j>=h?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},{"./_a-number-value":6,"./_an-instance":8,"./_export":31,"./_fails":33,"./_string-repeat":99,"./_to-integer":104}],174:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_fails"),f=a("./_a-number-value"),g=1..toPrecision;d(d.P+d.F*(e(function(){return"1"!==g.call(1,void 0)})||!e(function(){g.call({})})),"Number",{toPrecision:function(a){var b=f(this,"Number#toPrecision: incorrect invocation!");return void 0===a?g.call(b):g.call(b,a)}})},{"./_a-number-value":6,"./_export":31,"./_fails":33}],175:[function(a,b,c){var d=a("./_export");d(d.S+d.F,"Object",{assign:a("./_object-assign")})},{"./_export":31,"./_object-assign":64}],176:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{create:a("./_object-create")})},{"./_export":31,"./_object-create":65}],177:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperties:a("./_object-dps")})},{"./_descriptors":27,"./_export":31,"./_object-dps":67}],178:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperty:a("./_object-dp").f})},{"./_descriptors":27,"./_export":31,"./_object-dp":66}],179:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("freeze",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],180:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopd").f;a("./_object-sap")("getOwnPropertyDescriptor",function(){return function(a,b){return e(d(a),b)}})},{"./_object-gopd":68,"./_object-sap":76,"./_to-iobject":105}],181:[function(a,b,c){a("./_object-sap")("getOwnPropertyNames",function(){return a("./_object-gopn-ext").f})},{"./_object-gopn-ext":69,"./_object-sap":76}],182:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-gpo");a("./_object-sap")("getPrototypeOf",function(){return function(a){return e(d(a))}})},{"./_object-gpo":72,"./_object-sap":76,"./_to-object":107}],183:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isExtensible",function(a){return function(b){return d(b)?a?a(b):!0:!1}})},{"./_is-object":48,"./_object-sap":76}],184:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isFrozen",function(a){return function(b){return d(b)?a?a(b):!1:!0}})},{"./_is-object":48,"./_object-sap":76}],185:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isSealed",function(a){return function(b){return d(b)?a?a(b):!1:!0}})},{"./_is-object":48,"./_object-sap":76}],186:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{is:a("./_same-value")})},{"./_export":31,"./_same-value":87}],187:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-keys");a("./_object-sap")("keys",function(){return function(a){return e(d(a))}})},{"./_object-keys":74,"./_object-sap":76,"./_to-object":107}],188:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("preventExtensions",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],189:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("seal",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":48,"./_meta":61,"./_object-sap":76}],190:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{setPrototypeOf:a("./_set-proto").set})},{"./_export":31,"./_set-proto":88}],191:[function(a,b,c){"use strict";var d=a("./_classof"),e={};e[a("./_wks")("toStringTag")]="z",e+""!="[object z]"&&a("./_redefine")(Object.prototype,"toString",function(){return"[object "+d(this)+"]"},!0)},{"./_classof":18,"./_redefine":85,"./_wks":113}],192:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},{"./_export":31,"./_parse-float":79}],193:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.G+d.F*(parseInt!=e),{parseInt:e})},{"./_export":31,"./_parse-int":80}],194:[function(a,b,c){"use strict";var d,e,f,g=a("./_library"),h=a("./_global"),i=a("./_ctx"),j=a("./_classof"),k=a("./_export"),l=a("./_is-object"),m=(a("./_an-object"),a("./_a-function")),n=a("./_an-instance"),o=a("./_for-of"),p=(a("./_set-proto").set,a("./_species-constructor")),q=a("./_task").set,r=a("./_microtask"),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var b=v.resolve(1),c=(b.constructor={})[a("./_wks")("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&b.then(x)instanceof c}catch(d){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return l(a)&&"function"==typeof(b=a.then)?b:!1},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(b){return{error:b}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(e){I.call(d,e)}}):(c._v=a,c._s=1,E(c,!1))}catch(d){I.call({_w:c,_d:!1},d)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(b){I.call(this,b)}},d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},d.prototype=a("./_redefine-all")(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"==typeof a?a:!0,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},"catch":function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+k.F*!y,{Promise:v}),a("./_set-to-string-tag")(v,s),a("./_set-species")(s),f=a("./_core")[s],k(k.S+k.F*!y,s,{reject:function(a){var b=B(this),c=b.reject;return c(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this),c=b.resolve;return c(a),b.promise}}),k(k.S+k.F*!(y&&a("./_iter-detect")(function(a){v.all(a)["catch"](x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},{"./_a-function":5,"./_an-instance":8,"./_an-object":9,"./_classof":18,"./_core":24,"./_ctx":25,"./_export":31,"./_for-of":36,"./_global":37,"./_is-object":48,"./_iter-detect":53,"./_library":57,"./_microtask":63,"./_redefine-all":84,"./_set-proto":88,"./_set-species":89,"./_set-to-string-tag":90,"./_species-constructor":93,"./_task":102,"./_wks":113}],195:[function(a,b,c){var d=a("./_export"),e=Function.apply;d(d.S,"Reflect",{apply:function(a,b,c){return e.call(a,b,c)}})},{"./_export":31}],196:[function(a,b,c){var d=a("./_export"),e=a("./_object-create"),f=a("./_a-function"),g=a("./_an-object"),h=a("./_is-object"),i=a("./_bind");d(d.S+d.F*a("./_fails")(function(){function a(){}return!(Reflect.construct(function(){},[],a)instanceof a)}),"Reflect",{construct:function(a,b){f(a);var c=arguments.length<3?a:f(arguments[2]);if(a==c){if(void 0!=b)switch(g(b).length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(i.apply(a,d))}var j=c.prototype,k=e(h(j)?j:Object.prototype),l=Function.apply.call(a,k,b);return h(l)?l:k}})},{"./_a-function":5,"./_an-object":9,"./_bind":17,"./_export":31,"./_fails":33,"./_is-object":48,"./_object-create":65}],197:[function(a,b,c){var d=a("./_object-dp"),e=a("./_export"),f=a("./_an-object"),g=a("./_to-primitive");e(e.S+e.F*a("./_fails")(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},{"./_an-object":9,"./_export":31,"./_fails":33,"./_object-dp":66,"./_to-primitive":108}],198:[function(a,b,c){var d=a("./_export"),e=a("./_object-gopd").f,f=a("./_an-object");d(d.S,"Reflect",{deleteProperty:function(a,b){var c=e(f(a),b);return c&&!c.configurable?!1:delete a[b]}})},{"./_an-object":9,"./_export":31,"./_object-gopd":68}],199:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_an-object"),f=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};a("./_iter-create")(f,"Object",function(){var a,b=this,c=b._k;do if(b._i>=c.length)return{value:void 0,done:!0};while(!((a=c[b._i++])in b._t));return{value:a,done:!1}}),d(d.S,"Reflect",{enumerate:function(a){return new f(a)}})},{"./_an-object":9,"./_export":31,"./_iter-create":51}],200:[function(a,b,c){var d=a("./_object-gopd"),e=a("./_export"),f=a("./_an-object");e(e.S,"Reflect",{getOwnPropertyDescriptor:function(a,b){return d.f(f(a),b)}})},{"./_an-object":9,"./_export":31,"./_object-gopd":68}],201:[function(a,b,c){var d=a("./_export"),e=a("./_object-gpo"),f=a("./_an-object");d(d.S,"Reflect",{getPrototypeOf:function(a){return e(f(a))}})},{"./_an-object":9,"./_export":31,"./_object-gpo":72}],202:[function(a,b,c){function d(a,b){var c,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(c=e.f(a,b))?g(c,"value")?c.value:void 0!==c.get?c.get.call(k):void 0:i(h=f(a))?d(h,b,k):void 0}var e=a("./_object-gopd"),f=a("./_object-gpo"),g=a("./_has"),h=a("./_export"),i=a("./_is-object"),j=a("./_an-object");h(h.S,"Reflect",{get:d})},{"./_an-object":9,"./_export":31,"./_has":38,"./_is-object":48,"./_object-gopd":68,"./_object-gpo":72}],203:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{has:function(a,b){return b in a}})},{"./_export":31}],204:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function(a){return e(a),f?f(a):!0}})},{"./_an-object":9,"./_export":31}],205:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{ownKeys:a("./_own-keys")})},{"./_export":31,"./_own-keys":78}],206:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},{"./_an-object":9,"./_export":31}],207:[function(a,b,c){var d=a("./_export"),e=a("./_set-proto");e&&d(d.S,"Reflect",{setPrototypeOf:function(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},{"./_export":31,"./_set-proto":88}],208:[function(a,b,c){function d(a,b,c){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return d(m,b,c,n);o=j(0)}return h(o,"value")?o.writable!==!1&&l(n)?(i=f.f(n,b)||j(0),i.value=c,e.f(n,b,i),!0):!1:void 0===o.set?!1:(o.set.call(n,c),!0)}var e=a("./_object-dp"),f=a("./_object-gopd"),g=a("./_object-gpo"),h=a("./_has"),i=a("./_export"),j=a("./_property-desc"),k=a("./_an-object"),l=a("./_is-object");i(i.S,"Reflect",{set:d})},{"./_an-object":9,"./_export":31,"./_has":38,"./_is-object":48,"./_object-dp":66,"./_object-gopd":68,"./_object-gpo":72,"./_property-desc":83}],209:[function(a,b,c){var d=a("./_global"),e=a("./_inherit-if-required"),f=a("./_object-dp").f,g=a("./_object-gopn").f,h=a("./_is-regexp"),i=a("./_flags"),j=d.RegExp,k=j,l=j.prototype,m=/a/g,n=/a/g,o=new j(m)!==m;if(a("./_descriptors")&&(!o||a("./_fails")(function(){return n[a("./_wks")("match")]=!1,j(m)!=m||j(n)==n||"/a/i"!=j(m,"i")}))){j=function(a,b){var c=this instanceof j,d=h(a),f=void 0===b;return!c&&d&&a.constructor===j&&f?a:e(o?new k(d&&!f?a.source:a,b):k((d=a instanceof j)?a.source:a,d&&f?i.call(a):b),c?this:l,j)};for(var p=(function(a){a in j||f(j,a,{configurable:!0,get:function(){return k[a]},set:function(b){k[a]=b}})}),q=g(k),r=0;q.length>r;)p(q[r++]);l.constructor=j,j.prototype=l,a("./_redefine")(d,"RegExp",j)}a("./_set-species")("RegExp")},{"./_descriptors":27,"./_fails":33,"./_flags":35,"./_global":37,"./_inherit-if-required":42,"./_is-regexp":49,"./_object-dp":66,"./_object-gopn":70,"./_redefine":85,"./_set-species":89,"./_wks":113}],210:[function(a,b,c){a("./_descriptors")&&"g"!=/./g.flags&&a("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:a("./_flags")})},{"./_descriptors":27,"./_flags":35,"./_object-dp":66}],211:[function(a,b,c){a("./_fix-re-wks")("match",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":34}],212:[function(a,b,c){a("./_fix-re-wks")("replace",2,function(a,b,c){return[function(d,e){"use strict";var f=a(this),g=void 0==d?void 0:d[b];return void 0!==g?g.call(d,f,e):c.call(String(f),d,e)},c]})},{"./_fix-re-wks":34}],213:[function(a,b,c){a("./_fix-re-wks")("search",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":34}],214:[function(a,b,c){a("./_fix-re-wks")("split",2,function(b,c,d){"use strict";var e=a("./_is-regexp"),f=d,g=[].push,h="split",i="length",j="lastIndex";if("c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[i]||2!="ab"[h](/(?:ab)*/)[i]||4!="."[h](/(.?)(.?)/)[i]||"."[h](/()()/)[i]>1||""[h](/.?/)[i]){var k=void 0===/()??/.exec("")[1];d=function(a,b){var c=String(this);if(void 0===a&&0===b)return[];if(!e(a))return f.call(c,a,b);var d,h,l,m,n,o=[],p=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),q=0,r=void 0===b?4294967295:b>>>0,s=new RegExp(a.source,p+"g");for(k||(d=new RegExp("^"+s.source+"$(?!\\s)",p));(h=s.exec(c))&&(l=h.index+h[0][i],!(l>q&&(o.push(c.slice(q,h.index)),!k&&h[i]>1&&h[0].replace(d,function(){for(n=1;n1&&h.index=r)));)s[j]===h.index&&s[j]++;return q===c[i]?(m||!s.test(""))&&o.push(""):o.push(c.slice(q)),o[i]>r?o.slice(0,r):o}}else"0"[h](void 0,0)[i]&&(d=function(a,b){return void 0===a&&0===b?[]:f.call(this,a,b)});return[function(a,e){var f=b(this),g=void 0==a?void 0:a[c];return void 0!==g?g.call(a,f,e):d.call(String(f),a,e)},d]})},{"./_fix-re-wks":34,"./_is-regexp":49}],215:[function(a,b,c){"use strict";a("./es6.regexp.flags");var d=a("./_an-object"),e=a("./_flags"),f=a("./_descriptors"),g="toString",h=/./[g],i=function(b){
+a("./_redefine")(RegExp.prototype,g,b,!0)};a("./_fails")(function(){return"/a/b"!=h.call({source:"a",flags:"b"})})?i(function(){var a=d(this);return"/".concat(a.source,"/","flags"in a?a.flags:!f&&a instanceof RegExp?e.call(a):void 0)}):h.name!=g&&i(function(){return h.call(this)})},{"./_an-object":9,"./_descriptors":27,"./_fails":33,"./_flags":35,"./_redefine":85,"./es6.regexp.flags":210}],216:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Set",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a=0===a?0:a,a)}},d)},{"./_collection":23,"./_collection-strong":20}],217:[function(a,b,c){"use strict";a("./_string-html")("anchor",function(a){return function(b){return a(this,"a","name",b)}})},{"./_string-html":97}],218:[function(a,b,c){"use strict";a("./_string-html")("big",function(a){return function(){return a(this,"big","","")}})},{"./_string-html":97}],219:[function(a,b,c){"use strict";a("./_string-html")("blink",function(a){return function(){return a(this,"blink","","")}})},{"./_string-html":97}],220:[function(a,b,c){"use strict";a("./_string-html")("bold",function(a){return function(){return a(this,"b","","")}})},{"./_string-html":97}],221:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-at")(!1);d(d.P,"String",{codePointAt:function(a){return e(this,a)}})},{"./_export":31,"./_string-at":95}],222:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-length"),f=a("./_string-context"),g="endsWith",h=""[g];d(d.P+d.F*a("./_fails-is-regexp")(g),"String",{endsWith:function(a){var b=f(this,a,g),c=arguments.length>1?arguments[1]:void 0,d=e(b.length),i=void 0===c?d:Math.min(e(c),d),j=String(a);return h?h.call(b,j,i):b.slice(i-j.length,i)===j}})},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96,"./_to-length":106}],223:[function(a,b,c){"use strict";a("./_string-html")("fixed",function(a){return function(){return a(this,"tt","","")}})},{"./_string-html":97}],224:[function(a,b,c){"use strict";a("./_string-html")("fontcolor",function(a){return function(b){return a(this,"font","color",b)}})},{"./_string-html":97}],225:[function(a,b,c){"use strict";a("./_string-html")("fontsize",function(a){return function(b){return a(this,"font","size",b)}})},{"./_string-html":97}],226:[function(a,b,c){var d=a("./_export"),e=a("./_to-index"),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(65536>b?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},{"./_export":31,"./_to-index":103}],227:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-context"),f="includes";d(d.P+d.F*a("./_fails-is-regexp")(f),"String",{includes:function(a){return!!~e(this,a,f).indexOf(a,arguments.length>1?arguments[1]:void 0)}})},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96}],228:[function(a,b,c){"use strict";a("./_string-html")("italics",function(a){return function(){return a(this,"i","","")}})},{"./_string-html":97}],229:[function(a,b,c){"use strict";var d=a("./_string-at")(!0);a("./_iter-define")(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},{"./_iter-define":52,"./_string-at":95}],230:[function(a,b,c){"use strict";a("./_string-html")("link",function(a){return function(b){return a(this,"a","href",b)}})},{"./_string-html":97}],231:[function(a,b,c){var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-length");d(d.S,"String",{raw:function(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),d>h&&g.push(String(arguments[h]));return g.join("")}})},{"./_export":31,"./_to-iobject":105,"./_to-length":106}],232:[function(a,b,c){var d=a("./_export");d(d.P,"String",{repeat:a("./_string-repeat")})},{"./_export":31,"./_string-repeat":99}],233:[function(a,b,c){"use strict";a("./_string-html")("small",function(a){return function(){return a(this,"small","","")}})},{"./_string-html":97}],234:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-length"),f=a("./_string-context"),g="startsWith",h=""[g];d(d.P+d.F*a("./_fails-is-regexp")(g),"String",{startsWith:function(a){var b=f(this,a,g),c=e(Math.min(arguments.length>1?arguments[1]:void 0,b.length)),d=String(a);return h?h.call(b,d,c):b.slice(c,c+d.length)===d}})},{"./_export":31,"./_fails-is-regexp":32,"./_string-context":96,"./_to-length":106}],235:[function(a,b,c){"use strict";a("./_string-html")("strike",function(a){return function(){return a(this,"strike","","")}})},{"./_string-html":97}],236:[function(a,b,c){"use strict";a("./_string-html")("sub",function(a){return function(){return a(this,"sub","","")}})},{"./_string-html":97}],237:[function(a,b,c){"use strict";a("./_string-html")("sup",function(a){return function(){return a(this,"sup","","")}})},{"./_string-html":97}],238:[function(a,b,c){"use strict";a("./_string-trim")("trim",function(a){return function(){return a(this,3)}})},{"./_string-trim":100}],239:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_core"),f=a("./_has"),g=a("./_descriptors"),h=a("./_export"),i=a("./_redefine"),j=a("./_meta").KEY,k=a("./_fails"),l=a("./_shared"),m=a("./_set-to-string-tag"),n=a("./_uid"),o=a("./_wks"),p=a("./_keyof"),q=a("./_enum-keys"),r=a("./_is-array"),s=a("./_an-object"),t=a("./_to-iobject"),u=a("./_to-primitive"),v=a("./_property-desc"),w=a("./_object-create"),x=a("./_object-gopn-ext"),y=a("./_object-gopd"),z=a("./_object-dp"),A=y.f,B=z.f,C=x.f,D=d.Symbol,E=d.JSON,F=E&&E.stringify,G=!1,H=o("_hidden"),I={}.propertyIsEnumerable,J=l("symbol-registry"),K=l("symbols"),L=Object.prototype,M="function"==typeof D,N=d.QObject,O=g&&k(function(){return 7!=w(B({},"a",{get:function(){return B(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=A(L,b);d&&delete L[b],B(a,b,c),d&&a!==L&&B(L,b,d)}:B,P=function(a){var b=K[a]=w(D.prototype);return b._k=a,g&&G&&O(L,a,{configurable:!0,set:function(b){f(this,H)&&f(this[H],a)&&(this[H][a]=!1),O(this,a,v(1,b))}}),b},Q=function(a){return"symbol"==typeof a},R=function(a,b,c){return s(a),b=u(b,!0),s(c),f(K,b)?(c.enumerable?(f(a,H)&&a[H][b]&&(a[H][b]=!1),c=w(c,{enumerable:v(0,!1)})):(f(a,H)||B(a,H,v(1,{})),a[H][b]=!0),O(a,b,c)):B(a,b,c)},S=function(a,b){s(a);for(var c,d=q(b=t(b)),e=0,f=d.length;f>e;)R(a,c=d[e++],b[c]);return a},T=function(a,b){return void 0===b?w(a):S(w(a),b)},U=function(a){var b=I.call(this,a=u(a,!0));return b||!f(this,a)||!f(K,a)||f(this,H)&&this[H][a]?b:!0},V=function(a,b){var c=A(a=t(a),b=u(b,!0));return!c||!f(K,b)||f(a,H)&&a[H][b]||(c.enumerable=!0),c},W=function(a){for(var b,c=C(t(a)),d=[],e=0;c.length>e;)f(K,b=c[e++])||b==H||b==j||d.push(b);return d},X=function(a){for(var b,c=C(t(a)),d=[],e=0;c.length>e;)f(K,b=c[e++])&&d.push(K[b]);return d},Y=function(a){if(void 0!==a&&!Q(a)){for(var b,c,d=[a],e=1;arguments.length>e;)d.push(arguments[e++]);return b=d[1],"function"==typeof b&&(c=b),(c||!r(b))&&(b=function(a,b){return c&&(b=c.call(this,a,b)),Q(b)?void 0:b}),d[1]=b,F.apply(E,d)}},Z=k(function(){var a=D();return"[null]"!=F([a])||"{}"!=F({a:a})||"{}"!=F(Object(a))});M||(D=function(){if(Q(this))throw TypeError("Symbol is not a constructor");return P(n(arguments.length>0?arguments[0]:void 0))},i(D.prototype,"toString",function(){return this._k}),Q=function(a){return a instanceof D},y.f=V,z.f=R,a("./_object-gopn").f=x.f=W,a("./_object-pie").f=U,a("./_object-gops").f=X,g&&!a("./_library")&&i(L,"propertyIsEnumerable",U,!0)),h(h.G+h.W+h.F*!M,{Symbol:D});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),_=0;$.length>_;){var aa=$[_++],ba=e.Symbol,ca=o(aa);aa in ba||B(ba,aa,{value:M?ca:P(ca)})}N&&N.prototype&&N.prototype.findChild||(G=!0),h(h.S+h.F*!M,"Symbol",{"for":function(a){return f(J,a+="")?J[a]:J[a]=D(a)},keyFor:function(a){return p(J,a)},useSetter:function(){G=!0},useSimple:function(){G=!1}}),h(h.S+h.F*!M,"Object",{create:T,defineProperty:R,defineProperties:S,getOwnPropertyDescriptor:V,getOwnPropertyNames:W,getOwnPropertySymbols:X}),E&&h(h.S+h.F*(!M||Z),"JSON",{stringify:Y}),m(D,"Symbol"),m(Math,"Math",!0),m(d.JSON,"JSON",!0)},{"./_an-object":9,"./_core":24,"./_descriptors":27,"./_enum-keys":30,"./_export":31,"./_fails":33,"./_global":37,"./_has":38,"./_is-array":46,"./_keyof":56,"./_library":57,"./_meta":61,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_object-gopn-ext":69,"./_object-gops":71,"./_object-pie":75,"./_property-desc":83,"./_redefine":85,"./_set-to-string-tag":90,"./_shared":92,"./_to-iobject":105,"./_to-primitive":108,"./_uid":112,"./_wks":113}],240:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_typed"),f=a("./_typed-buffer"),g=a("./_an-object"),h=a("./_to-index"),i=a("./_to-length"),j=a("./_is-object"),k=(a("./_wks")("typed_array"),a("./_global").ArrayBuffer),l=a("./_species-constructor"),m=f.ArrayBuffer,n=f.DataView,o=e.ABV&&k.isView,p=m.prototype.slice,q=e.VIEW,r="ArrayBuffer";d(d.G+d.W+d.F*(k!==m),{ArrayBuffer:m}),d(d.S+d.F*!e.CONSTR,r,{isView:function(a){return o&&o(a)||j(a)&&q in a}}),d(d.P+d.U+d.F*a("./_fails")(function(){return!new m(2).slice(1,void 0).byteLength}),r,{slice:function(a,b){if(void 0!==p&&void 0===b)return p.call(g(this),a);for(var c=g(this).byteLength,d=h(a,c),e=h(void 0===b?c:b,c),f=new(l(this,m))(i(e-d)),j=new n(this),k=new n(f),o=0;e>d;)k.setUint8(o++,j.getUint8(d++));return f}}),a("./_set-species")(r)},{"./_an-object":9,"./_export":31,"./_fails":33,"./_global":37,"./_is-object":48,"./_set-species":89,"./_species-constructor":93,"./_to-index":103,"./_to-length":106,"./_typed":111,"./_typed-buffer":110,"./_wks":113}],241:[function(a,b,c){var d=a("./_export");d(d.G+d.W+d.F*!a("./_typed").ABV,{DataView:a("./_typed-buffer").DataView})},{"./_export":31,"./_typed":111,"./_typed-buffer":110}],242:[function(a,b,c){a("./_typed-array")("Float32",4,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],243:[function(a,b,c){a("./_typed-array")("Float64",8,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],244:[function(a,b,c){a("./_typed-array")("Int16",2,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],245:[function(a,b,c){a("./_typed-array")("Int32",4,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],246:[function(a,b,c){a("./_typed-array")("Int8",1,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],247:[function(a,b,c){a("./_typed-array")("Uint16",2,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],248:[function(a,b,c){a("./_typed-array")("Uint32",4,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],249:[function(a,b,c){a("./_typed-array")("Uint8",1,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":109}],250:[function(a,b,c){a("./_typed-array")("Uint8",1,function(a){return function(b,c,d){return a(this,b,c,d)}},!0)},{"./_typed-array":109}],251:[function(a,b,c){"use strict";var d,e=a("./_array-methods")(0),f=a("./_redefine"),g=a("./_meta"),h=a("./_object-assign"),i=a("./_collection-weak"),j=a("./_is-object"),k=(a("./_has"),g.getWeak),l=Object.isExtensible,m=i.ufstore,n={},o=function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},p={get:function(a){if(j(a)){var b=k(a);return b===!0?m(this).get(a):b?b[this._i]:void 0}},set:function(a,b){return i.def(this,a,b)}},q=b.exports=a("./_collection")("WeakMap",o,p,i,!0,!0);7!=(new q).set((Object.freeze||Object)(n),7).get(n)&&(d=i.getConstructor(o),h(d.prototype,p),g.NEED=!0,e(["delete","has","get","set"],function(a){var b=q.prototype,c=b[a];f(b,a,function(b,e){if(j(b)&&!l(b)){this._f||(this._f=new d);var f=this._f[a](b,e);return"set"==a?this:f}return c.call(this,b,e)})}))},{"./_array-methods":14,"./_collection":23,"./_collection-weak":22,"./_has":38,"./_is-object":48,"./_meta":61,"./_object-assign":64,"./_redefine":85}],252:[function(a,b,c){"use strict";var d=a("./_collection-weak");a("./_collection")("WeakSet",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a,!0)}},d,!1,!0)},{"./_collection":23,"./_collection-weak":22}],253:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!0);d(d.P,"Array",{includes:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":7,"./_array-includes":13,"./_export":31}],254:[function(a,b,c){var d=a("./_export"),e=a("./_cof");d(d.S,"Error",{isError:function(a){return"Error"===e(a)}})},{"./_cof":19,"./_export":31}],255:[function(a,b,c){var d=a("./_export");d(d.P+d.R,"Map",{toJSON:a("./_collection-to-json")("Map")})},{"./_collection-to-json":21,"./_export":31}],256:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{iaddh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},{"./_export":31}],257:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{imulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},{"./_export":31}],258:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{isubh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},{"./_export":31}],259:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{umulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},{"./_export":31}],260:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!0);d(d.S,"Object",{entries:function(a){return e(a)}})},{"./_export":31,"./_object-to-array":77}],261:[function(a,b,c){var d=a("./_export"),e=a("./_own-keys"),f=a("./_to-iobject"),g=a("./_property-desc"),h=a("./_object-gopd"),i=a("./_object-dp");d(d.S,"Object",{getOwnPropertyDescriptors:function(a){for(var b,c,d=f(a),j=h.f,k=e(d),l={},m=0;k.length>m;)c=j(d,b=k[m++]),b in l?i.f(l,b,g(0,c)):l[b]=c;return l}})},{"./_export":31,"./_object-dp":66,"./_object-gopd":68,"./_own-keys":78,"./_property-desc":83,"./_to-iobject":105}],262:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!1);d(d.S,"Object",{values:function(a){return e(a)}})},{"./_export":31,"./_object-to-array":77}],263:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.key,g=d.set;d.exp({defineMetadata:function(a,b,c,d){g(a,b,e(c),f(d))}})},{"./_an-object":9,"./_metadata":62}],264:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.key,g=d.map,h=d.store;d.exp({deleteMetadata:function(a,b){var c=arguments.length<3?void 0:f(arguments[2]),d=g(e(b),c,!1);if(void 0===d||!d["delete"](a))return!1;if(d.size)return!0;var i=h.get(b);return i["delete"](c),!!i.size||h["delete"](b)}})},{"./_an-object":9,"./_metadata":62}],265:[function(a,b,c){var d=a("./es6.set"),e=a("./_array-from-iterable"),f=a("./_metadata"),g=a("./_an-object"),h=a("./_object-gpo"),i=f.keys,j=f.key,k=function(a,b){var c=i(a,b),f=h(a);if(null===f)return c;var g=k(f,b);return g.length?c.length?e(new d(c.concat(g))):g:c};f.exp({getMetadataKeys:function(a){return k(g(a),arguments.length<2?void 0:j(arguments[1]))}})},{"./_an-object":9,"./_array-from-iterable":12,"./_metadata":62,"./_object-gpo":72,"./es6.set":216}],266:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_object-gpo"),g=d.has,h=d.get,i=d.key,j=function(a,b,c){var d=g(a,b,c);if(d)return h(a,b,c);var e=f(b);return null!==e?j(a,e,c):void 0};d.exp({getMetadata:function(a,b){return j(a,e(b),arguments.length<3?void 0:i(arguments[2]))}})},{"./_an-object":9,"./_metadata":62,"./_object-gpo":72}],267:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.keys,g=d.key;d.exp({getOwnMetadataKeys:function(a){return f(e(a),arguments.length<2?void 0:g(arguments[1]))}})},{"./_an-object":9,"./_metadata":62}],268:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.get,g=d.key;d.exp({getOwnMetadata:function(a,b){return f(a,e(b),arguments.length<3?void 0:g(arguments[2]))}})},{"./_an-object":9,"./_metadata":62}],269:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_object-gpo"),g=d.has,h=d.key,i=function(a,b,c){var d=g(a,b,c);if(d)return!0;var e=f(b);return null!==e?i(a,e,c):!1};d.exp({hasMetadata:function(a,b){return i(a,e(b),arguments.length<3?void 0:h(arguments[2]))}})},{"./_an-object":9,"./_metadata":62,"./_object-gpo":72}],270:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.has,g=d.key;d.exp({hasOwnMetadata:function(a,b){return f(a,e(b),arguments.length<3?void 0:g(arguments[2]))}})},{"./_an-object":9,"./_metadata":62}],271:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_a-function"),g=d.key,h=d.set;d.exp({metadata:function(a,b){return function(c,d){h(a,b,(void 0!==d?e:f)(c),g(d))}}})},{"./_a-function":5,"./_an-object":9,"./_metadata":62}],272:[function(a,b,c){var d=a("./_export");d(d.P+d.R,"Set",{toJSON:a("./_collection-to-json")("Set")})},{"./_collection-to-json":21,"./_export":31}],273:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-at")(!0);d(d.P,"String",{at:function(a){return e(this,a)}})},{"./_export":31,"./_string-at":95}],274:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-pad");d(d.P,"String",{padEnd:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0,!1)}})},{"./_export":31,"./_string-pad":98}],275:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-pad");d(d.P,"String",{padStart:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":31,"./_string-pad":98}],276:[function(a,b,c){"use strict";a("./_string-trim")("trimLeft",function(a){return function(){return a(this,1)}},"trimStart")},{"./_string-trim":100}],277:[function(a,b,c){"use strict";a("./_string-trim")("trimRight",function(a){return function(){return a(this,2)}},"trimEnd")},{"./_string-trim":100}],278:[function(a,b,c){var d=a("./_export");d(d.S,"System",{global:a("./_global")})},{"./_export":31,"./_global":37}],279:[function(a,b,c){for(var d=a("./es6.array.iterator"),e=a("./_redefine"),f=a("./_global"),g=a("./_hide"),h=a("./_iterators"),i=a("./_wks"),j=i("iterator"),k=i("toStringTag"),l=h.Array,m=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],n=0;5>n;n++){var o,p=m[n],q=f[p],r=q&&q.prototype;if(r){r[j]||g(r,j,l),r[k]||g(r,k,p),h[p]=l;for(o in d)r[o]||e(r,o,d[o],!0)}}},{"./_global":37,"./_hide":39,"./_iterators":55,"./_redefine":85,"./_wks":113,"./es6.array.iterator":127}],280:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":31,"./_task":102}],281:[function(a,b,c){var d=a("./_global"),e=a("./_export"),f=a("./_invoke"),g=a("./_partial"),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},{"./_export":31,"./_global":37,"./_invoke":43,"./_partial":81}],282:[function(a,b,c){a("./modules/es6.symbol"),a("./modules/es6.object.create"),a("./modules/es6.object.define-property"),a("./modules/es6.object.define-properties"),a("./modules/es6.object.get-own-property-descriptor"),a("./modules/es6.object.get-prototype-of"),a("./modules/es6.object.keys"),a("./modules/es6.object.get-own-property-names"),a("./modules/es6.object.freeze"),a("./modules/es6.object.seal"),a("./modules/es6.object.prevent-extensions"),a("./modules/es6.object.is-frozen"),a("./modules/es6.object.is-sealed"),a("./modules/es6.object.is-extensible"),a("./modules/es6.object.assign"),a("./modules/es6.object.is"),a("./modules/es6.object.set-prototype-of"),a("./modules/es6.object.to-string"),a("./modules/es6.function.bind"),a("./modules/es6.function.name"),a("./modules/es6.function.has-instance"),a("./modules/es6.parse-int"),a("./modules/es6.parse-float"),a("./modules/es6.number.constructor"),a("./modules/es6.number.to-fixed"),a("./modules/es6.number.to-precision"),a("./modules/es6.number.epsilon"),a("./modules/es6.number.is-finite"),a("./modules/es6.number.is-integer"),a("./modules/es6.number.is-nan"),a("./modules/es6.number.is-safe-integer"),a("./modules/es6.number.max-safe-integer"),a("./modules/es6.number.min-safe-integer"),a("./modules/es6.number.parse-float"),a("./modules/es6.number.parse-int"),a("./modules/es6.math.acosh"),a("./modules/es6.math.asinh"),a("./modules/es6.math.atanh"),a("./modules/es6.math.cbrt"),a("./modules/es6.math.clz32"),a("./modules/es6.math.cosh"),a("./modules/es6.math.expm1"),a("./modules/es6.math.fround"),a("./modules/es6.math.hypot"),a("./modules/es6.math.imul"),a("./modules/es6.math.log10"),a("./modules/es6.math.log1p"),a("./modules/es6.math.log2"),a("./modules/es6.math.sign"),a("./modules/es6.math.sinh"),a("./modules/es6.math.tanh"),a("./modules/es6.math.trunc"),a("./modules/es6.string.from-code-point"),a("./modules/es6.string.raw"),a("./modules/es6.string.trim"),a("./modules/es6.string.iterator"),a("./modules/es6.string.code-point-at"),a("./modules/es6.string.ends-with"),a("./modules/es6.string.includes"),a("./modules/es6.string.repeat"),a("./modules/es6.string.starts-with"),a("./modules/es6.string.anchor"),a("./modules/es6.string.big"),a("./modules/es6.string.blink"),a("./modules/es6.string.bold"),a("./modules/es6.string.fixed"),a("./modules/es6.string.fontcolor"),a("./modules/es6.string.fontsize"),a("./modules/es6.string.italics"),a("./modules/es6.string.link"),a("./modules/es6.string.small"),a("./modules/es6.string.strike"),a("./modules/es6.string.sub"),a("./modules/es6.string.sup"),a("./modules/es6.date.now"),a("./modules/es6.date.to-string"),a("./modules/es6.date.to-iso-string"),a("./modules/es6.date.to-json"),a("./modules/es6.array.is-array"),a("./modules/es6.array.from"),a("./modules/es6.array.of"),a("./modules/es6.array.join"),a("./modules/es6.array.slice"),a("./modules/es6.array.sort"),a("./modules/es6.array.for-each"),a("./modules/es6.array.map"),a("./modules/es6.array.filter"),a("./modules/es6.array.some"),a("./modules/es6.array.every"),a("./modules/es6.array.reduce"),a("./modules/es6.array.reduce-right"),a("./modules/es6.array.index-of"),a("./modules/es6.array.last-index-of"),a("./modules/es6.array.copy-within"),a("./modules/es6.array.fill"),a("./modules/es6.array.find"),a("./modules/es6.array.find-index"),a("./modules/es6.array.species"),a("./modules/es6.array.iterator"),a("./modules/es6.regexp.constructor"),a("./modules/es6.regexp.to-string"),a("./modules/es6.regexp.flags"),a("./modules/es6.regexp.match"),a("./modules/es6.regexp.replace"),a("./modules/es6.regexp.search"),a("./modules/es6.regexp.split"),a("./modules/es6.promise"),a("./modules/es6.map"),a("./modules/es6.set"),a("./modules/es6.weak-map"),a("./modules/es6.weak-set"),a("./modules/es6.typed.array-buffer"),a("./modules/es6.typed.data-view"),a("./modules/es6.typed.int8-array"),a("./modules/es6.typed.uint8-array"),a("./modules/es6.typed.uint8-clamped-array"),a("./modules/es6.typed.int16-array"),a("./modules/es6.typed.uint16-array"),a("./modules/es6.typed.int32-array"),a("./modules/es6.typed.uint32-array"),a("./modules/es6.typed.float32-array"),a("./modules/es6.typed.float64-array"),a("./modules/es6.reflect.apply"),a("./modules/es6.reflect.construct"),a("./modules/es6.reflect.define-property"),a("./modules/es6.reflect.delete-property"),a("./modules/es6.reflect.enumerate"),a("./modules/es6.reflect.get"),a("./modules/es6.reflect.get-own-property-descriptor"),a("./modules/es6.reflect.get-prototype-of"),a("./modules/es6.reflect.has"),a("./modules/es6.reflect.is-extensible"),a("./modules/es6.reflect.own-keys"),a("./modules/es6.reflect.prevent-extensions"),a("./modules/es6.reflect.set"),a("./modules/es6.reflect.set-prototype-of"),a("./modules/es7.array.includes"),a("./modules/es7.string.at"),a("./modules/es7.string.pad-start"),a("./modules/es7.string.pad-end"),a("./modules/es7.string.trim-left"),a("./modules/es7.string.trim-right"),a("./modules/es7.object.get-own-property-descriptors"),a("./modules/es7.object.values"),a("./modules/es7.object.entries"),a("./modules/es7.map.to-json"),a("./modules/es7.set.to-json"),a("./modules/es7.system.global"),a("./modules/es7.error.is-error"),a("./modules/es7.math.iaddh"),a("./modules/es7.math.isubh"),a("./modules/es7.math.imulh"),a("./modules/es7.math.umulh"),a("./modules/es7.reflect.define-metadata"),a("./modules/es7.reflect.delete-metadata"),a("./modules/es7.reflect.get-metadata"),a("./modules/es7.reflect.get-metadata-keys"),a("./modules/es7.reflect.get-own-metadata"),a("./modules/es7.reflect.get-own-metadata-keys"),a("./modules/es7.reflect.has-metadata"),a("./modules/es7.reflect.has-own-metadata"),a("./modules/es7.reflect.metadata"),a("./modules/web.timers"),a("./modules/web.immediate"),a("./modules/web.dom.iterable"),b.exports=a("./modules/_core")},{"./modules/_core":24,"./modules/es6.array.copy-within":117,"./modules/es6.array.every":118,"./modules/es6.array.fill":119,"./modules/es6.array.filter":120,"./modules/es6.array.find":122,"./modules/es6.array.find-index":121,"./modules/es6.array.for-each":123,"./modules/es6.array.from":124,"./modules/es6.array.index-of":125,"./modules/es6.array.is-array":126,"./modules/es6.array.iterator":127,"./modules/es6.array.join":128,"./modules/es6.array.last-index-of":129,"./modules/es6.array.map":130,"./modules/es6.array.of":131,"./modules/es6.array.reduce":133,"./modules/es6.array.reduce-right":132,"./modules/es6.array.slice":134,"./modules/es6.array.some":135,"./modules/es6.array.sort":136,"./modules/es6.array.species":137,"./modules/es6.date.now":138,"./modules/es6.date.to-iso-string":139,"./modules/es6.date.to-json":140,"./modules/es6.date.to-string":141,"./modules/es6.function.bind":142,"./modules/es6.function.has-instance":143,"./modules/es6.function.name":144,"./modules/es6.map":145,"./modules/es6.math.acosh":146,"./modules/es6.math.asinh":147,"./modules/es6.math.atanh":148,"./modules/es6.math.cbrt":149,"./modules/es6.math.clz32":150,"./modules/es6.math.cosh":151,"./modules/es6.math.expm1":152,"./modules/es6.math.fround":153,"./modules/es6.math.hypot":154,"./modules/es6.math.imul":155,"./modules/es6.math.log10":156,"./modules/es6.math.log1p":157,"./modules/es6.math.log2":158,"./modules/es6.math.sign":159,"./modules/es6.math.sinh":160,"./modules/es6.math.tanh":161,"./modules/es6.math.trunc":162,"./modules/es6.number.constructor":163,"./modules/es6.number.epsilon":164,"./modules/es6.number.is-finite":165,"./modules/es6.number.is-integer":166,"./modules/es6.number.is-nan":167,"./modules/es6.number.is-safe-integer":168,"./modules/es6.number.max-safe-integer":169,"./modules/es6.number.min-safe-integer":170,"./modules/es6.number.parse-float":171,"./modules/es6.number.parse-int":172,"./modules/es6.number.to-fixed":173,"./modules/es6.number.to-precision":174,"./modules/es6.object.assign":175,"./modules/es6.object.create":176,"./modules/es6.object.define-properties":177,"./modules/es6.object.define-property":178,"./modules/es6.object.freeze":179,"./modules/es6.object.get-own-property-descriptor":180,"./modules/es6.object.get-own-property-names":181,"./modules/es6.object.get-prototype-of":182,"./modules/es6.object.is":186,"./modules/es6.object.is-extensible":183,"./modules/es6.object.is-frozen":184,"./modules/es6.object.is-sealed":185,"./modules/es6.object.keys":187,"./modules/es6.object.prevent-extensions":188,"./modules/es6.object.seal":189,"./modules/es6.object.set-prototype-of":190,"./modules/es6.object.to-string":191,"./modules/es6.parse-float":192,"./modules/es6.parse-int":193,"./modules/es6.promise":194,"./modules/es6.reflect.apply":195,"./modules/es6.reflect.construct":196,"./modules/es6.reflect.define-property":197,"./modules/es6.reflect.delete-property":198,"./modules/es6.reflect.enumerate":199,"./modules/es6.reflect.get":202,"./modules/es6.reflect.get-own-property-descriptor":200,"./modules/es6.reflect.get-prototype-of":201,"./modules/es6.reflect.has":203,"./modules/es6.reflect.is-extensible":204,"./modules/es6.reflect.own-keys":205,"./modules/es6.reflect.prevent-extensions":206,"./modules/es6.reflect.set":208,"./modules/es6.reflect.set-prototype-of":207,"./modules/es6.regexp.constructor":209,"./modules/es6.regexp.flags":210,"./modules/es6.regexp.match":211,"./modules/es6.regexp.replace":212,"./modules/es6.regexp.search":213,"./modules/es6.regexp.split":214,"./modules/es6.regexp.to-string":215,"./modules/es6.set":216,"./modules/es6.string.anchor":217,"./modules/es6.string.big":218,"./modules/es6.string.blink":219,"./modules/es6.string.bold":220,"./modules/es6.string.code-point-at":221,"./modules/es6.string.ends-with":222,"./modules/es6.string.fixed":223,"./modules/es6.string.fontcolor":224,"./modules/es6.string.fontsize":225,"./modules/es6.string.from-code-point":226,"./modules/es6.string.includes":227,"./modules/es6.string.italics":228,"./modules/es6.string.iterator":229,"./modules/es6.string.link":230,"./modules/es6.string.raw":231,"./modules/es6.string.repeat":232,"./modules/es6.string.small":233,"./modules/es6.string.starts-with":234,"./modules/es6.string.strike":235,"./modules/es6.string.sub":236,"./modules/es6.string.sup":237,"./modules/es6.string.trim":238,"./modules/es6.symbol":239,"./modules/es6.typed.array-buffer":240,"./modules/es6.typed.data-view":241,"./modules/es6.typed.float32-array":242,"./modules/es6.typed.float64-array":243,"./modules/es6.typed.int16-array":244,"./modules/es6.typed.int32-array":245,"./modules/es6.typed.int8-array":246,"./modules/es6.typed.uint16-array":247,"./modules/es6.typed.uint32-array":248,"./modules/es6.typed.uint8-array":249,"./modules/es6.typed.uint8-clamped-array":250,"./modules/es6.weak-map":251,"./modules/es6.weak-set":252,"./modules/es7.array.includes":253,"./modules/es7.error.is-error":254,"./modules/es7.map.to-json":255,"./modules/es7.math.iaddh":256,"./modules/es7.math.imulh":257,"./modules/es7.math.isubh":258,"./modules/es7.math.umulh":259,"./modules/es7.object.entries":260,"./modules/es7.object.get-own-property-descriptors":261,"./modules/es7.object.values":262,"./modules/es7.reflect.define-metadata":263,"./modules/es7.reflect.delete-metadata":264,"./modules/es7.reflect.get-metadata":266,"./modules/es7.reflect.get-metadata-keys":265,"./modules/es7.reflect.get-own-metadata":268,"./modules/es7.reflect.get-own-metadata-keys":267,"./modules/es7.reflect.has-metadata":269,"./modules/es7.reflect.has-own-metadata":270,"./modules/es7.reflect.metadata":271,"./modules/es7.set.to-json":272,"./modules/es7.string.at":273,"./modules/es7.string.pad-end":274,"./modules/es7.string.pad-start":275,"./modules/es7.string.trim-left":276,"./modules/es7.string.trim-right":277,"./modules/es7.system.global":278,"./modules/web.dom.iterable":279,"./modules/web.immediate":280,"./modules/web.timers":281}],283:[function(a,b,c){(function(a,c){!function(c){"use strict";function d(a,b,c,d){var e=Object.create((b||f).prototype),g=new o(d||[]);return e._invoke=l(a,c,g),e}function e(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(d){return{type:"throw",arg:d}}}function f(){}function g(){}function h(){}function i(a){["next","throw","return"].forEach(function(b){a[b]=function(a){return this._invoke(b,a)}})}function j(a){this.arg=a}function k(b){function c(a,c){var d=b[a](c),e=d.value;return e instanceof j?Promise.resolve(e.arg).then(f,g):Promise.resolve(e).then(function(a){return d.value=a,d})}function d(a,b){function d(){return c(a,b)}return e=e?e.then(d,d):new Promise(function(a){a(d())})}"object"==typeof a&&a.domain&&(c=a.domain.bind(c));var e,f=c.bind(b,"next"),g=c.bind(b,"throw");
+c.bind(b,"return");this._invoke=d}function l(a,b,c){var d=w;return function(f,g){if(d===y)throw new Error("Generator is already running");if(d===z){if("throw"===f)throw g;return q()}for(;;){var h=c.delegate;if(h){if("return"===f||"throw"===f&&h.iterator[f]===r){c.delegate=null;var i=h.iterator["return"];if(i){var j=e(i,h.iterator,g);if("throw"===j.type){f="throw",g=j.arg;continue}}if("return"===f)continue}var j=e(h.iterator[f],h.iterator,g);if("throw"===j.type){c.delegate=null,f="throw",g=j.arg;continue}f="next",g=r;var k=j.arg;if(!k.done)return d=x,k;c[h.resultName]=k.value,c.next=h.nextLoc,c.delegate=null}if("next"===f)c._sent=g,d===x?c.sent=g:c.sent=r;else if("throw"===f){if(d===w)throw d=z,g;c.dispatchException(g)&&(f="next",g=r)}else"return"===f&&c.abrupt("return",g);d=y;var j=e(a,b,c);if("normal"===j.type){d=c.done?z:x;var k={value:j.arg,done:c.done};if(j.arg!==A)return k;c.delegate&&"next"===f&&(g=r)}else"throw"===j.type&&(d=z,f="throw",g=j.arg)}}}function m(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function n(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function o(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(m,this),this.reset(!0)}function p(a){if(a){var b=a[t];if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var c=-1,d=function e(){for(;++c=0;--d){var e=this.tryEntries[d],f=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var g=s.call(e,"catchLoc"),h=s.call(e,"finallyLoc");if(g&&h){if(this.prev=0;--c){var d=this.tryEntries[c];if(d.tryLoc<=this.prev&&s.call(d,"finallyLoc")&&this.prev=0;--b){var c=this.tryEntries[b];if(c.finallyLoc===a)return this.complete(c.completion,c.afterLoc),n(c),A}},"catch":function(a){for(var b=this.tryEntries.length-1;b>=0;--b){var c=this.tryEntries[b];if(c.tryLoc===a){var d=c.completion;if("throw"===d.type){var e=d.arg;n(c)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(a,b,c){return this.delegate={iterator:p(a),resultName:b,nextLoc:c},A}}}("object"==typeof c?c:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:290}],284:[function(a,b,c){b.exports={"default":a("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":285}],285:[function(a,b,c){var d=a("../../modules/$");b.exports=function(a,b,c){return d.setDesc(a,b,c)}},{"../../modules/$":286}],286:[function(a,b,c){var d=Object;b.exports={create:d.create,getProto:d.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:d.getOwnPropertyDescriptor,setDesc:d.defineProperty,setDescs:d.defineProperties,getKeys:d.keys,getNames:d.getOwnPropertyNames,getSymbols:d.getOwnPropertySymbols,each:[].forEach}},{}],287:[function(a,b,c){(function(a){"use strict";function b(a,b,c){return new Promise(function(d,e){"function"==typeof b&&(c=b,b=void 0);var g=b?f().open(a,b):f().open(a);g.onblocked=function(a){var b=new Promise(function(a,b){g.onsuccess=function(b){return a(b.target.result)},g.onerror=function(a){a.preventDefault(),b(a)}});a.resume=b,e(a)},"function"==typeof c&&(g.onupgradeneeded=function(a){try{c(a)}catch(b){a.target.result.close(),e(b)}}),g.onerror=function(a){a.preventDefault(),e(a)},g.onsuccess=function(a){d(a.target.result)}})}function d(a){var b="string"!=typeof a?a.name:a;return new Promise(function(c,d){var e=function(){var a=f().deleteDatabase(b);a.onblocked=function(b){b=null===b.newVersion||"undefined"==typeof Proxy?b:new Proxy(b,{get:function(a,b){return"newVersion"===b?null:a[b]}});var c=new Promise(function(c,d){a.onsuccess=function(a){"newVersion"in a||(a.newVersion=b.newVersion),"oldVersion"in a||(a.oldVersion=b.oldVersion),c(a)},a.onerror=function(a){a.preventDefault(),d(a)}});b.resume=c,d(b)},a.onerror=function(a){a.preventDefault(),d(a)},a.onsuccess=function(a){"newVersion"in a||(a.newVersion=null),c(a)}};"string"!=typeof a?(a.close(),setTimeout(e,100)):e()})}function e(a,b){return f().cmp(a,b)}function f(){return a.forceIndexedDB||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.msIndexedDB||a.shimIndexedDB}Object.defineProperty(c,"__esModule",{value:!0}),c.open=b,c.del=d,c.cmp=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],288:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a){return Array.isArray(a)?a.map(function(a){return f(a)}):(0,m["default"])(a)?Object.keys(a).reduce(function(b,c){return b[c]=f(a[c]),b},{}):a}function g(a){return function(b){var c=b.oldVersion>s?0:b.oldVersion;a(b,c)}}function h(a,b,c,d){function e(){var a=k.next();if(a.done)return j.dropIndexes.forEach(function(a){h.objectStore(a.storeName).deleteIndex(a.name)}),j.indexes.forEach(function(a){h.objectStore(a.storeName).createIndex(a.name,a.field,{unique:a.unique,multiEntry:a.multiEntry})}),void(d&&d());var b=a.value,c={},f=void 0,i=void 0;if(b.copyFrom){f=b.copyFrom.name,i=h.objectStore(f);var l=b.copyFrom.options||{};null!==l.keyPath&&void 0!==l.keyPath?c.keyPath=l.keyPath:null!==i.keyPath&&void 0!==b.keyPath&&(c.keyPath=i.keyPath),void 0!==l.autoIncrement?c.autoIncrement=l.autoIncrement:i.autoIncrement&&(c.autoIncrement=i.autoIncrement)}else null!==b.keyPath&&void 0!==b.keyPath&&(c.keyPath=b.keyPath),b.autoIncrement&&(c.autoIncrement=b.autoIncrement);var m=g.createObjectStore(b.name,c);if(!b.copyFrom)return void e();var n=i.getAll();n.onsuccess=function(){var a=n.result,c=0;return!a.length&&b.copyFrom.deleteOld?(g.deleteObjectStore(f),void e()):void a.forEach(function(d){var h=m.add(d);h.onsuccess=function(){c++,c===a.length&&(b.copyFrom.deleteOld&&g.deleteObjectStore(f),e())}})}}var f=this;if(!(c>=a)){var g=b.target.result,h=b.target.transaction,i=this.lastEnteredVersion();this._versions[a].earlyCallbacks.forEach(function(c){f.setCurrentVersion(a),c.call(f,b)}),this.setCurrentVersion(i);var j=this._versions[a];j.dropStores.forEach(function(a){g.deleteObjectStore(a.name)});var k=j.stores.values();e()}}Object.defineProperty(c,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;ca||a>s)throw new TypeError("invalid version");return this.setCurrentVersion(a),this._versions[a]={stores:[],dropStores:[],indexes:[],dropIndexes:[],callbacks:[],earlyCallbacks:[],version:a},this}},{key:"addStore",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("string"!=typeof a)throw new TypeError('"name" is required');if(this._stores[a])throw new DOMException('"'+a+'" store is already defined',"ConstraintError");(0,m["default"])(c)&&(0,m["default"])(c.copyFrom)&&!function(){var a=c.copyFrom,d=a.name;if("string"!=typeof d)throw new TypeError('"copyFrom.name" is required when `copyFrom` is present');if(b._versions[b.lastEnteredVersion()].dropStores.some(function(a){return a.name===d}))throw new TypeError('"copyFrom.name" must not be a store slated for deletion.');if(a.deleteOld){var e=b._stores[d];e&&delete b._stores[d]}}();var d={name:a,indexes:{},keyPath:c.key||c.keyPath,autoIncrement:c.increment||c.autoIncrement||!1,copyFrom:c.copyFrom||null};if(d.keyPath||""===d.keyPath||(d.keyPath=null),d.autoIncrement&&(""===d.keyPath||Array.isArray(d.keyPath)))throw new DOMException("keyPath must not be the empty string or a sequence if autoIncrement is in use","InvalidAccessError");return this._stores[a]=d,this._versions[this.lastEnteredVersion()].stores.push(d),this._current.store=d,this}},{key:"delStore",value:function(a){if("string"!=typeof a)throw new TypeError('"name" is required');this._versions[this.lastEnteredVersion()].stores.forEach(function(b){var c=b.copyFrom;if((0,m["default"])(c)&&a===c.name){if(c.deleteOld)throw new TypeError('"name" is already slated for deletion');throw new TypeError("set `deleteOld` on `copyFrom` to delete this store.")}});var b=this._stores[a];return b?delete this._stores[a]:b={name:a},this._versions[this.lastEnteredVersion()].dropStores.push(b),this._current.store=null,this}},{key:"renameStore",value:function(a,b,c){return this.copyStore(a,b,c,!0)}},{key:"copyStore",value:function(a,b,c){var d=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];if("string"!=typeof a)throw new TypeError('"oldName" is required');if("string"!=typeof b)throw new TypeError('"newName" is required');return c=(0,m["default"])(c)?f(c):{},c.copyFrom={name:a,deleteOld:d,options:c},this.addStore(b,c)}},{key:"getStore",value:function(a){var b=this;if(a&&"object"===("undefined"==typeof a?"undefined":i(a))&&"name"in a&&"indexNames"in a&&!function(){var c=a;a=c.name;var d={name:a,indexes:Array.from(c.indexNames).reduce(function(b,d){var e=c.index(d);return b[d]={name:d,storeName:a,field:e.keyPath,unique:e.unique,multiEntry:e.multiEntry},b},{}),keyPath:c.keyPath,autoIncrement:c.autoIncrement,copyFrom:null};b._stores[a]=d}(),"string"!=typeof a)throw new DOMException('"name" is required',"NotFoundError");if(!this._stores[a])throw new TypeError('"'+a+'" store is not defined');return this._current.store=this._stores[a],this}},{key:"addIndex",value:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if("string"!=typeof a)throw new TypeError('"name" is required');if("string"!=typeof b&&!Array.isArray(b))throw new SyntaxError('"field" is required');var d=this._current.store;if(!d)throw new TypeError('set current store using "getStore" or "addStore"');if(d.indexes[a])throw new DOMException('"'+a+'" index is already defined',"ConstraintError");var e={name:a,field:b,storeName:d.name,multiEntry:c.multi||c.multiEntry||!1,unique:c.unique||!1};return d.indexes[a]=e,this._versions[this.lastEnteredVersion()].indexes.push(e),this}},{key:"delIndex",value:function(a){if("string"!=typeof a)throw new TypeError('"name" is required');var b=this._current.store.indexes[a];if(!b)throw new DOMException('"'+a+'" index is not defined',"NotFoundError");return delete this._current.store.indexes[a],this._versions[this.lastEnteredVersion()].dropIndexes.push(b),this}},{key:"addCallback",value:function(a){return this._versions[this.lastEnteredVersion()].callbacks.push(a),this}},{key:"addEarlyCallback",value:function(a){return this._versions[this.lastEnteredVersion()].earlyCallbacks.push(a),this}},{key:"flushIncomplete",value:function(a){var b=q("idb-incompleteUpgrades");delete b[a],r("idb-incompleteUpgrades",b)}},{key:"open",value:function(a,b){return this.upgrade(a,b,!0)}},{key:"upgrade",value:function(a,b,c){var d=this,e=void 0,f=void 0,j=void 0,l=function(){f=n(d._versions).sort(function(a,b){return a.version-b.version}).map(function(a){return a.version}).values()},m=function(a){return function(b){if(b&&"blocked"===b.type)return void a(b);throw b}};l();var o=function(i,l,m,n){var o=i.version,p=!0,q=void 0,r=void 0;for(r=f.next();!r.done&&r.value<=o;r=f.next())q=r.value;return e=r.value,r.done||e>b?void(void 0!==n?(e=q,j(i,l,m,n)):c?l(i):(i.close(),l())):(i.close(),void setTimeout(function(){(0,k.open)(a,e,g(function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];p=!1,h.call.apply(h,[d,e].concat(b,[function(){p=!0}]))})).then(function(a){var b=setInterval(function(){p&&(clearInterval(b),j(a,l,m,n))},100)})["catch"](function(a){m(a)})}))};return j=function(b,c,f,g){var h=function(c,e){if(c="string"==typeof c?new Error(c):c,c.retry=function(){return new Promise(function(c,f){var g=function(b){d.flushIncomplete(a),c(b)};b.close(),(0,k.open)(a)["catch"](m(f)).then(function(a){l(),o(a,g,f,e)})["catch"](f)})},p){var g=q("idb-incompleteUpgrades");g[a]={version:b.version,error:c.message,callbackIndex:e},r("idb-incompleteUpgrades",g)}b.close(),f(c)},i=Promise.resolve(),j=void 0,n=d._versions[e],s=n.callbacks.some(function(a,c){if(void 0!==g&&g>c)return!1;var d=void 0;try{d=a(b)}catch(e){return h(e,c),!0}return d&&d.then?(i=n.callbacks.slice(c+1).reduce(function(a,c){return a.then(function(){return c(b)})},d),j=c,!0):void 0}),t=void 0!==j;(!s||t)&&(i=i.then(function(){return o(b,c,f)}),t&&(i=i["catch"](function(a){h(a,j)})))},new Promise(function(c,l){if(b=b||d.version(),"number"!=typeof b||1>b)return void l(new Error("Bad version supplied for idb-schema upgrade"));var n=void 0,r=void 0;if(p&&(n=q("idb-incompleteUpgrades"),r=n[a]),r){var s=function(){var b=new Error("An upgrade previously failed to complete for version: "+r.version+" due to reason: "+r.error);return b.badVersion=r.version,b.retry=function(){for(var c=f.next();!c.done&&c.valuec;c++)b[c]=arguments[c];t=!1;var g=f.next();if(g.done)throw new Error("No schema versions added for upgrade");e=g.value,h.call.apply(h,[d,e].concat(b,[function(){t=!0}]))});(0,k.open)(a,u)["catch"](m(l)).then(function(a){var d=setInterval(function(){return t?(clearInterval(d),b1)for(var c=1;c x;\r\n\r\n const indexedDB = local.indexedDB || local.webkitIndexedDB ||\r\n local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB ||\r\n local.shimIndexedDB || (function () {\r\n throw new Error('IndexedDB required');\r\n }());\r\n\r\n const dbCache = {};\r\n const serverEvents = ['abort', 'error', 'versionchange'];\r\n\r\n function isObject (item) {\r\n return item && typeof item === 'object';\r\n }\r\n\r\n function mongoDBToKeyRangeArgs (opts) {\r\n const keys = Object.keys(opts).sort();\r\n if (keys.length === 1) {\r\n const key = keys[0];\r\n const val = opts[key];\r\n let name, inclusive;\r\n switch (key) {\r\n case 'eq': name = 'only'; break;\r\n case 'gt':\r\n name = 'lowerBound';\r\n inclusive = true;\r\n break;\r\n case 'lt':\r\n name = 'upperBound';\r\n inclusive = true;\r\n break;\r\n case 'gte': name = 'lowerBound'; break;\r\n case 'lte': name = 'upperBound'; break;\r\n default: throw new TypeError('`' + key + '` is not a valid key');\r\n }\r\n return [name, [val, inclusive]];\r\n }\r\n const x = opts[keys[0]];\r\n const y = opts[keys[1]];\r\n const pattern = keys.join('-');\r\n\r\n switch (pattern) {\r\n case 'gt-lt': case 'gt-lte': case 'gte-lt': case 'gte-lte':\r\n return ['bound', [x, y, keys[0] === 'gt', keys[1] === 'lt']];\r\n default: throw new TypeError(\r\n '`' + pattern + '` are conflicted keys'\r\n );\r\n }\r\n }\r\n function mongoifyKey (key) {\r\n if (key && typeof key === 'object' && !(key instanceof IDBKeyRange)) {\r\n let [type, args] = mongoDBToKeyRangeArgs(key);\r\n return IDBKeyRange[type](...args);\r\n }\r\n return key;\r\n }\r\n\r\n const IndexQuery = function (table, db, indexName, preexistingError) {\r\n let modifyObj = null;\r\n\r\n const runQuery = function (type, args, cursorType, direction, limitRange, filters, mapper) {\r\n return new Promise(function (resolve, reject) {\r\n let keyRange;\r\n try {\r\n keyRange = type ? IDBKeyRange[type](...args) : null;\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n filters = filters || [];\r\n limitRange = limitRange || null;\r\n\r\n let results = [];\r\n let counter = 0;\r\n const indexArgs = [keyRange];\r\n\r\n const transaction = db.transaction(table, modifyObj ? transactionModes.readwrite : transactionModes.readonly);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(results);\r\n\r\n const store = transaction.objectStore(table); // if bad, db.transaction will reject first\r\n const index = typeof indexName === 'string' ? store.index(indexName) : store;\r\n\r\n if (cursorType !== 'count') {\r\n indexArgs.push(direction || 'next');\r\n }\r\n\r\n // Create a function that will set in the modifyObj properties into\r\n // the passed record.\r\n const modifyKeys = modifyObj ? Object.keys(modifyObj) : [];\r\n\r\n const modifyRecord = function (record) {\r\n modifyKeys.forEach(key => {\r\n let val = modifyObj[key];\r\n if (typeof val === 'function') { val = val(record); }\r\n record[key] = val;\r\n });\r\n return record;\r\n };\r\n\r\n index[cursorType](...indexArgs).onsuccess = function (e) { // indexArgs are already validated\r\n const cursor = e.target.result;\r\n if (typeof cursor === 'number') {\r\n results = cursor;\r\n } else if (cursor) {\r\n if (limitRange !== null && limitRange[0] > counter) {\r\n counter = limitRange[0];\r\n cursor.advance(limitRange[0]); // Will throw on 0, but condition above prevents since counter always 0+\r\n } else if (limitRange !== null && counter >= (limitRange[0] + limitRange[1])) {\r\n // Out of limit range... skip\r\n } else {\r\n let matchFilter = true;\r\n let result = 'value' in cursor ? cursor.value : cursor.key;\r\n\r\n try {\r\n filters.forEach(function (filter) {\r\n if (typeof filter[0] === 'function') {\r\n matchFilter = matchFilter && filter[0](result);\r\n } else {\r\n matchFilter = matchFilter && (result[filter[0]] === filter[1]);\r\n }\r\n });\r\n } catch (err) { // Could be filter on non-object or error in filter function\r\n reject(err);\r\n return;\r\n }\r\n\r\n if (matchFilter) {\r\n counter++;\r\n // If we're doing a modify, run it now\r\n if (modifyObj) {\r\n try {\r\n result = modifyRecord(result);\r\n cursor.update(result); // `result` should only be a \"structured clone\"-able object\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n }\r\n try {\r\n results.push(mapper(result));\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n }\r\n cursor.continue();\r\n }\r\n }\r\n };\r\n });\r\n };\r\n\r\n const Query = function (type, args, queuedError) {\r\n const filters = [];\r\n let direction = 'next';\r\n let cursorType = 'openCursor';\r\n let limitRange = null;\r\n let mapper = defaultMapper;\r\n let unique = false;\r\n let error = preexistingError || queuedError;\r\n\r\n const execute = function () {\r\n if (error) {\r\n return Promise.reject(error);\r\n }\r\n return runQuery(type, args, cursorType, unique ? direction + 'unique' : direction, limitRange, filters, mapper);\r\n };\r\n\r\n const count = function () {\r\n direction = null;\r\n cursorType = 'count';\r\n\r\n return {\r\n execute\r\n };\r\n };\r\n\r\n const keys = function () {\r\n cursorType = 'openKeyCursor';\r\n\r\n return {\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n limit,\r\n map\r\n };\r\n };\r\n\r\n const limit = function (start, end) {\r\n limitRange = !end ? [0, start] : [start, end];\r\n error = limitRange.some(val => typeof val !== 'number') ? new Error('limit() arguments must be numeric') : error;\r\n\r\n return {\r\n desc,\r\n distinct,\r\n filter,\r\n keys,\r\n execute,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const filter = function (prop, val) {\r\n filters.push([prop, val]);\r\n\r\n return {\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const desc = function () {\r\n direction = 'prev';\r\n\r\n return {\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const distinct = function () {\r\n unique = true;\r\n return {\r\n count,\r\n desc,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n const modify = function (update) {\r\n modifyObj = update && typeof update === 'object' ? update : null;\r\n return {\r\n execute\r\n };\r\n };\r\n\r\n const map = function (fn) {\r\n mapper = fn;\r\n\r\n return {\r\n count,\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n modify\r\n };\r\n };\r\n\r\n return {\r\n count,\r\n desc,\r\n distinct,\r\n execute,\r\n filter,\r\n keys,\r\n limit,\r\n map,\r\n modify\r\n };\r\n };\r\n\r\n ['only', 'bound', 'upperBound', 'lowerBound'].forEach((name) => {\r\n this[name] = function () {\r\n return Query(name, arguments);\r\n };\r\n });\r\n\r\n this.range = function (opts) {\r\n let error;\r\n let keyRange = [null, null];\r\n try {\r\n keyRange = mongoDBToKeyRangeArgs(opts);\r\n } catch (e) {\r\n error = e;\r\n }\r\n return Query(...keyRange, error);\r\n };\r\n\r\n this.filter = function (...args) {\r\n const query = Query(null, null);\r\n return query.filter(...args);\r\n };\r\n\r\n this.all = function () {\r\n return this.filter();\r\n };\r\n };\r\n\r\n const Server = function (db, name, version, noServerMethods) {\r\n let closed = false;\r\n\r\n this.getIndexedDB = () => db;\r\n this.isClosed = () => closed;\r\n\r\n this.query = function (table, index) {\r\n const error = closed ? new Error('Database has been closed') : null;\r\n return new IndexQuery(table, db, index, error); // Does not throw by itself\r\n };\r\n\r\n this.add = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing a ConstraintError and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n\r\n const store = transaction.objectStore(table);\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n try {\r\n // Safe to add since in readwrite\r\n if (key != null) {\r\n req = store.add(record, key);\r\n } else {\r\n req = store.add(record);\r\n }\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.update = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n\r\n const store = transaction.objectStore(table);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return true;\r\n }\r\n }\r\n }\r\n try {\r\n // These can throw DataError, e.g., if function passed in\r\n if (key != null) {\r\n req = store.put(record, key);\r\n } else {\r\n req = store.put(record);\r\n }\r\n } catch (err) {\r\n reject(err);\r\n return true;\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.put = function (...args) {\r\n return this.update(...args);\r\n };\r\n\r\n this.remove = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(key);\r\n\r\n const store = transaction.objectStore(table);\r\n try {\r\n store.delete(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n });\r\n };\r\n\r\n this.delete = function (...args) {\r\n return this.remove(...args);\r\n };\r\n\r\n this.clear = function (table) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n const transaction = db.transaction(table, transactionModes.readwrite);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve();\r\n\r\n const store = transaction.objectStore(table);\r\n store.clear();\r\n });\r\n };\r\n\r\n this.close = function () {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n db.close();\r\n closed = true;\r\n delete dbCache[name][version];\r\n resolve();\r\n });\r\n };\r\n\r\n this.get = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n\r\n const store = transaction.objectStore(table);\r\n\r\n let req;\r\n try {\r\n req = store.get(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.count = function (table, key) {\r\n return new Promise((resolve, reject) => {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n try {\r\n key = mongoifyKey(key);\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n\r\n const transaction = db.transaction(table);\r\n transaction.onerror = e => {\r\n // prevent throwing and aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n\r\n const store = transaction.objectStore(table);\r\n let req;\r\n try {\r\n req = key == null ? store.count() : store.count(key);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.addEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n if (eventName === 'error') {\r\n db.addEventListener(eventName, function (e) {\r\n e.preventDefault(); // Needed by Firefox to prevent hard abort with ConstraintError\r\n handler(e);\r\n });\r\n return;\r\n }\r\n db.addEventListener(eventName, handler);\r\n };\r\n\r\n this.removeEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n db.removeEventListener(eventName, handler);\r\n };\r\n\r\n serverEvents.forEach(function (evName) {\r\n this[evName] = function (handler) {\r\n this.addEventListener(evName, handler);\r\n return this;\r\n };\r\n }, this);\r\n\r\n if (noServerMethods) {\r\n return;\r\n }\r\n\r\n let err;\r\n [].some.call(db.objectStoreNames, storeName => {\r\n if (this[storeName]) {\r\n err = new Error('The store name, \"' + storeName + '\", which you have attempted to load, conflicts with db.js method names.\"');\r\n this.close();\r\n return true;\r\n }\r\n this[storeName] = {};\r\n const keys = Object.keys(this);\r\n keys.filter(key => !(([...serverEvents, 'close', 'addEventListener', 'removeEventListener']).includes(key)))\r\n .map(key =>\r\n this[storeName][key] = (...args) => this[key](storeName, ...args)\r\n );\r\n });\r\n return err;\r\n };\r\n\r\n const createSchema = function (e, request, schema, db, server, version) {\r\n if (!schema || schema.length === 0) {\r\n return;\r\n }\r\n\r\n for (let i = 0; i < db.objectStoreNames.length; i++) {\r\n const name = db.objectStoreNames[i];\r\n if (!hasOwn.call(schema, name)) {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `TransactionInactiveError` (as by the upgrade having already\r\n // completed or somehow aborting) - since we've just started and\r\n // should be without risk in this loop\r\n // `NotFoundError` - since we are iterating the dynamically updated\r\n // `objectStoreNames`\r\n db.deleteObjectStore(name);\r\n }\r\n }\r\n\r\n let ret;\r\n Object.keys(schema).some(function (tableName) {\r\n const table = schema[tableName];\r\n let store;\r\n if (db.objectStoreNames.contains(tableName)) {\r\n store = request.transaction.objectStore(tableName); // Shouldn't throw\r\n } else {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.\r\n // `ConstraintError` - The above condition should prevent the name already existing.\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the store but then abort the transaction.\r\n // `SyntaxError` - if an invalid `table.key.keyPath` is supplied.\r\n // `InvalidAccessError` - if `table.key.autoIncrement` is `true` and `table.key.keyPath` is an\r\n // empty string or any sequence (empty or otherwise).\r\n try {\r\n store = db.createObjectStore(tableName, table.key);\r\n } catch (err) {\r\n ret = err;\r\n return true;\r\n }\r\n }\r\n\r\n Object.keys(table.indexes || {}).some(function (indexKey) {\r\n try {\r\n store.index(indexKey);\r\n } catch (err) {\r\n let index = table.indexes[indexKey];\r\n index = index && typeof index === 'object' ? index : {};\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.\r\n // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the index object but then abort the transaction.\r\n // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path\r\n // `InvalidAccessError` - If `multiEntry` on `index` is `true` and\r\n // `keyPath` (second argument) is a sequence\r\n try {\r\n store.createIndex(indexKey, index.keyPath || index.key || indexKey, index);\r\n } catch (err2) {\r\n ret = err2;\r\n return true;\r\n }\r\n }\r\n });\r\n });\r\n return ret;\r\n };\r\n\r\n const open = function (e, server, version, noServerMethods) {\r\n const db = e.target.result;\r\n dbCache[server][version] = db;\r\n\r\n const s = new Server(db, server, version, noServerMethods);\r\n return s instanceof Error ? Promise.reject(s) : Promise.resolve(s);\r\n };\r\n\r\n const db = {\r\n version: '0.15.0',\r\n open: function (options) {\r\n let server = options.server;\r\n let version = options.version || 1;\r\n let schema = options.schema;\r\n let noServerMethods = options.noServerMethods;\r\n\r\n if (!dbCache[server]) {\r\n dbCache[server] = {};\r\n }\r\n return new Promise(function (resolve, reject) {\r\n if (dbCache[server][version]) {\r\n open({\r\n target: {\r\n result: dbCache[server][version]\r\n }\r\n }, server, version, noServerMethods)\r\n .then(resolve, reject);\r\n } else {\r\n if (typeof schema === 'function') {\r\n try {\r\n schema = schema();\r\n } catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n }\r\n const request = indexedDB.open(server, version);\r\n\r\n request.onsuccess = e => open(e, server, version, noServerMethods).then(resolve, reject);\r\n request.onerror = e => {\r\n // Prevent default for `BadVersion` and `AbortError` errors, etc.\r\n // These are not necessarily reported in console in Chrome but present; see\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n // http://stackoverflow.com/questions/36225779/aborterror-within-indexeddb-upgradeneeded-event/36266502\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n request.onupgradeneeded = e => {\r\n let err = createSchema(e, request, schema, e.target.result, server, version);\r\n if (err) {\r\n reject(err);\r\n }\r\n };\r\n request.onblocked = e => {\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // open() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = (ev) => {\r\n open(ev, server, version, noServerMethods)\r\n .then(res, rej);\r\n };\r\n request.onerror = e => rej(e);\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n }\r\n });\r\n },\r\n\r\n delete: function (dbName) {\r\n return new Promise(function (resolve, reject) {\r\n const request = indexedDB.deleteDatabase(dbName); // Does not throw\r\n\r\n request.onsuccess = e => resolve(e);\r\n request.onerror = e => reject(e); // No errors currently\r\n request.onblocked = e => {\r\n // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279\r\n e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, {get: function (target, name) {\r\n return name === 'newVersion' ? null : target[name];\r\n }});\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // delete() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = ev => {\r\n // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in ev)) {\r\n ev.newVersion = e.newVersion;\r\n }\r\n\r\n if (!('oldVersion' in ev)) {\r\n ev.oldVersion = e.oldVersion;\r\n }\r\n\r\n res(ev);\r\n };\r\n request.onerror = e => rej(e);\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n });\r\n },\r\n\r\n cmp: function (param1, param2) {\r\n return new Promise(function (resolve, reject) {\r\n try {\r\n resolve(indexedDB.cmp(param1, param2));\r\n } catch (e) {\r\n reject(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\r\n module.exports = db;\r\n } else if (typeof define === 'function' && define.amd) {\r\n define(function () { return db; });\r\n } else {\r\n local.db = db;\r\n }\r\n}(self));\r\n"]}
\ No newline at end of file
+{"version":3,"sources":["../src/db.js"],"names":["local","isObject","item","_typeof","mongoDBToKeyRangeArgs","opts","keys","Object","sort","length","key","val","name","inclusive","TypeError","x","y","pattern","mongoifyKey","IDBKeyRange","type","_mongoDBToKeyRangeArg2","apply","_toConsumableArray","args","indexedDB","webkitIndexedDB","mozIndexedDB","oIndexedDB","msIndexedDB","shimIndexedDB","Error","serverEvents","transactionModes","readonly","readwrite","runQuery","cursorType","direction","limitRange","filters","mapper","Promise","resolve","reject","keyRange","results","counter","transaction","db","table","modifyObj","onerror","e","onabort","oncomplete","store","objectStore","indexArgs","push","modifyRecord","record","modifyKeys","forEach","cursor","target","result","advance","_ret","matchFilter","filter","propObj","_defineProperty","prop","update","err","v","Query","queuedError","defaultMapper","unique","execute","error","count","desc","distinct","limit","map","start","end","some","modify","fn","_this","arguments","this","range","undefined","concat","query","all","setupTransactionAndStore","records","preventDefault","closed","index","IndexQuery","_key","reduce","aip","req","hasOwn","call","add","onsuccess","keyPath","source","defineProperty","value","enumerable","_key2","put","remove","del","clear","close","dbCache","version","get","addEventListener","eventName","handler","includes","removeEventListener","evName","noServerMethods","Array","from","objectStoreNames","storeName","_this2","_open","server","Server","open","options","clearUnusedStores","clearUnusedIndexes","schema","schemas","schemaType","openDb","s","idbimport","_idbImport2","p","_addCallback","addCallback","cb","newCb","then","schemaBuilder","createVersionedSchema","idbschemaVersion","resume","_retry","retry","dbName","delete","newVersion","Proxy","ev","oldVersion","res","request","rej","cmp","param1","param2","module","exports","define","amd"],"mappings":"uqDAGI,SAAAA,GAqBI,QAAAC,GAAOC,GADX,MAAAA,IAAA,YAAA,mBAAAA,GAAA,YAAAC,EAAAD,IAKI,QAAME,GAAOC,GACb,GAAIC,GAAKC,OAALD,KAAmBD,GAAAG,MACnB,IAAY,IAAZF,EAAMG,OADa,CAEnB,GAAMC,GAAMJ,EAAK,GACbK,EAAAN,EAAAK,GAAME,EAA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lfQ;;AA4oBd,QAAI,OAAO,MAAP,KAAkB,WAAlB,IAAiC,OAAO,OAAO,OAAP,KAAmB,WAA1B,EAAuC;AACxE,eAAO,OAAP,GAAiB,EAAjB,CADwE;KAA5E,MAEO,IAAI,OAAO,MAAP,KAAkB,UAAlB,IAAgC,OAAO,GAAP,EAAY;AACnD,eAAO,YAAY;AAAE,mBAAO,EAAP,CAAF;SAAZ,CAAP,CADmD;KAAhD,MAEA;AACH,cAAM,EAAN,GAAW,EAAX,CADG;KAFA;CA9oBV,EAmpBC,IAnpBD,CAAD","file":"db.min.js","sourcesContent":["import IdbImport from './idb-import';\r\n\r\n(function (local) {\r\n 'use strict';\r\n\r\n const hasOwn = Object.prototype.hasOwnProperty;\r\n\r\n const indexedDB = local.indexedDB || local.webkitIndexedDB ||\r\n local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB ||\r\n local.shimIndexedDB || (function () {\r\n throw new Error('IndexedDB required');\r\n }());\r\n const IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;\r\n\r\n const defaultMapper = x => x;\r\n const serverEvents = ['abort', 'error', 'versionchange'];\r\n const transactionModes = {\r\n readonly: 'readonly',\r\n readwrite: 'readwrite'\r\n };\r\n\r\n const dbCache = {};\r\n\r\n function isObject (item) {\r\n return item && typeof item === 'object';\r\n }\r\n\r\n function mongoDBToKeyRangeArgs (opts) {\r\n const keys = Object.keys(opts).sort();\r\n if (keys.length === 1) {\r\n const key = keys[0];\r\n const val = opts[key];\r\n let name, inclusive;\r\n switch (key) {\r\n case 'eq': name = 'only'; break;\r\n case 'gt':\r\n name = 'lowerBound';\r\n inclusive = true;\r\n break;\r\n case 'lt':\r\n name = 'upperBound';\r\n inclusive = true;\r\n break;\r\n case 'gte': name = 'lowerBound'; break;\r\n case 'lte': name = 'upperBound'; break;\r\n default: throw new TypeError('`' + key + '` is not a valid key');\r\n }\r\n return [name, [val, inclusive]];\r\n }\r\n const x = opts[keys[0]];\r\n const y = opts[keys[1]];\r\n const pattern = keys.join('-');\r\n\r\n switch (pattern) {\r\n case 'gt-lt': case 'gt-lte': case 'gte-lt': case 'gte-lte':\r\n return ['bound', [x, y, keys[0] === 'gt', keys[1] === 'lt']];\r\n default: throw new TypeError(\r\n '`' + pattern + '` are conflicted keys'\r\n );\r\n }\r\n }\r\n function mongoifyKey (key) {\r\n if (key && typeof key === 'object' && !(key instanceof IDBKeyRange)) {\r\n const [type, args] = mongoDBToKeyRangeArgs(key);\r\n return IDBKeyRange[type](...args);\r\n }\r\n return key;\r\n }\r\n\r\n const IndexQuery = function (table, db, indexName, preexistingError) {\r\n let modifyObj = null;\r\n\r\n const runQuery = function (type, args, cursorType, direction, limitRange, filters, mapper) {\r\n return new Promise(function (resolve, reject) {\r\n const keyRange = type ? IDBKeyRange[type](...args) : null; // May throw\r\n filters = filters || [];\r\n limitRange = limitRange || null;\r\n\r\n let results = [];\r\n let counter = 0;\r\n const indexArgs = [keyRange];\r\n\r\n const transaction = db.transaction(table, modifyObj ? transactionModes.readwrite : transactionModes.readonly);\r\n transaction.onerror = e => reject(e);\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(results);\r\n\r\n const store = transaction.objectStore(table); // if bad, db.transaction will reject first\r\n const index = typeof indexName === 'string' ? store.index(indexName) : store;\r\n\r\n if (cursorType !== 'count') {\r\n indexArgs.push(direction || 'next');\r\n }\r\n\r\n // Create a function that will set in the modifyObj properties into\r\n // the passed record.\r\n const modifyKeys = modifyObj ? Object.keys(modifyObj) : [];\r\n\r\n const modifyRecord = function (record) {\r\n modifyKeys.forEach(key => {\r\n let val = modifyObj[key];\r\n if (typeof val === 'function') { val = val(record); }\r\n record[key] = val;\r\n });\r\n return record;\r\n };\r\n\r\n index[cursorType](...indexArgs).onsuccess = function (e) { // indexArgs are already validated\r\n const cursor = e.target.result;\r\n if (typeof cursor === 'number') {\r\n results = cursor;\r\n } else if (cursor) {\r\n if (limitRange !== null && limitRange[0] > counter) {\r\n counter = limitRange[0];\r\n cursor.advance(limitRange[0]); // Will throw on 0, but condition above prevents since counter always 0+\r\n } else if (limitRange !== null && counter >= (limitRange[0] + limitRange[1])) {\r\n // Out of limit range... skip\r\n } else {\r\n let matchFilter = true;\r\n let result = 'value' in cursor ? cursor.value : cursor.key;\r\n\r\n try { // We must manually catch for this promise as we are within an async event function\r\n filters.forEach(function (filter) {\r\n let propObj = filter[0];\r\n if (typeof propObj === 'function') {\r\n matchFilter = matchFilter && propObj(result); // May throw with filter on non-object\r\n } else {\r\n if (!propObj || typeof propObj !== 'object') {\r\n propObj = {[propObj]: filter[1]};\r\n }\r\n Object.keys(propObj).forEach((prop) => {\r\n matchFilter = matchFilter && (result[prop] === propObj[prop]); // May throw with error in filter function\r\n });\r\n }\r\n });\r\n\r\n if (matchFilter) {\r\n counter++;\r\n // If we're doing a modify, run it now\r\n if (modifyObj) {\r\n result = modifyRecord(result); // May throw\r\n cursor.update(result); // May throw as `result` should only be a \"structured clone\"-able object\r\n }\r\n results.push(mapper(result)); // May throw\r\n }\r\n } catch (err) {\r\n reject(err);\r\n return;\r\n }\r\n cursor.continue();\r\n }\r\n }\r\n };\r\n });\r\n };\r\n\r\n const Query = function (type, args, queuedError) {\r\n const filters = [];\r\n let direction = 'next';\r\n let cursorType = 'openCursor';\r\n let limitRange = null;\r\n let mapper = defaultMapper;\r\n let unique = false;\r\n let error = preexistingError || queuedError;\r\n\r\n const execute = function () {\r\n if (error) {\r\n return Promise.reject(error);\r\n }\r\n return runQuery(type, args, cursorType, unique ? direction + 'unique' : direction, limitRange, filters, mapper);\r\n };\r\n\r\n const count = function () {\r\n direction = null;\r\n cursorType = 'count';\r\n return {execute};\r\n };\r\n\r\n const keys = function () {\r\n cursorType = 'openKeyCursor';\r\n return {desc, distinct, execute, filter, limit, map};\r\n };\r\n\r\n const limit = function (start, end) {\r\n limitRange = !end ? [0, start] : [start, end];\r\n error = limitRange.some(val => typeof val !== 'number') ? new Error('limit() arguments must be numeric') : error;\r\n return {desc, distinct, filter, keys, execute, map, modify};\r\n };\r\n\r\n const filter = function (prop, val) {\r\n filters.push([prop, val]);\r\n return {desc, distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const desc = function () {\r\n direction = 'prev';\r\n return {distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const distinct = function () {\r\n unique = true;\r\n return {count, desc, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n const modify = function (update) {\r\n modifyObj = update && typeof update === 'object' ? update : null;\r\n return {execute};\r\n };\r\n\r\n const map = function (fn) {\r\n mapper = fn;\r\n return {count, desc, distinct, execute, filter, keys, limit, modify};\r\n };\r\n\r\n return {count, desc, distinct, execute, filter, keys, limit, map, modify};\r\n };\r\n\r\n ['only', 'bound', 'upperBound', 'lowerBound'].forEach((name) => {\r\n this[name] = function () {\r\n return Query(name, arguments);\r\n };\r\n });\r\n\r\n this.range = function (opts) {\r\n let error;\r\n let keyRange = [null, null];\r\n try {\r\n keyRange = mongoDBToKeyRangeArgs(opts);\r\n } catch (e) {\r\n error = e;\r\n }\r\n return Query(...keyRange, error);\r\n };\r\n\r\n this.filter = function (...args) {\r\n const query = Query(null, null);\r\n return query.filter(...args);\r\n };\r\n\r\n this.all = function () {\r\n return this.filter();\r\n };\r\n };\r\n\r\n const setupTransactionAndStore = (db, table, records, resolve, reject, readonly) => {\r\n const transaction = db.transaction(table, readonly ? transactionModes.readonly : transactionModes.readwrite);\r\n transaction.onerror = e => {\r\n // prevent throwing aborting (hard)\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=872873\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n transaction.onabort = e => reject(e);\r\n transaction.oncomplete = () => resolve(records);\r\n return transaction.objectStore(table);\r\n };\r\n\r\n const Server = function (db, name, version, noServerMethods) {\r\n let closed = false;\r\n\r\n this.getIndexedDB = () => db;\r\n this.isClosed = () => closed;\r\n\r\n this.query = function (table, index) {\r\n const error = closed ? new Error('Database has been closed') : null;\r\n return new IndexQuery(table, db, index, error); // Does not throw by itself\r\n };\r\n\r\n this.add = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const store = setupTransactionAndStore(db, table, records, resolve, reject);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n key = mongoifyKey(key); // May throw\r\n }\r\n }\r\n\r\n // Safe to add since in readwrite, but may still throw\r\n if (key != null) {\r\n req = store.add(record, key);\r\n } else {\r\n req = store.add(record);\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.update = function (table, ...args) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n\r\n const records = args.reduce(function (records, aip) {\r\n return records.concat(aip);\r\n }, []);\r\n\r\n const store = setupTransactionAndStore(db, table, records, resolve, reject);\r\n\r\n records.some(function (record) {\r\n let req, key;\r\n if (isObject(record) && hasOwn.call(record, 'item')) {\r\n key = record.key;\r\n record = record.item;\r\n if (key != null) {\r\n key = mongoifyKey(key); // May throw\r\n }\r\n }\r\n // These can throw DataError, e.g., if function passed in\r\n if (key != null) {\r\n req = store.put(record, key);\r\n } else {\r\n req = store.put(record);\r\n }\r\n\r\n req.onsuccess = function (e) {\r\n if (!isObject(record)) {\r\n return;\r\n }\r\n const target = e.target;\r\n let keyPath = target.source.keyPath;\r\n if (keyPath === null) {\r\n keyPath = '__id__';\r\n }\r\n if (hasOwn.call(record, keyPath)) {\r\n return;\r\n }\r\n Object.defineProperty(record, keyPath, {\r\n value: target.result,\r\n enumerable: true\r\n });\r\n };\r\n });\r\n });\r\n };\r\n\r\n this.put = function (...args) {\r\n return this.update(...args);\r\n };\r\n\r\n this.remove = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, key, resolve, reject);\r\n\r\n store.delete(key); // May throw\r\n });\r\n };\r\n\r\n this.del = this.delete = function (...args) {\r\n return this.remove(...args);\r\n };\r\n\r\n this.clear = function (table) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject);\r\n store.clear();\r\n });\r\n };\r\n\r\n this.close = function () {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n closed = true;\r\n delete dbCache[name][version];\r\n db.close();\r\n resolve();\r\n });\r\n };\r\n\r\n this.get = function (table, key) {\r\n return new Promise(function (resolve, reject) {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);\r\n\r\n const req = store.get(key);\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.count = function (table, key) {\r\n return new Promise((resolve, reject) => {\r\n if (closed) {\r\n reject(new Error('Database has been closed'));\r\n return;\r\n }\r\n key = mongoifyKey(key); // May throw\r\n\r\n const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);\r\n\r\n const req = key == null ? store.count() : store.count(key); // May throw\r\n req.onsuccess = e => resolve(e.target.result);\r\n });\r\n };\r\n\r\n this.addEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n if (eventName === 'error') {\r\n db.addEventListener(eventName, function (e) {\r\n e.preventDefault(); // Needed to prevent hard abort with ConstraintError\r\n handler(e);\r\n });\r\n return;\r\n }\r\n db.addEventListener(eventName, handler);\r\n };\r\n\r\n this.removeEventListener = function (eventName, handler) {\r\n if (!serverEvents.includes(eventName)) {\r\n throw new Error('Unrecognized event type ' + eventName);\r\n }\r\n db.removeEventListener(eventName, handler);\r\n };\r\n\r\n serverEvents.forEach(function (evName) {\r\n this[evName] = function (handler) {\r\n this.addEventListener(evName, handler);\r\n return this;\r\n };\r\n }, this);\r\n\r\n if (noServerMethods) {\r\n return;\r\n }\r\n\r\n let err;\r\n Array.from(db.objectStoreNames).some(storeName => {\r\n if (this[storeName]) {\r\n err = new Error('The store name, \"' + storeName + '\", which you have attempted to load, conflicts with db.js method names.\"');\r\n this.close();\r\n return true;\r\n }\r\n this[storeName] = {};\r\n const keys = Object.keys(this);\r\n keys.filter(key => !(([...serverEvents, 'close', 'addEventListener', 'removeEventListener']).includes(key)))\r\n .map(key =>\r\n this[storeName][key] = (...args) => this[key](storeName, ...args)\r\n );\r\n });\r\n return err;\r\n };\r\n\r\n const open = function (db, server, version, noServerMethods) {\r\n dbCache[server][version] = db;\r\n\r\n return new Server(db, server, version, noServerMethods);\r\n };\r\n\r\n const db = {\r\n version: '0.15.0',\r\n open: function (options) {\r\n const server = options.server;\r\n const noServerMethods = options.noServerMethods;\r\n const clearUnusedStores = options.clearUnusedStores !== false;\r\n const clearUnusedIndexes = options.clearUnusedIndexes !== false;\r\n let version = options.version || 1;\r\n let schema = options.schema;\r\n let schemas = options.schemas;\r\n let schemaType = options.schemaType || (schema ? 'whole' : 'mixed');\r\n if (!dbCache[server]) {\r\n dbCache[server] = {};\r\n }\r\n const openDb = function (db) {\r\n const s = open(db, server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n throw s;\r\n }\r\n return s;\r\n };\r\n\r\n return new Promise(function (resolve, reject) {\r\n if (dbCache[server][version]) {\r\n const s = open(dbCache[server][version], server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n reject(s);\r\n return;\r\n }\r\n resolve(s);\r\n return;\r\n }\r\n const idbimport = new IdbImport();\r\n let p = Promise.resolve();\r\n if (schema || schemas || options.schemaBuilder) {\r\n const _addCallback = idbimport.addCallback;\r\n idbimport.addCallback = function (cb) {\r\n function newCb (db) {\r\n const s = open(db, server, version, noServerMethods);\r\n if (s instanceof Error) {\r\n throw s;\r\n }\r\n return cb(db, s);\r\n }\r\n return _addCallback.call(idbimport, newCb);\r\n };\r\n\r\n p = p.then(() => {\r\n if (options.schemaBuilder) {\r\n return options.schemaBuilder(idbimport);\r\n }\r\n }).then(() => {\r\n if (schema) {\r\n switch (schemaType) {\r\n case 'mixed': case 'idb-schema': case 'merge': case 'whole': {\r\n schemas = {[version]: schema};\r\n break;\r\n }\r\n }\r\n }\r\n if (schemas) {\r\n idbimport.createVersionedSchema(schemas, schemaType, clearUnusedStores, clearUnusedIndexes);\r\n }\r\n const idbschemaVersion = idbimport.version();\r\n if (options.version && idbschemaVersion < version) {\r\n throw new Error(\r\n 'Your highest schema building (IDBSchema) version (' + idbschemaVersion + ') ' +\r\n 'must not be less than your designated version (' + version + ').'\r\n );\r\n }\r\n if (!options.version && idbschemaVersion > version) {\r\n version = idbschemaVersion;\r\n }\r\n });\r\n }\r\n\r\n p.then(() => {\r\n return idbimport.open(server, version);\r\n }).catch((err) => {\r\n if (err.resume) {\r\n err.resume = err.resume.then(openDb);\r\n }\r\n if (err.retry) {\r\n const _retry = err.retry;\r\n err.retry = function () {\r\n _retry.call(err).then(openDb);\r\n };\r\n }\r\n throw err;\r\n }).then(openDb).then(resolve).catch((e) => {\r\n reject(e);\r\n });\r\n });\r\n },\r\n\r\n del: function (dbName) {\r\n return this.delete(dbName);\r\n },\r\n delete: function (dbName) {\r\n return new Promise(function (resolve, reject) {\r\n const request = indexedDB.deleteDatabase(dbName); // Does not throw\r\n\r\n request.onsuccess = e => {\r\n // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in e)) {\r\n e.newVersion = null;\r\n }\r\n resolve(e);\r\n };\r\n request.onerror = e => { // No errors currently\r\n e.preventDefault();\r\n reject(e);\r\n };\r\n request.onblocked = e => {\r\n // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279\r\n e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, {get: function (target, name) {\r\n return name === 'newVersion' ? null : target[name];\r\n }});\r\n const resume = new Promise(function (res, rej) {\r\n // We overwrite handlers rather than make a new\r\n // delete() since the original request is still\r\n // open and its onsuccess will still fire if\r\n // the user unblocks by closing the blocking\r\n // connection\r\n request.onsuccess = ev => {\r\n // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141\r\n if (!('newVersion' in ev)) {\r\n ev.newVersion = e.newVersion;\r\n }\r\n\r\n if (!('oldVersion' in ev)) {\r\n ev.oldVersion = e.oldVersion;\r\n }\r\n\r\n res(ev);\r\n };\r\n request.onerror = e => {\r\n e.preventDefault();\r\n rej(e);\r\n };\r\n });\r\n e.resume = resume;\r\n reject(e);\r\n };\r\n });\r\n },\r\n\r\n cmp: function (param1, param2) {\r\n return new Promise(function (resolve, reject) {\r\n resolve(indexedDB.cmp(param1, param2)); // May throw\r\n });\r\n }\r\n };\r\n\r\n if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\r\n module.exports = db;\r\n } else if (typeof define === 'function' && define.amd) {\r\n define(function () { return db; });\r\n } else {\r\n local.db = db;\r\n }\r\n}(self));\r\n"]}
\ No newline at end of file
diff --git a/dist/idb-import.js b/dist/idb-import.js
new file mode 100644
index 0000000..8cf785e
--- /dev/null
+++ b/dist/idb-import.js
@@ -0,0 +1,7835 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 ? arguments[2] : undefined
+ , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
+ , inc = 1;
+ if(from < to && to < from + count){
+ inc = -1;
+ from += count - 1;
+ to += count - 1;
+ }
+ while(count-- > 0){
+ if(from in O)O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+};
+},{"./_to-index":102,"./_to-length":105,"./_to-object":106}],10:[function(require,module,exports){
+// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+'use strict';
+var toObject = require('./_to-object')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length');
+module.exports = function fill(value /*, start = 0, end = @length */){
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , aLen = arguments.length
+ , index = toIndex(aLen > 1 ? arguments[1] : undefined, length)
+ , end = aLen > 2 ? arguments[2] : undefined
+ , endPos = end === undefined ? length : toIndex(end, length);
+ while(endPos > index)O[index++] = value;
+ return O;
+};
+},{"./_to-index":102,"./_to-length":105,"./_to-object":106}],11:[function(require,module,exports){
+var forOf = require('./_for-of');
+
+module.exports = function(iter, ITERATOR){
+ var result = [];
+ forOf(iter, false, result.push, result, ITERATOR);
+ return result;
+};
+
+},{"./_for-of":35}],12:[function(require,module,exports){
+// false -> Array#indexOf
+// true -> Array#includes
+var toIObject = require('./_to-iobject')
+ , toLength = require('./_to-length')
+ , toIndex = require('./_to-index');
+module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+};
+},{"./_to-index":102,"./_to-iobject":104,"./_to-length":105}],13:[function(require,module,exports){
+// 0 -> Array#forEach
+// 1 -> Array#map
+// 2 -> Array#filter
+// 3 -> Array#some
+// 4 -> Array#every
+// 5 -> Array#find
+// 6 -> Array#findIndex
+var ctx = require('./_ctx')
+ , IObject = require('./_iobject')
+ , toObject = require('./_to-object')
+ , toLength = require('./_to-length')
+ , asc = require('./_array-species-create');
+module.exports = function(TYPE, $create){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
+ , create = $create || asc;
+ return function($this, callbackfn, that){
+ var O = toObject($this)
+ , self = IObject(O)
+ , f = ctx(callbackfn, that, 3)
+ , length = toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+};
+},{"./_array-species-create":15,"./_ctx":24,"./_iobject":43,"./_to-length":105,"./_to-object":106}],14:[function(require,module,exports){
+var aFunction = require('./_a-function')
+ , toObject = require('./_to-object')
+ , IObject = require('./_iobject')
+ , toLength = require('./_to-length');
+
+module.exports = function(that, callbackfn, aLen, memo, isRight){
+ aFunction(callbackfn);
+ var O = toObject(that)
+ , self = IObject(O)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(aLen < 2)for(;;){
+ if(index in self){
+ memo = self[index];
+ index += i;
+ break;
+ }
+ index += i;
+ if(isRight ? index < 0 : length <= index){
+ throw TypeError('Reduce of empty array with no initial value');
+ }
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in self){
+ memo = callbackfn(memo, self[index], index, O);
+ }
+ return memo;
+};
+},{"./_a-function":4,"./_iobject":43,"./_to-length":105,"./_to-object":106}],15:[function(require,module,exports){
+// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
+var isObject = require('./_is-object')
+ , isArray = require('./_is-array')
+ , SPECIES = require('./_wks')('species');
+module.exports = function(original, length){
+ var C;
+ if(isArray(original)){
+ C = original.constructor;
+ // cross-realm fallback
+ if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
+ if(isObject(C)){
+ C = C[SPECIES];
+ if(C === null)C = undefined;
+ }
+ } return new (C === undefined ? Array : C)(length);
+};
+},{"./_is-array":45,"./_is-object":47,"./_wks":112}],16:[function(require,module,exports){
+'use strict';
+var aFunction = require('./_a-function')
+ , isObject = require('./_is-object')
+ , invoke = require('./_invoke')
+ , arraySlice = [].slice
+ , factories = {};
+
+var construct = function(F, len, args){
+ if(!(len in factories)){
+ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
+ factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
+ } return factories[len](F, args);
+};
+
+module.exports = Function.bind || function bind(that /*, args... */){
+ var fn = aFunction(this)
+ , partArgs = arraySlice.call(arguments, 1);
+ var bound = function(/* args... */){
+ var args = partArgs.concat(arraySlice.call(arguments));
+ return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
+ };
+ if(isObject(fn.prototype))bound.prototype = fn.prototype;
+ return bound;
+};
+},{"./_a-function":4,"./_invoke":42,"./_is-object":47}],17:[function(require,module,exports){
+// getting tag from 19.1.3.6 Object.prototype.toString()
+var cof = require('./_cof')
+ , TAG = require('./_wks')('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+
+// fallback for IE11 Script Access Denied error
+var tryGet = function(it, key){
+ try {
+ return it[key];
+ } catch(e){ /* empty */ }
+};
+
+module.exports = function(it){
+ var O, T, B;
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
+ // @@toStringTag case
+ : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ // builtinTag case
+ : ARG ? cof(O)
+ // ES3 arguments fallback
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
+};
+},{"./_cof":18,"./_wks":112}],18:[function(require,module,exports){
+var toString = {}.toString;
+
+module.exports = function(it){
+ return toString.call(it).slice(8, -1);
+};
+},{}],19:[function(require,module,exports){
+'use strict';
+var dP = require('./_object-dp').f
+ , create = require('./_object-create')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , ctx = require('./_ctx')
+ , anInstance = require('./_an-instance')
+ , defined = require('./_defined')
+ , forOf = require('./_for-of')
+ , $iterDefine = require('./_iter-define')
+ , step = require('./_iter-step')
+ , setSpecies = require('./_set-species')
+ , DESCRIPTORS = require('./_descriptors')
+ , fastKey = require('./_meta').fastKey
+ , SIZE = DESCRIPTORS ? '_s' : 'size';
+
+var getEntry = function(that, key){
+ // fast case
+ var index = fastKey(key), entry;
+ if(index !== 'F')return that._i[index];
+ // frozen object case
+ for(entry = that._f; entry; entry = entry.n){
+ if(entry.k == key)return entry;
+ }
+};
+
+module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = create(null); // index
+ that._f = undefined; // first entry
+ that._l = undefined; // last entry
+ that[SIZE] = 0; // size
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear(){
+ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
+ entry.r = true;
+ if(entry.p)entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that._f = that._l = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function(key){
+ var that = this
+ , entry = getEntry(that, key);
+ if(entry){
+ var next = entry.n
+ , prev = entry.p;
+ delete that._i[entry.i];
+ entry.r = true;
+ if(prev)prev.n = next;
+ if(next)next.p = prev;
+ if(that._f == entry)that._f = next;
+ if(that._l == entry)that._l = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /*, that = undefined */){
+ anInstance(this, C, 'forEach');
+ var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
+ , entry;
+ while(entry = entry ? entry.n : this._f){
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key){
+ return !!getEntry(this, key);
+ }
+ });
+ if(DESCRIPTORS)dP(C.prototype, 'size', {
+ get: function(){
+ return defined(this[SIZE]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var entry = getEntry(that, key)
+ , prev, index;
+ // change existing entry
+ if(entry){
+ entry.v = value;
+ // create new entry
+ } else {
+ that._l = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that._l, // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if(!that._f)that._f = entry;
+ if(prev)prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if(index !== 'F')that._i[index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ setStrong: function(C, NAME, IS_MAP){
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ $iterDefine(C, NAME, function(iterated, kind){
+ this._t = iterated; // target
+ this._k = kind; // kind
+ this._l = undefined; // previous
+ }, function(){
+ var that = this
+ , kind = that._k
+ , entry = that._l;
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ // get next entry
+ if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
+ // or finish the iteration
+ that._t = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if(kind == 'keys' )return step(0, entry.k);
+ if(kind == 'values')return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
+
+ // add [@@species], 23.1.2.2, 23.2.2.2
+ setSpecies(NAME);
+ }
+};
+},{"./_an-instance":7,"./_ctx":24,"./_defined":25,"./_descriptors":26,"./_for-of":35,"./_hide":38,"./_iter-define":51,"./_iter-step":53,"./_meta":60,"./_object-create":64,"./_object-dp":65,"./_redefine-all":83,"./_set-species":88}],20:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var classof = require('./_classof')
+ , from = require('./_array-from-iterable');
+module.exports = function(NAME){
+ return function toJSON(){
+ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
+ return from(this);
+ };
+};
+},{"./_array-from-iterable":11,"./_classof":17}],21:[function(require,module,exports){
+'use strict';
+var redefineAll = require('./_redefine-all')
+ , getWeak = require('./_meta').getWeak
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , anInstance = require('./_an-instance')
+ , forOf = require('./_for-of')
+ , createArrayMethod = require('./_array-methods')
+ , $has = require('./_has')
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , id = 0;
+
+// fallback for uncaught frozen keys
+var uncaughtFrozenStore = function(that){
+ return that._l || (that._l = new UncaughtFrozenStore);
+};
+var UncaughtFrozenStore = function(){
+ this.a = [];
+};
+var findUncaughtFrozen = function(store, key){
+ return arrayFind(store.a, function(it){
+ return it[0] === key;
+ });
+};
+UncaughtFrozenStore.prototype = {
+ get: function(key){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)return entry[1];
+ },
+ has: function(key){
+ return !!findUncaughtFrozen(this, key);
+ },
+ set: function(key, value){
+ var entry = findUncaughtFrozen(this, key);
+ if(entry)entry[1] = value;
+ else this.a.push([key, value]);
+ },
+ 'delete': function(key){
+ var index = arrayFindIndex(this.a, function(it){
+ return it[0] === key;
+ });
+ if(~index)this.a.splice(index, 1);
+ return !!~index;
+ }
+};
+
+module.exports = {
+ getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
+ var C = wrapper(function(that, iterable){
+ anInstance(that, C, NAME, '_i');
+ that._i = id++; // collection id
+ that._l = undefined; // leak store for uncaught frozen objects
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ });
+ redefineAll(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this)['delete'](key);
+ return data && $has(data, this._i) && delete data[this._i];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key){
+ if(!isObject(key))return false;
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).has(key);
+ return data && $has(data, this._i);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var data = getWeak(anObject(key), true);
+ if(data === true)uncaughtFrozenStore(that).set(key, value);
+ else data[that._i] = value;
+ return that;
+ },
+ ufstore: uncaughtFrozenStore
+};
+},{"./_an-instance":7,"./_an-object":8,"./_array-methods":13,"./_for-of":35,"./_has":37,"./_is-object":47,"./_meta":60,"./_redefine-all":83}],22:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , redefineAll = require('./_redefine-all')
+ , meta = require('./_meta')
+ , forOf = require('./_for-of')
+ , anInstance = require('./_an-instance')
+ , isObject = require('./_is-object')
+ , fails = require('./_fails')
+ , $iterDetect = require('./_iter-detect')
+ , setToStringTag = require('./_set-to-string-tag')
+ , inheritIfRequired = require('./_inherit-if-required');
+
+module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
+ var Base = global[NAME]
+ , C = Base
+ , ADDER = IS_MAP ? 'set' : 'add'
+ , proto = C && C.prototype
+ , O = {};
+ var fixMethod = function(KEY){
+ var fn = proto[KEY];
+ redefine(proto, KEY,
+ KEY == 'delete' ? function(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'has' ? function has(a){
+ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'get' ? function get(a){
+ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
+ } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
+ : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
+ );
+ };
+ if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
+ new C().entries().next();
+ }))){
+ // create collection constructor
+ C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
+ redefineAll(C.prototype, methods);
+ meta.NEED = true;
+ } else {
+ var instance = new C
+ // early implementations not supports chaining
+ , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
+ // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
+ , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
+ // most early implementations doesn't supports iterables, most modern - not close it correctly
+ , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
+ // for early implementations -0 and +0 not the same
+ , BUGGY_ZERO = !IS_WEAK && fails(function(){
+ // V8 ~ Chromium 42- fails only with 5+ elements
+ var $instance = new C()
+ , index = 5;
+ while(index--)$instance[ADDER](index, index);
+ return !$instance.has(-0);
+ });
+ if(!ACCEPT_ITERABLES){
+ C = wrapper(function(target, iterable){
+ anInstance(target, C, NAME);
+ var that = inheritIfRequired(new Base, target, C);
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ return that;
+ });
+ C.prototype = proto;
+ proto.constructor = C;
+ }
+ if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
+ fixMethod('delete');
+ fixMethod('has');
+ IS_MAP && fixMethod('get');
+ }
+ if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
+ // weak collections should not contains .clear method
+ if(IS_WEAK && proto.clear)delete proto.clear;
+ }
+
+ setToStringTag(C, NAME);
+
+ O[NAME] = C;
+ $export($export.G + $export.W + $export.F * (C != Base), O);
+
+ if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
+
+ return C;
+};
+},{"./_an-instance":7,"./_export":30,"./_fails":32,"./_for-of":35,"./_global":36,"./_inherit-if-required":41,"./_is-object":47,"./_iter-detect":52,"./_meta":60,"./_redefine":84,"./_redefine-all":83,"./_set-to-string-tag":89}],23:[function(require,module,exports){
+var core = module.exports = {version: '2.1.5'};
+if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+},{}],24:[function(require,module,exports){
+// optional / simple context binding
+var aFunction = require('./_a-function');
+module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+};
+},{"./_a-function":4}],25:[function(require,module,exports){
+// 7.2.1 RequireObjectCoercible(argument)
+module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+};
+},{}],26:[function(require,module,exports){
+// Thank's IE8 for his funny defineProperty
+module.exports = !require('./_fails')(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+});
+},{"./_fails":32}],27:[function(require,module,exports){
+var isObject = require('./_is-object')
+ , document = require('./_global').document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+module.exports = function(it){
+ return is ? document.createElement(it) : {};
+};
+},{"./_global":36,"./_is-object":47}],28:[function(require,module,exports){
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+).split(',');
+},{}],29:[function(require,module,exports){
+// all enumerable object keys, includes symbols
+var getKeys = require('./_object-keys')
+ , gOPS = require('./_object-gops')
+ , pIE = require('./_object-pie');
+module.exports = function(it){
+ var result = getKeys(it)
+ , getSymbols = gOPS.f;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = pIE.f
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
+ } return result;
+};
+},{"./_object-gops":70,"./_object-keys":73,"./_object-pie":74}],30:[function(require,module,exports){
+var global = require('./_global')
+ , core = require('./_core')
+ , hide = require('./_hide')
+ , redefine = require('./_redefine')
+ , ctx = require('./_ctx')
+ , PROTOTYPE = 'prototype';
+
+var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
+ , key, own, out, exp;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // extend global
+ if(target)redefine(target, key, out, type & $export.U);
+ // export
+ if(exports[key] != out)hide(exports, key, exp);
+ if(IS_PROTO && expProto[key] != out)expProto[key] = out;
+ }
+};
+global.core = core;
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+},{"./_core":23,"./_ctx":24,"./_global":36,"./_hide":38,"./_redefine":84}],31:[function(require,module,exports){
+var MATCH = require('./_wks')('match');
+module.exports = function(KEY){
+ var re = /./;
+ try {
+ '/./'[KEY](re);
+ } catch(e){
+ try {
+ re[MATCH] = false;
+ return !'/./'[KEY](re);
+ } catch(f){ /* empty */ }
+ } return true;
+};
+},{"./_wks":112}],32:[function(require,module,exports){
+module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+};
+},{}],33:[function(require,module,exports){
+'use strict';
+var hide = require('./_hide')
+ , redefine = require('./_redefine')
+ , fails = require('./_fails')
+ , defined = require('./_defined')
+ , wks = require('./_wks');
+
+module.exports = function(KEY, length, exec){
+ var SYMBOL = wks(KEY)
+ , fns = exec(defined, SYMBOL, ''[KEY])
+ , strfn = fns[0]
+ , rxfn = fns[1];
+ if(fails(function(){
+ var O = {};
+ O[SYMBOL] = function(){ return 7; };
+ return ''[KEY](O) != 7;
+ })){
+ redefine(String.prototype, KEY, strfn);
+ hide(RegExp.prototype, SYMBOL, length == 2
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
+ ? function(string, arg){ return rxfn.call(string, this, arg); }
+ // 21.2.5.6 RegExp.prototype[@@match](string)
+ // 21.2.5.9 RegExp.prototype[@@search](string)
+ : function(string){ return rxfn.call(string, this); }
+ );
+ }
+};
+},{"./_defined":25,"./_fails":32,"./_hide":38,"./_redefine":84,"./_wks":112}],34:[function(require,module,exports){
+'use strict';
+// 21.2.5.3 get RegExp.prototype.flags
+var anObject = require('./_an-object');
+module.exports = function(){
+ var that = anObject(this)
+ , result = '';
+ if(that.global) result += 'g';
+ if(that.ignoreCase) result += 'i';
+ if(that.multiline) result += 'm';
+ if(that.unicode) result += 'u';
+ if(that.sticky) result += 'y';
+ return result;
+};
+},{"./_an-object":8}],35:[function(require,module,exports){
+var ctx = require('./_ctx')
+ , call = require('./_iter-call')
+ , isArrayIter = require('./_is-array-iter')
+ , anObject = require('./_an-object')
+ , toLength = require('./_to-length')
+ , getIterFn = require('./core.get-iterator-method');
+module.exports = function(iterable, entries, fn, that, ITERATOR){
+ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
+ // fast case for arrays with default iterator
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
+ entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
+ call(iterator, f, step.value, entries);
+ }
+};
+},{"./_an-object":8,"./_ctx":24,"./_is-array-iter":44,"./_iter-call":49,"./_to-length":105,"./core.get-iterator-method":113}],36:[function(require,module,exports){
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+},{}],37:[function(require,module,exports){
+var hasOwnProperty = {}.hasOwnProperty;
+module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+};
+},{}],38:[function(require,module,exports){
+var dP = require('./_object-dp')
+ , createDesc = require('./_property-desc');
+module.exports = require('./_descriptors') ? function(object, key, value){
+ return dP.f(object, key, createDesc(1, value));
+} : function(object, key, value){
+ object[key] = value;
+ return object;
+};
+},{"./_descriptors":26,"./_object-dp":65,"./_property-desc":82}],39:[function(require,module,exports){
+module.exports = require('./_global').document && document.documentElement;
+},{"./_global":36}],40:[function(require,module,exports){
+module.exports = !require('./_descriptors') && !require('./_fails')(function(){
+ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
+});
+},{"./_descriptors":26,"./_dom-create":27,"./_fails":32}],41:[function(require,module,exports){
+var isObject = require('./_is-object')
+ , setPrototypeOf = require('./_set-proto').set;
+module.exports = function(that, target, C){
+ var P, S = target.constructor;
+ if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
+ setPrototypeOf(that, P);
+ } return that;
+};
+},{"./_is-object":47,"./_set-proto":87}],42:[function(require,module,exports){
+// fast apply, http://jsperf.lnkit.com/fast-apply/5
+module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+};
+},{}],43:[function(require,module,exports){
+// fallback for non-array-like ES3 and non-enumerable old V8 strings
+var cof = require('./_cof');
+module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+};
+},{"./_cof":18}],44:[function(require,module,exports){
+// check on default Array iterator
+var Iterators = require('./_iterators')
+ , ITERATOR = require('./_wks')('iterator')
+ , ArrayProto = Array.prototype;
+
+module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+};
+},{"./_iterators":54,"./_wks":112}],45:[function(require,module,exports){
+// 7.2.2 IsArray(argument)
+var cof = require('./_cof');
+module.exports = Array.isArray || function isArray(arg){
+ return cof(arg) == 'Array';
+};
+},{"./_cof":18}],46:[function(require,module,exports){
+// 20.1.2.3 Number.isInteger(number)
+var isObject = require('./_is-object')
+ , floor = Math.floor;
+module.exports = function isInteger(it){
+ return !isObject(it) && isFinite(it) && floor(it) === it;
+};
+},{"./_is-object":47}],47:[function(require,module,exports){
+module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+},{}],48:[function(require,module,exports){
+// 7.2.8 IsRegExp(argument)
+var isObject = require('./_is-object')
+ , cof = require('./_cof')
+ , MATCH = require('./_wks')('match');
+module.exports = function(it){
+ var isRegExp;
+ return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
+};
+},{"./_cof":18,"./_is-object":47,"./_wks":112}],49:[function(require,module,exports){
+// call something on iterator step with safe closing on error
+var anObject = require('./_an-object');
+module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+};
+},{"./_an-object":8}],50:[function(require,module,exports){
+'use strict';
+var create = require('./_object-create')
+ , descriptor = require('./_property-desc')
+ , setToStringTag = require('./_set-to-string-tag')
+ , IteratorPrototype = {};
+
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; });
+
+module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+};
+},{"./_hide":38,"./_object-create":64,"./_property-desc":82,"./_set-to-string-tag":89,"./_wks":112}],51:[function(require,module,exports){
+'use strict';
+var LIBRARY = require('./_library')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , hide = require('./_hide')
+ , has = require('./_has')
+ , Iterators = require('./_iterators')
+ , $iterCreate = require('./_iter-create')
+ , setToStringTag = require('./_set-to-string-tag')
+ , getPrototypeOf = require('./_object-gpo')
+ , ITERATOR = require('./_wks')('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+var returnThis = function(){ return this; };
+
+module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
+ , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
+ , methods, key, IteratorPrototype;
+ // Fix native
+ if($anyNative){
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
+ if(IteratorPrototype !== Object.prototype){
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+};
+},{"./_export":30,"./_has":37,"./_hide":38,"./_iter-create":50,"./_iterators":54,"./_library":56,"./_object-gpo":71,"./_redefine":84,"./_set-to-string-tag":89,"./_wks":112}],52:[function(require,module,exports){
+var ITERATOR = require('./_wks')('iterator')
+ , SAFE_CLOSING = false;
+
+try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+} catch(e){ /* empty */ }
+
+module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ safe = true; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+};
+},{"./_wks":112}],53:[function(require,module,exports){
+module.exports = function(done, value){
+ return {value: value, done: !!done};
+};
+},{}],54:[function(require,module,exports){
+module.exports = {};
+},{}],55:[function(require,module,exports){
+var getKeys = require('./_object-keys')
+ , toIObject = require('./_to-iobject');
+module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+};
+},{"./_object-keys":73,"./_to-iobject":104}],56:[function(require,module,exports){
+module.exports = false;
+},{}],57:[function(require,module,exports){
+// 20.2.2.14 Math.expm1(x)
+module.exports = Math.expm1 || function expm1(x){
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
+};
+},{}],58:[function(require,module,exports){
+// 20.2.2.20 Math.log1p(x)
+module.exports = Math.log1p || function log1p(x){
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
+};
+},{}],59:[function(require,module,exports){
+// 20.2.2.28 Math.sign(x)
+module.exports = Math.sign || function sign(x){
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+};
+},{}],60:[function(require,module,exports){
+var META = require('./_uid')('meta')
+ , isObject = require('./_is-object')
+ , has = require('./_has')
+ , setDesc = require('./_object-dp').f
+ , id = 0;
+var isExtensible = Object.isExtensible || function(){
+ return true;
+};
+var FREEZE = !require('./_fails')(function(){
+ return isExtensible(Object.preventExtensions({}));
+});
+var setMeta = function(it){
+ setDesc(it, META, {value: {
+ i: 'O' + ++id, // object ID
+ w: {} // weak collections IDs
+ }});
+};
+var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add metadata
+ if(!create)return 'E';
+ // add missing metadata
+ setMeta(it);
+ // return object ID
+ } return it[META].i;
+};
+var getWeak = function(it, create){
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return true;
+ // not necessary to add metadata
+ if(!create)return false;
+ // add missing metadata
+ setMeta(it);
+ // return hash weak collections IDs
+ } return it[META].w;
+};
+// add metadata on freeze-family methods calling
+var onFreeze = function(it){
+ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
+ return it;
+};
+var meta = module.exports = {
+ KEY: META,
+ NEED: false,
+ fastKey: fastKey,
+ getWeak: getWeak,
+ onFreeze: onFreeze
+};
+},{"./_fails":32,"./_has":37,"./_is-object":47,"./_object-dp":65,"./_uid":111}],61:[function(require,module,exports){
+var Map = require('./es6.map')
+ , $export = require('./_export')
+ , shared = require('./_shared')('metadata')
+ , store = shared.store || (shared.store = new (require('./es6.weak-map')));
+
+var getOrCreateMetadataMap = function(target, targetKey, create){
+ var targetMetadata = store.get(target);
+ if(!targetMetadata){
+ if(!create)return undefined;
+ store.set(target, targetMetadata = new Map);
+ }
+ var keyMetadata = targetMetadata.get(targetKey);
+ if(!keyMetadata){
+ if(!create)return undefined;
+ targetMetadata.set(targetKey, keyMetadata = new Map);
+ } return keyMetadata;
+};
+var ordinaryHasOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
+};
+var ordinaryGetOwnMetadata = function(MetadataKey, O, P){
+ var metadataMap = getOrCreateMetadataMap(O, P, false);
+ return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
+};
+var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){
+ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
+};
+var ordinaryOwnMetadataKeys = function(target, targetKey){
+ var metadataMap = getOrCreateMetadataMap(target, targetKey, false)
+ , keys = [];
+ if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); });
+ return keys;
+};
+var toMetaKey = function(it){
+ return it === undefined || typeof it == 'symbol' ? it : String(it);
+};
+var exp = function(O){
+ $export($export.S, 'Reflect', O);
+};
+
+module.exports = {
+ store: store,
+ map: getOrCreateMetadataMap,
+ has: ordinaryHasOwnMetadata,
+ get: ordinaryGetOwnMetadata,
+ set: ordinaryDefineOwnMetadata,
+ keys: ordinaryOwnMetadataKeys,
+ key: toMetaKey,
+ exp: exp
+};
+},{"./_export":30,"./_shared":91,"./es6.map":144,"./es6.weak-map":250}],62:[function(require,module,exports){
+var global = require('./_global')
+ , macrotask = require('./_task').set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = require('./_cof')(process) == 'process'
+ , head, last, notify;
+
+var flush = function(){
+ var parent, fn;
+ if(isNode && (parent = process.domain))parent.exit();
+ while(head){
+ fn = head.fn;
+ fn(); // <- currently we use it only for Promise - try / catch not required
+ head = head.next;
+ } last = undefined;
+ if(parent)parent.enter();
+};
+
+// Node.js
+if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+// browsers with MutationObserver
+} else if(Observer){
+ var toggle = true
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = !toggle;
+ };
+// environments with maybe non-completely correct, but existent Promise
+} else if(Promise && Promise.resolve){
+ notify = function(){
+ Promise.resolve().then(flush);
+ };
+// for other environments - macrotask based on:
+// - setImmediate
+// - MessageChannel
+// - window.postMessag
+// - onreadystatechange
+// - setTimeout
+} else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+}
+
+module.exports = function(fn){
+ var task = {fn: fn, next: undefined};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+};
+},{"./_cof":18,"./_global":36,"./_task":101}],63:[function(require,module,exports){
+'use strict';
+// 19.1.2.1 Object.assign(target, source, ...)
+var getKeys = require('./_object-keys')
+ , gOPS = require('./_object-gops')
+ , pIE = require('./_object-pie')
+ , toObject = require('./_to-object')
+ , IObject = require('./_iobject')
+ , $assign = Object.assign;
+
+// should work with symbols and should have deterministic property order (V8 bug)
+module.exports = !$assign || require('./_fails')(function(){
+ var A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function(k){ B[k] = k; });
+ return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , aLen = arguments.length
+ , index = 1
+ , getSymbols = gOPS.f
+ , isEnum = pIE.f;
+ while(aLen > index){
+ var S = IObject(arguments[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
+ } return T;
+} : $assign;
+},{"./_fails":32,"./_iobject":43,"./_object-gops":70,"./_object-keys":73,"./_object-pie":74,"./_to-object":106}],64:[function(require,module,exports){
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+var anObject = require('./_an-object')
+ , dPs = require('./_object-dps')
+ , enumBugKeys = require('./_enum-bug-keys')
+ , IE_PROTO = require('./_shared-key')('IE_PROTO')
+ , Empty = function(){ /* empty */ }
+ , PROTOTYPE = 'prototype';
+
+// Create object with fake `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = require('./_dom-create')('iframe')
+ , i = enumBugKeys.length
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ require('./_html').appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(' i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+};
+},{"./_an-object":8,"./_descriptors":26,"./_object-dp":65,"./_object-keys":73}],67:[function(require,module,exports){
+var pIE = require('./_object-pie')
+ , createDesc = require('./_property-desc')
+ , toIObject = require('./_to-iobject')
+ , toPrimitive = require('./_to-primitive')
+ , has = require('./_has')
+ , IE8_DOM_DEFINE = require('./_ie8-dom-define')
+ , gOPD = Object.getOwnPropertyDescriptor;
+
+exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){
+ O = toIObject(O);
+ P = toPrimitive(P, true);
+ if(IE8_DOM_DEFINE)try {
+ return gOPD(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+};
+},{"./_descriptors":26,"./_has":37,"./_ie8-dom-define":40,"./_object-pie":74,"./_property-desc":82,"./_to-iobject":104,"./_to-primitive":107}],68:[function(require,module,exports){
+// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+var toIObject = require('./_to-iobject')
+ , gOPN = require('./_object-gopn').f
+ , toString = {}.toString;
+
+var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
+
+var getWindowNames = function(it){
+ try {
+ return gOPN.f(it);
+ } catch(e){
+ return windowNames.slice();
+ }
+};
+
+module.exports.f = function getOwnPropertyNames(it){
+ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+};
+},{"./_object-gopn":69,"./_to-iobject":104}],69:[function(require,module,exports){
+// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+var $keys = require('./_object-keys-internal')
+ , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
+
+exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
+ return $keys(O, hiddenKeys);
+};
+},{"./_enum-bug-keys":28,"./_object-keys-internal":72}],70:[function(require,module,exports){
+exports.f = Object.getOwnPropertySymbols;
+},{}],71:[function(require,module,exports){
+// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+var has = require('./_has')
+ , toObject = require('./_to-object')
+ , IE_PROTO = require('./_shared-key')('IE_PROTO')
+ , ObjectProto = Object.prototype;
+
+module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+};
+},{"./_has":37,"./_shared-key":90,"./_to-object":106}],72:[function(require,module,exports){
+var has = require('./_has')
+ , toIObject = require('./_to-iobject')
+ , arrayIndexOf = require('./_array-includes')(false)
+ , IE_PROTO = require('./_shared-key')('IE_PROTO');
+
+module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(names.length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+};
+},{"./_array-includes":12,"./_has":37,"./_shared-key":90,"./_to-iobject":104}],73:[function(require,module,exports){
+// 19.1.2.14 / 15.2.3.14 Object.keys(O)
+var $keys = require('./_object-keys-internal')
+ , enumBugKeys = require('./_enum-bug-keys');
+
+module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+};
+},{"./_enum-bug-keys":28,"./_object-keys-internal":72}],74:[function(require,module,exports){
+exports.f = {}.propertyIsEnumerable;
+},{}],75:[function(require,module,exports){
+// most Object methods by ES6 should accept primitives
+var $export = require('./_export')
+ , core = require('./_core')
+ , fails = require('./_fails');
+module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+};
+},{"./_core":23,"./_export":30,"./_fails":32}],76:[function(require,module,exports){
+var getKeys = require('./_object-keys')
+ , toIObject = require('./_to-iobject')
+ , isEnum = require('./_object-pie').f;
+module.exports = function(isEntries){
+ return function(it){
+ var O = toIObject(it)
+ , keys = getKeys(O)
+ , length = keys.length
+ , i = 0
+ , result = []
+ , key;
+ while(length > i)if(isEnum.call(O, key = keys[i++])){
+ result.push(isEntries ? [key, O[key]] : O[key]);
+ } return result;
+ };
+};
+},{"./_object-keys":73,"./_object-pie":74,"./_to-iobject":104}],77:[function(require,module,exports){
+// all object keys, includes non-enumerable and symbols
+var gOPN = require('./_object-gopn')
+ , gOPS = require('./_object-gops')
+ , anObject = require('./_an-object')
+ , Reflect = require('./_global').Reflect;
+module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
+ var keys = gOPN.f(anObject(it))
+ , getSymbols = gOPS.f;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+};
+},{"./_an-object":8,"./_global":36,"./_object-gopn":69,"./_object-gops":70}],78:[function(require,module,exports){
+var $parseFloat = require('./_global').parseFloat
+ , $trim = require('./_string-trim').trim;
+
+module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){
+ var string = $trim(String(str), 3)
+ , result = $parseFloat(string);
+ return result === 0 && string.charAt(0) == '-' ? -0 : result;
+} : $parseFloat;
+},{"./_global":36,"./_string-trim":99,"./_string-ws":100}],79:[function(require,module,exports){
+var $parseInt = require('./_global').parseInt
+ , $trim = require('./_string-trim').trim
+ , ws = require('./_string-ws')
+ , hex = /^[\-+]?0[xX]/;
+
+module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){
+ var string = $trim(String(str), 3);
+ return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
+} : $parseInt;
+},{"./_global":36,"./_string-trim":99,"./_string-ws":100}],80:[function(require,module,exports){
+'use strict';
+var path = require('./_path')
+ , invoke = require('./_invoke')
+ , aFunction = require('./_a-function');
+module.exports = function(/* ...pargs */){
+ var fn = aFunction(this)
+ , length = arguments.length
+ , pargs = Array(length)
+ , i = 0
+ , _ = path._
+ , holder = false;
+ while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
+ return function(/* ...args */){
+ var that = this
+ , aLen = arguments.length
+ , j = 0, k = 0, args;
+ if(!holder && !aLen)return invoke(fn, pargs, that);
+ args = pargs.slice();
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
+ while(aLen > k)args.push(arguments[k++]);
+ return invoke(fn, args, that);
+ };
+};
+},{"./_a-function":4,"./_invoke":42,"./_path":81}],81:[function(require,module,exports){
+module.exports = require('./_global');
+},{"./_global":36}],82:[function(require,module,exports){
+module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+};
+},{}],83:[function(require,module,exports){
+var redefine = require('./_redefine');
+module.exports = function(target, src, safe){
+ for(var key in src)redefine(target, key, src[key], safe);
+ return target;
+};
+},{"./_redefine":84}],84:[function(require,module,exports){
+var global = require('./_global')
+ , hide = require('./_hide')
+ , has = require('./_has')
+ , SRC = require('./_uid')('src')
+ , TO_STRING = 'toString'
+ , $toString = Function[TO_STRING]
+ , TPL = ('' + $toString).split(TO_STRING);
+
+require('./_core').inspectSource = function(it){
+ return $toString.call(it);
+};
+
+(module.exports = function(O, key, val, safe){
+ var isFunction = typeof val == 'function';
+ if(isFunction)has(val, 'name') || hide(val, 'name', key);
+ if(O[key] === val)return;
+ if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
+ if(O === global){
+ O[key] = val;
+ } else {
+ if(!safe){
+ delete O[key];
+ hide(O, key, val);
+ } else {
+ if(O[key])O[key] = val;
+ else hide(O, key, val);
+ }
+ }
+// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+})(Function.prototype, TO_STRING, function toString(){
+ return typeof this == 'function' && this[SRC] || $toString.call(this);
+});
+},{"./_core":23,"./_global":36,"./_has":37,"./_hide":38,"./_uid":111}],85:[function(require,module,exports){
+module.exports = function(regExp, replace){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(it).replace(regExp, replacer);
+ };
+};
+},{}],86:[function(require,module,exports){
+// 7.2.9 SameValue(x, y)
+module.exports = Object.is || function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+};
+},{}],87:[function(require,module,exports){
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var isObject = require('./_is-object')
+ , anObject = require('./_an-object');
+var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
+};
+module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
+};
+},{"./_an-object":8,"./_ctx":24,"./_is-object":47,"./_object-gopd":67}],88:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , dP = require('./_object-dp')
+ , DESCRIPTORS = require('./_descriptors')
+ , SPECIES = require('./_wks')('species');
+
+module.exports = function(KEY){
+ var C = global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
+};
+},{"./_descriptors":26,"./_global":36,"./_object-dp":65,"./_wks":112}],89:[function(require,module,exports){
+var def = require('./_object-dp').f
+ , has = require('./_has')
+ , TAG = require('./_wks')('toStringTag');
+
+module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+};
+},{"./_has":37,"./_object-dp":65,"./_wks":112}],90:[function(require,module,exports){
+var shared = require('./_shared')('keys')
+ , uid = require('./_uid');
+module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
+};
+},{"./_shared":91,"./_uid":111}],91:[function(require,module,exports){
+var global = require('./_global')
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+module.exports = function(key){
+ return store[key] || (store[key] = {});
+};
+},{"./_global":36}],92:[function(require,module,exports){
+// 7.3.20 SpeciesConstructor(O, defaultConstructor)
+var anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , SPECIES = require('./_wks')('species');
+module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+};
+},{"./_a-function":4,"./_an-object":8,"./_wks":112}],93:[function(require,module,exports){
+var fails = require('./_fails');
+
+module.exports = function(method, arg){
+ return !!method && fails(function(){
+ arg ? method.call(null, function(){}, 1) : method.call(null);
+ });
+};
+},{"./_fails":32}],94:[function(require,module,exports){
+var toInteger = require('./_to-integer')
+ , defined = require('./_defined');
+// true -> String#at
+// false -> String#codePointAt
+module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+};
+},{"./_defined":25,"./_to-integer":103}],95:[function(require,module,exports){
+// helper for String#{startsWith, endsWith, includes}
+var isRegExp = require('./_is-regexp')
+ , defined = require('./_defined');
+
+module.exports = function(that, searchString, NAME){
+ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
+ return String(defined(that));
+};
+},{"./_defined":25,"./_is-regexp":48}],96:[function(require,module,exports){
+var $export = require('./_export')
+ , fails = require('./_fails')
+ , defined = require('./_defined')
+ , quot = /"/g;
+// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
+var createHTML = function(string, tag, attribute, value) {
+ var S = String(defined(string))
+ , p1 = '<' + tag;
+ if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
+ return p1 + '>' + S + '' + tag + '>';
+};
+module.exports = function(NAME, exec){
+ var O = {};
+ O[NAME] = exec(createHTML);
+ $export($export.P + $export.F * fails(function(){
+ var test = ''[NAME]('"');
+ return test !== test.toLowerCase() || test.split('"').length > 3;
+ }), 'String', O);
+};
+},{"./_defined":25,"./_export":30,"./_fails":32}],97:[function(require,module,exports){
+// https://github.com/tc39/proposal-string-pad-start-end
+var toLength = require('./_to-length')
+ , repeat = require('./_string-repeat')
+ , defined = require('./_defined');
+
+module.exports = function(that, maxLength, fillString, left){
+ var S = String(defined(that))
+ , stringLength = S.length
+ , fillStr = fillString === undefined ? ' ' : String(fillString)
+ , intMaxLength = toLength(maxLength);
+ if(intMaxLength <= stringLength)return S;
+ if(fillStr == '')fillStr = ' ';
+ var fillLen = intMaxLength - stringLength
+ , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
+ if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
+ return left ? stringFiller + S : S + stringFiller;
+};
+
+},{"./_defined":25,"./_string-repeat":98,"./_to-length":105}],98:[function(require,module,exports){
+'use strict';
+var toInteger = require('./_to-integer')
+ , defined = require('./_defined');
+
+module.exports = function repeat(count){
+ var str = String(defined(this))
+ , res = ''
+ , n = toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+};
+},{"./_defined":25,"./_to-integer":103}],99:[function(require,module,exports){
+var $export = require('./_export')
+ , defined = require('./_defined')
+ , fails = require('./_fails')
+ , spaces = require('./_string-ws')
+ , space = '[' + spaces + ']'
+ , non = '\u200b\u0085'
+ , ltrim = RegExp('^' + space + space + '*')
+ , rtrim = RegExp(space + space + '*$');
+
+var exporter = function(KEY, exec, ALIAS){
+ var exp = {};
+ var FORCE = fails(function(){
+ return !!spaces[KEY]() || non[KEY]() != non;
+ });
+ var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
+ if(ALIAS)exp[ALIAS] = fn;
+ $export($export.P + $export.F * FORCE, 'String', exp);
+};
+
+// 1 -> String#trimLeft
+// 2 -> String#trimRight
+// 3 -> String#trim
+var trim = exporter.trim = function(string, TYPE){
+ string = String(defined(string));
+ if(TYPE & 1)string = string.replace(ltrim, '');
+ if(TYPE & 2)string = string.replace(rtrim, '');
+ return string;
+};
+
+module.exports = exporter;
+},{"./_defined":25,"./_export":30,"./_fails":32,"./_string-ws":100}],100:[function(require,module,exports){
+module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+ '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
+},{}],101:[function(require,module,exports){
+var ctx = require('./_ctx')
+ , invoke = require('./_invoke')
+ , html = require('./_html')
+ , cel = require('./_dom-create')
+ , global = require('./_global')
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+var run = function(){
+ var id = +this;
+ if(queue.hasOwnProperty(id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+};
+var listener = function(event){
+ run.call(event.data);
+};
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(require('./_cof')(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listener;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
+ global.postMessage(id + '', '*');
+ };
+ global.addEventListener('message', listener, false);
+ // IE8-
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+}
+module.exports = {
+ set: setTask,
+ clear: clearTask
+};
+},{"./_cof":18,"./_ctx":24,"./_dom-create":27,"./_global":36,"./_html":39,"./_invoke":42}],102:[function(require,module,exports){
+var toInteger = require('./_to-integer')
+ , max = Math.max
+ , min = Math.min;
+module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+};
+},{"./_to-integer":103}],103:[function(require,module,exports){
+// 7.1.4 ToInteger
+var ceil = Math.ceil
+ , floor = Math.floor;
+module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+};
+},{}],104:[function(require,module,exports){
+// to indexed object, toObject with fallback for non-array-like ES3 strings
+var IObject = require('./_iobject')
+ , defined = require('./_defined');
+module.exports = function(it){
+ return IObject(defined(it));
+};
+},{"./_defined":25,"./_iobject":43}],105:[function(require,module,exports){
+// 7.1.15 ToLength
+var toInteger = require('./_to-integer')
+ , min = Math.min;
+module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+};
+},{"./_to-integer":103}],106:[function(require,module,exports){
+// 7.1.13 ToObject(argument)
+var defined = require('./_defined');
+module.exports = function(it){
+ return Object(defined(it));
+};
+},{"./_defined":25}],107:[function(require,module,exports){
+// 7.1.1 ToPrimitive(input [, PreferredType])
+var isObject = require('./_is-object');
+// instead of the ES6 spec version, we didn't implement @@toPrimitive case
+// and the second argument - flag - preferred type is a string
+module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+};
+},{"./_is-object":47}],108:[function(require,module,exports){
+'use strict';
+if(require('./_descriptors')){
+ var LIBRARY = require('./_library')
+ , global = require('./_global')
+ , fails = require('./_fails')
+ , $export = require('./_export')
+ , $typed = require('./_typed')
+ , $buffer = require('./_typed-buffer')
+ , ctx = require('./_ctx')
+ , anInstance = require('./_an-instance')
+ , propertyDesc = require('./_property-desc')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , isInteger = require('./_is-integer')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length')
+ , toIndex = require('./_to-index')
+ , toPrimitive = require('./_to-primitive')
+ , has = require('./_has')
+ , same = require('./_same-value')
+ , classof = require('./_classof')
+ , isObject = require('./_is-object')
+ , toObject = require('./_to-object')
+ , isArrayIter = require('./_is-array-iter')
+ , create = require('./_object-create')
+ , getPrototypeOf = require('./_object-gpo')
+ , gOPN = require('./_object-gopn').f
+ , isIterable = require('./core.is-iterable')
+ , getIterFn = require('./core.get-iterator-method')
+ , uid = require('./_uid')
+ , wks = require('./_wks')
+ , createArrayMethod = require('./_array-methods')
+ , createArrayIncludes = require('./_array-includes')
+ , speciesConstructor = require('./_species-constructor')
+ , ArrayIterators = require('./es6.array.iterator')
+ , Iterators = require('./_iterators')
+ , $iterDetect = require('./_iter-detect')
+ , setSpecies = require('./_set-species')
+ , arrayFill = require('./_array-fill')
+ , arrayCopyWithin = require('./_array-copy-within')
+ , $DP = require('./_object-dp')
+ , $GOPD = require('./_object-gopd')
+ , dP = $DP.f
+ , gOPD = $GOPD.f
+ , RangeError = global.RangeError
+ , TypeError = global.TypeError
+ , Uint8Array = global.Uint8Array
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER
+ , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'
+ , PROTOTYPE = 'prototype'
+ , ArrayProto = Array[PROTOTYPE]
+ , $ArrayBuffer = $buffer.ArrayBuffer
+ , $DataView = $buffer.DataView
+ , arrayForEach = createArrayMethod(0)
+ , arrayFilter = createArrayMethod(2)
+ , arraySome = createArrayMethod(3)
+ , arrayEvery = createArrayMethod(4)
+ , arrayFind = createArrayMethod(5)
+ , arrayFindIndex = createArrayMethod(6)
+ , arrayIncludes = createArrayIncludes(true)
+ , arrayIndexOf = createArrayIncludes(false)
+ , arrayValues = ArrayIterators.values
+ , arrayKeys = ArrayIterators.keys
+ , arrayEntries = ArrayIterators.entries
+ , arrayLastIndexOf = ArrayProto.lastIndexOf
+ , arrayReduce = ArrayProto.reduce
+ , arrayReduceRight = ArrayProto.reduceRight
+ , arrayJoin = ArrayProto.join
+ , arraySort = ArrayProto.sort
+ , arraySlice = ArrayProto.slice
+ , arrayToString = ArrayProto.toString
+ , arrayToLocaleString = ArrayProto.toLocaleString
+ , ITERATOR = wks('iterator')
+ , TAG = wks('toStringTag')
+ , TYPED_CONSTRUCTOR = uid('typed_constructor')
+ , DEF_CONSTRUCTOR = uid('def_constructor')
+ , ALL_CONSTRUCTORS = $typed.CONSTR
+ , TYPED_ARRAY = $typed.TYPED
+ , VIEW = $typed.VIEW
+ , WRONG_LENGTH = 'Wrong length!';
+
+ var $map = createArrayMethod(1, function(O, length){
+ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
+ });
+
+ var LITTLE_ENDIAN = fails(function(){
+ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
+ });
+
+ var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){
+ new Uint8Array(1).set({});
+ });
+
+ var strictToLength = function(it, SAME){
+ if(it === undefined)throw TypeError(WRONG_LENGTH);
+ var number = +it
+ , length = toLength(it);
+ if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH);
+ return length;
+ };
+
+ var toOffset = function(it, BYTES){
+ var offset = toInteger(it);
+ if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!');
+ return offset;
+ };
+
+ var validate = function(it){
+ if(isObject(it) && TYPED_ARRAY in it)return it;
+ throw TypeError(it + ' is not a typed array!');
+ };
+
+ var allocate = function(C, length){
+ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){
+ throw TypeError('It is not a typed array constructor!');
+ } return new C(length);
+ };
+
+ var speciesFromList = function(O, list){
+ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
+ };
+
+ var fromList = function(C, list){
+ var index = 0
+ , length = list.length
+ , result = allocate(C, length);
+ while(length > index)result[index] = list[index++];
+ return result;
+ };
+
+ var addGetter = function(it, key, internal){
+ dP(it, key, {get: function(){ return this._d[internal]; }});
+ };
+
+ var $from = function from(source /*, mapfn, thisArg */){
+ var O = toObject(source)
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , iterFn = getIterFn(O)
+ , i, length, values, result, step, iterator;
+ if(iterFn != undefined && !isArrayIter(iterFn)){
+ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){
+ values.push(step.value);
+ } O = values;
+ }
+ if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2);
+ for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){
+ result[i] = mapping ? mapfn(O[i], i) : O[i];
+ }
+ return result;
+ };
+
+ var $of = function of(/*...items*/){
+ var index = 0
+ , length = arguments.length
+ , result = allocate(this, length);
+ while(length > index)result[index] = arguments[index++];
+ return result;
+ };
+
+ // iOS Safari 6.x fails here
+ var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); });
+
+ var $toLocaleString = function toLocaleString(){
+ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
+ };
+
+ var proto = {
+ copyWithin: function copyWithin(target, start /*, end */){
+ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
+ },
+ every: function every(callbackfn /*, thisArg */){
+ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars
+ return arrayFill.apply(validate(this), arguments);
+ },
+ filter: function filter(callbackfn /*, thisArg */){
+ return speciesFromList(this, arrayFilter(validate(this), callbackfn,
+ arguments.length > 1 ? arguments[1] : undefined));
+ },
+ find: function find(predicate /*, thisArg */){
+ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ findIndex: function findIndex(predicate /*, thisArg */){
+ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ forEach: function forEach(callbackfn /*, thisArg */){
+ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ indexOf: function indexOf(searchElement /*, fromIndex */){
+ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ includes: function includes(searchElement /*, fromIndex */){
+ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ join: function join(separator){ // eslint-disable-line no-unused-vars
+ return arrayJoin.apply(validate(this), arguments);
+ },
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars
+ return arrayLastIndexOf.apply(validate(this), arguments);
+ },
+ map: function map(mapfn /*, thisArg */){
+ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduce.apply(validate(this), arguments);
+ },
+ reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars
+ return arrayReduceRight.apply(validate(this), arguments);
+ },
+ reverse: function reverse(){
+ var that = this
+ , length = validate(that).length
+ , middle = Math.floor(length / 2)
+ , index = 0
+ , value;
+ while(index < middle){
+ value = that[index];
+ that[index++] = that[--length];
+ that[length] = value;
+ } return that;
+ },
+ slice: function slice(start, end){
+ return speciesFromList(this, arraySlice.call(validate(this), start, end));
+ },
+ some: function some(callbackfn /*, thisArg */){
+ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ },
+ sort: function sort(comparefn){
+ return arraySort.call(validate(this), comparefn);
+ },
+ subarray: function subarray(begin, end){
+ var O = validate(this)
+ , length = O.length
+ , $begin = toIndex(begin, length);
+ return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
+ O.buffer,
+ O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
+ toLength((end === undefined ? length : toIndex(end, length)) - $begin)
+ );
+ }
+ };
+
+ var $set = function set(arrayLike /*, offset */){
+ validate(this);
+ var offset = toOffset(arguments[1], 1)
+ , length = this.length
+ , src = toObject(arrayLike)
+ , len = toLength(src.length)
+ , index = 0;
+ if(len + offset > length)throw RangeError(WRONG_LENGTH);
+ while(index < len)this[offset + index] = src[index++];
+ };
+
+ var $iterators = {
+ entries: function entries(){
+ return arrayEntries.call(validate(this));
+ },
+ keys: function keys(){
+ return arrayKeys.call(validate(this));
+ },
+ values: function values(){
+ return arrayValues.call(validate(this));
+ }
+ };
+
+ var isTAIndex = function(target, key){
+ return isObject(target)
+ && target[TYPED_ARRAY]
+ && typeof key != 'symbol'
+ && key in target
+ && String(+key) == String(key);
+ };
+ var $getDesc = function getOwnPropertyDescriptor(target, key){
+ return isTAIndex(target, key = toPrimitive(key, true))
+ ? propertyDesc(2, target[key])
+ : gOPD(target, key);
+ };
+ var $setDesc = function defineProperty(target, key, desc){
+ if(isTAIndex(target, key = toPrimitive(key, true))
+ && isObject(desc)
+ && has(desc, 'value')
+ && !has(desc, 'get')
+ && !has(desc, 'set')
+ // TODO: add validation descriptor w/o calling accessors
+ && !desc.configurable
+ && (!has(desc, 'writable') || desc.writable)
+ && (!has(desc, 'enumerable') || desc.enumerable)
+ ){
+ target[key] = desc.value;
+ return target;
+ } else return dP(target, key, desc);
+ };
+
+ if(!ALL_CONSTRUCTORS){
+ $GOPD.f = $getDesc;
+ $DP.f = $setDesc;
+ }
+
+ $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
+ getOwnPropertyDescriptor: $getDesc,
+ defineProperty: $setDesc
+ });
+
+ if(fails(function(){ arrayToString.call({}); })){
+ arrayToString = arrayToLocaleString = function toString(){
+ return arrayJoin.call(this);
+ }
+ }
+
+ var $TypedArrayPrototype$ = redefineAll({}, proto);
+ redefineAll($TypedArrayPrototype$, $iterators);
+ hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
+ redefineAll($TypedArrayPrototype$, {
+ set: $set,
+ constructor: function(){ /* noop */ },
+ toString: arrayToString,
+ toLocaleString: $toLocaleString
+ });
+ addGetter($TypedArrayPrototype$, 'buffer', 'b');
+ addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
+ addGetter($TypedArrayPrototype$, 'byteLength', 'l');
+ addGetter($TypedArrayPrototype$, 'length', 'e');
+ dP($TypedArrayPrototype$, TAG, {
+ get: function(){ return this[TYPED_ARRAY]; }
+ });
+
+ module.exports = function(KEY, BYTES, wrapper, CLAMPED){
+ CLAMPED = !!CLAMPED;
+ var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'
+ , ISNT_UINT8 = NAME != 'Uint8Array'
+ , GETTER = 'get' + KEY
+ , SETTER = 'set' + KEY
+ , TypedArray = global[NAME]
+ , Base = TypedArray || {}
+ , TAC = TypedArray && getPrototypeOf(TypedArray)
+ , FORCED = !TypedArray || !$typed.ABV
+ , O = {}
+ , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
+ var getter = function(that, index){
+ var data = that._d;
+ return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
+ };
+ var setter = function(that, index, value){
+ var data = that._d;
+ if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
+ data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
+ };
+ var addElement = function(that, index){
+ dP(that, index, {
+ get: function(){
+ return getter(this, index);
+ },
+ set: function(value){
+ return setter(this, index, value);
+ },
+ enumerable: true
+ });
+ };
+ if(FORCED){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME, '_d');
+ var index = 0
+ , offset = 0
+ , buffer, byteLength, length, klass;
+ if(!isObject(data)){
+ length = strictToLength(data, true)
+ byteLength = length * BYTES;
+ buffer = new $ArrayBuffer(byteLength);
+ } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ buffer = data;
+ offset = toOffset($offset, BYTES);
+ var $len = data.byteLength;
+ if($length === undefined){
+ if($len % BYTES)throw RangeError(WRONG_LENGTH);
+ byteLength = $len - offset;
+ if(byteLength < 0)throw RangeError(WRONG_LENGTH);
+ } else {
+ byteLength = toLength($length) * BYTES;
+ if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH);
+ }
+ length = byteLength / BYTES;
+ } else if(TYPED_ARRAY in data){
+ return fromList(TypedArray, data);
+ } else {
+ return $from.call(TypedArray, data);
+ }
+ hide(that, '_d', {
+ b: buffer,
+ o: offset,
+ l: byteLength,
+ e: length,
+ v: new $DataView(buffer)
+ });
+ while(index < length)addElement(that, index++);
+ });
+ TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
+ hide(TypedArrayPrototype, 'constructor', TypedArray);
+ } else if(!$iterDetect(function(iter){
+ // V8 works with iterators, but fails in many other cases
+ // https://code.google.com/p/v8/issues/detail?id=4552
+ new TypedArray(null); // eslint-disable-line no-new
+ new TypedArray(iter); // eslint-disable-line no-new
+ }, true)){
+ TypedArray = wrapper(function(that, data, $offset, $length){
+ anInstance(that, TypedArray, NAME);
+ var klass;
+ // `ws` module bug, temporarily remove validation length for Uint8Array
+ // https://github.com/websockets/ws/pull/645
+ if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8));
+ if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){
+ return $length !== undefined
+ ? new Base(data, toOffset($offset, BYTES), $length)
+ : $offset !== undefined
+ ? new Base(data, toOffset($offset, BYTES))
+ : new Base(data);
+ }
+ if(TYPED_ARRAY in data)return fromList(TypedArray, data);
+ return $from.call(TypedArray, data);
+ });
+ arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){
+ if(!(key in TypedArray))hide(TypedArray, key, Base[key]);
+ });
+ TypedArray[PROTOTYPE] = TypedArrayPrototype;
+ if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray;
+ }
+ var $nativeIterator = TypedArrayPrototype[ITERATOR]
+ , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined)
+ , $iterator = $iterators.values;
+ hide(TypedArray, TYPED_CONSTRUCTOR, true);
+ hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
+ hide(TypedArrayPrototype, VIEW, true);
+ hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
+
+ if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){
+ dP(TypedArrayPrototype, TAG, {
+ get: function(){ return NAME; }
+ });
+ }
+
+ O[NAME] = TypedArray;
+
+ $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
+
+ $export($export.S, NAME, {
+ BYTES_PER_ELEMENT: BYTES,
+ from: $from,
+ of: $of
+ });
+
+ if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
+
+ $export($export.P, NAME, proto);
+
+ $export($export.P + $export.F * FORCED_SET, NAME, {set: $set});
+
+ $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
+
+ $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString});
+
+ $export($export.P + $export.F * (fails(function(){
+ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString()
+ }) || !fails(function(){
+ TypedArrayPrototype.toLocaleString.call([1, 2]);
+ })), NAME, {toLocaleString: $toLocaleString});
+
+ Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
+ if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
+
+ setSpecies(NAME);
+ };
+} else module.exports = function(){ /* empty */ };
+},{"./_an-instance":7,"./_array-copy-within":9,"./_array-fill":10,"./_array-includes":12,"./_array-methods":13,"./_classof":17,"./_ctx":24,"./_descriptors":26,"./_export":30,"./_fails":32,"./_global":36,"./_has":37,"./_hide":38,"./_is-array-iter":44,"./_is-integer":46,"./_is-object":47,"./_iter-detect":52,"./_iterators":54,"./_library":56,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_object-gpo":71,"./_property-desc":82,"./_redefine-all":83,"./_same-value":86,"./_set-species":88,"./_species-constructor":92,"./_to-index":102,"./_to-integer":103,"./_to-length":105,"./_to-object":106,"./_to-primitive":107,"./_typed":110,"./_typed-buffer":109,"./_uid":111,"./_wks":112,"./core.get-iterator-method":113,"./core.is-iterable":114,"./es6.array.iterator":126}],109:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , DESCRIPTORS = require('./_descriptors')
+ , LIBRARY = require('./_library')
+ , $typed = require('./_typed')
+ , hide = require('./_hide')
+ , redefineAll = require('./_redefine-all')
+ , fails = require('./_fails')
+ , anInstance = require('./_an-instance')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length')
+ , gOPN = require('./_object-gopn').f
+ , dP = require('./_object-dp').f
+ , arrayFill = require('./_array-fill')
+ , setToStringTag = require('./_set-to-string-tag')
+ , ARRAY_BUFFER = 'ArrayBuffer'
+ , DATA_VIEW = 'DataView'
+ , PROTOTYPE = 'prototype'
+ , WRONG_LENGTH = 'Wrong length!'
+ , WRONG_INDEX = 'Wrong index!'
+ , $ArrayBuffer = global[ARRAY_BUFFER]
+ , $DataView = global[DATA_VIEW]
+ , Math = global.Math
+ , parseInt = global.parseInt
+ , RangeError = global.RangeError
+ , Infinity = global.Infinity
+ , BaseBuffer = $ArrayBuffer
+ , abs = Math.abs
+ , pow = Math.pow
+ , min = Math.min
+ , floor = Math.floor
+ , log = Math.log
+ , LN2 = Math.LN2
+ , BUFFER = 'buffer'
+ , BYTE_LENGTH = 'byteLength'
+ , BYTE_OFFSET = 'byteOffset'
+ , $BUFFER = DESCRIPTORS ? '_b' : BUFFER
+ , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH
+ , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
+
+// IEEE754 conversions based on https://github.com/feross/ieee754
+var packIEEE754 = function(value, mLen, nBytes){
+ var buffer = Array(nBytes)
+ , eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0
+ , i = 0
+ , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0
+ , e, m, c;
+ value = abs(value)
+ if(value != value || value === Infinity){
+ m = value != value ? 1 : 0;
+ e = eMax;
+ } else {
+ e = floor(log(value) / LN2);
+ if(value * (c = pow(2, -e)) < 1){
+ e--;
+ c *= 2;
+ }
+ if(e + eBias >= 1){
+ value += rt / c;
+ } else {
+ value += rt * pow(2, 1 - eBias);
+ }
+ if(value * c >= 2){
+ e++;
+ c /= 2;
+ }
+ if(e + eBias >= eMax){
+ m = 0;
+ e = eMax;
+ } else if(e + eBias >= 1){
+ m = (value * c - 1) * pow(2, mLen);
+ e = e + eBias;
+ } else {
+ m = value * pow(2, eBias - 1) * pow(2, mLen);
+ e = 0;
+ }
+ }
+ for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
+ e = e << mLen | m;
+ eLen += mLen;
+ for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
+ buffer[--i] |= s * 128;
+ return buffer;
+};
+var unpackIEEE754 = function(buffer, mLen, nBytes){
+ var eLen = nBytes * 8 - mLen - 1
+ , eMax = (1 << eLen) - 1
+ , eBias = eMax >> 1
+ , nBits = eLen - 7
+ , i = nBytes - 1
+ , s = buffer[i--]
+ , e = s & 127
+ , m;
+ s >>= 7;
+ for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
+ m = e & (1 << -nBits) - 1;
+ e >>= -nBits;
+ nBits += mLen;
+ for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
+ if(e === 0){
+ e = 1 - eBias;
+ } else if(e === eMax){
+ return m ? NaN : s ? -Infinity : Infinity;
+ } else {
+ m = m + pow(2, mLen);
+ e = e - eBias;
+ } return (s ? -1 : 1) * m * pow(2, e - mLen);
+};
+
+var unpackI32 = function(bytes){
+ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
+};
+var packI8 = function(it){
+ return [it & 0xff];
+};
+var packI16 = function(it){
+ return [it & 0xff, it >> 8 & 0xff];
+};
+var packI32 = function(it){
+ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
+};
+var packF64 = function(it){
+ return packIEEE754(it, 52, 8);
+};
+var packF32 = function(it){
+ return packIEEE754(it, 23, 4);
+};
+
+var addGetter = function(C, key, internal){
+ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }});
+};
+
+var get = function(view, bytes, index, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = store.slice(start, start + bytes);
+ return isLittleEndian ? pack : pack.reverse();
+};
+var set = function(view, bytes, index, conversion, value, isLittleEndian){
+ var numIndex = +index
+ , intIndex = toInteger(numIndex);
+ if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX);
+ var store = view[$BUFFER]._b
+ , start = intIndex + view[$OFFSET]
+ , pack = conversion(+value);
+ for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
+};
+
+var validateArrayBufferArguments = function(that, length){
+ anInstance(that, $ArrayBuffer, ARRAY_BUFFER);
+ var numberLength = +length
+ , byteLength = toLength(numberLength);
+ if(numberLength != byteLength)throw RangeError(WRONG_LENGTH);
+ return byteLength;
+};
+
+if(!$typed.ABV){
+ $ArrayBuffer = function ArrayBuffer(length){
+ var byteLength = validateArrayBufferArguments(this, length);
+ this._b = arrayFill.call(Array(byteLength), 0);
+ this[$LENGTH] = byteLength;
+ };
+
+ $DataView = function DataView(buffer, byteOffset, byteLength){
+ anInstance(this, $DataView, DATA_VIEW);
+ anInstance(buffer, $ArrayBuffer, DATA_VIEW);
+ var bufferLength = buffer[$LENGTH]
+ , offset = toInteger(byteOffset);
+ if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!');
+ byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
+ if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH);
+ this[$BUFFER] = buffer;
+ this[$OFFSET] = offset;
+ this[$LENGTH] = byteLength;
+ };
+
+ if(DESCRIPTORS){
+ addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
+ addGetter($DataView, BUFFER, '_b');
+ addGetter($DataView, BYTE_LENGTH, '_l');
+ addGetter($DataView, BYTE_OFFSET, '_o');
+ }
+
+ redefineAll($DataView[PROTOTYPE], {
+ getInt8: function getInt8(byteOffset){
+ return get(this, 1, byteOffset)[0] << 24 >> 24;
+ },
+ getUint8: function getUint8(byteOffset){
+ return get(this, 1, byteOffset)[0];
+ },
+ getInt16: function getInt16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
+ },
+ getUint16: function getUint16(byteOffset /*, littleEndian */){
+ var bytes = get(this, 2, byteOffset, arguments[1]);
+ return bytes[1] << 8 | bytes[0];
+ },
+ getInt32: function getInt32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1]));
+ },
+ getUint32: function getUint32(byteOffset /*, littleEndian */){
+ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
+ },
+ getFloat32: function getFloat32(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
+ },
+ getFloat64: function getFloat64(byteOffset /*, littleEndian */){
+ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
+ },
+ setInt8: function setInt8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ set(this, 1, byteOffset, packI8, value);
+ },
+ setInt16: function setInt16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setUint16: function setUint16(byteOffset, value /*, littleEndian */){
+ set(this, 2, byteOffset, packI16, value, arguments[2]);
+ },
+ setInt32: function setInt32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setUint32: function setUint32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packI32, value, arguments[2]);
+ },
+ setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){
+ set(this, 4, byteOffset, packF32, value, arguments[2]);
+ },
+ setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){
+ set(this, 8, byteOffset, packF64, value, arguments[2]);
+ }
+ });
+} else {
+ if(!fails(function(){
+ new $ArrayBuffer; // eslint-disable-line no-new
+ }) || !fails(function(){
+ new $ArrayBuffer(.5); // eslint-disable-line no-new
+ })){
+ $ArrayBuffer = function ArrayBuffer(length){
+ return new BaseBuffer(validateArrayBufferArguments(this, length));
+ };
+ var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
+ for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){
+ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]);
+ };
+ if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer;
+ }
+ // iOS Safari 7.x bug
+ var view = new $DataView(new $ArrayBuffer(2))
+ , $setInt8 = $DataView[PROTOTYPE].setInt8;
+ view.setInt8(0, 2147483648);
+ view.setInt8(1, 2147483649);
+ if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], {
+ setInt8: function setInt8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ },
+ setUint8: function setUint8(byteOffset, value){
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
+ }
+ }, true);
+}
+setToStringTag($ArrayBuffer, ARRAY_BUFFER);
+setToStringTag($DataView, DATA_VIEW);
+hide($DataView[PROTOTYPE], $typed.VIEW, true);
+exports[ARRAY_BUFFER] = $ArrayBuffer;
+exports[DATA_VIEW] = $DataView;
+},{"./_an-instance":7,"./_array-fill":10,"./_descriptors":26,"./_fails":32,"./_global":36,"./_hide":38,"./_library":56,"./_object-dp":65,"./_object-gopn":69,"./_redefine-all":83,"./_set-to-string-tag":89,"./_to-integer":103,"./_to-length":105,"./_typed":110}],110:[function(require,module,exports){
+var global = require('./_global')
+ , hide = require('./_hide')
+ , uid = require('./_uid')
+ , TYPED = uid('typed_array')
+ , VIEW = uid('view')
+ , ABV = !!(global.ArrayBuffer && global.DataView)
+ , CONSTR = ABV
+ , i = 0, l = 9, Typed;
+
+var TypedArrayConstructors = (
+ 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
+).split(',');
+
+while(i < l){
+ if(Typed = global[TypedArrayConstructors[i++]]){
+ hide(Typed.prototype, TYPED, true);
+ hide(Typed.prototype, VIEW, true);
+ } else CONSTR = false;
+}
+
+module.exports = {
+ ABV: ABV,
+ CONSTR: CONSTR,
+ TYPED: TYPED,
+ VIEW: VIEW
+};
+},{"./_global":36,"./_hide":38,"./_uid":111}],111:[function(require,module,exports){
+var id = 0
+ , px = Math.random();
+module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+};
+},{}],112:[function(require,module,exports){
+var store = require('./_shared')('wks')
+ , uid = require('./_uid')
+ , Symbol = require('./_global').Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
+module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+},{"./_global":36,"./_shared":91,"./_uid":111}],113:[function(require,module,exports){
+var classof = require('./_classof')
+ , ITERATOR = require('./_wks')('iterator')
+ , Iterators = require('./_iterators');
+module.exports = require('./_core').getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+};
+},{"./_classof":17,"./_core":23,"./_iterators":54,"./_wks":112}],114:[function(require,module,exports){
+var classof = require('./_classof')
+ , ITERATOR = require('./_wks')('iterator')
+ , Iterators = require('./_iterators');
+module.exports = require('./_core').isIterable = function(it){
+ var O = Object(it);
+ return O[ITERATOR] !== undefined
+ || '@@iterator' in O
+ || Iterators.hasOwnProperty(classof(O));
+};
+},{"./_classof":17,"./_core":23,"./_iterators":54,"./_wks":112}],115:[function(require,module,exports){
+// https://github.com/benjamingr/RexExp.escape
+var $export = require('./_export')
+ , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+
+$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
+
+},{"./_export":30,"./_replacer":85}],116:[function(require,module,exports){
+// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+var $export = require('./_export');
+
+$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')});
+
+require('./_add-to-unscopables')('copyWithin');
+},{"./_add-to-unscopables":6,"./_array-copy-within":9,"./_export":30}],117:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $every = require('./_array-methods')(4);
+
+$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', {
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: function every(callbackfn /* , thisArg */){
+ return $every(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],118:[function(require,module,exports){
+// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+var $export = require('./_export');
+
+$export($export.P, 'Array', {fill: require('./_array-fill')});
+
+require('./_add-to-unscopables')('fill');
+},{"./_add-to-unscopables":6,"./_array-fill":10,"./_export":30}],119:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $filter = require('./_array-methods')(2);
+
+$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: function filter(callbackfn /* , thisArg */){
+ return $filter(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],120:[function(require,module,exports){
+'use strict';
+// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
+var $export = require('./_export')
+ , $find = require('./_array-methods')(6)
+ , KEY = 'findIndex'
+ , forced = true;
+// Shouldn't skip holes
+if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+$export($export.P + $export.F * forced, 'Array', {
+ findIndex: function findIndex(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+require('./_add-to-unscopables')(KEY);
+},{"./_add-to-unscopables":6,"./_array-methods":13,"./_export":30}],121:[function(require,module,exports){
+'use strict';
+// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
+var $export = require('./_export')
+ , $find = require('./_array-methods')(5)
+ , KEY = 'find'
+ , forced = true;
+// Shouldn't skip holes
+if(KEY in [])Array(1)[KEY](function(){ forced = false; });
+$export($export.P + $export.F * forced, 'Array', {
+ find: function find(callbackfn/*, that = undefined */){
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+require('./_add-to-unscopables')(KEY);
+},{"./_add-to-unscopables":6,"./_array-methods":13,"./_export":30}],122:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $forEach = require('./_array-methods')(0)
+ , STRICT = require('./_strict-method')([].forEach, true);
+
+$export($export.P + $export.F * !STRICT, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: function forEach(callbackfn /* , thisArg */){
+ return $forEach(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],123:[function(require,module,exports){
+'use strict';
+var ctx = require('./_ctx')
+ , $export = require('./_export')
+ , toObject = require('./_to-object')
+ , call = require('./_iter-call')
+ , isArrayIter = require('./_is-array-iter')
+ , toLength = require('./_to-length')
+ , getIterFn = require('./core.get-iterator-method');
+$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = toObject(arrayLike)
+ , C = typeof this == 'function' ? this : Array
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , index = 0
+ , iterFn = getIterFn(O)
+ , length, result, step, iterator;
+ if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ // if object isn't iterable or it's array with default iterator - use simple case
+ if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
+ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
+ result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
+ }
+ } else {
+ length = toLength(O.length);
+ for(result = new C(length); length > index; index++){
+ result[index] = mapping ? mapfn(O[index], index) : O[index];
+ }
+ }
+ result.length = index;
+ return result;
+ }
+});
+
+},{"./_ctx":24,"./_export":30,"./_is-array-iter":44,"./_iter-call":49,"./_iter-detect":52,"./_to-length":105,"./_to-object":106,"./core.get-iterator-method":113}],124:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $indexOf = require('./_array-includes')(false);
+
+$export($export.P + $export.F * !require('./_strict-method')([].indexOf), 'Array', {
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: function indexOf(searchElement /*, fromIndex = 0 */){
+ return $indexOf(this, searchElement, arguments[1]);
+ }
+});
+},{"./_array-includes":12,"./_export":30,"./_strict-method":93}],125:[function(require,module,exports){
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+var $export = require('./_export');
+
+$export($export.S, 'Array', {isArray: require('./_is-array')});
+},{"./_export":30,"./_is-array":45}],126:[function(require,module,exports){
+'use strict';
+var addToUnscopables = require('./_add-to-unscopables')
+ , step = require('./_iter-step')
+ , Iterators = require('./_iterators')
+ , toIObject = require('./_to-iobject');
+
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
+
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
+
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
+},{"./_add-to-unscopables":6,"./_iter-define":51,"./_iter-step":53,"./_iterators":54,"./_to-iobject":104}],127:[function(require,module,exports){
+'use strict';
+// 22.1.3.13 Array.prototype.join(separator)
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , arrayJoin = [].join;
+
+// fallback for not array-like strings
+$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', {
+ join: function join(separator){
+ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
+ }
+});
+},{"./_export":30,"./_iobject":43,"./_strict-method":93,"./_to-iobject":104}],128:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , toInteger = require('./_to-integer')
+ , toLength = require('./_to-length');
+
+$export($export.P + $export.F * !require('./_strict-method')([].lastIndexOf), 'Array', {
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){
+ var O = toIObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1]));
+ if(index < 0)index = length + index;
+ for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index;
+ return -1;
+ }
+});
+},{"./_export":30,"./_strict-method":93,"./_to-integer":103,"./_to-iobject":104,"./_to-length":105}],129:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $map = require('./_array-methods')(1);
+
+$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', {
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: function map(callbackfn /* , thisArg */){
+ return $map(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],130:[function(require,module,exports){
+'use strict';
+var $export = require('./_export');
+
+// WebKit Array.of isn't generic
+$export($export.S + $export.F * require('./_fails')(function(){
+ function F(){}
+ return !(Array.of.call(F) instanceof F);
+}), 'Array', {
+ // 22.1.2.3 Array.of( ...items)
+ of: function of(/* ...args */){
+ var index = 0
+ , aLen = arguments.length
+ , result = new (typeof this == 'function' ? this : Array)(aLen);
+ while(aLen > index)result[index] = arguments[index++];
+ result.length = aLen;
+ return result;
+ }
+});
+},{"./_export":30,"./_fails":32}],131:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $reduce = require('./_array-reduce');
+
+$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', {
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: function reduceRight(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], true);
+ }
+});
+},{"./_array-reduce":14,"./_export":30,"./_strict-method":93}],132:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $reduce = require('./_array-reduce');
+
+$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', {
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: function reduce(callbackfn /* , initialValue */){
+ return $reduce(this, callbackfn, arguments.length, arguments[1], false);
+ }
+});
+},{"./_array-reduce":14,"./_export":30,"./_strict-method":93}],133:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , html = require('./_html')
+ , cof = require('./_cof')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length')
+ , arraySlice = [].slice;
+
+// fallback for not array-like ES3 strings and DOM objects
+$export($export.P + $export.F * require('./_fails')(function(){
+ if(html)arraySlice.call(html);
+}), 'Array', {
+ slice: function slice(begin, end){
+ var len = toLength(this.length)
+ , klass = cof(this);
+ end = end === undefined ? len : end;
+ if(klass == 'Array')return arraySlice.call(this, begin, end);
+ var start = toIndex(begin, len)
+ , upTo = toIndex(end, len)
+ , size = toLength(upTo - start)
+ , cloned = Array(size)
+ , i = 0;
+ for(; i < size; i++)cloned[i] = klass == 'String'
+ ? this.charAt(start + i)
+ : this[start + i];
+ return cloned;
+ }
+});
+},{"./_cof":18,"./_export":30,"./_fails":32,"./_html":39,"./_to-index":102,"./_to-length":105}],134:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $some = require('./_array-methods')(3);
+
+$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', {
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: function some(callbackfn /* , thisArg */){
+ return $some(this, callbackfn, arguments[1]);
+ }
+});
+},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],135:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , aFunction = require('./_a-function')
+ , toObject = require('./_to-object')
+ , fails = require('./_fails')
+ , $sort = [].sort
+ , test = [1, 2, 3];
+
+$export($export.P + $export.F * (fails(function(){
+ // IE8-
+ test.sort(undefined);
+}) || !fails(function(){
+ // V8 bug
+ test.sort(null);
+ // Old WebKit
+}) || !require('./_strict-method')($sort)), 'Array', {
+ // 22.1.3.25 Array.prototype.sort(comparefn)
+ sort: function sort(comparefn){
+ return comparefn === undefined
+ ? $sort.call(toObject(this))
+ : $sort.call(toObject(this), aFunction(comparefn));
+ }
+});
+},{"./_a-function":4,"./_export":30,"./_fails":32,"./_strict-method":93,"./_to-object":106}],136:[function(require,module,exports){
+require('./_set-species')('Array');
+},{"./_set-species":88}],137:[function(require,module,exports){
+// 20.3.3.1 / 15.9.4.4 Date.now()
+var $export = require('./_export');
+
+$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
+},{"./_export":30}],138:[function(require,module,exports){
+'use strict';
+// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+var $export = require('./_export')
+ , fails = require('./_fails')
+ , getTime = Date.prototype.getTime;
+
+var lz = function(num){
+ return num > 9 ? num : '0' + num;
+};
+
+// PhantomJS / old WebKit has a broken implementations
+$export($export.P + $export.F * (fails(function(){
+ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
+}) || !fails(function(){
+ new Date(NaN).toISOString();
+})), 'Date', {
+ toISOString: function toISOString(){
+ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+ }
+});
+},{"./_export":30,"./_fails":32}],139:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , toObject = require('./_to-object')
+ , toPrimitive = require('./_to-primitive');
+
+$export($export.P + $export.F * require('./_fails')(function(){
+ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1;
+}), 'Date', {
+ toJSON: function toJSON(key){
+ var O = toObject(this)
+ , pv = toPrimitive(O);
+ return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
+ }
+});
+},{"./_export":30,"./_fails":32,"./_to-object":106,"./_to-primitive":107}],140:[function(require,module,exports){
+var DateProto = Date.prototype
+ , INVALID_DATE = 'Invalid Date'
+ , TO_STRING = 'toString'
+ , $toString = DateProto[TO_STRING]
+ , getTime = DateProto.getTime;
+if(new Date(NaN) + '' != INVALID_DATE){
+ require('./_redefine')(DateProto, TO_STRING, function toString(){
+ var value = getTime.call(this);
+ return value === value ? $toString.call(this) : INVALID_DATE;
+ });
+}
+},{"./_redefine":84}],141:[function(require,module,exports){
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+var $export = require('./_export');
+
+$export($export.P, 'Function', {bind: require('./_bind')});
+},{"./_bind":16,"./_export":30}],142:[function(require,module,exports){
+'use strict';
+var isObject = require('./_is-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , HAS_INSTANCE = require('./_wks')('hasInstance')
+ , FunctionProto = Function.prototype;
+// 19.2.3.6 Function.prototype[@@hasInstance](V)
+if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){
+ if(typeof this != 'function' || !isObject(O))return false;
+ if(!isObject(this.prototype))return O instanceof this;
+ // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
+ while(O = getPrototypeOf(O))if(this.prototype === O)return true;
+ return false;
+}});
+},{"./_is-object":47,"./_object-dp":65,"./_object-gpo":71,"./_wks":112}],143:[function(require,module,exports){
+var dP = require('./_object-dp').f
+ , createDesc = require('./_property-desc')
+ , has = require('./_has')
+ , FProto = Function.prototype
+ , nameRE = /^\s*function ([^ (]*)/
+ , NAME = 'name';
+// 19.2.4.2 name
+NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
+ configurable: true,
+ get: function(){
+ var match = ('' + this).match(nameRE)
+ , name = match ? match[1] : '';
+ has(this, NAME) || dP(this, NAME, createDesc(5, name));
+ return name;
+ }
+});
+},{"./_descriptors":26,"./_has":37,"./_object-dp":65,"./_property-desc":82}],144:[function(require,module,exports){
+'use strict';
+var strong = require('./_collection-strong');
+
+// 23.1 Map Objects
+module.exports = require('./_collection')('Map', function(get){
+ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key){
+ var entry = strong.getEntry(this, key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value){
+ return strong.def(this, key === 0 ? 0 : key, value);
+ }
+}, strong, true);
+},{"./_collection":22,"./_collection-strong":19}],145:[function(require,module,exports){
+// 20.2.2.3 Math.acosh(x)
+var $export = require('./_export')
+ , log1p = require('./_math-log1p')
+ , sqrt = Math.sqrt
+ , $acosh = Math.acosh;
+
+// V8 bug https://code.google.com/p/v8/issues/detail?id=3509
+$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
+ acosh: function acosh(x){
+ return (x = +x) < 1 ? NaN : x > 94906265.62425156
+ ? Math.log(x) + Math.LN2
+ : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
+ }
+});
+},{"./_export":30,"./_math-log1p":58}],146:[function(require,module,exports){
+// 20.2.2.5 Math.asinh(x)
+var $export = require('./_export');
+
+function asinh(x){
+ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
+}
+
+$export($export.S, 'Math', {asinh: asinh});
+},{"./_export":30}],147:[function(require,module,exports){
+// 20.2.2.7 Math.atanh(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ atanh: function atanh(x){
+ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
+ }
+});
+},{"./_export":30}],148:[function(require,module,exports){
+// 20.2.2.9 Math.cbrt(x)
+var $export = require('./_export')
+ , sign = require('./_math-sign');
+
+$export($export.S, 'Math', {
+ cbrt: function cbrt(x){
+ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
+ }
+});
+},{"./_export":30,"./_math-sign":59}],149:[function(require,module,exports){
+// 20.2.2.11 Math.clz32(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ clz32: function clz32(x){
+ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
+ }
+});
+},{"./_export":30}],150:[function(require,module,exports){
+// 20.2.2.12 Math.cosh(x)
+var $export = require('./_export')
+ , exp = Math.exp;
+
+$export($export.S, 'Math', {
+ cosh: function cosh(x){
+ return (exp(x = +x) + exp(-x)) / 2;
+ }
+});
+},{"./_export":30}],151:[function(require,module,exports){
+// 20.2.2.14 Math.expm1(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {expm1: require('./_math-expm1')});
+},{"./_export":30,"./_math-expm1":57}],152:[function(require,module,exports){
+// 20.2.2.16 Math.fround(x)
+var $export = require('./_export')
+ , sign = require('./_math-sign')
+ , pow = Math.pow
+ , EPSILON = pow(2, -52)
+ , EPSILON32 = pow(2, -23)
+ , MAX32 = pow(2, 127) * (2 - EPSILON32)
+ , MIN32 = pow(2, -126);
+
+var roundTiesToEven = function(n){
+ return n + 1 / EPSILON - 1 / EPSILON;
+};
+
+
+$export($export.S, 'Math', {
+ fround: function fround(x){
+ var $abs = Math.abs(x)
+ , $sign = sign(x)
+ , a, result;
+ if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ if(result > MAX32 || result != result)return $sign * Infinity;
+ return $sign * result;
+ }
+});
+},{"./_export":30,"./_math-sign":59}],153:[function(require,module,exports){
+// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
+var $export = require('./_export')
+ , abs = Math.abs;
+
+$export($export.S, 'Math', {
+ hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
+ var sum = 0
+ , i = 0
+ , aLen = arguments.length
+ , larg = 0
+ , arg, div;
+ while(i < aLen){
+ arg = abs(arguments[i++]);
+ if(larg < arg){
+ div = larg / arg;
+ sum = sum * div * div + 1;
+ larg = arg;
+ } else if(arg > 0){
+ div = arg / larg;
+ sum += div * div;
+ } else sum += arg;
+ }
+ return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
+ }
+});
+},{"./_export":30}],154:[function(require,module,exports){
+// 20.2.2.18 Math.imul(x, y)
+var $export = require('./_export')
+ , $imul = Math.imul;
+
+// some WebKit versions fails with big numbers, some has wrong arity
+$export($export.S + $export.F * require('./_fails')(function(){
+ return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
+}), 'Math', {
+ imul: function imul(x, y){
+ var UINT16 = 0xffff
+ , xn = +x
+ , yn = +y
+ , xl = UINT16 & xn
+ , yl = UINT16 & yn;
+ return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
+ }
+});
+},{"./_export":30,"./_fails":32}],155:[function(require,module,exports){
+// 20.2.2.21 Math.log10(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ log10: function log10(x){
+ return Math.log(x) / Math.LN10;
+ }
+});
+},{"./_export":30}],156:[function(require,module,exports){
+// 20.2.2.20 Math.log1p(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {log1p: require('./_math-log1p')});
+},{"./_export":30,"./_math-log1p":58}],157:[function(require,module,exports){
+// 20.2.2.22 Math.log2(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ log2: function log2(x){
+ return Math.log(x) / Math.LN2;
+ }
+});
+},{"./_export":30}],158:[function(require,module,exports){
+// 20.2.2.28 Math.sign(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {sign: require('./_math-sign')});
+},{"./_export":30,"./_math-sign":59}],159:[function(require,module,exports){
+// 20.2.2.30 Math.sinh(x)
+var $export = require('./_export')
+ , expm1 = require('./_math-expm1')
+ , exp = Math.exp;
+
+// V8 near Chromium 38 has a problem with very small numbers
+$export($export.S + $export.F * require('./_fails')(function(){
+ return !Math.sinh(-2e-17) != -2e-17;
+}), 'Math', {
+ sinh: function sinh(x){
+ return Math.abs(x = +x) < 1
+ ? (expm1(x) - expm1(-x)) / 2
+ : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
+ }
+});
+},{"./_export":30,"./_fails":32,"./_math-expm1":57}],160:[function(require,module,exports){
+// 20.2.2.33 Math.tanh(x)
+var $export = require('./_export')
+ , expm1 = require('./_math-expm1')
+ , exp = Math.exp;
+
+$export($export.S, 'Math', {
+ tanh: function tanh(x){
+ var a = expm1(x = +x)
+ , b = expm1(-x);
+ return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
+ }
+});
+},{"./_export":30,"./_math-expm1":57}],161:[function(require,module,exports){
+// 20.2.2.34 Math.trunc(x)
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ trunc: function trunc(it){
+ return (it > 0 ? Math.floor : Math.ceil)(it);
+ }
+});
+},{"./_export":30}],162:[function(require,module,exports){
+'use strict';
+var global = require('./_global')
+ , has = require('./_has')
+ , cof = require('./_cof')
+ , inheritIfRequired = require('./_inherit-if-required')
+ , toPrimitive = require('./_to-primitive')
+ , fails = require('./_fails')
+ , gOPN = require('./_object-gopn').f
+ , gOPD = require('./_object-gopd').f
+ , dP = require('./_object-dp').f
+ , $trim = require('./_string-trim').trim
+ , NUMBER = 'Number'
+ , $Number = global[NUMBER]
+ , Base = $Number
+ , proto = $Number.prototype
+ // Opera ~12 has broken Object#toString
+ , BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER
+ , TRIM = 'trim' in String.prototype;
+
+// 7.1.3 ToNumber(argument)
+var toNumber = function(argument){
+ var it = toPrimitive(argument, false);
+ if(typeof it == 'string' && it.length > 2){
+ it = TRIM ? it.trim() : $trim(it, 3);
+ var first = it.charCodeAt(0)
+ , third, radix, maxCode;
+ if(first === 43 || first === 45){
+ third = it.charCodeAt(2);
+ if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix
+ } else if(first === 48){
+ switch(it.charCodeAt(1)){
+ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
+ case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
+ default : return +it;
+ }
+ for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){
+ code = digits.charCodeAt(i);
+ // parseInt parses a string to a first unavailable symbol
+ // but ToNumber should return NaN if a string contains unavailable symbols
+ if(code < 48 || code > maxCode)return NaN;
+ } return parseInt(digits, radix);
+ }
+ } return +it;
+};
+
+if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
+ $Number = function Number(value){
+ var it = arguments.length < 1 ? 0 : value
+ , that = this;
+ return that instanceof $Number
+ // check on 1..constructor(foo) case
+ && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
+ ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
+ };
+ for(var keys = require('./_descriptors') ? gOPN(Base) : (
+ // ES3:
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+ // ES6 (in case, if modules with ES6 Number statics required before):
+ 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ ).split(','), j = 0, key; keys.length > j; j++){
+ if(has(Base, key = keys[j]) && !has($Number, key)){
+ dP($Number, key, gOPD(Base, key));
+ }
+ }
+ $Number.prototype = proto;
+ proto.constructor = $Number;
+ require('./_redefine')(global, NUMBER, $Number);
+}
+},{"./_cof":18,"./_descriptors":26,"./_fails":32,"./_global":36,"./_has":37,"./_inherit-if-required":41,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_redefine":84,"./_string-trim":99,"./_to-primitive":107}],163:[function(require,module,exports){
+// 20.1.2.1 Number.EPSILON
+var $export = require('./_export');
+
+$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
+},{"./_export":30}],164:[function(require,module,exports){
+// 20.1.2.2 Number.isFinite(number)
+var $export = require('./_export')
+ , _isFinite = require('./_global').isFinite;
+
+$export($export.S, 'Number', {
+ isFinite: function isFinite(it){
+ return typeof it == 'number' && _isFinite(it);
+ }
+});
+},{"./_export":30,"./_global":36}],165:[function(require,module,exports){
+// 20.1.2.3 Number.isInteger(number)
+var $export = require('./_export');
+
+$export($export.S, 'Number', {isInteger: require('./_is-integer')});
+},{"./_export":30,"./_is-integer":46}],166:[function(require,module,exports){
+// 20.1.2.4 Number.isNaN(number)
+var $export = require('./_export');
+
+$export($export.S, 'Number', {
+ isNaN: function isNaN(number){
+ return number != number;
+ }
+});
+},{"./_export":30}],167:[function(require,module,exports){
+// 20.1.2.5 Number.isSafeInteger(number)
+var $export = require('./_export')
+ , isInteger = require('./_is-integer')
+ , abs = Math.abs;
+
+$export($export.S, 'Number', {
+ isSafeInteger: function isSafeInteger(number){
+ return isInteger(number) && abs(number) <= 0x1fffffffffffff;
+ }
+});
+},{"./_export":30,"./_is-integer":46}],168:[function(require,module,exports){
+// 20.1.2.6 Number.MAX_SAFE_INTEGER
+var $export = require('./_export');
+
+$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
+},{"./_export":30}],169:[function(require,module,exports){
+// 20.1.2.10 Number.MIN_SAFE_INTEGER
+var $export = require('./_export');
+
+$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
+},{"./_export":30}],170:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 20.1.2.12 Number.parseFloat(string)
+$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});
+},{"./_export":30,"./_parse-float":78}],171:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 20.1.2.13 Number.parseInt(string, radix)
+$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});
+},{"./_export":30,"./_parse-int":79}],172:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , anInstance = require('./_an-instance')
+ , toInteger = require('./_to-integer')
+ , aNumberValue = require('./_a-number-value')
+ , repeat = require('./_string-repeat')
+ , $toFixed = 1..toFixed
+ , floor = Math.floor
+ , data = [0, 0, 0, 0, 0, 0]
+ , ERROR = 'Number.toFixed: incorrect invocation!'
+ , ZERO = '0';
+
+var multiply = function(n, c){
+ var i = -1
+ , c2 = c;
+ while(++i < 6){
+ c2 += n * data[i];
+ data[i] = c2 % 1e7;
+ c2 = floor(c2 / 1e7);
+ }
+};
+var divide = function(n){
+ var i = 6
+ , c = 0;
+ while(--i >= 0){
+ c += data[i];
+ data[i] = floor(c / n);
+ c = (c % n) * 1e7;
+ }
+};
+var numToString = function(){
+ var i = 6
+ , s = '';
+ while(--i >= 0){
+ if(s !== '' || i === 0 || data[i] !== 0){
+ var t = String(data[i]);
+ s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
+ }
+ } return s;
+};
+var pow = function(x, n, acc){
+ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
+};
+var log = function(x){
+ var n = 0
+ , x2 = x;
+ while(x2 >= 4096){
+ n += 12;
+ x2 /= 4096;
+ }
+ while(x2 >= 2){
+ n += 1;
+ x2 /= 2;
+ } return n;
+};
+
+$export($export.P + $export.F * (!!$toFixed && (
+ 0.00008.toFixed(3) !== '0.000' ||
+ 0.9.toFixed(0) !== '1' ||
+ 1.255.toFixed(2) !== '1.25' ||
+ 1000000000000000128..toFixed(0) !== '1000000000000000128'
+) || !require('./_fails')(function(){
+ // V8 ~ Android 4.3-
+ $toFixed.call({});
+})), 'Number', {
+ toFixed: function toFixed(fractionDigits){
+ var x = aNumberValue(this, ERROR)
+ , f = toInteger(fractionDigits)
+ , s = ''
+ , m = ZERO
+ , e, z, j, k;
+ if(f < 0 || f > 20)throw RangeError(ERROR);
+ if(x != x)return 'NaN';
+ if(x <= -1e21 || x >= 1e21)return String(x);
+ if(x < 0){
+ s = '-';
+ x = -x;
+ }
+ if(x > 1e-21){
+ e = log(x * pow(2, 69, 1)) - 69;
+ z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
+ z *= 0x10000000000000;
+ e = 52 - e;
+ if(e > 0){
+ multiply(0, z);
+ j = f;
+ while(j >= 7){
+ multiply(1e7, 0);
+ j -= 7;
+ }
+ multiply(pow(10, j, 1), 0);
+ j = e - 1;
+ while(j >= 23){
+ divide(1 << 23);
+ j -= 23;
+ }
+ divide(1 << j);
+ multiply(1, 1);
+ divide(2);
+ m = numToString();
+ } else {
+ multiply(0, z);
+ multiply(1 << -e, 0);
+ m = numToString() + repeat.call(ZERO, f);
+ }
+ }
+ if(f > 0){
+ k = m.length;
+ m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
+ } else {
+ m = s + m;
+ } return m;
+ }
+});
+},{"./_a-number-value":5,"./_an-instance":7,"./_export":30,"./_fails":32,"./_string-repeat":98,"./_to-integer":103}],173:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $fails = require('./_fails')
+ , aNumberValue = require('./_a-number-value')
+ , $toPrecision = 1..toPrecision;
+
+$export($export.P + $export.F * ($fails(function(){
+ // IE7-
+ return $toPrecision.call(1, undefined) !== '1';
+}) || !$fails(function(){
+ // V8 ~ Android 4.3-
+ $toPrecision.call({});
+})), 'Number', {
+ toPrecision: function toPrecision(precision){
+ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
+ return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
+ }
+});
+},{"./_a-number-value":5,"./_export":30,"./_fails":32}],174:[function(require,module,exports){
+// 19.1.3.1 Object.assign(target, source)
+var $export = require('./_export');
+
+$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});
+},{"./_export":30,"./_object-assign":63}],175:[function(require,module,exports){
+var $export = require('./_export')
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+$export($export.S, 'Object', {create: require('./_object-create')});
+},{"./_export":30,"./_object-create":64}],176:[function(require,module,exports){
+var $export = require('./_export');
+// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')});
+},{"./_descriptors":26,"./_export":30,"./_object-dps":66}],177:[function(require,module,exports){
+var $export = require('./_export');
+// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});
+},{"./_descriptors":26,"./_export":30,"./_object-dp":65}],178:[function(require,module,exports){
+// 19.1.2.5 Object.freeze(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('freeze', function($freeze){
+ return function freeze(it){
+ return $freeze && isObject(it) ? $freeze(meta(it)) : it;
+ };
+});
+},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],179:[function(require,module,exports){
+// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+var toIObject = require('./_to-iobject')
+ , $getOwnPropertyDescriptor = require('./_object-gopd').f;
+
+require('./_object-sap')('getOwnPropertyDescriptor', function(){
+ return function getOwnPropertyDescriptor(it, key){
+ return $getOwnPropertyDescriptor(toIObject(it), key);
+ };
+});
+},{"./_object-gopd":67,"./_object-sap":75,"./_to-iobject":104}],180:[function(require,module,exports){
+// 19.1.2.7 Object.getOwnPropertyNames(O)
+require('./_object-sap')('getOwnPropertyNames', function(){
+ return require('./_object-gopn-ext').f;
+});
+},{"./_object-gopn-ext":68,"./_object-sap":75}],181:[function(require,module,exports){
+// 19.1.2.9 Object.getPrototypeOf(O)
+var toObject = require('./_to-object')
+ , $getPrototypeOf = require('./_object-gpo');
+
+require('./_object-sap')('getPrototypeOf', function(){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+});
+},{"./_object-gpo":71,"./_object-sap":75,"./_to-object":106}],182:[function(require,module,exports){
+// 19.1.2.11 Object.isExtensible(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isExtensible', function($isExtensible){
+ return function isExtensible(it){
+ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
+ };
+});
+},{"./_is-object":47,"./_object-sap":75}],183:[function(require,module,exports){
+// 19.1.2.12 Object.isFrozen(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isFrozen', function($isFrozen){
+ return function isFrozen(it){
+ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
+ };
+});
+},{"./_is-object":47,"./_object-sap":75}],184:[function(require,module,exports){
+// 19.1.2.13 Object.isSealed(O)
+var isObject = require('./_is-object');
+
+require('./_object-sap')('isSealed', function($isSealed){
+ return function isSealed(it){
+ return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
+ };
+});
+},{"./_is-object":47,"./_object-sap":75}],185:[function(require,module,exports){
+// 19.1.3.10 Object.is(value1, value2)
+var $export = require('./_export');
+$export($export.S, 'Object', {is: require('./_same-value')});
+},{"./_export":30,"./_same-value":86}],186:[function(require,module,exports){
+// 19.1.2.14 Object.keys(O)
+var toObject = require('./_to-object')
+ , $keys = require('./_object-keys');
+
+require('./_object-sap')('keys', function(){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+});
+},{"./_object-keys":73,"./_object-sap":75,"./_to-object":106}],187:[function(require,module,exports){
+// 19.1.2.15 Object.preventExtensions(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('preventExtensions', function($preventExtensions){
+ return function preventExtensions(it){
+ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
+ };
+});
+},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],188:[function(require,module,exports){
+// 19.1.2.17 Object.seal(O)
+var isObject = require('./_is-object')
+ , meta = require('./_meta').onFreeze;
+
+require('./_object-sap')('seal', function($seal){
+ return function seal(it){
+ return $seal && isObject(it) ? $seal(meta(it)) : it;
+ };
+});
+},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],189:[function(require,module,exports){
+// 19.1.3.19 Object.setPrototypeOf(O, proto)
+var $export = require('./_export');
+$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});
+},{"./_export":30,"./_set-proto":87}],190:[function(require,module,exports){
+'use strict';
+// 19.1.3.6 Object.prototype.toString()
+var classof = require('./_classof')
+ , test = {};
+test[require('./_wks')('toStringTag')] = 'z';
+if(test + '' != '[object z]'){
+ require('./_redefine')(Object.prototype, 'toString', function toString(){
+ return '[object ' + classof(this) + ']';
+ }, true);
+}
+},{"./_classof":17,"./_redefine":84,"./_wks":112}],191:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 18.2.4 parseFloat(string)
+$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
+},{"./_export":30,"./_parse-float":78}],192:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 18.2.5 parseInt(string, radix)
+$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
+},{"./_export":30,"./_parse-int":79}],193:[function(require,module,exports){
+'use strict';
+var LIBRARY = require('./_library')
+ , global = require('./_global')
+ , ctx = require('./_ctx')
+ , classof = require('./_classof')
+ , $export = require('./_export')
+ , isObject = require('./_is-object')
+ , anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , anInstance = require('./_an-instance')
+ , forOf = require('./_for-of')
+ , setProto = require('./_set-proto').set
+ , speciesConstructor = require('./_species-constructor')
+ , task = require('./_task').set
+ , microtask = require('./_microtask')
+ , PROMISE = 'Promise'
+ , TypeError = global.TypeError
+ , process = global.process
+ , $Promise = global[PROMISE]
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , empty = function(){ /* empty */ }
+ , Internal, GenericPromiseCapability, Wrapper;
+
+var USE_NATIVE = !!function(){
+ try {
+ // correct subclassing with @@species support
+ var promise = $Promise.resolve(1)
+ , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); };
+ // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
+ return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
+ } catch(e){ /* empty */ }
+}();
+
+// helpers
+var sameConstructor = function(a, b){
+ // with library wrapper special case
+ return a === b || a === $Promise && b === Wrapper;
+};
+var isThenable = function(it){
+ var then;
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+};
+var newPromiseCapability = function(C){
+ return sameConstructor($Promise, C)
+ ? new PromiseCapability(C)
+ : new GenericPromiseCapability(C);
+};
+var PromiseCapability = GenericPromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+};
+var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+};
+var notify = function(promise, isReject){
+ if(promise._n)return;
+ promise._n = true;
+ var chain = promise._c;
+ microtask(function(){
+ var value = promise._v
+ , ok = promise._s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , domain = reaction.domain
+ , result, then;
+ try {
+ if(handler){
+ if(!ok){
+ if(promise._h == 2)onHandleUnhandled(promise);
+ promise._h = 1;
+ }
+ if(handler === true)result = value;
+ else {
+ if(domain)domain.enter();
+ result = handler(value);
+ if(domain)domain.exit();
+ }
+ if(result === reaction.promise){
+ reject(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(result)){
+ then.call(result, resolve, reject);
+ } else resolve(result);
+ } else reject(value);
+ } catch(e){
+ reject(e);
+ }
+ };
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
+ promise._c = [];
+ promise._n = false;
+ if(isReject && !promise._h)onUnhandled(promise);
+ });
+};
+var onUnhandled = function(promise){
+ task.call(global, function(){
+ var value = promise._v
+ , abrupt, handler, console;
+ if(isUnhandled(promise)){
+ abrupt = perform(function(){
+ if(isNode){
+ process.emit('unhandledRejection', value, promise);
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
+ console.error('Unhandled promise rejection', value);
+ }
+ });
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
+ promise._h = isNode || isUnhandled(promise) ? 2 : 1;
+ } promise._a = undefined;
+ if(abrupt)throw abrupt.error;
+ });
+};
+var isUnhandled = function(promise){
+ if(promise._h == 1)return false;
+ var chain = promise._a || promise._c
+ , i = 0
+ , reaction;
+ while(chain.length > i){
+ reaction = chain[i++];
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
+ } return true;
+};
+var onHandleUnhandled = function(promise){
+ task.call(global, function(){
+ var handler;
+ if(isNode){
+ process.emit('rejectionHandled', promise);
+ } else if(handler = global.onrejectionhandled){
+ handler({promise: promise, reason: promise._v});
+ }
+ });
+};
+var $reject = function(value){
+ var promise = this;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ promise._v = value;
+ promise._s = 2;
+ if(!promise._a)promise._a = promise._c.slice();
+ notify(promise, true);
+};
+var $resolve = function(value){
+ var promise = this
+ , then;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ try {
+ if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ microtask(function(){
+ var wrapper = {_w: promise, _d: false}; // wrap
+ try {
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } catch(e){
+ $reject.call(wrapper, e);
+ }
+ });
+ } else {
+ promise._v = value;
+ promise._s = 1;
+ notify(promise, false);
+ }
+ } catch(e){
+ $reject.call({_w: promise, _d: false}, e); // wrap
+ }
+};
+
+// constructor polyfill
+if(!USE_NATIVE){
+ // 25.4.3.1 Promise(executor)
+ $Promise = function Promise(executor){
+ anInstance(this, $Promise, PROMISE, '_h');
+ aFunction(executor);
+ Internal.call(this);
+ try {
+ executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ } catch(err){
+ $reject.call(this, err);
+ }
+ };
+ Internal = function Promise(executor){
+ this._c = []; // <- awaiting reactions
+ this._a = undefined; // <- checked in isUnhandled reactions
+ this._s = 0; // <- state
+ this._d = false; // <- done
+ this._v = undefined; // <- value
+ this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
+ this._n = false; // <- notify
+ };
+ Internal.prototype = require('./_redefine-all')($Promise.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ reaction.domain = isNode ? process.domain : undefined;
+ this._c.push(reaction);
+ if(this._a)this._a.push(reaction);
+ if(this._s)notify(this, false);
+ return reaction.promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+ PromiseCapability = function(){
+ var promise = new Internal;
+ this.promise = promise;
+ this.resolve = ctx($resolve, promise, 1);
+ this.reject = ctx($reject, promise, 1);
+ };
+}
+
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
+require('./_set-to-string-tag')($Promise, PROMISE);
+require('./_set-species')(PROMISE);
+Wrapper = require('./_core')[PROMISE];
+
+// statics
+$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ var capability = newPromiseCapability(this)
+ , $$reject = capability.reject;
+ $$reject(r);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ // instanceof instead of internal slot check because we should fix it without replacement native Promise core
+ if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
+ var capability = newPromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){
+ $Promise.all(iter)['catch'](empty);
+})), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ var values = []
+ , index = 0
+ , remaining = 1;
+ forOf(iterable, false, function(promise){
+ var $index = index++
+ , alreadyCalled = false;
+ values.push(undefined);
+ remaining++;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
+ values[$index] = value;
+ --remaining || resolve(values);
+ }, reject);
+ });
+ --remaining || resolve(values);
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(capability.resolve, reject);
+ });
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ }
+});
+},{"./_a-function":4,"./_an-instance":7,"./_an-object":8,"./_classof":17,"./_core":23,"./_ctx":24,"./_export":30,"./_for-of":35,"./_global":36,"./_is-object":47,"./_iter-detect":52,"./_library":56,"./_microtask":62,"./_redefine-all":83,"./_set-proto":87,"./_set-species":88,"./_set-to-string-tag":89,"./_species-constructor":92,"./_task":101,"./_wks":112}],194:[function(require,module,exports){
+// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
+var $export = require('./_export')
+ , _apply = Function.apply;
+
+$export($export.S, 'Reflect', {
+ apply: function apply(target, thisArgument, argumentsList){
+ return _apply.call(target, thisArgument, argumentsList);
+ }
+});
+},{"./_export":30}],195:[function(require,module,exports){
+// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
+var $export = require('./_export')
+ , create = require('./_object-create')
+ , aFunction = require('./_a-function')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , bind = require('./_bind');
+
+// MS Edge supports only 2 arguments
+// FF Nightly sets third argument as `new.target`, but does not create `this` from it
+$export($export.S + $export.F * require('./_fails')(function(){
+ function F(){}
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), 'Reflect', {
+ construct: function construct(Target, args /*, newTarget*/){
+ aFunction(Target);
+ var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
+ if(Target == newTarget){
+ // w/o altered newTarget, optimization for 0-4 arguments
+ if(args != undefined)switch(anObject(args).length){
+ case 0: return new Target;
+ case 1: return new Target(args[0]);
+ case 2: return new Target(args[0], args[1]);
+ case 3: return new Target(args[0], args[1], args[2]);
+ case 4: return new Target(args[0], args[1], args[2], args[3]);
+ }
+ // w/o altered newTarget, lot of arguments case
+ var $args = [null];
+ $args.push.apply($args, args);
+ return new (bind.apply(Target, $args));
+ }
+ // with altered newTarget, not support built-in constructors
+ var proto = newTarget.prototype
+ , instance = create(isObject(proto) ? proto : Object.prototype)
+ , result = Function.apply.call(Target, instance, args);
+ return isObject(result) ? result : instance;
+ }
+});
+},{"./_a-function":4,"./_an-object":8,"./_bind":16,"./_export":30,"./_fails":32,"./_is-object":47,"./_object-create":64}],196:[function(require,module,exports){
+// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
+var dP = require('./_object-dp')
+ , $export = require('./_export')
+ , anObject = require('./_an-object')
+ , toPrimitive = require('./_to-primitive');
+
+// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
+$export($export.S + $export.F * require('./_fails')(function(){
+ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2});
+}), 'Reflect', {
+ defineProperty: function defineProperty(target, propertyKey, attributes){
+ anObject(target);
+ propertyKey = toPrimitive(propertyKey, true);
+ anObject(attributes);
+ try {
+ dP.f(target, propertyKey, attributes);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_an-object":8,"./_export":30,"./_fails":32,"./_object-dp":65,"./_to-primitive":107}],197:[function(require,module,exports){
+// 26.1.4 Reflect.deleteProperty(target, propertyKey)
+var $export = require('./_export')
+ , gOPD = require('./_object-gopd').f
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ deleteProperty: function deleteProperty(target, propertyKey){
+ var desc = gOPD(anObject(target), propertyKey);
+ return desc && !desc.configurable ? false : delete target[propertyKey];
+ }
+});
+},{"./_an-object":8,"./_export":30,"./_object-gopd":67}],198:[function(require,module,exports){
+'use strict';
+// 26.1.5 Reflect.enumerate(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object');
+var Enumerate = function(iterated){
+ this._t = anObject(iterated); // target
+ this._i = 0; // next index
+ var keys = this._k = [] // keys
+ , key;
+ for(key in iterated)keys.push(key);
+};
+require('./_iter-create')(Enumerate, 'Object', function(){
+ var that = this
+ , keys = that._k
+ , key;
+ do {
+ if(that._i >= keys.length)return {value: undefined, done: true};
+ } while(!((key = keys[that._i++]) in that._t));
+ return {value: key, done: false};
+});
+
+$export($export.S, 'Reflect', {
+ enumerate: function enumerate(target){
+ return new Enumerate(target);
+ }
+});
+},{"./_an-object":8,"./_export":30,"./_iter-create":50}],199:[function(require,module,exports){
+// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
+var gOPD = require('./_object-gopd')
+ , $export = require('./_export')
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
+ return gOPD.f(anObject(target), propertyKey);
+ }
+});
+},{"./_an-object":8,"./_export":30,"./_object-gopd":67}],200:[function(require,module,exports){
+// 26.1.8 Reflect.getPrototypeOf(target)
+var $export = require('./_export')
+ , getProto = require('./_object-gpo')
+ , anObject = require('./_an-object');
+
+$export($export.S, 'Reflect', {
+ getPrototypeOf: function getPrototypeOf(target){
+ return getProto(anObject(target));
+ }
+});
+},{"./_an-object":8,"./_export":30,"./_object-gpo":71}],201:[function(require,module,exports){
+// 26.1.6 Reflect.get(target, propertyKey [, receiver])
+var gOPD = require('./_object-gopd')
+ , getPrototypeOf = require('./_object-gpo')
+ , has = require('./_has')
+ , $export = require('./_export')
+ , isObject = require('./_is-object')
+ , anObject = require('./_an-object');
+
+function get(target, propertyKey/*, receiver*/){
+ var receiver = arguments.length < 3 ? target : arguments[2]
+ , desc, proto;
+ if(anObject(target) === receiver)return target[propertyKey];
+ if(desc = gOPD.f(target, propertyKey))return has(desc, 'value')
+ ? desc.value
+ : desc.get !== undefined
+ ? desc.get.call(receiver)
+ : undefined;
+ if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver);
+}
+
+$export($export.S, 'Reflect', {get: get});
+},{"./_an-object":8,"./_export":30,"./_has":37,"./_is-object":47,"./_object-gopd":67,"./_object-gpo":71}],202:[function(require,module,exports){
+// 26.1.9 Reflect.has(target, propertyKey)
+var $export = require('./_export');
+
+$export($export.S, 'Reflect', {
+ has: function has(target, propertyKey){
+ return propertyKey in target;
+ }
+});
+},{"./_export":30}],203:[function(require,module,exports){
+// 26.1.10 Reflect.isExtensible(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object')
+ , $isExtensible = Object.isExtensible;
+
+$export($export.S, 'Reflect', {
+ isExtensible: function isExtensible(target){
+ anObject(target);
+ return $isExtensible ? $isExtensible(target) : true;
+ }
+});
+},{"./_an-object":8,"./_export":30}],204:[function(require,module,exports){
+// 26.1.11 Reflect.ownKeys(target)
+var $export = require('./_export');
+
+$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});
+},{"./_export":30,"./_own-keys":77}],205:[function(require,module,exports){
+// 26.1.12 Reflect.preventExtensions(target)
+var $export = require('./_export')
+ , anObject = require('./_an-object')
+ , $preventExtensions = Object.preventExtensions;
+
+$export($export.S, 'Reflect', {
+ preventExtensions: function preventExtensions(target){
+ anObject(target);
+ try {
+ if($preventExtensions)$preventExtensions(target);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_an-object":8,"./_export":30}],206:[function(require,module,exports){
+// 26.1.14 Reflect.setPrototypeOf(target, proto)
+var $export = require('./_export')
+ , setProto = require('./_set-proto');
+
+if(setProto)$export($export.S, 'Reflect', {
+ setPrototypeOf: function setPrototypeOf(target, proto){
+ setProto.check(target, proto);
+ try {
+ setProto.set(target, proto);
+ return true;
+ } catch(e){
+ return false;
+ }
+ }
+});
+},{"./_export":30,"./_set-proto":87}],207:[function(require,module,exports){
+// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
+var dP = require('./_object-dp')
+ , gOPD = require('./_object-gopd')
+ , getPrototypeOf = require('./_object-gpo')
+ , has = require('./_has')
+ , $export = require('./_export')
+ , createDesc = require('./_property-desc')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object');
+
+function set(target, propertyKey, V/*, receiver*/){
+ var receiver = arguments.length < 4 ? target : arguments[3]
+ , ownDesc = gOPD.f(anObject(target), propertyKey)
+ , existingDescriptor, proto;
+ if(!ownDesc){
+ if(isObject(proto = getPrototypeOf(target))){
+ return set(proto, propertyKey, V, receiver);
+ }
+ ownDesc = createDesc(0);
+ }
+ if(has(ownDesc, 'value')){
+ if(ownDesc.writable === false || !isObject(receiver))return false;
+ existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
+ existingDescriptor.value = V;
+ dP.f(receiver, propertyKey, existingDescriptor);
+ return true;
+ }
+ return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
+}
+
+$export($export.S, 'Reflect', {set: set});
+},{"./_an-object":8,"./_export":30,"./_has":37,"./_is-object":47,"./_object-dp":65,"./_object-gopd":67,"./_object-gpo":71,"./_property-desc":82}],208:[function(require,module,exports){
+var global = require('./_global')
+ , inheritIfRequired = require('./_inherit-if-required')
+ , dP = require('./_object-dp').f
+ , gOPN = require('./_object-gopn').f
+ , isRegExp = require('./_is-regexp')
+ , $flags = require('./_flags')
+ , $RegExp = global.RegExp
+ , Base = $RegExp
+ , proto = $RegExp.prototype
+ , re1 = /a/g
+ , re2 = /a/g
+ // "new" creates a new object, old webkit buggy here
+ , CORRECT_NEW = new $RegExp(re1) !== re1;
+
+if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){
+ re2[require('./_wks')('match')] = false;
+ // RegExp constructor can alter flags and IsRegExp works correct with @@match
+ return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
+}))){
+ $RegExp = function RegExp(p, f){
+ var tiRE = this instanceof $RegExp
+ , piRE = isRegExp(p)
+ , fiU = f === undefined;
+ return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
+ : inheritIfRequired(CORRECT_NEW
+ ? new Base(piRE && !fiU ? p.source : p, f)
+ : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
+ , tiRE ? this : proto, $RegExp);
+ };
+ var proxy = function(key){
+ key in $RegExp || dP($RegExp, key, {
+ configurable: true,
+ get: function(){ return Base[key]; },
+ set: function(it){ Base[key] = it; }
+ });
+ };
+ for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]);
+ proto.constructor = $RegExp;
+ $RegExp.prototype = proto;
+ require('./_redefine')(global, 'RegExp', $RegExp);
+}
+
+require('./_set-species')('RegExp');
+},{"./_descriptors":26,"./_fails":32,"./_flags":34,"./_global":36,"./_inherit-if-required":41,"./_is-regexp":48,"./_object-dp":65,"./_object-gopn":69,"./_redefine":84,"./_set-species":88,"./_wks":112}],209:[function(require,module,exports){
+// 21.2.5.3 get RegExp.prototype.flags()
+if(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', {
+ configurable: true,
+ get: require('./_flags')
+});
+},{"./_descriptors":26,"./_flags":34,"./_object-dp":65}],210:[function(require,module,exports){
+// @@match logic
+require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
+ // 21.1.3.11 String.prototype.match(regexp)
+ return [function match(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[MATCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
+ }, $match];
+});
+},{"./_fix-re-wks":33}],211:[function(require,module,exports){
+// @@replace logic
+require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
+ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
+ return [function replace(searchValue, replaceValue){
+ 'use strict';
+ var O = defined(this)
+ , fn = searchValue == undefined ? undefined : searchValue[REPLACE];
+ return fn !== undefined
+ ? fn.call(searchValue, O, replaceValue)
+ : $replace.call(String(O), searchValue, replaceValue);
+ }, $replace];
+});
+},{"./_fix-re-wks":33}],212:[function(require,module,exports){
+// @@search logic
+require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
+ // 21.1.3.15 String.prototype.search(regexp)
+ return [function search(regexp){
+ 'use strict';
+ var O = defined(this)
+ , fn = regexp == undefined ? undefined : regexp[SEARCH];
+ return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
+ }, $search];
+});
+},{"./_fix-re-wks":33}],213:[function(require,module,exports){
+// @@split logic
+require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
+ 'use strict';
+ var isRegExp = require('./_is-regexp')
+ , _split = $split
+ , $push = [].push
+ , $SPLIT = 'split'
+ , LENGTH = 'length'
+ , LAST_INDEX = 'lastIndex';
+ if(
+ 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
+ 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
+ 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
+ '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
+ '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
+ ''[$SPLIT](/.?/)[LENGTH]
+ ){
+ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
+ // based on es5-shim implementation, need to rework it
+ $split = function(separator, limit){
+ var string = String(this);
+ if(separator === undefined && limit === 0)return [];
+ // If `separator` is not a regex, use native split
+ if(!isRegExp(separator))return _split.call(string, separator, limit);
+ var output = [];
+ var flags = (separator.ignoreCase ? 'i' : '') +
+ (separator.multiline ? 'm' : '') +
+ (separator.unicode ? 'u' : '') +
+ (separator.sticky ? 'y' : '');
+ var lastLastIndex = 0;
+ var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
+ // Make `global` and avoid `lastIndex` issues by working with a copy
+ var separatorCopy = new RegExp(separator.source, flags + 'g');
+ var separator2, match, lastIndex, lastLength, i;
+ // Doesn't need flags gy, but they don't hurt
+ if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
+ while(match = separatorCopy.exec(string)){
+ // `separatorCopy.lastIndex` is not reliable cross-browser
+ lastIndex = match.index + match[0][LENGTH];
+ if(lastIndex > lastLastIndex){
+ output.push(string.slice(lastLastIndex, match.index));
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
+ if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){
+ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined;
+ });
+ if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1));
+ lastLength = match[0][LENGTH];
+ lastLastIndex = lastIndex;
+ if(output[LENGTH] >= splitLimit)break;
+ }
+ if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
+ }
+ if(lastLastIndex === string[LENGTH]){
+ if(lastLength || !separatorCopy.test(''))output.push('');
+ } else output.push(string.slice(lastLastIndex));
+ return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
+ };
+ // Chakra, V8
+ } else if('0'[$SPLIT](undefined, 0)[LENGTH]){
+ $split = function(separator, limit){
+ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
+ };
+ }
+ // 21.1.3.17 String.prototype.split(separator, limit)
+ return [function split(separator, limit){
+ var O = defined(this)
+ , fn = separator == undefined ? undefined : separator[SPLIT];
+ return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
+ }, $split];
+});
+},{"./_fix-re-wks":33,"./_is-regexp":48}],214:[function(require,module,exports){
+'use strict';
+require('./es6.regexp.flags');
+var anObject = require('./_an-object')
+ , $flags = require('./_flags')
+ , DESCRIPTORS = require('./_descriptors')
+ , TO_STRING = 'toString'
+ , $toString = /./[TO_STRING];
+
+var define = function(fn){
+ require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);
+};
+
+// 21.2.5.14 RegExp.prototype.toString()
+if(require('./_fails')(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){
+ define(function toString(){
+ var R = anObject(this);
+ return '/'.concat(R.source, '/',
+ 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
+ });
+// FF44- RegExp#toString has a wrong name
+} else if($toString.name != TO_STRING){
+ define(function toString(){
+ return $toString.call(this);
+ });
+}
+},{"./_an-object":8,"./_descriptors":26,"./_fails":32,"./_flags":34,"./_redefine":84,"./es6.regexp.flags":209}],215:[function(require,module,exports){
+'use strict';
+var strong = require('./_collection-strong');
+
+// 23.2 Set Objects
+module.exports = require('./_collection')('Set', function(get){
+ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value){
+ return strong.def(this, value = value === 0 ? 0 : value, value);
+ }
+}, strong);
+},{"./_collection":22,"./_collection-strong":19}],216:[function(require,module,exports){
+'use strict';
+// B.2.3.2 String.prototype.anchor(name)
+require('./_string-html')('anchor', function(createHTML){
+ return function anchor(name){
+ return createHTML(this, 'a', 'name', name);
+ }
+});
+},{"./_string-html":96}],217:[function(require,module,exports){
+'use strict';
+// B.2.3.3 String.prototype.big()
+require('./_string-html')('big', function(createHTML){
+ return function big(){
+ return createHTML(this, 'big', '', '');
+ }
+});
+},{"./_string-html":96}],218:[function(require,module,exports){
+'use strict';
+// B.2.3.4 String.prototype.blink()
+require('./_string-html')('blink', function(createHTML){
+ return function blink(){
+ return createHTML(this, 'blink', '', '');
+ }
+});
+},{"./_string-html":96}],219:[function(require,module,exports){
+'use strict';
+// B.2.3.5 String.prototype.bold()
+require('./_string-html')('bold', function(createHTML){
+ return function bold(){
+ return createHTML(this, 'b', '', '');
+ }
+});
+},{"./_string-html":96}],220:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $at = require('./_string-at')(false);
+$export($export.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: function codePointAt(pos){
+ return $at(this, pos);
+ }
+});
+},{"./_export":30,"./_string-at":94}],221:[function(require,module,exports){
+// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
+'use strict';
+var $export = require('./_export')
+ , toLength = require('./_to-length')
+ , context = require('./_string-context')
+ , ENDS_WITH = 'endsWith'
+ , $endsWith = ''[ENDS_WITH];
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', {
+ endsWith: function endsWith(searchString /*, endPosition = @length */){
+ var that = context(this, searchString, ENDS_WITH)
+ , endPosition = arguments.length > 1 ? arguments[1] : undefined
+ , len = toLength(that.length)
+ , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
+ , search = String(searchString);
+ return $endsWith
+ ? $endsWith.call(that, search, end)
+ : that.slice(end - search.length, end) === search;
+ }
+});
+},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95,"./_to-length":105}],222:[function(require,module,exports){
+'use strict';
+// B.2.3.6 String.prototype.fixed()
+require('./_string-html')('fixed', function(createHTML){
+ return function fixed(){
+ return createHTML(this, 'tt', '', '');
+ }
+});
+},{"./_string-html":96}],223:[function(require,module,exports){
+'use strict';
+// B.2.3.7 String.prototype.fontcolor(color)
+require('./_string-html')('fontcolor', function(createHTML){
+ return function fontcolor(color){
+ return createHTML(this, 'font', 'color', color);
+ }
+});
+},{"./_string-html":96}],224:[function(require,module,exports){
+'use strict';
+// B.2.3.8 String.prototype.fontsize(size)
+require('./_string-html')('fontsize', function(createHTML){
+ return function fontsize(size){
+ return createHTML(this, 'font', 'size', size);
+ }
+});
+},{"./_string-html":96}],225:[function(require,module,exports){
+var $export = require('./_export')
+ , toIndex = require('./_to-index')
+ , fromCharCode = String.fromCharCode
+ , $fromCodePoint = String.fromCodePoint;
+
+// length should be 1, old FF problem
+$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
+ var res = []
+ , aLen = arguments.length
+ , i = 0
+ , code;
+ while(aLen > i){
+ code = +arguments[i++];
+ if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+});
+},{"./_export":30,"./_to-index":102}],226:[function(require,module,exports){
+// 21.1.3.7 String.prototype.includes(searchString, position = 0)
+'use strict';
+var $export = require('./_export')
+ , context = require('./_string-context')
+ , INCLUDES = 'includes';
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
+ includes: function includes(searchString /*, position = 0 */){
+ return !!~context(this, searchString, INCLUDES)
+ .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95}],227:[function(require,module,exports){
+'use strict';
+// B.2.3.9 String.prototype.italics()
+require('./_string-html')('italics', function(createHTML){
+ return function italics(){
+ return createHTML(this, 'i', '', '');
+ }
+});
+},{"./_string-html":96}],228:[function(require,module,exports){
+'use strict';
+var $at = require('./_string-at')(true);
+
+// 21.1.3.27 String.prototype[@@iterator]()
+require('./_iter-define')(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+// 21.1.5.2.1 %StringIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+});
+},{"./_iter-define":51,"./_string-at":94}],229:[function(require,module,exports){
+'use strict';
+// B.2.3.10 String.prototype.link(url)
+require('./_string-html')('link', function(createHTML){
+ return function link(url){
+ return createHTML(this, 'a', 'href', url);
+ }
+});
+},{"./_string-html":96}],230:[function(require,module,exports){
+var $export = require('./_export')
+ , toIObject = require('./_to-iobject')
+ , toLength = require('./_to-length');
+
+$export($export.S, 'String', {
+ // 21.1.2.4 String.raw(callSite, ...substitutions)
+ raw: function raw(callSite){
+ var tpl = toIObject(callSite.raw)
+ , len = toLength(tpl.length)
+ , aLen = arguments.length
+ , res = []
+ , i = 0;
+ while(len > i){
+ res.push(String(tpl[i++]));
+ if(i < aLen)res.push(String(arguments[i]));
+ } return res.join('');
+ }
+});
+},{"./_export":30,"./_to-iobject":104,"./_to-length":105}],231:[function(require,module,exports){
+var $export = require('./_export');
+
+$export($export.P, 'String', {
+ // 21.1.3.13 String.prototype.repeat(count)
+ repeat: require('./_string-repeat')
+});
+},{"./_export":30,"./_string-repeat":98}],232:[function(require,module,exports){
+'use strict';
+// B.2.3.11 String.prototype.small()
+require('./_string-html')('small', function(createHTML){
+ return function small(){
+ return createHTML(this, 'small', '', '');
+ }
+});
+},{"./_string-html":96}],233:[function(require,module,exports){
+// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
+'use strict';
+var $export = require('./_export')
+ , toLength = require('./_to-length')
+ , context = require('./_string-context')
+ , STARTS_WITH = 'startsWith'
+ , $startsWith = ''[STARTS_WITH];
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', {
+ startsWith: function startsWith(searchString /*, position = 0 */){
+ var that = context(this, searchString, STARTS_WITH)
+ , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
+ , search = String(searchString);
+ return $startsWith
+ ? $startsWith.call(that, search, index)
+ : that.slice(index, index + search.length) === search;
+ }
+});
+},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95,"./_to-length":105}],234:[function(require,module,exports){
+'use strict';
+// B.2.3.12 String.prototype.strike()
+require('./_string-html')('strike', function(createHTML){
+ return function strike(){
+ return createHTML(this, 'strike', '', '');
+ }
+});
+},{"./_string-html":96}],235:[function(require,module,exports){
+'use strict';
+// B.2.3.13 String.prototype.sub()
+require('./_string-html')('sub', function(createHTML){
+ return function sub(){
+ return createHTML(this, 'sub', '', '');
+ }
+});
+},{"./_string-html":96}],236:[function(require,module,exports){
+'use strict';
+// B.2.3.14 String.prototype.sup()
+require('./_string-html')('sup', function(createHTML){
+ return function sup(){
+ return createHTML(this, 'sup', '', '');
+ }
+});
+},{"./_string-html":96}],237:[function(require,module,exports){
+'use strict';
+// 21.1.3.25 String.prototype.trim()
+require('./_string-trim')('trim', function($trim){
+ return function trim(){
+ return $trim(this, 3);
+ };
+});
+},{"./_string-trim":99}],238:[function(require,module,exports){
+'use strict';
+// ECMAScript 6 symbols shim
+var global = require('./_global')
+ , core = require('./_core')
+ , has = require('./_has')
+ , DESCRIPTORS = require('./_descriptors')
+ , $export = require('./_export')
+ , redefine = require('./_redefine')
+ , META = require('./_meta').KEY
+ , $fails = require('./_fails')
+ , shared = require('./_shared')
+ , setToStringTag = require('./_set-to-string-tag')
+ , uid = require('./_uid')
+ , wks = require('./_wks')
+ , keyOf = require('./_keyof')
+ , enumKeys = require('./_enum-keys')
+ , isArray = require('./_is-array')
+ , anObject = require('./_an-object')
+ , toIObject = require('./_to-iobject')
+ , toPrimitive = require('./_to-primitive')
+ , createDesc = require('./_property-desc')
+ , _create = require('./_object-create')
+ , gOPNExt = require('./_object-gopn-ext')
+ , $GOPD = require('./_object-gopd')
+ , $DP = require('./_object-dp')
+ , gOPD = $GOPD.f
+ , dP = $DP.f
+ , gOPN = gOPNExt.f
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , setter = false
+ , HIDDEN = wks('_hidden')
+ , isEnum = {}.propertyIsEnumerable
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , ObjectProto = Object.prototype
+ , USE_NATIVE = typeof $Symbol == 'function'
+ , QObject = global.QObject;
+
+// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(dP({}, 'a', {
+ get: function(){ return dP(this, 'a', {value: 7}).a; }
+ })).a != 7;
+}) ? function(it, key, D){
+ var protoDesc = gOPD(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ dP(it, key, D);
+ if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
+} : dP;
+
+var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol.prototype);
+ sym._k = tag;
+ DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ }
+ });
+ return sym;
+};
+
+var isSymbol = function(it){
+ return typeof it == 'symbol';
+};
+
+var $defineProperty = function defineProperty(it, key, D){
+ anObject(it);
+ key = toPrimitive(key, true);
+ anObject(D);
+ if(has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return dP(it, key, D);
+};
+var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+};
+var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+};
+var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key = toPrimitive(key, true));
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+};
+var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+};
+var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
+ return result;
+};
+var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+};
+var $stringify = function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , replacer, $replacer;
+ while(arguments.length > i)args.push(arguments[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+};
+var BUGGY_JSON = $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+});
+
+// 19.4.1.1 Symbol([description])
+if(!USE_NATIVE){
+ $Symbol = function Symbol(){
+ if(isSymbol(this))throw TypeError('Symbol is not a constructor');
+ return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
+ };
+ redefine($Symbol.prototype, 'toString', function toString(){
+ return this._k;
+ });
+
+ isSymbol = function(it){
+ return it instanceof $Symbol;
+ };
+
+ $GOPD.f = $getOwnPropertyDescriptor;
+ $DP.f = $defineProperty;
+ require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
+ require('./_object-pie').f = $propertyIsEnumerable
+ require('./_object-gops').f = $getOwnPropertySymbols;
+
+ if(DESCRIPTORS && !require('./_library')){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
+}
+
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
+
+// 19.4.2.2 Symbol.hasInstance
+// 19.4.2.3 Symbol.isConcatSpreadable
+// 19.4.2.4 Symbol.iterator
+// 19.4.2.6 Symbol.match
+// 19.4.2.8 Symbol.replace
+// 19.4.2.9 Symbol.search
+// 19.4.2.10 Symbol.species
+// 19.4.2.11 Symbol.split
+// 19.4.2.12 Symbol.toPrimitive
+// 19.4.2.13 Symbol.toStringTag
+// 19.4.2.14 Symbol.unscopables
+for(var symbols = (
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
+).split(','), i = 0; symbols.length > i; ){
+ var key = symbols[i++]
+ , Wrapper = core.Symbol
+ , sym = wks(key);
+ if(!(key in Wrapper))dP(Wrapper, key, {value: USE_NATIVE ? sym : wrap(sym)});
+};
+
+// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
+if(!QObject || !QObject.prototype || !QObject.prototype.findChild)setter = true;
+
+$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+});
+
+$export($export.S + $export.F * !USE_NATIVE, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+});
+
+// 24.3.2 JSON.stringify(value [, replacer [, space]])
+$JSON && $export($export.S + $export.F * (!USE_NATIVE || BUGGY_JSON), 'JSON', {stringify: $stringify});
+
+// 19.4.3.5 Symbol.prototype[@@toStringTag]
+setToStringTag($Symbol, 'Symbol');
+// 20.2.1.9 Math[@@toStringTag]
+setToStringTag(Math, 'Math', true);
+// 24.3.3 JSON[@@toStringTag]
+setToStringTag(global.JSON, 'JSON', true);
+},{"./_an-object":8,"./_core":23,"./_descriptors":26,"./_enum-keys":29,"./_export":30,"./_fails":32,"./_global":36,"./_has":37,"./_is-array":45,"./_keyof":55,"./_library":56,"./_meta":60,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_object-gopn-ext":68,"./_object-gops":70,"./_object-pie":74,"./_property-desc":82,"./_redefine":84,"./_set-to-string-tag":89,"./_shared":91,"./_to-iobject":104,"./_to-primitive":107,"./_uid":111,"./_wks":112}],239:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $typed = require('./_typed')
+ , buffer = require('./_typed-buffer')
+ , anObject = require('./_an-object')
+ , toIndex = require('./_to-index')
+ , toLength = require('./_to-length')
+ , isObject = require('./_is-object')
+ , TYPED_ARRAY = require('./_wks')('typed_array')
+ , ArrayBuffer = require('./_global').ArrayBuffer
+ , speciesConstructor = require('./_species-constructor')
+ , $ArrayBuffer = buffer.ArrayBuffer
+ , $DataView = buffer.DataView
+ , $isView = $typed.ABV && ArrayBuffer.isView
+ , $slice = $ArrayBuffer.prototype.slice
+ , VIEW = $typed.VIEW
+ , ARRAY_BUFFER = 'ArrayBuffer';
+
+$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer});
+
+$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
+ // 24.1.3.1 ArrayBuffer.isView(arg)
+ isView: function isView(it){
+ return $isView && $isView(it) || isObject(it) && VIEW in it;
+ }
+});
+
+$export($export.P + $export.U + $export.F * require('./_fails')(function(){
+ return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
+}), ARRAY_BUFFER, {
+ // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
+ slice: function slice(start, end){
+ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix
+ var len = anObject(this).byteLength
+ , first = toIndex(start, len)
+ , final = toIndex(end === undefined ? len : end, len)
+ , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first))
+ , viewS = new $DataView(this)
+ , viewT = new $DataView(result)
+ , index = 0;
+ while(first < final){
+ viewT.setUint8(index++, viewS.getUint8(first++));
+ } return result;
+ }
+});
+
+require('./_set-species')(ARRAY_BUFFER);
+},{"./_an-object":8,"./_export":30,"./_fails":32,"./_global":36,"./_is-object":47,"./_set-species":88,"./_species-constructor":92,"./_to-index":102,"./_to-length":105,"./_typed":110,"./_typed-buffer":109,"./_wks":112}],240:[function(require,module,exports){
+var $export = require('./_export');
+$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
+ DataView: require('./_typed-buffer').DataView
+});
+},{"./_export":30,"./_typed":110,"./_typed-buffer":109}],241:[function(require,module,exports){
+require('./_typed-array')('Float32', 4, function(init){
+ return function Float32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],242:[function(require,module,exports){
+require('./_typed-array')('Float64', 8, function(init){
+ return function Float64Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],243:[function(require,module,exports){
+require('./_typed-array')('Int16', 2, function(init){
+ return function Int16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],244:[function(require,module,exports){
+require('./_typed-array')('Int32', 4, function(init){
+ return function Int32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],245:[function(require,module,exports){
+require('./_typed-array')('Int8', 1, function(init){
+ return function Int8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],246:[function(require,module,exports){
+require('./_typed-array')('Uint16', 2, function(init){
+ return function Uint16Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],247:[function(require,module,exports){
+require('./_typed-array')('Uint32', 4, function(init){
+ return function Uint32Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],248:[function(require,module,exports){
+require('./_typed-array')('Uint8', 1, function(init){
+ return function Uint8Array(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+});
+},{"./_typed-array":108}],249:[function(require,module,exports){
+require('./_typed-array')('Uint8', 1, function(init){
+ return function Uint8ClampedArray(data, byteOffset, length){
+ return init(this, data, byteOffset, length);
+ };
+}, true);
+},{"./_typed-array":108}],250:[function(require,module,exports){
+'use strict';
+var each = require('./_array-methods')(0)
+ , redefine = require('./_redefine')
+ , meta = require('./_meta')
+ , assign = require('./_object-assign')
+ , weak = require('./_collection-weak')
+ , isObject = require('./_is-object')
+ , has = require('./_has')
+ , getWeak = meta.getWeak
+ , isExtensible = Object.isExtensible
+ , uncaughtFrozenStore = weak.ufstore
+ , tmp = {}
+ , InternalMap;
+
+var wrapper = function(get){
+ return function WeakMap(){
+ return get(this, arguments.length > 0 ? arguments[0] : undefined);
+ };
+};
+
+var methods = {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key){
+ if(isObject(key)){
+ var data = getWeak(key);
+ if(data === true)return uncaughtFrozenStore(this).get(key);
+ return data ? data[this._i] : undefined;
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value){
+ return weak.def(this, key, value);
+ }
+};
+
+// 23.3 WeakMap Objects
+var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true);
+
+// IE11 WeakMap frozen keys fix
+if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
+ InternalMap = weak.getConstructor(wrapper);
+ assign(InternalMap.prototype, methods);
+ meta.NEED = true;
+ each(['delete', 'has', 'get', 'set'], function(key){
+ var proto = $WeakMap.prototype
+ , method = proto[key];
+ redefine(proto, key, function(a, b){
+ // store frozen objects on internal weakmap shim
+ if(isObject(a) && !isExtensible(a)){
+ if(!this._f)this._f = new InternalMap;
+ var result = this._f[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ });
+ });
+}
+},{"./_array-methods":13,"./_collection":22,"./_collection-weak":21,"./_has":37,"./_is-object":47,"./_meta":60,"./_object-assign":63,"./_redefine":84}],251:[function(require,module,exports){
+'use strict';
+var weak = require('./_collection-weak');
+
+// 23.4 WeakSet Objects
+require('./_collection')('WeakSet', function(get){
+ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
+}, {
+ // 23.4.3.1 WeakSet.prototype.add(value)
+ add: function add(value){
+ return weak.def(this, value, true);
+ }
+}, weak, false, true);
+},{"./_collection":22,"./_collection-weak":21}],252:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $includes = require('./_array-includes')(true);
+
+$export($export.P, 'Array', {
+ // https://github.com/domenic/Array.prototype.includes
+ includes: function includes(el /*, fromIndex = 0 */){
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
+ }
+});
+
+require('./_add-to-unscopables')('includes');
+},{"./_add-to-unscopables":6,"./_array-includes":12,"./_export":30}],253:[function(require,module,exports){
+// https://github.com/ljharb/proposal-is-error
+var $export = require('./_export')
+ , cof = require('./_cof');
+
+$export($export.S, 'Error', {
+ isError: function isError(it){
+ return cof(it) === 'Error';
+ }
+});
+},{"./_cof":18,"./_export":30}],254:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var $export = require('./_export');
+
+$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});
+},{"./_collection-to-json":20,"./_export":30}],255:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ iaddh: function iaddh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
+ }
+});
+},{"./_export":30}],256:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ imulh: function imulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >> 16
+ , v1 = $v >> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
+ }
+});
+},{"./_export":30}],257:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ isubh: function isubh(x0, x1, y0, y1){
+ var $x0 = x0 >>> 0
+ , $x1 = x1 >>> 0
+ , $y0 = y0 >>> 0;
+ return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
+ }
+});
+},{"./_export":30}],258:[function(require,module,exports){
+// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
+var $export = require('./_export');
+
+$export($export.S, 'Math', {
+ umulh: function umulh(u, v){
+ var UINT16 = 0xffff
+ , $u = +u
+ , $v = +v
+ , u0 = $u & UINT16
+ , v0 = $v & UINT16
+ , u1 = $u >>> 16
+ , v1 = $v >>> 16
+ , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
+ return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
+ }
+});
+},{"./_export":30}],259:[function(require,module,exports){
+// http://goo.gl/XkBrjD
+var $export = require('./_export')
+ , $entries = require('./_object-to-array')(true);
+
+$export($export.S, 'Object', {
+ entries: function entries(it){
+ return $entries(it);
+ }
+});
+},{"./_export":30,"./_object-to-array":76}],260:[function(require,module,exports){
+// https://gist.github.com/WebReflection/9353781
+var $export = require('./_export')
+ , ownKeys = require('./_own-keys')
+ , toIObject = require('./_to-iobject')
+ , createDesc = require('./_property-desc')
+ , gOPD = require('./_object-gopd')
+ , dP = require('./_object-dp');
+
+$export($export.S, 'Object', {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
+ var O = toIObject(object)
+ , getDesc = gOPD.f
+ , keys = ownKeys(O)
+ , result = {}
+ , i = 0
+ , key, D;
+ while(keys.length > i){
+ D = getDesc(O, key = keys[i++]);
+ if(key in result)dP.f(result, key, createDesc(0, D));
+ else result[key] = D;
+ } return result;
+ }
+});
+},{"./_export":30,"./_object-dp":65,"./_object-gopd":67,"./_own-keys":77,"./_property-desc":82,"./_to-iobject":104}],261:[function(require,module,exports){
+// http://goo.gl/XkBrjD
+var $export = require('./_export')
+ , $values = require('./_object-to-array')(false);
+
+$export($export.S, 'Object', {
+ values: function values(it){
+ return $values(it);
+ }
+});
+},{"./_export":30,"./_object-to-array":76}],262:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
+ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
+}});
+},{"./_an-object":8,"./_metadata":61}],263:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , toMetaKey = metadata.key
+ , getOrCreateMetadataMap = metadata.map
+ , store = metadata.store;
+
+metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){
+ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2])
+ , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
+ if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false;
+ if(metadataMap.size)return true;
+ var targetMetadata = store.get(target);
+ targetMetadata['delete'](targetKey);
+ return !!targetMetadata.size || store['delete'](target);
+}});
+},{"./_an-object":8,"./_metadata":61}],264:[function(require,module,exports){
+var Set = require('./es6.set')
+ , from = require('./_array-from-iterable')
+ , metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+var ordinaryMetadataKeys = function(O, P){
+ var oKeys = ordinaryOwnMetadataKeys(O, P)
+ , parent = getPrototypeOf(O);
+ if(parent === null)return oKeys;
+ var pKeys = ordinaryMetadataKeys(parent, P);
+ return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
+};
+
+metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
+ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+}});
+},{"./_an-object":8,"./_array-from-iterable":11,"./_metadata":61,"./_object-gpo":71,"./es6.set":215}],265:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryHasOwnMetadata = metadata.has
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+var ordinaryGetMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P);
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
+};
+
+metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":8,"./_metadata":61,"./_object-gpo":71}],266:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryOwnMetadataKeys = metadata.keys
+ , toMetaKey = metadata.key;
+
+metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
+ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
+}});
+},{"./_an-object":8,"./_metadata":61}],267:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryGetOwnMetadata = metadata.get
+ , toMetaKey = metadata.key;
+
+metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryGetOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":8,"./_metadata":61}],268:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , getPrototypeOf = require('./_object-gpo')
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+var ordinaryHasMetadata = function(MetadataKey, O, P){
+ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
+ if(hasOwn)return true;
+ var parent = getPrototypeOf(O);
+ return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
+};
+
+metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":8,"./_metadata":61,"./_object-gpo":71}],269:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , ordinaryHasOwnMetadata = metadata.has
+ , toMetaKey = metadata.key;
+
+metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){
+ return ordinaryHasOwnMetadata(metadataKey, anObject(target)
+ , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
+}});
+},{"./_an-object":8,"./_metadata":61}],270:[function(require,module,exports){
+var metadata = require('./_metadata')
+ , anObject = require('./_an-object')
+ , aFunction = require('./_a-function')
+ , toMetaKey = metadata.key
+ , ordinaryDefineOwnMetadata = metadata.set;
+
+metadata.exp({metadata: function metadata(metadataKey, metadataValue){
+ return function decorator(target, targetKey){
+ ordinaryDefineOwnMetadata(
+ metadataKey, metadataValue,
+ (targetKey !== undefined ? anObject : aFunction)(target),
+ toMetaKey(targetKey)
+ );
+ };
+}});
+},{"./_a-function":4,"./_an-object":8,"./_metadata":61}],271:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var $export = require('./_export');
+
+$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});
+},{"./_collection-to-json":20,"./_export":30}],272:[function(require,module,exports){
+'use strict';
+// https://github.com/mathiasbynens/String.prototype.at
+var $export = require('./_export')
+ , $at = require('./_string-at')(true);
+
+$export($export.P, 'String', {
+ at: function at(pos){
+ return $at(this, pos);
+ }
+});
+},{"./_export":30,"./_string-at":94}],273:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $pad = require('./_string-pad');
+
+$export($export.P, 'String', {
+ padEnd: function padEnd(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
+ }
+});
+},{"./_export":30,"./_string-pad":97}],274:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , $pad = require('./_string-pad');
+
+$export($export.P, 'String', {
+ padStart: function padStart(maxLength /*, fillString = ' ' */){
+ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
+ }
+});
+},{"./_export":30,"./_string-pad":97}],275:[function(require,module,exports){
+'use strict';
+// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+require('./_string-trim')('trimLeft', function($trim){
+ return function trimLeft(){
+ return $trim(this, 1);
+ };
+}, 'trimStart');
+},{"./_string-trim":99}],276:[function(require,module,exports){
+'use strict';
+// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
+require('./_string-trim')('trimRight', function($trim){
+ return function trimRight(){
+ return $trim(this, 2);
+ };
+}, 'trimEnd');
+},{"./_string-trim":99}],277:[function(require,module,exports){
+// https://github.com/ljharb/proposal-global
+var $export = require('./_export');
+
+$export($export.S, 'System', {global: require('./_global')});
+},{"./_export":30,"./_global":36}],278:[function(require,module,exports){
+var $iterators = require('./es6.array.iterator')
+ , redefine = require('./_redefine')
+ , global = require('./_global')
+ , hide = require('./_hide')
+ , Iterators = require('./_iterators')
+ , wks = require('./_wks')
+ , ITERATOR = wks('iterator')
+ , TO_STRING_TAG = wks('toStringTag')
+ , ArrayValues = Iterators.Array;
+
+for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype
+ , key;
+ if(proto){
+ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues);
+ if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ Iterators[NAME] = ArrayValues;
+ for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
+ }
+}
+},{"./_global":36,"./_hide":38,"./_iterators":54,"./_redefine":84,"./_wks":112,"./es6.array.iterator":126}],279:[function(require,module,exports){
+var $export = require('./_export')
+ , $task = require('./_task');
+$export($export.G + $export.B, {
+ setImmediate: $task.set,
+ clearImmediate: $task.clear
+});
+},{"./_export":30,"./_task":101}],280:[function(require,module,exports){
+// ie9- setTimeout & setInterval additional parameters fix
+var global = require('./_global')
+ , $export = require('./_export')
+ , invoke = require('./_invoke')
+ , partial = require('./_partial')
+ , navigator = global.navigator
+ , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+var wrap = function(set){
+ return MSIE ? function(fn, time /*, ...args */){
+ return set(invoke(
+ partial,
+ [].slice.call(arguments, 2),
+ typeof fn == 'function' ? fn : Function(fn)
+ ), time);
+ } : set;
+};
+$export($export.G + $export.B + $export.F * MSIE, {
+ setTimeout: wrap(global.setTimeout),
+ setInterval: wrap(global.setInterval)
+});
+},{"./_export":30,"./_global":36,"./_invoke":42,"./_partial":80}],281:[function(require,module,exports){
+require('./modules/es6.symbol');
+require('./modules/es6.object.create');
+require('./modules/es6.object.define-property');
+require('./modules/es6.object.define-properties');
+require('./modules/es6.object.get-own-property-descriptor');
+require('./modules/es6.object.get-prototype-of');
+require('./modules/es6.object.keys');
+require('./modules/es6.object.get-own-property-names');
+require('./modules/es6.object.freeze');
+require('./modules/es6.object.seal');
+require('./modules/es6.object.prevent-extensions');
+require('./modules/es6.object.is-frozen');
+require('./modules/es6.object.is-sealed');
+require('./modules/es6.object.is-extensible');
+require('./modules/es6.object.assign');
+require('./modules/es6.object.is');
+require('./modules/es6.object.set-prototype-of');
+require('./modules/es6.object.to-string');
+require('./modules/es6.function.bind');
+require('./modules/es6.function.name');
+require('./modules/es6.function.has-instance');
+require('./modules/es6.parse-int');
+require('./modules/es6.parse-float');
+require('./modules/es6.number.constructor');
+require('./modules/es6.number.to-fixed');
+require('./modules/es6.number.to-precision');
+require('./modules/es6.number.epsilon');
+require('./modules/es6.number.is-finite');
+require('./modules/es6.number.is-integer');
+require('./modules/es6.number.is-nan');
+require('./modules/es6.number.is-safe-integer');
+require('./modules/es6.number.max-safe-integer');
+require('./modules/es6.number.min-safe-integer');
+require('./modules/es6.number.parse-float');
+require('./modules/es6.number.parse-int');
+require('./modules/es6.math.acosh');
+require('./modules/es6.math.asinh');
+require('./modules/es6.math.atanh');
+require('./modules/es6.math.cbrt');
+require('./modules/es6.math.clz32');
+require('./modules/es6.math.cosh');
+require('./modules/es6.math.expm1');
+require('./modules/es6.math.fround');
+require('./modules/es6.math.hypot');
+require('./modules/es6.math.imul');
+require('./modules/es6.math.log10');
+require('./modules/es6.math.log1p');
+require('./modules/es6.math.log2');
+require('./modules/es6.math.sign');
+require('./modules/es6.math.sinh');
+require('./modules/es6.math.tanh');
+require('./modules/es6.math.trunc');
+require('./modules/es6.string.from-code-point');
+require('./modules/es6.string.raw');
+require('./modules/es6.string.trim');
+require('./modules/es6.string.iterator');
+require('./modules/es6.string.code-point-at');
+require('./modules/es6.string.ends-with');
+require('./modules/es6.string.includes');
+require('./modules/es6.string.repeat');
+require('./modules/es6.string.starts-with');
+require('./modules/es6.string.anchor');
+require('./modules/es6.string.big');
+require('./modules/es6.string.blink');
+require('./modules/es6.string.bold');
+require('./modules/es6.string.fixed');
+require('./modules/es6.string.fontcolor');
+require('./modules/es6.string.fontsize');
+require('./modules/es6.string.italics');
+require('./modules/es6.string.link');
+require('./modules/es6.string.small');
+require('./modules/es6.string.strike');
+require('./modules/es6.string.sub');
+require('./modules/es6.string.sup');
+require('./modules/es6.date.now');
+require('./modules/es6.date.to-string');
+require('./modules/es6.date.to-iso-string');
+require('./modules/es6.date.to-json');
+require('./modules/es6.array.is-array');
+require('./modules/es6.array.from');
+require('./modules/es6.array.of');
+require('./modules/es6.array.join');
+require('./modules/es6.array.slice');
+require('./modules/es6.array.sort');
+require('./modules/es6.array.for-each');
+require('./modules/es6.array.map');
+require('./modules/es6.array.filter');
+require('./modules/es6.array.some');
+require('./modules/es6.array.every');
+require('./modules/es6.array.reduce');
+require('./modules/es6.array.reduce-right');
+require('./modules/es6.array.index-of');
+require('./modules/es6.array.last-index-of');
+require('./modules/es6.array.copy-within');
+require('./modules/es6.array.fill');
+require('./modules/es6.array.find');
+require('./modules/es6.array.find-index');
+require('./modules/es6.array.species');
+require('./modules/es6.array.iterator');
+require('./modules/es6.regexp.constructor');
+require('./modules/es6.regexp.to-string');
+require('./modules/es6.regexp.flags');
+require('./modules/es6.regexp.match');
+require('./modules/es6.regexp.replace');
+require('./modules/es6.regexp.search');
+require('./modules/es6.regexp.split');
+require('./modules/es6.promise');
+require('./modules/es6.map');
+require('./modules/es6.set');
+require('./modules/es6.weak-map');
+require('./modules/es6.weak-set');
+require('./modules/es6.typed.array-buffer');
+require('./modules/es6.typed.data-view');
+require('./modules/es6.typed.int8-array');
+require('./modules/es6.typed.uint8-array');
+require('./modules/es6.typed.uint8-clamped-array');
+require('./modules/es6.typed.int16-array');
+require('./modules/es6.typed.uint16-array');
+require('./modules/es6.typed.int32-array');
+require('./modules/es6.typed.uint32-array');
+require('./modules/es6.typed.float32-array');
+require('./modules/es6.typed.float64-array');
+require('./modules/es6.reflect.apply');
+require('./modules/es6.reflect.construct');
+require('./modules/es6.reflect.define-property');
+require('./modules/es6.reflect.delete-property');
+require('./modules/es6.reflect.enumerate');
+require('./modules/es6.reflect.get');
+require('./modules/es6.reflect.get-own-property-descriptor');
+require('./modules/es6.reflect.get-prototype-of');
+require('./modules/es6.reflect.has');
+require('./modules/es6.reflect.is-extensible');
+require('./modules/es6.reflect.own-keys');
+require('./modules/es6.reflect.prevent-extensions');
+require('./modules/es6.reflect.set');
+require('./modules/es6.reflect.set-prototype-of');
+require('./modules/es7.array.includes');
+require('./modules/es7.string.at');
+require('./modules/es7.string.pad-start');
+require('./modules/es7.string.pad-end');
+require('./modules/es7.string.trim-left');
+require('./modules/es7.string.trim-right');
+require('./modules/es7.object.get-own-property-descriptors');
+require('./modules/es7.object.values');
+require('./modules/es7.object.entries');
+require('./modules/es7.map.to-json');
+require('./modules/es7.set.to-json');
+require('./modules/es7.system.global');
+require('./modules/es7.error.is-error');
+require('./modules/es7.math.iaddh');
+require('./modules/es7.math.isubh');
+require('./modules/es7.math.imulh');
+require('./modules/es7.math.umulh');
+require('./modules/es7.reflect.define-metadata');
+require('./modules/es7.reflect.delete-metadata');
+require('./modules/es7.reflect.get-metadata');
+require('./modules/es7.reflect.get-metadata-keys');
+require('./modules/es7.reflect.get-own-metadata');
+require('./modules/es7.reflect.get-own-metadata-keys');
+require('./modules/es7.reflect.has-metadata');
+require('./modules/es7.reflect.has-own-metadata');
+require('./modules/es7.reflect.metadata');
+require('./modules/web.timers');
+require('./modules/web.immediate');
+require('./modules/web.dom.iterable');
+module.exports = require('./modules/_core');
+},{"./modules/_core":23,"./modules/es6.array.copy-within":116,"./modules/es6.array.every":117,"./modules/es6.array.fill":118,"./modules/es6.array.filter":119,"./modules/es6.array.find":121,"./modules/es6.array.find-index":120,"./modules/es6.array.for-each":122,"./modules/es6.array.from":123,"./modules/es6.array.index-of":124,"./modules/es6.array.is-array":125,"./modules/es6.array.iterator":126,"./modules/es6.array.join":127,"./modules/es6.array.last-index-of":128,"./modules/es6.array.map":129,"./modules/es6.array.of":130,"./modules/es6.array.reduce":132,"./modules/es6.array.reduce-right":131,"./modules/es6.array.slice":133,"./modules/es6.array.some":134,"./modules/es6.array.sort":135,"./modules/es6.array.species":136,"./modules/es6.date.now":137,"./modules/es6.date.to-iso-string":138,"./modules/es6.date.to-json":139,"./modules/es6.date.to-string":140,"./modules/es6.function.bind":141,"./modules/es6.function.has-instance":142,"./modules/es6.function.name":143,"./modules/es6.map":144,"./modules/es6.math.acosh":145,"./modules/es6.math.asinh":146,"./modules/es6.math.atanh":147,"./modules/es6.math.cbrt":148,"./modules/es6.math.clz32":149,"./modules/es6.math.cosh":150,"./modules/es6.math.expm1":151,"./modules/es6.math.fround":152,"./modules/es6.math.hypot":153,"./modules/es6.math.imul":154,"./modules/es6.math.log10":155,"./modules/es6.math.log1p":156,"./modules/es6.math.log2":157,"./modules/es6.math.sign":158,"./modules/es6.math.sinh":159,"./modules/es6.math.tanh":160,"./modules/es6.math.trunc":161,"./modules/es6.number.constructor":162,"./modules/es6.number.epsilon":163,"./modules/es6.number.is-finite":164,"./modules/es6.number.is-integer":165,"./modules/es6.number.is-nan":166,"./modules/es6.number.is-safe-integer":167,"./modules/es6.number.max-safe-integer":168,"./modules/es6.number.min-safe-integer":169,"./modules/es6.number.parse-float":170,"./modules/es6.number.parse-int":171,"./modules/es6.number.to-fixed":172,"./modules/es6.number.to-precision":173,"./modules/es6.object.assign":174,"./modules/es6.object.create":175,"./modules/es6.object.define-properties":176,"./modules/es6.object.define-property":177,"./modules/es6.object.freeze":178,"./modules/es6.object.get-own-property-descriptor":179,"./modules/es6.object.get-own-property-names":180,"./modules/es6.object.get-prototype-of":181,"./modules/es6.object.is":185,"./modules/es6.object.is-extensible":182,"./modules/es6.object.is-frozen":183,"./modules/es6.object.is-sealed":184,"./modules/es6.object.keys":186,"./modules/es6.object.prevent-extensions":187,"./modules/es6.object.seal":188,"./modules/es6.object.set-prototype-of":189,"./modules/es6.object.to-string":190,"./modules/es6.parse-float":191,"./modules/es6.parse-int":192,"./modules/es6.promise":193,"./modules/es6.reflect.apply":194,"./modules/es6.reflect.construct":195,"./modules/es6.reflect.define-property":196,"./modules/es6.reflect.delete-property":197,"./modules/es6.reflect.enumerate":198,"./modules/es6.reflect.get":201,"./modules/es6.reflect.get-own-property-descriptor":199,"./modules/es6.reflect.get-prototype-of":200,"./modules/es6.reflect.has":202,"./modules/es6.reflect.is-extensible":203,"./modules/es6.reflect.own-keys":204,"./modules/es6.reflect.prevent-extensions":205,"./modules/es6.reflect.set":207,"./modules/es6.reflect.set-prototype-of":206,"./modules/es6.regexp.constructor":208,"./modules/es6.regexp.flags":209,"./modules/es6.regexp.match":210,"./modules/es6.regexp.replace":211,"./modules/es6.regexp.search":212,"./modules/es6.regexp.split":213,"./modules/es6.regexp.to-string":214,"./modules/es6.set":215,"./modules/es6.string.anchor":216,"./modules/es6.string.big":217,"./modules/es6.string.blink":218,"./modules/es6.string.bold":219,"./modules/es6.string.code-point-at":220,"./modules/es6.string.ends-with":221,"./modules/es6.string.fixed":222,"./modules/es6.string.fontcolor":223,"./modules/es6.string.fontsize":224,"./modules/es6.string.from-code-point":225,"./modules/es6.string.includes":226,"./modules/es6.string.italics":227,"./modules/es6.string.iterator":228,"./modules/es6.string.link":229,"./modules/es6.string.raw":230,"./modules/es6.string.repeat":231,"./modules/es6.string.small":232,"./modules/es6.string.starts-with":233,"./modules/es6.string.strike":234,"./modules/es6.string.sub":235,"./modules/es6.string.sup":236,"./modules/es6.string.trim":237,"./modules/es6.symbol":238,"./modules/es6.typed.array-buffer":239,"./modules/es6.typed.data-view":240,"./modules/es6.typed.float32-array":241,"./modules/es6.typed.float64-array":242,"./modules/es6.typed.int16-array":243,"./modules/es6.typed.int32-array":244,"./modules/es6.typed.int8-array":245,"./modules/es6.typed.uint16-array":246,"./modules/es6.typed.uint32-array":247,"./modules/es6.typed.uint8-array":248,"./modules/es6.typed.uint8-clamped-array":249,"./modules/es6.weak-map":250,"./modules/es6.weak-set":251,"./modules/es7.array.includes":252,"./modules/es7.error.is-error":253,"./modules/es7.map.to-json":254,"./modules/es7.math.iaddh":255,"./modules/es7.math.imulh":256,"./modules/es7.math.isubh":257,"./modules/es7.math.umulh":258,"./modules/es7.object.entries":259,"./modules/es7.object.get-own-property-descriptors":260,"./modules/es7.object.values":261,"./modules/es7.reflect.define-metadata":262,"./modules/es7.reflect.delete-metadata":263,"./modules/es7.reflect.get-metadata":265,"./modules/es7.reflect.get-metadata-keys":264,"./modules/es7.reflect.get-own-metadata":267,"./modules/es7.reflect.get-own-metadata-keys":266,"./modules/es7.reflect.has-metadata":268,"./modules/es7.reflect.has-own-metadata":269,"./modules/es7.reflect.metadata":270,"./modules/es7.set.to-json":271,"./modules/es7.string.at":272,"./modules/es7.string.pad-end":273,"./modules/es7.string.pad-start":274,"./modules/es7.string.trim-left":275,"./modules/es7.string.trim-right":276,"./modules/es7.system.global":277,"./modules/web.dom.iterable":278,"./modules/web.immediate":279,"./modules/web.timers":280}],282:[function(require,module,exports){
+(function (process,global){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+!(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var iteratorSymbol =
+ typeof Symbol === "function" && Symbol.iterator || "@@iterator";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided, then outerFn.prototype instanceof Generator.
+ var generator = Object.create((outerFn || Generator).prototype);
+ var context = new Context(tryLocsList || []);
+
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `value instanceof AwaitArgument` to determine if the yielded value is
+ // meant to be awaited. Some may consider the name of this method too
+ // cutesy, but they are curmudgeons.
+ runtime.awrap = function(arg) {
+ return new AwaitArgument(arg);
+ };
+
+ function AwaitArgument(arg) {
+ this.arg = arg;
+ }
+
+ function AsyncIterator(generator) {
+ // This invoke function is written in a style that assumes some
+ // calling function (or Promise) will handle exceptions.
+ function invoke(method, arg) {
+ var result = generator[method](arg);
+ var value = result.value;
+ return value instanceof AwaitArgument
+ ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)
+ : Promise.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration. If the Promise is rejected, however, the
+ // result for this iteration will be rejected with the same
+ // reason. Note that rejections of yielded Promises are not
+ // thrown back into the generator function, as is the case
+ // when an awaited Promise is rejected. This difference in
+ // behavior between yield and await is important, because it
+ // allows the consumer to decide what to do with the yielded
+ // rejection (swallow it and continue, manually .throw it back
+ // into the generator, abandon iteration, whatever). With
+ // await, by contrast, there is no opportunity to examine the
+ // rejection reason outside the generator function, so the
+ // only option is to throw it from the await expression, and
+ // let the generator function handle the exception.
+ result.value = unwrapped;
+ return result;
+ });
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var invokeNext = invoke.bind(generator, "next");
+ var invokeThrow = invoke.bind(generator, "throw");
+ var invokeReturn = invoke.bind(generator, "return");
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return invoke(method, arg);
+ }
+
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : new Promise(function (resolve) {
+ resolve(callInvokeWithMethodAndArg());
+ });
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
+
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ context._sent = arg;
+
+ if (state === GenStateSuspendedYield) {
+ context.sent = arg;
+ } else {
+ context.sent = undefined;
+ }
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ this.sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+})(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+);
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"_process":289}],283:[function(require,module,exports){
+module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true };
+},{"core-js/library/fn/object/define-property":284}],284:[function(require,module,exports){
+var $ = require('../../modules/$');
+module.exports = function defineProperty(it, key, desc){
+ return $.setDesc(it, key, desc);
+};
+},{"../../modules/$":285}],285:[function(require,module,exports){
+var $Object = Object;
+module.exports = {
+ create: $Object.create,
+ getProto: $Object.getPrototypeOf,
+ isEnum: {}.propertyIsEnumerable,
+ getDesc: $Object.getOwnPropertyDescriptor,
+ setDesc: $Object.defineProperty,
+ setDescs: $Object.defineProperties,
+ getKeys: $Object.keys,
+ getNames: $Object.getOwnPropertyNames,
+ getSymbols: $Object.getOwnPropertySymbols,
+ each: [].forEach
+};
+},{}],286:[function(require,module,exports){
+(function (global){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.open = open;
+exports.del = del;
+exports.cmp = cmp;
+
+/**
+ * Open IndexedDB database with `name`.
+ * Retry logic allows to avoid issues in tests env,
+ * when db with the same name delete/open repeatedly and can be blocked.
+ *
+ * @param {String} dbName
+ * @param {Number} [version]
+ * @param {Function} [upgradeCallback]
+ * @return {Promise}
+ */
+
+function open(dbName, version, upgradeCallback) {
+ return new Promise(function (resolve, reject) {
+ if (typeof version === 'function') {
+ upgradeCallback = version;
+ version = undefined;
+ }
+ // don't call open with 2 arguments, when version is not set
+ var req = version ? idb().open(dbName, version) : idb().open(dbName);
+ req.onblocked = function (e) {
+ var resume = new Promise(function (res, rej) {
+ // We overwrite handlers rather than make a new
+ // open() since the original request is still
+ // open and its onsuccess will still fire if
+ // the user unblocks by closing the blocking
+ // connection
+ req.onsuccess = function (ev) {
+ return res(ev.target.result);
+ };
+ req.onerror = function (ev) {
+ ev.preventDefault();
+ rej(ev);
+ };
+ });
+ e.resume = resume;
+ reject(e);
+ };
+ if (typeof upgradeCallback === 'function') {
+ req.onupgradeneeded = function (e) {
+ try {
+ upgradeCallback(e);
+ } catch (err) {
+ // We allow the callback to throw its own error
+ e.target.result.close();
+ reject(err);
+ }
+ };
+ }
+ req.onerror = function (e) {
+ e.preventDefault();
+ reject(e);
+ };
+ req.onsuccess = function (e) {
+ resolve(e.target.result);
+ };
+ });
+}
+
+/**
+ * Delete `db` properly:
+ * - close it and wait 100ms to disk flush (Safari, older Chrome, Firefox)
+ * - if database is locked, due to inconsistent exectution of `versionchange`,
+ * try again in 100ms
+ *
+ * @param {IDBDatabase|String} db
+ * @return {Promise}
+ */
+
+function del(db) {
+ var dbName = typeof db !== 'string' ? db.name : db;
+
+ return new Promise(function (resolve, reject) {
+ var delDb = function delDb() {
+ var req = idb().deleteDatabase(dbName);
+ req.onblocked = function (e) {
+ // The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279
+ e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, { get: function get(target, name) {
+ return name === 'newVersion' ? null : target[name];
+ } });
+ var resume = new Promise(function (res, rej) {
+ // We overwrite handlers rather than make a new
+ // delete() since the original request is still
+ // open and its onsuccess will still fire if
+ // the user unblocks by closing the blocking
+ // connection
+ req.onsuccess = function (ev) {
+ // The following are needed currently by PhantomJS: https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in ev)) {
+ ev.newVersion = e.newVersion;
+ }
+
+ if (!('oldVersion' in ev)) {
+ ev.oldVersion = e.oldVersion;
+ }
+
+ res(ev);
+ };
+ req.onerror = function (ev) {
+ ev.preventDefault();
+ rej(ev);
+ };
+ });
+ e.resume = resume;
+ reject(e);
+ };
+ req.onerror = function (e) {
+ e.preventDefault();
+ reject(e);
+ };
+ req.onsuccess = function (e) {
+ // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in e)) {
+ e.newVersion = null;
+ }
+
+ resolve(e);
+ };
+ };
+
+ if (typeof db !== 'string') {
+ db.close();
+ setTimeout(delDb, 100);
+ } else {
+ delDb();
+ }
+ });
+}
+
+/**
+ * Compare `first` and `second`.
+ * Added for consistency with official API.
+ *
+ * @param {Any} first
+ * @param {Any} second
+ * @return {Number} -1|0|1
+ */
+
+function cmp(first, second) {
+ return idb().cmp(first, second);
+}
+
+/**
+ * Get globally available IDBFactory instance.
+ * - it uses `global`, so it can work in any env.
+ * - it tries to use `global.forceIndexedDB` first,
+ * so you can rewrite `global.indexedDB` with polyfill
+ * https://bugs.webkit.org/show_bug.cgi?id=137034
+ * - it fallbacks to all possibly available implementations
+ * https://github.com/axemclion/IndexedDBShim#ios
+ * - function allows to have dynamic link,
+ * which can be changed after module's initial exectution
+ *
+ * @return {IDBFactory}
+ */
+
+function idb() {
+ return global.forceIndexedDB || global.indexedDB || global.webkitIndexedDB || global.mozIndexedDB || global.msIndexedDB || global.shimIndexedDB;
+}
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],287:[function(require,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Object.values, etc.
+
+
+require('babel-polyfill');
+
+var _idbFactory = require('./idb-factory');
+
+var _isPlainObj = require('is-plain-obj');
+
+var _isPlainObj2 = _interopRequireDefault(_isPlainObj);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var values = Object.values;
+var isInteger = Number.isInteger;
+var localStorageExists = typeof window !== 'undefined' && window.localStorage;
+
+var getJSONStorage = function getJSONStorage(item) {
+ var dflt = arguments.length <= 1 || arguments[1] === undefined ? '{}' : arguments[1];
+
+ return JSON.parse(localStorage.getItem(item) || dflt);
+};
+var setJSONStorage = function setJSONStorage(item, value) {
+ localStorage.setItem(item, JSON.stringify(value));
+};
+
+/**
+ * Maximum version value (unsigned long long)
+ * http://www.w3.org/TR/IndexedDB/#events
+ */
+
+var MAX_VERSION = Math.pow(2, 32) - 1;
+
+/**
+ * Export `Schema`.
+ */
+
+var Schema = function () {
+ function Schema() {
+ _classCallCheck(this, Schema);
+
+ this._stores = {};
+ this._current = {};
+ this._versions = {};
+ this.version(1);
+ }
+
+ _createClass(Schema, [{
+ key: 'lastEnteredVersion',
+ value: function lastEnteredVersion() {
+ return this._current.version;
+ }
+ }, {
+ key: 'setCurrentVersion',
+ value: function setCurrentVersion(version) {
+ this._current = { version: version, store: null };
+ }
+
+ /**
+ * Get/Set new version.
+ *
+ * @param {Number} [version]
+ * @return {Schema|Number}
+ */
+
+ }, {
+ key: 'version',
+ value: function version(_version) {
+ if (!arguments.length) return parseInt(Object.keys(this._versions).sort().pop(), 10);
+ if (!isInteger(_version) || _version < 1 || _version > MAX_VERSION) {
+ throw new TypeError('invalid version');
+ }
+
+ this.setCurrentVersion(_version);
+ this._versions[_version] = {
+ stores: [], // db.createObjectStore
+ dropStores: [], // db.deleteObjectStore
+ indexes: [], // store.createIndex
+ dropIndexes: [], // store.deleteIndex
+ callbacks: [],
+ earlyCallbacks: [],
+ version: _version };
+
+ // version
+ return this;
+ }
+
+ /**
+ * Add store.
+ *
+ * @param {String} name
+ * @param {Object} [opts] { key: null, increment: false, copyFrom: null }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addStore',
+ value: function addStore(name) {
+ var _this = this;
+
+ var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ if (this._stores[name]) throw new DOMException('"' + name + '" store is already defined', 'ConstraintError');
+ if ((0, _isPlainObj2.default)(opts) && (0, _isPlainObj2.default)(opts.copyFrom)) {
+ (function () {
+ var copyFrom = opts.copyFrom;
+ var copyFromName = copyFrom.name;
+ if (typeof copyFromName !== 'string') throw new TypeError('"copyFrom.name" is required when `copyFrom` is present'); // idb-schema requirement
+ if (_this._versions[_this.lastEnteredVersion()].dropStores.some(function (dropStore) {
+ return dropStore.name === copyFromName;
+ })) {
+ throw new TypeError('"copyFrom.name" must not be a store slated for deletion.'); // idb-schema requirement
+ }
+ if (copyFrom.deleteOld) {
+ var copyFromStore = _this._stores[copyFromName];
+ if (copyFromStore) {
+ // We don't throw here if non-existing since it may have been created outside of idb-schema
+ delete _this._stores[copyFromName];
+ }
+ }
+ })();
+ }
+ var store = {
+ name: name,
+ indexes: {},
+ keyPath: opts.key || opts.keyPath,
+ autoIncrement: opts.increment || opts.autoIncrement || false,
+ copyFrom: opts.copyFrom || null };
+ // We don't check here for existence of a copyFrom store as might be copying from preexisting store
+ if (!store.keyPath && store.keyPath !== '') {
+ store.keyPath = null;
+ }
+ if (store.autoIncrement && (store.keyPath === '' || Array.isArray(store.keyPath))) {
+ throw new DOMException('keyPath must not be the empty string or a sequence if autoIncrement is in use', 'InvalidAccessError');
+ }
+
+ this._stores[name] = store;
+ this._versions[this.lastEnteredVersion()].stores.push(store);
+ this._current.store = store;
+
+ return this;
+ }
+
+ /**
+ * Delete store.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'delStore',
+ value: function delStore(name) {
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ this._versions[this.lastEnteredVersion()].stores.forEach(function (store) {
+ var copyFrom = store.copyFrom;
+ if ((0, _isPlainObj2.default)(copyFrom) && name === copyFrom.name) {
+ if (copyFrom.deleteOld) {
+ throw new TypeError('"name" is already slated for deletion'); // idb-schema requirement
+ }
+ throw new TypeError('set `deleteOld` on `copyFrom` to delete this store.'); // idb-schema requirement
+ }
+ });
+ var store = this._stores[name];
+ if (store) {
+ delete this._stores[name];
+ } else {
+ store = { name: name };
+ }
+ this._versions[this.lastEnteredVersion()].dropStores.push(store);
+ this._current.store = null;
+ return this;
+ }
+
+ /**
+ * Rename store.
+ *
+ * @param {String} oldName Old name
+ * @param {String} newName New name
+ * @param {Object} [opts] { key: null, increment: false }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'renameStore',
+ value: function renameStore(oldName, newName, options) {
+ return this.copyStore(oldName, newName, options, true);
+ }
+
+ /**
+ * Copy store.
+ *
+ * @param {String} oldName Old name
+ * @param {String} newName New name
+ * @param {Object} [opts] { key: null, increment: false }
+ * @param {Boolean} [deleteOld=false] Whether to delete the old store or not
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'copyStore',
+ value: function copyStore(oldName, newName, options) {
+ var deleteOld = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
+
+ if (typeof oldName !== 'string') throw new TypeError('"oldName" is required'); // idb-schema requirement
+ if (typeof newName !== 'string') throw new TypeError('"newName" is required'); // idb-schema requirement
+
+ options = (0, _isPlainObj2.default)(options) ? _clone(options) : {};
+ options.copyFrom = { name: oldName, deleteOld: deleteOld, options: options };
+
+ return this.addStore(newName, options);
+ }
+
+ /**
+ * Change current store.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'getStore',
+ value: function getStore(name) {
+ var _this2 = this;
+
+ if (name && (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object' && 'name' in name && 'indexNames' in name) {
+ (function () {
+ var storeObj = name;
+ name = storeObj.name;
+ var store = {
+ name: name,
+ indexes: Array.from(storeObj.indexNames).reduce(function (obj, iName) {
+ var indexObj = storeObj.index(iName);
+ obj[iName] = {
+ name: iName,
+ storeName: name,
+ field: indexObj.keyPath,
+ unique: indexObj.unique,
+ multiEntry: indexObj.multiEntry
+ };
+ return obj;
+ }, {}),
+ keyPath: storeObj.keyPath,
+ autoIncrement: storeObj.autoIncrement,
+ copyFrom: null
+ };
+ _this2._stores[name] = store;
+ })();
+ }
+ if (typeof name !== 'string') throw new DOMException('"name" is required', 'NotFoundError');
+ if (!this._stores[name]) throw new TypeError('"' + name + '" store is not defined');
+ this._current.store = this._stores[name];
+ return this;
+ }
+
+ /**
+ * Add index.
+ *
+ * @param {String} name
+ * @param {String|Array} field
+ * @param {Object} [opts] { unique: false, multi: false }
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addIndex',
+ value: function addIndex(name, field) {
+ var opts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ if (typeof field !== 'string' && !Array.isArray(field)) {
+ throw new SyntaxError('"field" is required');
+ }
+ var store = this._current.store;
+ if (!store) throw new TypeError('set current store using "getStore" or "addStore"');
+ if (store.indexes[name]) throw new DOMException('"' + name + '" index is already defined', 'ConstraintError');
+
+ var index = {
+ name: name,
+ field: field,
+ storeName: store.name,
+ multiEntry: opts.multi || opts.multiEntry || false,
+ unique: opts.unique || false
+ };
+ store.indexes[name] = index;
+ this._versions[this.lastEnteredVersion()].indexes.push(index);
+
+ return this;
+ }
+
+ /**
+ * Delete index.
+ *
+ * @param {String} name
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'delIndex',
+ value: function delIndex(name) {
+ if (typeof name !== 'string') throw new TypeError('"name" is required'); // idb-schema requirement
+ var index = this._current.store.indexes[name];
+ if (!index) throw new DOMException('"' + name + '" index is not defined', 'NotFoundError');
+ delete this._current.store.indexes[name];
+ this._versions[this.lastEnteredVersion()].dropIndexes.push(index);
+ return this;
+ }
+
+ /**
+ * Add a callback to be executed at the end of the `upgradeneeded` event.
+ * Callback will be supplied the `upgradeneeded` event object.
+ *
+ * @param {Function} cb
+ * @return {Schema}
+ */
+
+ }, {
+ key: 'addCallback',
+ value: function addCallback(cb) {
+ this._versions[this.lastEnteredVersion()].callbacks.push(cb);
+ return this;
+ }
+ }, {
+ key: 'addEarlyCallback',
+ value: function addEarlyCallback(cb) {
+ this._versions[this.lastEnteredVersion()].earlyCallbacks.push(cb);
+ return this;
+ }
+
+ /**
+ * Flushes storage pertaining to incomplete upgrades
+ *
+ * @return {}
+ */
+
+ }, {
+ key: 'flushIncomplete',
+ value: function flushIncomplete(dbName) {
+ var incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ delete incompleteUpgrades[dbName];
+ setJSONStorage('idb-incompleteUpgrades', incompleteUpgrades);
+ }
+
+ /**
+ * Generate open connection running a sequence of upgrades, keeping the connection open.
+ *
+ * @return {Promise}
+ */
+
+ }, {
+ key: 'open',
+ value: function open(dbName, version) {
+ return this.upgrade(dbName, version, true);
+ }
+
+ /**
+ * Generate open connection running a sequence of upgrades.
+ *
+ * @return {Promise}
+ */
+
+ }, {
+ key: 'upgrade',
+ value: function upgrade(dbName, version, keepOpen) {
+ var _this3 = this;
+
+ var currentVersion = void 0;
+ var versions = void 0;
+ var afterOpen = void 0;
+ var setVersions = function setVersions() {
+ versions = values(_this3._versions).sort(function (a, b) {
+ return a.version - b.version;
+ }).map(function (obj) {
+ return obj.version;
+ }).values();
+ };
+ var blockRecover = function blockRecover(reject) {
+ return function (err) {
+ if (err && err.type === 'blocked') {
+ reject(err);
+ return;
+ }
+ throw err;
+ };
+ };
+ setVersions();
+ var thenableUpgradeVersion = function thenableUpgradeVersion(dbLast, res, rej, start) {
+ var lastVers = dbLast.version;
+ var ready = true;
+ var lastGoodVersion = void 0;
+ var versionIter = void 0;
+ for (versionIter = versions.next(); !versionIter.done && versionIter.value <= lastVers; versionIter = versions.next()) {
+ lastGoodVersion = versionIter.value;
+ }
+ currentVersion = versionIter.value;
+ if (versionIter.done || currentVersion > version) {
+ if (start !== undefined) {
+ currentVersion = lastGoodVersion;
+ afterOpen(dbLast, res, rej, start);
+ } else if (!keepOpen) {
+ dbLast.close();
+ res();
+ } else {
+ res(dbLast);
+ }
+ return;
+ }
+ dbLast.close();
+
+ setTimeout(function () {
+ (0, _idbFactory.open)(dbName, currentVersion, upgradeneeded(function () {
+ for (var _len = arguments.length, dbInfo = Array(_len), _key = 0; _key < _len; _key++) {
+ dbInfo[_key] = arguments[_key];
+ }
+
+ ready = false;
+ upgradeVersion.call.apply(upgradeVersion, [_this3, currentVersion].concat(dbInfo, [function () {
+ ready = true;
+ }]));
+ })).then(function (db) {
+ var intvl = setInterval(function () {
+ if (ready) {
+ clearInterval(intvl);
+ afterOpen(db, res, rej, start);
+ }
+ }, 100);
+ }).catch(function (err) {
+ rej(err);
+ });
+ });
+ };
+ afterOpen = function afterOpen(db, res, rej, start) {
+ // We run callbacks in `success` so promises can be used without fear of the (upgrade) transaction expiring
+ var processReject = function processReject(err, callbackIndex) {
+ err = typeof err === 'string' ? new Error(err) : err;
+ err.retry = function () {
+ return new Promise(function (resolv, rejct) {
+ var resolver = function resolver(item) {
+ _this3.flushIncomplete(dbName);
+ resolv(item);
+ };
+ db.close();
+ // db.transaction can't execute as closing by now, so we close and reopen
+ (0, _idbFactory.open)(dbName).catch(blockRecover(rejct)).then(function (dbs) {
+ setVersions();
+ thenableUpgradeVersion(dbs, resolver, rejct, callbackIndex);
+ }).catch(rejct);
+ });
+ };
+ if (localStorageExists) {
+ var incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ incompleteUpgrades[dbName] = {
+ version: db.version,
+ error: err.message,
+ callbackIndex: callbackIndex
+ };
+ setJSONStorage('idb-incompleteUpgrades', incompleteUpgrades);
+ }
+ db.close();
+ rej(err);
+ };
+ var promise = Promise.resolve();
+ var lastIndex = void 0;
+ var versionSchema = _this3._versions[currentVersion]; // We can safely cache as these callbacks do not need to access schema info
+ var cbFailed = versionSchema.callbacks.some(function (cb, i) {
+ if (start !== undefined && i < start) {
+ return false;
+ }
+ var ret = void 0;
+ try {
+ ret = cb(db);
+ } catch (err) {
+ processReject(err, i);
+ return true;
+ }
+ if (ret && ret.then) {
+ // We need to treat the rest as promises so that they do not
+ // continue to execute before the current one has a chance to
+ // execute or fail
+ promise = versionSchema.callbacks.slice(i + 1).reduce(function (p, cb2) {
+ return p.then(function () {
+ return cb2(db);
+ });
+ }, ret);
+ lastIndex = i;
+ return true;
+ }
+ });
+ var complete = lastIndex !== undefined;
+ if (cbFailed && !complete) return;
+ promise = promise.then(function () {
+ return thenableUpgradeVersion(db, res, rej);
+ });
+ if (complete) {
+ promise = promise.catch(function (err) {
+ processReject(err, lastIndex);
+ });
+ }
+ };
+ // If needed, open higher versions until fully upgraded (noting any transaction failures)
+ return new Promise(function (resolve, reject) {
+ version = version || _this3.version();
+ if (typeof version !== 'number' || version < 1) {
+ reject(new Error('Bad version supplied for idb-schema upgrade'));
+ return;
+ }
+
+ var incompleteUpgrades = void 0;
+ var iudb = void 0;
+ if (localStorageExists) {
+ incompleteUpgrades = getJSONStorage('idb-incompleteUpgrades');
+ iudb = incompleteUpgrades[dbName];
+ }
+ if (iudb) {
+ var _ret3 = function () {
+ var err = new Error('An upgrade previously failed to complete for version: ' + iudb.version + ' due to reason: ' + iudb.error);
+ err.badVersion = iudb.version;
+ err.retry = function () {
+ var versionIter = versions.next();
+ while (!versionIter.done && versionIter.value < err.badVersion) {
+ versionIter = versions.next();
+ }
+ currentVersion = versionIter.value;
+ return new Promise(function (resolv, rejct) {
+ var resolver = function resolver(item) {
+ _this3.flushIncomplete(dbName);
+ resolv(item);
+ };
+ // If there was a prior failure, we don't need to worry about `upgradeneeded` yet
+ (0, _idbFactory.open)(dbName).catch(blockRecover(rejct)).then(function (dbs) {
+ afterOpen(dbs, resolver, rejct, iudb.callbackIndex);
+ }).catch(rejct);
+ });
+ };
+ reject(err);
+ return {
+ v: void 0
+ };
+ }();
+
+ if ((typeof _ret3 === 'undefined' ? 'undefined' : _typeof(_ret3)) === "object") return _ret3.v;
+ }
+ var ready = true;
+ var upgrade = upgradeneeded(function () {
+ for (var _len2 = arguments.length, dbInfo = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ dbInfo[_key2] = arguments[_key2];
+ }
+
+ // Upgrade from 0 to version 1
+ ready = false;
+ var versionIter = versions.next();
+ if (versionIter.done) {
+ throw new Error('No schema versions added for upgrade');
+ }
+ currentVersion = versionIter.value;
+ upgradeVersion.call.apply(upgradeVersion, [_this3, currentVersion].concat(dbInfo, [function () {
+ ready = true;
+ }]));
+ });
+ (0, _idbFactory.open)(dbName, upgrade).catch(blockRecover(reject)).then(function (db) {
+ var intvl = setInterval(function () {
+ if (!ready) {
+ return;
+ }
+ clearInterval(intvl);
+ if (version < db.version) {
+ db.close();
+ reject(new DOMException('The requested version (' + version + ') is less than the existing version (' + db.version + ').', 'VersionError'));
+ return;
+ }
+ if (currentVersion !== undefined) {
+ afterOpen(db, resolve, reject);
+ return;
+ }
+ thenableUpgradeVersion(db, resolve, reject);
+ }, 100);
+ }).catch(function (err) {
+ return reject(err);
+ });
+ });
+ }
+
+ /**
+ * Generate onupgradeneeded callback running a sequence of upgrades.
+ *
+ * @return {Function}
+ */
+
+ }, {
+ key: 'callback',
+ value: function callback(_callback, errBack) {
+ var _this4 = this;
+
+ var versions = values(this._versions).sort(function (a, b) {
+ return a.version - b.version;
+ }).map(function (obj) {
+ return obj.version;
+ }).values();
+ var tryCatch = function tryCatch(e, cb) {
+ try {
+ cb();
+ } catch (err) {
+ if (errBack) {
+ errBack(err, e);
+ return true;
+ }
+ throw err;
+ }
+ };
+ var upgrade = function upgrade(e, oldVersion) {
+ var versionIter = versions.next();
+ while (!versionIter.done && versionIter.value <= oldVersion) {
+ versionIter = versions.next();
+ }
+
+ if (versionIter.done) {
+ if (_callback) _callback(e);
+ return;
+ }
+ var version = versionIter.value;
+ var lev = _this4.lastEnteredVersion();
+
+ tryCatch(e, function () {
+ upgradeVersion.call(_this4, version, e, oldVersion, function () {
+ tryCatch(e, function () {
+ _this4._versions[version].callbacks.forEach(function (cb) {
+ _this4.setCurrentVersion(version); // Reset current version for callback to be able to operate on this version rather than the last added one
+ cb.call(_this4, e); // Call on `this` as can still modify schema in these callbacks
+ });
+ _this4.setCurrentVersion(lev);
+ upgrade(e, oldVersion);
+ });
+ });
+ });
+ };
+ return upgradeneeded(upgrade);
+ }
+
+ /**
+ * Get a description of the stores.
+ * It creates a deep clone of `this._stores` object
+ * and transform it to an array.
+ *
+ * @return {Array}
+ */
+
+ }, {
+ key: 'stores',
+ value: function stores() {
+ return values(_clone(this._stores)).map(function (store) {
+ store.indexes = values(store.indexes).map(function (index) {
+ delete index.storeName;
+ return index;
+ });
+ return store;
+ });
+ }
+
+ /**
+ * Clone `this` to new schema object.
+ *
+ * @return {Schema} - new object
+ */
+
+ }, {
+ key: 'clone',
+ value: function clone() {
+ var _this5 = this;
+
+ var schema = new Schema();
+ Object.keys(this).forEach(function (key) {
+ return schema[key] = _clone(_this5[key]);
+ });
+ return schema;
+ }
+ }]);
+
+ return Schema;
+}();
+
+/**
+ * Clone `obj`.
+ * https://github.com/component/clone/blob/master/index.js
+ */
+
+exports.default = Schema;
+function _clone(obj) {
+ if (Array.isArray(obj)) {
+ return obj.map(function (val) {
+ return _clone(val);
+ });
+ }
+ if ((0, _isPlainObj2.default)(obj)) {
+ return Object.keys(obj).reduce(function (copy, key) {
+ copy[key] = _clone(obj[key]);
+ return copy;
+ }, {});
+ }
+ return obj;
+}
+
+/**
+ * Utility for `upgradeneeded`.
+ * @todo Can `oldVersion` be overwritten and this utility exposed within idb-factory?
+ */
+
+function upgradeneeded(cb) {
+ return function (e) {
+ var oldVersion = e.oldVersion > MAX_VERSION ? 0 : e.oldVersion; // Safari bug: https://bugs.webkit.org/show_bug.cgi?id=136888
+ cb(e, oldVersion);
+ };
+}
+
+function upgradeVersion(version, e, oldVersion, finishedCb) {
+ var _this6 = this;
+
+ if (oldVersion >= version) return;
+
+ var db = e.target.result;
+ var tr = e.target.transaction;
+
+ var lev = this.lastEnteredVersion();
+ this._versions[version].earlyCallbacks.forEach(function (cb) {
+ _this6.setCurrentVersion(version); // Reset current version for callback to be able to operate on this version rather than the last added one
+ cb.call(_this6, e);
+ });
+ this.setCurrentVersion(lev);
+
+ // Now we can cache as no more callbacks to modify this._versions data
+ var versionSchema = this._versions[version];
+ versionSchema.dropStores.forEach(function (s) {
+ db.deleteObjectStore(s.name);
+ });
+
+ // We wait for addition of old data and then for the deleting of the old
+ // store before iterating to add the next store (in case the user may
+ // create a new store of the same name as an old deleted store)
+ var stores = versionSchema.stores.values();
+ function iterateStores() {
+ var storeIter = stores.next();
+ if (storeIter.done) {
+ versionSchema.dropIndexes.forEach(function (i) {
+ tr.objectStore(i.storeName).deleteIndex(i.name);
+ });
+
+ versionSchema.indexes.forEach(function (i) {
+ tr.objectStore(i.storeName).createIndex(i.name, i.field, {
+ unique: i.unique,
+ multiEntry: i.multiEntry
+ });
+ });
+ if (finishedCb) finishedCb();
+ return;
+ }
+ var s = storeIter.value;
+
+ // Only pass the options that are explicitly specified to createObjectStore() otherwise IE/Edge
+ // can throw an InvalidAccessError - see https://msdn.microsoft.com/en-us/library/hh772493(v=vs.85).aspx
+ var opts = {};
+ var oldStoreName = void 0;
+ var oldObjStore = void 0;
+ if (s.copyFrom) {
+ // Store props not set yet as need reflection (and may be store not in idb-schema)
+ oldStoreName = s.copyFrom.name;
+ oldObjStore = tr.objectStore(oldStoreName);
+ var oldObjStoreOptions = s.copyFrom.options || {};
+ if (oldObjStoreOptions.keyPath !== null && oldObjStoreOptions.keyPath !== undefined) opts.keyPath = oldObjStoreOptions.keyPath;else if (oldObjStore.keyPath !== null && s.keyPath !== undefined) opts.keyPath = oldObjStore.keyPath;
+ if (oldObjStoreOptions.autoIncrement !== undefined) opts.autoIncrement = oldObjStoreOptions.autoIncrement;else if (oldObjStore.autoIncrement) opts.autoIncrement = oldObjStore.autoIncrement;
+ } else {
+ if (s.keyPath !== null && s.keyPath !== undefined) opts.keyPath = s.keyPath;
+ if (s.autoIncrement) opts.autoIncrement = s.autoIncrement;
+ }
+
+ var newObjStore = db.createObjectStore(s.name, opts);
+ if (!s.copyFrom) {
+ iterateStores();
+ return;
+ }
+ var req = oldObjStore.getAll();
+ req.onsuccess = function () {
+ var oldContents = req.result;
+ var ct = 0;
+
+ if (!oldContents.length && s.copyFrom.deleteOld) {
+ db.deleteObjectStore(oldStoreName);
+ iterateStores();
+ return;
+ }
+ oldContents.forEach(function (oldContent) {
+ var addReq = newObjStore.add(oldContent);
+ addReq.onsuccess = function () {
+ ct++;
+ if (ct === oldContents.length) {
+ if (s.copyFrom.deleteOld) {
+ db.deleteObjectStore(oldStoreName);
+ }
+ iterateStores();
+ }
+ };
+ });
+ };
+ }
+ iterateStores();
+}
+module.exports = exports['default'];
+},{"./idb-factory":286,"babel-polyfill":2,"is-plain-obj":288}],288:[function(require,module,exports){
+'use strict';
+var toString = Object.prototype.toString;
+
+module.exports = function (x) {
+ var prototype;
+ return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
+};
+
+},{}],289:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+},{}]},{},[1]);
diff --git a/dist/idb-import.js.map b/dist/idb-import.js.map
new file mode 100644
index 0000000..ef35776
--- /dev/null
+++ b/dist/idb-import.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/idb-import.js"],"names":[],"mappings":";;;;;;;;;;;;AAcA;;;;;;;;;;;;;;;;;;;;;;;;;AADA,KAAK,cAAL,GAAsB,KAAtB;;;AAGA,IAAM,YAAY,KAAK,SAAL;AAClB,IAAM,SAAS,SAAT,MAAS,CAAC,GAAD,EAAM,IAAN;WAAe,OAAO,SAAP,CAAiB,cAAjB,CAAgC,IAAhC,CAAqC,GAArC,EAA0C,IAA1C;CAAf;AACf,IAAM,qBAAqB,SAArB,kBAAq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ACf,mCAAK,0BAAL,CAAgC,SAAhC,EADe;AAEf,kCAFe;yBAAnB;AApCA,yBAwCK,OAAL;AAAc;AACV,mCAAK,sBAAL,CAA4B,SAA5B,EAAuC,iBAAvC,EAA0D,kBAA1D,EADU;AAEV,kCAFU;yBAAd;AAxCA,iBAD6C;aAA3B,CADyD;AAgD/E,mBAAO,IAAP,CAAY,WAAW,EAAX,CAAZ,CAA2B,IAA3B,GAAkC,OAAlC,CAA0C,UAAC,aAAD,EAAmB;AACzD,oBAAM,UAAU,SAAS,aAAT,EAAwB,EAAxB,CAAV,CADmD;AAEzD,oBAAI,YAAY,QAAQ,OAAR,CAAZ,CAFqD;AAGzD,oBAAI,eAAe,YAAf,IAA+B,OAAO,SAAP,KAAqB,UAArB,EAAiC;AAChE,gCAAY,iBAAZ;AADgE,iBAApE;AAGA,uBAAK,OAAL,CAAa,OAAb,EANyD;AAOzD,8BAAc,SAAd,EAAyB,UAAzB,EAAqC,OAArC,EAPyD;aAAnB,CAA1C,CAhD+E;;;;WA1NlE","file":"idb-import.js","sourcesContent":["/*\r\n# Notes\r\n\r\n1. Could use/adapt [jtlt](https://github.com/brettz9/jtlt/) for changing JSON data\r\n\r\n# Possible to-dos\r\n\r\n1. Support data within adapted JSON Merge Patch\r\n1. Allow JSON Schema to be specified during import (and export): https://github.com/aaronpowell/db.js/issues/181\r\n1. JSON format above database level to allow for deleting or moving/copying of whole databases\r\n1. `copyFrom`/`moveFrom` for indexes\r\n*/\r\n\r\nself._babelPolyfill = false; // Need by Phantom in avoiding duplicate babel polyfill error\r\nimport IdbSchema from 'idb-schema';\r\n\r\nconst stringify = JSON.stringify;\r\nconst hasOwn = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\r\nconst compareStringified = (a, b) => stringify(a) === stringify(b);\r\n\r\nexport default class IdbImport extends IdbSchema {\r\n constructor () {\r\n super();\r\n }\r\n _setup (schema, cb, mergePatch) {\r\n const isNUL = schema === '\\0';\r\n if (!schema || typeof schema !== 'object' && !(mergePatch && isNUL)) {\r\n throw new Error('Bad schema object');\r\n }\r\n this.addEarlyCallback((e) => {\r\n const db = e.target.result;\r\n const transaction = e.target.transaction;\r\n if (mergePatch && isNUL) {\r\n this._deleteAllUnused(db, transaction, {}, true);\r\n return;\r\n }\r\n return cb(e, db, transaction);\r\n });\r\n }\r\n _deleteIndexes (transaction, storeName, exceptionIndexes) {\r\n const store = transaction.objectStore(storeName); // Shouldn't throw\r\n Array.from(store.indexNames).forEach((indexName) => {\r\n if (!exceptionIndexes || !hasOwn(exceptionIndexes, indexName)) {\r\n this.delIndex(indexName);\r\n }\r\n });\r\n }\r\n _deleteAllUnused (db, transaction, schema, clearUnusedStores, clearUnusedIndexes) {\r\n if (clearUnusedStores || clearUnusedIndexes) {\r\n Array.from(db.objectStoreNames).forEach((storeName) => {\r\n if (clearUnusedStores && !hasOwn(schema, storeName)) {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `TransactionInactiveError` (as by the upgrade having already\r\n // completed or somehow aborting) - since we've just started and\r\n // should be without risk in this loop\r\n // `NotFoundError` - since we are iterating the dynamically updated\r\n // `objectStoreNames`\r\n // this._versions[version].dropStores.push({name: storeName});\r\n // Avoid deleting if going to delete in a move/copy\r\n if (!Object.keys(schema).some((key) => [schema[key].moveFrom, schema[key].copyFrom].includes(storeName))) {\r\n this.delStore(storeName); // Shouldn't throw // Keep this and delete previous line if this PR is accepted: https://github.com/treojs/idb-schema/pull/14\r\n }\r\n } else if (clearUnusedIndexes) {\r\n this._deleteIndexes(transaction, storeName, schema[storeName].indexes);\r\n }\r\n });\r\n }\r\n }\r\n _createStoreIfNotSame (db, transaction, schema, storeName, mergePatch) {\r\n const newStore = schema[storeName];\r\n let store;\r\n let storeParams = {};\r\n function setCanonicalProps (storeProp) {\r\n let canonicalPropValue;\r\n if (hasOwn(newStore, 'key')) { // Support old approach of db.js\r\n canonicalPropValue = newStore.key[storeProp];\r\n } else if (hasOwn(newStore, storeProp)) {\r\n canonicalPropValue = newStore[storeProp];\r\n } else {\r\n canonicalPropValue = storeProp === 'keyPath' ? null : false;\r\n }\r\n if (mergePatch && typeof canonicalPropValue === 'string') {\r\n if (canonicalPropValue === '\\0') {\r\n canonicalPropValue = storeProp === 'keyPath' ? null : false;\r\n } else {\r\n canonicalPropValue = canonicalPropValue.replace(/^\\0/, ''); // Remove escape if present\r\n }\r\n }\r\n storeParams[storeProp] = canonicalPropValue;\r\n }\r\n const copyFrom = newStore.copyFrom;\r\n const moveFrom = newStore.moveFrom;\r\n try {\r\n ['keyPath', 'autoIncrement'].forEach(setCanonicalProps);\r\n if (!db.objectStoreNames.contains(storeName)) {\r\n throw new Error('goto catch to build store');\r\n }\r\n store = transaction.objectStore(storeName); // Shouldn't throw\r\n this.getStore(store);\r\n if (!['keyPath', 'autoIncrement'].every((storeProp) => {\r\n return compareStringified(storeParams[storeProp], store[storeProp]);\r\n })) {\r\n // Avoid deleting if going to delete in a move/copy\r\n if (!copyFrom && !moveFrom) this.delStore(storeName);\r\n throw new Error('goto catch to build store');\r\n }\r\n } catch (err) {\r\n if (err.message !== 'goto catch to build store') {\r\n throw err;\r\n }\r\n if (copyFrom) {\r\n this.copyStore(copyFrom, storeName, storeParams); // May throw\r\n } else if (moveFrom) {\r\n this.renameStore(moveFrom, storeName, storeParams); // May throw\r\n } else {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.\r\n // `ConstraintError` - The above condition should prevent the name already existing.\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the store but then abort the transaction.\r\n // `SyntaxError` - if an invalid `storeParams.keyPath` is supplied.\r\n // `InvalidAccessError` - if `storeParams.autoIncrement` is `true` and `storeParams.keyPath` is an\r\n // empty string or any sequence (empty or otherwise).\r\n this.addStore(storeName, storeParams); // May throw\r\n }\r\n }\r\n return [store, newStore];\r\n }\r\n _createIndex (store, indexes, indexName, mergePatch) {\r\n let newIndex = indexes[indexName];\r\n let indexParams = {};\r\n function setCanonicalProps (indexProp) {\r\n let canonicalPropValue;\r\n if (hasOwn(newIndex, indexProp)) {\r\n canonicalPropValue = newIndex[indexProp];\r\n } else {\r\n canonicalPropValue = indexProp === 'keyPath' ? null : false;\r\n }\r\n if (mergePatch && typeof canonicalPropValue === 'string') {\r\n if (canonicalPropValue === '\\0') {\r\n canonicalPropValue = indexProp === 'keyPath' ? null : false;\r\n } else {\r\n canonicalPropValue = canonicalPropValue.replace(/^\\0/, ''); // Remove escape if present\r\n }\r\n }\r\n indexParams[indexProp] = canonicalPropValue;\r\n }\r\n try {\r\n ['keyPath', 'unique', 'multiEntry', 'locale'].forEach(setCanonicalProps);\r\n if (!store || !store.indexNames.contains(indexName)) {\r\n throw new Error('goto catch to build index');\r\n }\r\n const oldIndex = store.index(indexName);\r\n if (!['keyPath', 'unique', 'multiEntry', 'locale'].every((indexProp) => {\r\n return compareStringified(indexParams[indexProp], oldIndex[indexProp]);\r\n })) {\r\n this.delIndex(indexName);\r\n throw new Error('goto catch to build index');\r\n }\r\n } catch (err) {\r\n if (err.message !== 'goto catch to build index') {\r\n throw err;\r\n }\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.\r\n // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the index object but then abort the transaction.\r\n // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path\r\n // `InvalidAccessError` - If `multiEntry` on `index` is `true` and\r\n // `keyPath` (second argument) is a sequence\r\n this.addIndex(indexName, indexParams.keyPath !== null ? indexParams.keyPath : indexName, indexParams);\r\n }\r\n }\r\n createIdbSchemaPatchSchema (schema) {\r\n schema(this); // May throw\r\n }\r\n // Modified JSON Merge Patch type schemas: https://github.com/json-schema-org/json-schema-spec/issues/15#issuecomment-211142145\r\n createMergePatchSchema (schema) {\r\n this._setup(schema, (e, db, transaction) => {\r\n Object.keys(schema).forEach((storeName) => {\r\n const schemaObj = schema[storeName];\r\n const isNUL = schemaObj === '\\0';\r\n if (isNUL) {\r\n this.delStore(storeName);\r\n return;\r\n }\r\n if (!schemaObj || typeof schemaObj !== 'object') {\r\n throw new Error('Invalid merge patch schema object (type: ' + typeof schemaObj + '): ' + schemaObj);\r\n }\r\n const [store] = this._createStoreIfNotSame(db, transaction, schema, storeName, true);\r\n if (hasOwn(schemaObj, 'indexes')) {\r\n const indexes = schemaObj.indexes;\r\n const isNUL = indexes === '\\0';\r\n if (isNUL) {\r\n this._deleteIndexes(transaction, storeName);\r\n return;\r\n }\r\n if (!indexes || typeof indexes !== 'object') {\r\n throw new Error('Invalid merge patch indexes object (type: ' + typeof indexes + '): ' + indexes);\r\n }\r\n Object.keys(indexes).forEach((indexName) => {\r\n const indexObj = indexes[indexName];\r\n const isNUL = indexObj === '\\0';\r\n if (isNUL) {\r\n this.delIndex(indexName);\r\n return;\r\n }\r\n if (!indexObj || typeof indexObj !== 'object') {\r\n throw new Error('Invalid merge patch index object (type: ' + typeof indexObj + '): ' + indexObj);\r\n }\r\n this._createIndex(store, indexes, indexName, true);\r\n });\r\n }\r\n });\r\n });\r\n }\r\n createWholePatchSchema (schema, clearUnusedStores = true, clearUnusedIndexes = true) {\r\n this._setup(schema, (e, db, transaction) => {\r\n this._deleteAllUnused(db, transaction, schema, clearUnusedStores, clearUnusedIndexes);\r\n\r\n Object.keys(schema).forEach((storeName) => {\r\n const [store, newStore] = this._createStoreIfNotSame(db, transaction, schema, storeName);\r\n const indexes = newStore.indexes;\r\n Object.keys(indexes || {}).forEach((indexName) => {\r\n this._createIndex(store, indexes, indexName);\r\n });\r\n });\r\n });\r\n }\r\n createVersionedSchema (schemas, schemaType, clearUnusedStores, clearUnusedIndexes) {\r\n const createPatches = (schemaObj, schemaType) => {\r\n switch (schemaType) {\r\n case 'mixed': {\r\n schemaObj.forEach((mixedObj) => {\r\n const schemaType = Object.keys(mixedObj)[0];\r\n let schema = mixedObj[schemaType];\r\n if (schemaType !== 'idb-schema' && schema === 'function') {\r\n schema = schema(this); // May throw\r\n }\r\n // These could immediately throw with a bad version\r\n switch (schemaType) {\r\n case 'idb-schema': { // Function called above\r\n this.createIdbSchemaPatchSchema(schema);\r\n break;\r\n }\r\n case 'merge': {\r\n this.createMergePatchSchema(schema);\r\n break;\r\n }\r\n case 'whole': {\r\n this.createWholePatchSchema(schema, clearUnusedStores, clearUnusedIndexes);\r\n break;\r\n }\r\n case 'mixed': {\r\n createPatches(schema, schemaType);\r\n break;\r\n }\r\n default:\r\n throw new Error('Unrecognized schema type');\r\n }\r\n });\r\n break;\r\n }\r\n case 'merge': {\r\n this.createMergePatchSchema(schemaObj);\r\n break;\r\n }\r\n case 'idb-schema': {\r\n this.createIdbSchemaPatchSchema(schemaObj);\r\n break;\r\n }\r\n case 'whole': {\r\n this.createWholePatchSchema(schemaObj, clearUnusedStores, clearUnusedIndexes);\r\n break;\r\n }\r\n }\r\n };\r\n Object.keys(schemas || {}).sort().forEach((schemaVersion) => {\r\n const version = parseInt(schemaVersion, 10);\r\n let schemaObj = schemas[version];\r\n if (schemaType !== 'idb-schema' && typeof schemaObj === 'function') {\r\n schemaObj = schemaObj(this); // May throw\r\n }\r\n this.version(version);\r\n createPatches(schemaObj, schemaType, version);\r\n });\r\n }\r\n}\r\n"]}
\ No newline at end of file
diff --git a/dist/idb-import.min.js b/dist/idb-import.min.js
new file mode 100644
index 0000000..78e5d6f
--- /dev/null
+++ b/dist/idb-import.min.js
@@ -0,0 +1,6 @@
+!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g2?arguments[2]:void 0,k=Math.min((void 0===j?g:e(j,g))-i,g-h),l=1;for(h>i&&i+k>h&&(l=-1,i+=k-1,h+=k-1);k-->0;)i in c?c[h]=c[i]:delete c[h],h+=l,i+=l;return c}},{"./_to-index":102,"./_to-length":105,"./_to-object":106}],10:[function(a,b,c){"use strict";var d=a("./_to-object"),e=a("./_to-index"),f=a("./_to-length");b.exports=function(a){for(var b=d(this),c=f(b.length),g=arguments.length,h=e(g>1?arguments[1]:void 0,c),i=g>2?arguments[2]:void 0,j=void 0===i?c:e(i,c);j>h;)b[h++]=a;return b}},{"./_to-index":102,"./_to-length":105,"./_to-object":106}],11:[function(a,b,c){var d=a("./_for-of");b.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},{"./_for-of":35}],12:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_to-length"),f=a("./_to-index");b.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k;return!a&&-1}}},{"./_to-index":102,"./_to-iobject":104,"./_to-length":105}],13:[function(a,b,c){var d=a("./_ctx"),e=a("./_iobject"),f=a("./_to-object"),g=a("./_to-length"),h=a("./_array-species-create");b.exports=function(a,b){var c=1==a,i=2==a,j=3==a,k=4==a,l=6==a,m=5==a||l,n=b||h;return function(b,h,o){for(var p,q,r=f(b),s=e(r),t=d(h,o,3),u=g(s.length),v=0,w=c?n(b,u):i?n(b,0):void 0;u>v;v++)if((m||v in s)&&(p=s[v],q=t(p,v,r),a))if(c)w[v]=q;else if(q)switch(a){case 3:return!0;case 5:return p;case 6:return v;case 2:w.push(p)}else if(k)return!1;return l?-1:j||k?k:w}}},{"./_array-species-create":15,"./_ctx":24,"./_iobject":43,"./_to-length":105,"./_to-object":106}],14:[function(a,b,c){var d=a("./_a-function"),e=a("./_to-object"),f=a("./_iobject"),g=a("./_to-length");b.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(2>c)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?0>m:m>=l)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},{"./_a-function":4,"./_iobject":43,"./_to-length":105,"./_to-object":106}],15:[function(a,b,c){var d=a("./_is-object"),e=a("./_is-array"),f=a("./_wks")("species");b.exports=function(a,b){var c;return e(a)&&(c=a.constructor,"function"!=typeof c||c!==Array&&!e(c.prototype)||(c=void 0),d(c)&&(c=c[f],null===c&&(c=void 0))),new(void 0===c?Array:c)(b)}},{"./_is-array":45,"./_is-object":47,"./_wks":112}],16:[function(a,b,c){"use strict";var d=a("./_a-function"),e=a("./_is-object"),f=a("./_invoke"),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;b>e;e++)d[e]="a["+e+"]";h[b]=Function("F,a","return new F("+d.join(",")+")")}return h[b](a,c)};b.exports=Function.bind||function(a){var b=d(this),c=g.call(arguments,1),h=function(){var d=c.concat(g.call(arguments));return this instanceof h?i(b,d.length,d):f(b,d,a)};return e(b.prototype)&&(h.prototype=b.prototype),h}},{"./_a-function":4,"./_invoke":42,"./_is-object":47}],17:[function(a,b,c){var d=a("./_cof"),e=a("./_wks")("toStringTag"),f="Arguments"==d(function(){return arguments}()),g=function(a,b){try{return a[b]}catch(c){}};b.exports=function(a){var b,c,h;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=g(b=Object(a),e))?c:f?d(b):"Object"==(h=d(b))&&"function"==typeof b.callee?"Arguments":h}},{"./_cof":18,"./_wks":112}],18:[function(a,b,c){var d={}.toString;b.exports=function(a){return d.call(a).slice(8,-1)}},{}],19:[function(a,b,c){"use strict";var d=a("./_object-dp").f,e=a("./_object-create"),f=(a("./_hide"),a("./_redefine-all")),g=a("./_ctx"),h=a("./_an-instance"),i=a("./_defined"),j=a("./_for-of"),k=a("./_iter-define"),l=a("./_iter-step"),m=a("./_set-species"),n=a("./_descriptors"),o=a("./_meta").fastKey,p=n?"_s":"size",q=function(a,b){var c,d=o(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};b.exports={getConstructor:function(a,b,c,k){var l=a(function(a,d){h(a,l,b,"_i"),a._i=e(null),a._f=void 0,a._l=void 0,a[p]=0,void 0!=d&&j(d,c,a[k],a)});return f(l.prototype,{clear:function(){for(var a=this,b=a._i,c=a._f;c;c=c.n)c.r=!0,c.p&&(c.p=c.p.n=void 0),delete b[c.i];a._f=a._l=void 0,a[p]=0},"delete":function(a){var b=this,c=q(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[p]--}return!!c},forEach:function(a){h(this,l,"forEach");for(var b,c=g(a,arguments.length>1?arguments[1]:void 0,3);b=b?b.n:this._f;)for(c(b.v,b.k,this);b&&b.r;)b=b.p},has:function(a){return!!q(this,a)}}),n&&d(l.prototype,"size",{get:function(){return i(this[p])}}),l},def:function(a,b,c){var d,e,f=q(a,b);return f?f.v=c:(a._l=f={i:e=o(b,!0),k:b,v:c,p:d=a._l,n:void 0,r:!1},a._f||(a._f=f),d&&(d.n=f),a[p]++,"F"!==e&&(a._i[e]=f)),a},getEntry:q,setStrong:function(a,b,c){k(a,b,function(a,b){this._t=a,this._k=b,this._l=void 0},function(){for(var a=this,b=a._k,c=a._l;c&&c.r;)c=c.p;return a._t&&(a._l=c=c?c.n:a._t._f)?"keys"==b?l(0,c.k):"values"==b?l(0,c.v):l(0,[c.k,c.v]):(a._t=void 0,l(1))},c?"entries":"values",!c,!0),m(b)}}},{"./_an-instance":7,"./_ctx":24,"./_defined":25,"./_descriptors":26,"./_for-of":35,"./_hide":38,"./_iter-define":51,"./_iter-step":53,"./_meta":60,"./_object-create":64,"./_object-dp":65,"./_redefine-all":83,"./_set-species":88}],20:[function(a,b,c){var d=a("./_classof"),e=a("./_array-from-iterable");b.exports=function(a){return function(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},{"./_array-from-iterable":11,"./_classof":17}],21:[function(a,b,c){"use strict";var d=a("./_redefine-all"),e=a("./_meta").getWeak,f=a("./_an-object"),g=a("./_is-object"),h=a("./_an-instance"),i=a("./_for-of"),j=a("./_array-methods"),k=a("./_has"),l=j(5),m=j(6),n=0,o=function(a){return a._l||(a._l=new p)},p=function(){this.a=[]},q=function(a,b){return l(a.a,function(a){return a[0]===b})};p.prototype={get:function(a){var b=q(this,a);return b?b[1]:void 0},has:function(a){return!!q(this,a)},set:function(a,b){var c=q(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=m(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},b.exports={getConstructor:function(a,b,c,f){var j=a(function(a,d){h(a,j,b,"_i"),a._i=n++,a._l=void 0,void 0!=d&&i(d,c,a[f],a)});return d(j.prototype,{"delete":function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this)["delete"](a):b&&k(b,this._i)&&delete b[this._i]},has:function(a){if(!g(a))return!1;var b=e(a);return b===!0?o(this).has(a):b&&k(b,this._i)}}),j},def:function(a,b,c){var d=e(f(b),!0);return d===!0?o(a).set(b,c):d[a._i]=c,a},ufstore:o}},{"./_an-instance":7,"./_an-object":8,"./_array-methods":13,"./_for-of":35,"./_has":37,"./_is-object":47,"./_meta":60,"./_redefine-all":83}],22:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_export"),f=a("./_redefine"),g=a("./_redefine-all"),h=a("./_meta"),i=a("./_for-of"),j=a("./_an-instance"),k=a("./_is-object"),l=a("./_fails"),m=a("./_iter-detect"),n=a("./_set-to-string-tag"),o=a("./_inherit-if-required");b.exports=function(a,b,c,p,q,r){var s=d[a],t=s,u=q?"set":"add",v=t&&t.prototype,w={},x=function(a){var b=v[a];f(v,a,"delete"==a?function(a){return r&&!k(a)?!1:b.call(this,0===a?0:a)}:"has"==a?function(a){return r&&!k(a)?!1:b.call(this,0===a?0:a)}:"get"==a?function(a){return r&&!k(a)?void 0:b.call(this,0===a?0:a)}:"add"==a?function(a){return b.call(this,0===a?0:a),this}:function(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof t&&(r||v.forEach&&!l(function(){(new t).entries().next()}))){var y=new t,z=y[u](r?{}:-0,1)!=y,A=l(function(){y.has(1)}),B=m(function(a){new t(a)}),C=!r&&l(function(){for(var a=new t,b=5;b--;)a[u](b,b);return!a.has(-0)});B||(t=b(function(b,c){j(b,t,a);var d=o(new s,b,t);return void 0!=c&&i(c,q,d[u],d),d}),t.prototype=v,v.constructor=t),(A||C)&&(x("delete"),x("has"),q&&x("get")),(C||z)&&x(u),r&&v.clear&&delete v.clear}else t=p.getConstructor(b,a,q,u),g(t.prototype,c),h.NEED=!0;return n(t,a),w[a]=t,e(e.G+e.W+e.F*(t!=s),w),r||p.setStrong(t,a,q),t}},{"./_an-instance":7,"./_export":30,"./_fails":32,"./_for-of":35,"./_global":36,"./_inherit-if-required":41,"./_is-object":47,"./_iter-detect":52,"./_meta":60,"./_redefine":84,"./_redefine-all":83,"./_set-to-string-tag":89}],23:[function(a,b,c){var d=b.exports={version:"2.1.5"};"number"==typeof __e&&(__e=d)},{}],24:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":4}],25:[function(a,b,c){b.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},{}],26:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":32}],27:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":36,"./_is-object":47}],28:[function(a,b,c){b.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],29:[function(a,b,c){var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie");b.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},{"./_object-gops":70,"./_object-keys":73,"./_object-pie":74}],30:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_hide"),g=a("./_redefine"),h=a("./_ctx"),i="prototype",j=function(a,b,c){var k,l,m,n,o=a&j.F,p=a&j.G,q=a&j.S,r=a&j.P,s=a&j.B,t=p?d:q?d[b]||(d[b]={}):(d[b]||{})[i],u=p?e:e[b]||(e[b]={}),v=u[i]||(u[i]={});p&&(c=b);for(k in c)l=!o&&t&&void 0!==t[k],m=(l?t:c)[k],n=s&&l?h(m,d):r&&"function"==typeof m?h(Function.call,m):m,t&&g(t,k,m,a&j.U),u[k]!=m&&f(u,k,n),r&&v[k]!=m&&(v[k]=m)};d.core=e,j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,b.exports=j},{"./_core":23,"./_ctx":24,"./_global":36,"./_hide":38,"./_redefine":84}],31:[function(a,b,c){var d=a("./_wks")("match");b.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},{"./_wks":112}],32:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(b){return!0}}},{}],33:[function(a,b,c){"use strict";var d=a("./_hide"),e=a("./_redefine"),f=a("./_fails"),g=a("./_defined"),h=a("./_wks");b.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},{"./_defined":25,"./_fails":32,"./_hide":38,"./_redefine":84,"./_wks":112}],34:[function(a,b,c){"use strict";var d=a("./_an-object");b.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},{"./_an-object":8}],35:[function(a,b,c){var d=a("./_ctx"),e=a("./_iter-call"),f=a("./_is-array-iter"),g=a("./_an-object"),h=a("./_to-length"),i=a("./core.get-iterator-method");b.exports=function(a,b,c,j,k){var l,m,n,o=k?function(){return a}:i(a),p=d(c,j,b?2:1),q=0;if("function"!=typeof o)throw TypeError(a+" is not iterable!");if(f(o))for(l=h(a.length);l>q;q++)b?p(g(m=a[q])[0],m[1]):p(a[q]);else for(n=o.call(a);!(m=n.next()).done;)e(n,p,m.value,b)}},{"./_an-object":8,"./_ctx":24,"./_is-array-iter":44,"./_iter-call":49,"./_to-length":105,"./core.get-iterator-method":113}],36:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],37:[function(a,b,c){var d={}.hasOwnProperty;b.exports=function(a,b){return d.call(a,b)}},{}],38:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":26,"./_object-dp":65,"./_property-desc":82}],39:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":36}],40:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":26,"./_dom-create":27,"./_fails":32}],41:[function(a,b,c){var d=a("./_is-object"),e=a("./_set-proto").set;b.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},{"./_is-object":47,"./_set-proto":87}],42:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],43:[function(a,b,c){var d=a("./_cof");b.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},{"./_cof":18}],44:[function(a,b,c){var d=a("./_iterators"),e=a("./_wks")("iterator"),f=Array.prototype;b.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}},{"./_iterators":54,"./_wks":112}],45:[function(a,b,c){var d=a("./_cof");b.exports=Array.isArray||function(a){return"Array"==d(a)}},{"./_cof":18}],46:[function(a,b,c){var d=a("./_is-object"),e=Math.floor;b.exports=function(a){return!d(a)&&isFinite(a)&&e(a)===a}},{"./_is-object":47}],47:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],48:[function(a,b,c){var d=a("./_is-object"),e=a("./_cof"),f=a("./_wks")("match");b.exports=function(a){var b;return d(a)&&(void 0!==(b=a[f])?!!b:"RegExp"==e(a))}},{"./_cof":18,"./_is-object":47,"./_wks":112}],49:[function(a,b,c){var d=a("./_an-object");b.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(f){var g=a["return"];throw void 0!==g&&d(g.call(a)),f}}},{"./_an-object":8}],50:[function(a,b,c){"use strict";var d=a("./_object-create"),e=a("./_property-desc"),f=a("./_set-to-string-tag"),g={};a("./_hide")(g,a("./_wks")("iterator"),function(){return this}),b.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},{"./_hide":38,"./_object-create":64,"./_property-desc":82,"./_set-to-string-tag":89,"./_wks":112}],51:[function(a,b,c){"use strict";var d=a("./_library"),e=a("./_export"),f=a("./_redefine"),g=a("./_hide"),h=a("./_has"),i=a("./_iterators"),j=a("./_iter-create"),k=a("./_set-to-string-tag"),l=a("./_object-gpo"),m=a("./_wks")("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};b.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y,z=function(a){if(!n&&a in D)return D[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},A=b+" Iterator",B=t==q,C=!1,D=a.prototype,E=D[m]||D[o]||t&&D[t],F=E||z(t),G=t?B?z("entries"):F:void 0,H="Array"==b?D.entries||E:E;if(H&&(y=l(H.call(new a)),y!==Object.prototype&&(k(y,A,!0),d||h(y,m)||g(y,m,r))),B&&E&&E.name!==q&&(C=!0,F=function(){return E.call(this)}),d&&!v||!n&&!C&&D[m]||g(D,m,F),i[b]=F,i[A]=r,t)if(w={values:B?F:z(q),keys:u?F:z(p),entries:G},v)for(x in w)x in D||f(D,x,w[x]);else e(e.P+e.F*(n||C),b,w);return w}},{"./_export":30,"./_has":37,"./_hide":38,"./_iter-create":50,"./_iterators":54,"./_library":56,"./_object-gpo":71,"./_redefine":84,"./_set-to-string-tag":89,"./_wks":112}],52:[function(a,b,c){var d=a("./_wks")("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}b.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){c=!0},f[d]=function(){return g},a(f)}catch(h){}return c}},{"./_wks":112}],53:[function(a,b,c){b.exports=function(a,b){return{value:b,done:!!a}}},{}],54:[function(a,b,c){b.exports={}},{}],55:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject");b.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},{"./_object-keys":73,"./_to-iobject":104}],56:[function(a,b,c){b.exports=!1},{}],57:[function(a,b,c){b.exports=Math.expm1||function(a){return 0==(a=+a)?a:a>-1e-6&&1e-6>a?a+a*a/2:Math.exp(a)-1}},{}],58:[function(a,b,c){b.exports=Math.log1p||function(a){return(a=+a)>-1e-8&&1e-8>a?a-a*a/2:Math.log(1+a)}},{}],59:[function(a,b,c){b.exports=Math.sign||function(a){return 0==(a=+a)||a!=a?a:0>a?-1:1}},{}],60:[function(a,b,c){var d=a("./_uid")("meta"),e=a("./_is-object"),f=a("./_has"),g=a("./_object-dp").f,h=0,i=Object.isExtensible||function(){return!0},j=!a("./_fails")(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=b.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},{"./_fails":32,"./_has":37,"./_is-object":47,"./_object-dp":65,"./_uid":111}],61:[function(a,b,c){var d=a("./es6.map"),e=a("./_export"),f=a("./_shared")("metadata"),g=f.store||(f.store=new(a("./es6.weak-map"))),h=function(a,b,c){var e=g.get(a);if(!e){if(!c)return void 0;g.set(a,e=new d)}var f=e.get(b);if(!f){if(!c)return void 0;e.set(b,f=new d)}return f},i=function(a,b,c){var d=h(b,c,!1);return void 0===d?!1:d.has(a)},j=function(a,b,c){var d=h(b,c,!1);return void 0===d?void 0:d.get(a)},k=function(a,b,c,d){h(c,d,!0).set(a,b)},l=function(a,b){var c=h(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},m=function(a){return void 0===a||"symbol"==typeof a?a:String(a)},n=function(a){e(e.S,"Reflect",a)};b.exports={store:g,map:h,has:i,get:j,set:k,keys:l,key:m,exp:n}},{"./_export":30,"./_shared":91,"./es6.map":144,"./es6.weak-map":250}],62:[function(a,b,c){var d,e,f,g=a("./_global"),h=a("./_task").set,i=g.MutationObserver||g.WebKitMutationObserver,j=g.process,k=g.Promise,l="process"==a("./_cof")(j),m=function(){var a,b;for(l&&(a=j.domain)&&a.exit();d;)b=d.fn,b(),d=d.next;e=void 0,a&&a.enter()};if(l)f=function(){j.nextTick(m)};else if(i){var n=!0,o=document.createTextNode("");new i(m).observe(o,{characterData:!0}),f=function(){o.data=n=!n}}else f=k&&k.resolve?function(){k.resolve().then(m)}:function(){h.call(g,m)};b.exports=function(a){var b={fn:a,next:void 0};e&&(e.next=b),d||(d=b,f()),e=b}},{"./_cof":18,"./_global":36,"./_task":101}],63:[function(a,b,c){"use strict";var d=a("./_object-keys"),e=a("./_object-gops"),f=a("./_object-pie"),g=a("./_to-object"),h=a("./_iobject"),i=Object.assign;b.exports=!i||a("./_fails")(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},{"./_fails":32,"./_iobject":43,"./_object-gops":70,"./_object-keys":73,"./_object-pie":74,"./_to-object":106}],64:[function(a,b,c){var d=a("./_an-object"),e=a("./_object-dps"),f=a("./_enum-bug-keys"),g=a("./_shared-key")("IE_PROTO"),h=function(){},i="prototype",j=function(){var b,c=a("./_dom-create")("iframe"),d=f.length,e=">";for(c.style.display="none",a("./_html").appendChild(c),c.src="javascript:",b=c.contentWindow.document,b.open(),b.write("i;)d.f(a,c=g[i++],b[c]);return a}},{"./_an-object":8,"./_descriptors":26,"./_object-dp":65,"./_object-keys":73}],67:[function(a,b,c){var d=a("./_object-pie"),e=a("./_property-desc"),f=a("./_to-iobject"),g=a("./_to-primitive"),h=a("./_has"),i=a("./_ie8-dom-define"),j=Object.getOwnPropertyDescriptor;c.f=a("./_descriptors")?j:function(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}return h(a,b)?e(!d.f.call(a,b),a[b]):void 0}},{"./_descriptors":26,"./_has":37,"./_ie8-dom-define":40,"./_object-pie":74,"./_property-desc":82,"./_to-iobject":104,"./_to-primitive":107}],68:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopn").f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e.f(a)}catch(b){return g.slice()}};b.exports.f=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},{"./_object-gopn":69,"./_to-iobject":104}],69:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(a){return d(a,e)}},{"./_enum-bug-keys":28,"./_object-keys-internal":72}],70:[function(a,b,c){c.f=Object.getOwnPropertySymbols},{}],71:[function(a,b,c){var d=a("./_has"),e=a("./_to-object"),f=a("./_shared-key")("IE_PROTO"),g=Object.prototype;b.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},{"./_has":37,"./_shared-key":90,"./_to-object":106}],72:[function(a,b,c){var d=a("./_has"),e=a("./_to-iobject"),f=a("./_array-includes")(!1),g=a("./_shared-key")("IE_PROTO");b.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},{"./_array-includes":12,"./_has":37,"./_shared-key":90,"./_to-iobject":104}],73:[function(a,b,c){var d=a("./_object-keys-internal"),e=a("./_enum-bug-keys");b.exports=Object.keys||function(a){return d(a,e)}},{"./_enum-bug-keys":28,"./_object-keys-internal":72}],74:[function(a,b,c){c.f={}.propertyIsEnumerable},{}],75:[function(a,b,c){var d=a("./_export"),e=a("./_core"),f=a("./_fails");b.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},{"./_core":23,"./_export":30,"./_fails":32}],76:[function(a,b,c){var d=a("./_object-keys"),e=a("./_to-iobject"),f=a("./_object-pie").f;b.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},{"./_object-keys":73,
+"./_object-pie":74,"./_to-iobject":104}],77:[function(a,b,c){var d=a("./_object-gopn"),e=a("./_object-gops"),f=a("./_an-object"),g=a("./_global").Reflect;b.exports=g&&g.ownKeys||function(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},{"./_an-object":8,"./_global":36,"./_object-gopn":69,"./_object-gops":70}],78:[function(a,b,c){var d=a("./_global").parseFloat,e=a("./_string-trim").trim;b.exports=1/d(a("./_string-ws")+"-0")!==-(1/0)?function(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},{"./_global":36,"./_string-trim":99,"./_string-ws":100}],79:[function(a,b,c){var d=a("./_global").parseInt,e=a("./_string-trim").trim,f=a("./_string-ws"),g=/^[\-+]?0[xX]/;b.exports=8!==d(f+"08")||22!==d(f+"0x16")?function(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},{"./_global":36,"./_string-trim":99,"./_string-ws":100}],80:[function(a,b,c){"use strict";var d=a("./_path"),e=a("./_invoke"),f=a("./_a-function");b.exports=function(){for(var a=f(this),b=arguments.length,c=Array(b),g=0,h=d._,i=!1;b>g;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},{"./_a-function":4,"./_invoke":42,"./_path":81}],81:[function(a,b,c){b.exports=a("./_global")},{"./_global":36}],82:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],83:[function(a,b,c){var d=a("./_redefine");b.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},{"./_redefine":84}],84:[function(a,b,c){var d=a("./_global"),e=a("./_hide"),f=a("./_has"),g=a("./_uid")("src"),h="toString",i=Function[h],j=(""+i).split(h);a("./_core").inspectSource=function(a){return i.call(a)},(b.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function(){return"function"==typeof this&&this[g]||i.call(this)})},{"./_core":23,"./_global":36,"./_has":37,"./_hide":38,"./_uid":111}],85:[function(a,b,c){b.exports=function(a,b){var c=b===Object(b)?function(a){return b[a]}:b;return function(b){return String(b).replace(a,c)}}},{}],86:[function(a,b,c){b.exports=Object.is||function(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},{}],87:[function(a,b,c){var d=a("./_is-object"),e=a("./_an-object"),f=function(a,b){if(e(a),!d(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};b.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c,d){try{d=a("./_ctx")(Function.call,a("./_object-gopd").f(Object.prototype,"__proto__").set,2),d(b,[]),c=!(b instanceof Array)}catch(e){c=!0}return function(a,b){return f(a,b),c?a.__proto__=b:d(a,b),a}}({},!1):void 0),check:f}},{"./_an-object":8,"./_ctx":24,"./_is-object":47,"./_object-gopd":67}],88:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_object-dp"),f=a("./_descriptors"),g=a("./_wks")("species");b.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},{"./_descriptors":26,"./_global":36,"./_object-dp":65,"./_wks":112}],89:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_has"),f=a("./_wks")("toStringTag");b.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},{"./_has":37,"./_object-dp":65,"./_wks":112}],90:[function(a,b,c){var d=a("./_shared")("keys"),e=a("./_uid");b.exports=function(a){return d[a]||(d[a]=e(a))}},{"./_shared":91,"./_uid":111}],91:[function(a,b,c){var d=a("./_global"),e="__core-js_shared__",f=d[e]||(d[e]={});b.exports=function(a){return f[a]||(f[a]={})}},{"./_global":36}],92:[function(a,b,c){var d=a("./_an-object"),e=a("./_a-function"),f=a("./_wks")("species");b.exports=function(a,b){var c,g=d(a).constructor;return void 0===g||void 0==(c=d(g)[f])?b:e(c)}},{"./_a-function":4,"./_an-object":8,"./_wks":112}],93:[function(a,b,c){var d=a("./_fails");b.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},{"./_fails":32}],94:[function(a,b,c){var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return 0>i||i>=j?a?"":void 0:(f=h.charCodeAt(i),55296>f||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},{"./_defined":25,"./_to-integer":103}],95:[function(a,b,c){var d=a("./_is-regexp"),e=a("./_defined");b.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},{"./_defined":25,"./_is-regexp":48}],96:[function(a,b,c){var d=a("./_export"),e=a("./_fails"),f=a("./_defined"),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""+b+">"};b.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},{"./_defined":25,"./_export":30,"./_fails":32}],97:[function(a,b,c){var d=a("./_to-length"),e=a("./_string-repeat"),f=a("./_defined");b.exports=function(a,b,c,g){var h=String(f(a)),i=h.length,j=void 0===c?" ":String(c),k=d(b);if(i>=k)return h;""==j&&(j=" ");var l=k-i,m=e.call(j,Math.ceil(l/j.length));return m.length>l&&(m=m.slice(0,l)),g?m+h:h+m}},{"./_defined":25,"./_string-repeat":98,"./_to-length":105}],98:[function(a,b,c){"use strict";var d=a("./_to-integer"),e=a("./_defined");b.exports=function(a){var b=String(e(this)),c="",f=d(a);if(0>f||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},{"./_defined":25,"./_to-integer":103}],99:[function(a,b,c){var d=a("./_export"),e=a("./_defined"),f=a("./_fails"),g=a("./_string-ws"),h="["+g+"]",i="
",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};b.exports=l},{"./_defined":25,"./_export":30,"./_fails":32,"./_string-ws":100}],100:[function(a,b,c){b.exports=" \n\f\r \u2028\u2029\ufeff"},{}],101:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":18,"./_ctx":24,"./_dom-create":27,"./_global":36,"./_html":39,"./_invoke":42}],102:[function(a,b,c){var d=a("./_to-integer"),e=Math.max,f=Math.min;b.exports=function(a,b){return a=d(a),0>a?e(a+b,0):f(a,b)}},{"./_to-integer":103}],103:[function(a,b,c){var d=Math.ceil,e=Math.floor;b.exports=function(a){return isNaN(a=+a)?0:(a>0?e:d)(a)}},{}],104:[function(a,b,c){var d=a("./_iobject"),e=a("./_defined");b.exports=function(a){return d(e(a))}},{"./_defined":25,"./_iobject":43}],105:[function(a,b,c){var d=a("./_to-integer"),e=Math.min;b.exports=function(a){return a>0?e(d(a),9007199254740991):0}},{"./_to-integer":103}],106:[function(a,b,c){var d=a("./_defined");b.exports=function(a){return Object(d(a))}},{"./_defined":25}],107:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":47}],108:[function(a,b,c){"use strict";if(a("./_descriptors")){var d=a("./_library"),e=a("./_global"),f=a("./_fails"),g=a("./_export"),h=a("./_typed"),i=a("./_typed-buffer"),j=a("./_ctx"),k=a("./_an-instance"),l=a("./_property-desc"),m=a("./_hide"),n=a("./_redefine-all"),o=(a("./_is-integer"),a("./_to-integer")),p=a("./_to-length"),q=a("./_to-index"),r=a("./_to-primitive"),s=a("./_has"),t=a("./_same-value"),u=a("./_classof"),v=a("./_is-object"),w=a("./_to-object"),x=a("./_is-array-iter"),y=a("./_object-create"),z=a("./_object-gpo"),A=a("./_object-gopn").f,B=(a("./core.is-iterable"),a("./core.get-iterator-method")),C=a("./_uid"),D=a("./_wks"),E=a("./_array-methods"),F=a("./_array-includes"),G=a("./_species-constructor"),H=a("./es6.array.iterator"),I=a("./_iterators"),J=a("./_iter-detect"),K=a("./_set-species"),L=a("./_array-fill"),M=a("./_array-copy-within"),N=a("./_object-dp"),O=a("./_object-gopd"),P=N.f,Q=O.f,R=e.RangeError,S=e.TypeError,T=e.Uint8Array,U="ArrayBuffer",V="Shared"+U,W="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],Z=i.ArrayBuffer,$=i.DataView,_=E(0),aa=E(2),ba=E(3),ca=E(4),da=E(5),ea=E(6),fa=F(!0),ga=F(!1),ha=H.values,ia=H.keys,ja=H.entries,ka=Y.lastIndexOf,la=Y.reduce,ma=Y.reduceRight,na=Y.join,oa=Y.sort,pa=Y.slice,qa=Y.toString,ra=Y.toLocaleString,sa=D("iterator"),ta=D("toStringTag"),ua=C("typed_constructor"),va=C("def_constructor"),wa=h.CONSTR,xa=h.TYPED,ya=h.VIEW,za="Wrong length!",Aa=E(1,function(a,b){return Ga(G(a,a[va]),b)}),Ba=f(function(){return 1===new T(new Uint16Array([1]).buffer)[0]}),Ca=!!T&&!!T[X].set&&f(function(){new T(1).set({})}),Da=function(a,b){if(void 0===a)throw S(za);var c=+a,d=p(a);if(b&&!t(c,d))throw R(za);return d},Ea=function(a,b){var c=o(a);if(0>c||c%b)throw R("Wrong offset!");return c},Fa=function(a){if(v(a)&&xa in a)return a;throw S(a+" is not a typed array!")},Ga=function(a,b){if(!(v(a)&&ua in a))throw S("It is not a typed array constructor!");return new a(b)},Ha=function(a,b){return Ia(G(a,a[va]),b)},Ia=function(a,b){for(var c=0,d=b.length,e=Ga(a,d);d>c;)e[c]=b[c++];return e},Ja=function(a,b,c){P(a,b,{get:function(){return this._d[c]}})},Ka=function(a){var b,c,d,e,f,g,h=w(a),i=arguments.length,k=i>1?arguments[1]:void 0,l=void 0!==k,m=B(h);if(void 0!=m&&!x(m)){for(g=m.call(h),d=[],b=0;!(f=g.next()).done;b++)d.push(f.value);h=d}for(l&&i>2&&(k=j(k,arguments[2],2)),b=0,c=p(h.length),e=Ga(this,c);c>b;b++)e[b]=l?k(h[b],b):h[b];return e},La=function(){for(var a=0,b=arguments.length,c=Ga(this,b);b>a;)c[a]=arguments[a++];return c},Ma=!!T&&f(function(){ra.call(new T(1))}),Na=function(){return ra.apply(Ma?pa.call(Fa(this)):Fa(this),arguments)},Oa={copyWithin:function(a,b){return M.call(Fa(this),a,b,arguments.length>2?arguments[2]:void 0)},every:function(a){return ca(Fa(this),a,arguments.length>1?arguments[1]:void 0)},fill:function(a){return L.apply(Fa(this),arguments)},filter:function(a){return Ha(this,aa(Fa(this),a,arguments.length>1?arguments[1]:void 0))},find:function(a){return da(Fa(this),a,arguments.length>1?arguments[1]:void 0)},findIndex:function(a){return ea(Fa(this),a,arguments.length>1?arguments[1]:void 0)},forEach:function(a){_(Fa(this),a,arguments.length>1?arguments[1]:void 0)},indexOf:function(a){return ga(Fa(this),a,arguments.length>1?arguments[1]:void 0)},includes:function(a){return fa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},join:function(a){return na.apply(Fa(this),arguments)},lastIndexOf:function(a){return ka.apply(Fa(this),arguments)},map:function(a){return Aa(Fa(this),a,arguments.length>1?arguments[1]:void 0)},reduce:function(a){return la.apply(Fa(this),arguments)},reduceRight:function(a){return ma.apply(Fa(this),arguments)},reverse:function(){for(var a,b=this,c=Fa(b).length,d=Math.floor(c/2),e=0;d>e;)a=b[e],b[e++]=b[--c],b[c]=a;return b},slice:function(a,b){return Ha(this,pa.call(Fa(this),a,b))},some:function(a){return ba(Fa(this),a,arguments.length>1?arguments[1]:void 0)},sort:function(a){return oa.call(Fa(this),a)},subarray:function(a,b){var c=Fa(this),d=c.length,e=q(a,d);return new(G(c,c[va]))(c.buffer,c.byteOffset+e*c.BYTES_PER_ELEMENT,p((void 0===b?d:q(b,d))-e))}},Pa=function(a){Fa(this);var b=Ea(arguments[1],1),c=this.length,d=w(a),e=p(d.length),f=0;if(e+b>c)throw R(za);for(;e>f;)this[b+f]=d[f++]},Qa={entries:function(){return ja.call(Fa(this))},keys:function(){return ia.call(Fa(this))},values:function(){return ha.call(Fa(this))}},Ra=function(a,b){return v(a)&&a[xa]&&"symbol"!=typeof b&&b in a&&String(+b)==String(b)},Sa=function(a,b){return Ra(a,b=r(b,!0))?l(2,a[b]):Q(a,b)},Ta=function(a,b,c){return!(Ra(a,b=r(b,!0))&&v(c)&&s(c,"value"))||s(c,"get")||s(c,"set")||c.configurable||s(c,"writable")&&!c.writable||s(c,"enumerable")&&!c.enumerable?P(a,b,c):(a[b]=c.value,a)};wa||(O.f=Sa,N.f=Ta),g(g.S+g.F*!wa,"Object",{getOwnPropertyDescriptor:Sa,defineProperty:Ta}),f(function(){qa.call({})})&&(qa=ra=function(){return na.call(this)});var Ua=n({},Oa);n(Ua,Qa),m(Ua,sa,Qa.values),n(Ua,{set:Pa,constructor:function(){},toString:qa,toLocaleString:Na}),Ja(Ua,"buffer","b"),Ja(Ua,"byteOffset","o"),Ja(Ua,"byteLength","l"),Ja(Ua,"length","e"),P(Ua,ta,{get:function(){return this[xa]}}),b.exports=function(a,b,c,i){i=!!i;var j=a+(i?"Clamped":"")+"Array",l="Uint8Array"!=j,n="get"+a,o="set"+a,q=e[j],r=q||{},s=q&&z(q),t=!q||!h.ABV,w={},x=q&&q[X],B=function(a,c){var d=a._d;return d.v[n](c*b+d.o,Ba)},C=function(a,c,d){var e=a._d;i&&(d=(d=Math.round(d))<0?0:d>255?255:255&d),e.v[o](c*b+e.o,d,Ba)},D=function(a,b){P(a,b,{get:function(){return B(this,b)},set:function(a){return C(this,b,a)},enumerable:!0})};t?(q=c(function(a,c,d,e){k(a,q,j,"_d");var f,g,h,i,l=0,n=0;if(v(c)){if(!(c instanceof Z||(i=u(c))==U||i==V))return xa in c?Ia(q,c):Ka.call(q,c);f=c,n=Ea(d,b);var o=c.byteLength;if(void 0===e){if(o%b)throw R(za);if(g=o-n,0>g)throw R(za)}else if(g=p(e)*b,g+n>o)throw R(za);h=g/b}else h=Da(c,!0),g=h*b,f=new Z(g);for(m(a,"_d",{b:f,o:n,l:g,e:h,v:new $(f)});h>l;)D(a,l++)}),x=q[X]=y(Ua),m(x,"constructor",q)):J(function(a){new q(null),new q(a)},!0)||(q=c(function(a,c,d,e){k(a,q,j);var f;return v(c)?c instanceof Z||(f=u(c))==U||f==V?void 0!==e?new r(c,Ea(d,b),e):void 0!==d?new r(c,Ea(d,b)):new r(c):xa in c?Ia(q,c):Ka.call(q,c):new r(Da(c,l))}),_(s!==Function.prototype?A(r).concat(A(s)):A(r),function(a){a in q||m(q,a,r[a])}),q[X]=x,d||(x.constructor=q));var E=x[sa],F=!!E&&("values"==E.name||void 0==E.name),G=Qa.values;m(q,ua,!0),m(x,xa,j),m(x,ya,!0),m(x,va,q),(i?new q(1)[ta]==j:ta in x)||P(x,ta,{get:function(){return j}}),w[j]=q,g(g.G+g.W+g.F*(q!=r),w),g(g.S,j,{BYTES_PER_ELEMENT:b,from:Ka,of:La}),W in x||m(x,W,b),g(g.P,j,Oa),g(g.P+g.F*Ca,j,{set:Pa}),g(g.P+g.F*!F,j,Qa),g(g.P+g.F*(x.toString!=qa),j,{toString:qa}),g(g.P+g.F*(f(function(){return[1,2].toLocaleString()!=new q([1,2]).toLocaleString()})||!f(function(){x.toLocaleString.call([1,2])})),j,{toLocaleString:Na}),I[j]=F?E:G,d||F||m(x,sa,G),K(j)}}else b.exports=function(){}},{"./_an-instance":7,"./_array-copy-within":9,"./_array-fill":10,"./_array-includes":12,"./_array-methods":13,"./_classof":17,"./_ctx":24,"./_descriptors":26,"./_export":30,"./_fails":32,"./_global":36,"./_has":37,"./_hide":38,"./_is-array-iter":44,"./_is-integer":46,"./_is-object":47,"./_iter-detect":52,"./_iterators":54,"./_library":56,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_object-gpo":71,"./_property-desc":82,"./_redefine-all":83,"./_same-value":86,"./_set-species":88,"./_species-constructor":92,"./_to-index":102,"./_to-integer":103,"./_to-length":105,"./_to-object":106,"./_to-primitive":107,"./_typed":110,"./_typed-buffer":109,"./_uid":111,"./_wks":112,"./core.get-iterator-method":113,"./core.is-iterable":114,"./es6.array.iterator":126}],109:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_descriptors"),f=a("./_library"),g=a("./_typed"),h=a("./_hide"),i=a("./_redefine-all"),j=a("./_fails"),k=a("./_an-instance"),l=a("./_to-integer"),m=a("./_to-length"),n=a("./_object-gopn").f,o=a("./_object-dp").f,p=a("./_array-fill"),q=a("./_set-to-string-tag"),r="ArrayBuffer",s="DataView",t="prototype",u="Wrong length!",v="Wrong index!",w=d[r],x=d[s],y=d.Math,z=(d.parseInt,d.RangeError),A=d.Infinity,B=w,C=y.abs,D=y.pow,E=(y.min,y.floor),F=y.log,G=y.LN2,H="buffer",I="byteLength",J="byteOffset",K=e?"_b":H,L=e?"_l":I,M=e?"_o":J,N=function(a,b,c){var d,e,f,g=Array(c),h=8*c-b-1,i=(1<>1,k=23===b?D(2,-24)-D(2,-77):0,l=0,m=0>a||0===a&&0>1/a?1:0;for(a=C(a),a!=a||a===A?(e=a!=a?1:0,d=i):(d=E(F(a)/G),a*(f=D(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*D(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*D(2,b),d+=j):(e=a*D(2,j-1)*D(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},O=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-A:A;d+=D(2,b),k-=g}return(j?-1:1)*d*D(2,k-b)},P=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},Q=function(a){return[255&a]},R=function(a){return[255&a,a>>8&255]},S=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},T=function(a){return N(a,52,8)},U=function(a){return N(a,23,4)},V=function(a,b,c){o(a[t],b,{get:function(){return this[c]}})},W=function(a,b,c,d){var e=+c,f=l(e);if(e!=f||0>f||f+b>a[L])throw z(v);var g=a[K]._b,h=f+a[M],i=g.slice(h,h+b);return d?i:i.reverse()},X=function(a,b,c,d,e,f){var g=+c,h=l(g);if(g!=h||0>h||h+b>a[L])throw z(v);for(var i=a[K]._b,j=h+a[M],k=d(+e),m=0;b>m;m++)i[j+m]=k[f?m:b-m-1]},Y=function(a,b){k(a,w,r);var c=+b,d=m(c);if(c!=d)throw z(u);return d};if(g.ABV){if(!j(function(){new w})||!j(function(){new w(.5)})){w=function(a){return new B(Y(this,a))};for(var Z,$=w[t]=B[t],_=n(B),aa=0;_.length>aa;)(Z=_[aa++])in w||h(w,Z,B[Z]);f||($.constructor=w)}var ba=new x(new w(2)),ca=x[t].setInt8;ba.setInt8(0,2147483648),ba.setInt8(1,2147483649),(ba.getInt8(0)||!ba.getInt8(1))&&i(x[t],{setInt8:function(a,b){ca.call(this,a,b<<24>>24)},setUint8:function(a,b){ca.call(this,a,b<<24>>24)}},!0)}else w=function(a){var b=Y(this,a);this._b=p.call(Array(b),0),this[L]=b},x=function(a,b,c){k(this,x,s),k(a,w,s);var d=a[L],e=l(b);if(0>e||e>d)throw z("Wrong offset!");if(c=void 0===c?d-e:m(c),e+c>d)throw z(u);this[K]=a,this[M]=e,this[L]=c},e&&(V(w,I,"_l"),V(x,H,"_b"),V(x,I,"_l"),V(x,J,"_o")),i(x[t],{getInt8:function(a){return W(this,1,a)[0]<<24>>24},getUint8:function(a){return W(this,1,a)[0]},getInt16:function(a){var b=W(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function(a){var b=W(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function(a){return P(W(this,4,a,arguments[1]))},getUint32:function(a){return P(W(this,4,a,arguments[1]))>>>0},getFloat32:function(a){return O(W(this,4,a,arguments[1]),23,4)},getFloat64:function(a){return O(W(this,8,a,arguments[1]),52,8)},setInt8:function(a,b){X(this,1,a,Q,b)},setUint8:function(a,b){X(this,1,a,Q,b)},setInt16:function(a,b){X(this,2,a,R,b,arguments[2])},setUint16:function(a,b){X(this,2,a,R,b,arguments[2])},setInt32:function(a,b){X(this,4,a,S,b,arguments[2])},setUint32:function(a,b){X(this,4,a,S,b,arguments[2])},setFloat32:function(a,b){X(this,4,a,U,b,arguments[2])},setFloat64:function(a,b){X(this,8,a,T,b,arguments[2])}});q(w,r),q(x,s),h(x[t],g.VIEW,!0),c[r]=w,c[s]=x},{"./_an-instance":7,"./_array-fill":10,"./_descriptors":26,"./_fails":32,"./_global":36,"./_hide":38,"./_library":56,"./_object-dp":65,"./_object-gopn":69,"./_redefine-all":83,"./_set-to-string-tag":89,"./_to-integer":103,"./_to-length":105,"./_typed":110}],110:[function(a,b,c){for(var d,e=a("./_global"),f=a("./_hide"),g=a("./_uid"),h=g("typed_array"),i=g("view"),j=!(!e.ArrayBuffer||!e.DataView),k=j,l=0,m=9,n="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");m>l;)(d=e[n[l++]])?(f(d.prototype,h,!0),f(d.prototype,i,!0)):k=!1;b.exports={ABV:j,CONSTR:k,TYPED:h,VIEW:i}},{"./_global":36,"./_hide":38,"./_uid":111}],111:[function(a,b,c){var d=0,e=Math.random();b.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++d+e).toString(36))}},{}],112:[function(a,b,c){var d=a("./_shared")("wks"),e=a("./_uid"),f=a("./_global").Symbol,g="function"==typeof f;b.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))}},{"./_global":36,"./_shared":91,"./_uid":111}],113:[function(a,b,c){var d=a("./_classof"),e=a("./_wks")("iterator"),f=a("./_iterators");b.exports=a("./_core").getIteratorMethod=function(a){return void 0!=a?a[e]||a["@@iterator"]||f[d(a)]:void 0}},{"./_classof":17,"./_core":23,"./_iterators":54,"./_wks":112}],114:[function(a,b,c){var d=a("./_classof"),e=a("./_wks")("iterator"),f=a("./_iterators");b.exports=a("./_core").isIterable=function(a){var b=Object(a);return void 0!==b[e]||"@@iterator"in b||f.hasOwnProperty(d(b))}},{"./_classof":17,"./_core":23,"./_iterators":54,"./_wks":112}],115:[function(a,b,c){var d=a("./_export"),e=a("./_replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&");d(d.S,"RegExp",{escape:function(a){return e(a)}})},{"./_export":30,"./_replacer":85}],116:[function(a,b,c){var d=a("./_export");d(d.P,"Array",{copyWithin:a("./_array-copy-within")}),a("./_add-to-unscopables")("copyWithin")},{"./_add-to-unscopables":6,"./_array-copy-within":9,"./_export":30}],117:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(4);d(d.P+d.F*!a("./_strict-method")([].every,!0),"Array",{every:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],118:[function(a,b,c){var d=a("./_export");d(d.P,"Array",{fill:a("./_array-fill")}),a("./_add-to-unscopables")("fill")},{"./_add-to-unscopables":6,"./_array-fill":10,"./_export":30}],119:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(2);d(d.P+d.F*!a("./_strict-method")([].filter,!0),"Array",{filter:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],120:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(6),f="findIndex",g=!0;f in[]&&Array(1)[f](function(){g=!1}),d(d.P+d.F*g,"Array",{findIndex:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":6,"./_array-methods":13,"./_export":30}],121:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(5),f="find",g=!0;f in[]&&Array(1)[f](function(){g=!1}),d(d.P+d.F*g,"Array",{find:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")(f)},{"./_add-to-unscopables":6,"./_array-methods":13,"./_export":30}],122:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(0),f=a("./_strict-method")([].forEach,!0);d(d.P+d.F*!f,"Array",{forEach:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],123:[function(a,b,c){"use strict";var d=a("./_ctx"),e=a("./_export"),f=a("./_to-object"),g=a("./_iter-call"),h=a("./_is-array-iter"),i=a("./_to-length"),j=a("./core.get-iterator-method");e(e.S+e.F*!a("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(a){var b,c,e,k,l=f(a),m="function"==typeof this?this:Array,n=arguments.length,o=n>1?arguments[1]:void 0,p=void 0!==o,q=0,r=j(l);if(p&&(o=d(o,n>2?arguments[2]:void 0,2)),void 0==r||m==Array&&h(r))for(b=i(l.length),c=new m(b);b>q;q++)c[q]=p?o(l[q],q):l[q];else for(k=r.call(l),c=new m;!(e=k.next()).done;q++)c[q]=p?g(k,o,[e.value,q],!0):e.value;return c.length=q,c}})},{"./_ctx":24,"./_export":30,"./_is-array-iter":44,"./_iter-call":49,"./_iter-detect":52,"./_to-length":105,"./_to-object":106,"./core.get-iterator-method":113}],124:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!1);d(d.P+d.F*!a("./_strict-method")([].indexOf),"Array",{indexOf:function(a){return e(this,a,arguments[1])}})},{"./_array-includes":12,"./_export":30,"./_strict-method":93}],125:[function(a,b,c){var d=a("./_export");d(d.S,"Array",{isArray:a("./_is-array")})},{"./_export":30,"./_is-array":45}],126:[function(a,b,c){"use strict";var d=a("./_add-to-unscopables"),e=a("./_iter-step"),f=a("./_iterators"),g=a("./_to-iobject");b.exports=a("./_iter-define")(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},{"./_add-to-unscopables":6,"./_iter-define":51,"./_iter-step":53,"./_iterators":54,"./_to-iobject":104}],127:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=[].join;d(d.P+d.F*(a("./_iobject")!=Object||!a("./_strict-method")(f)),"Array",{join:function(a){return f.call(e(this),void 0===a?",":a)}})},{"./_export":30,"./_iobject":43,"./_strict-method":93,"./_to-iobject":104}],128:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-integer"),g=a("./_to-length");d(d.P+d.F*!a("./_strict-method")([].lastIndexOf),"Array",{lastIndexOf:function(a){var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),0>d&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d;return-1}})},{"./_export":30,"./_strict-method":93,"./_to-integer":103,"./_to-iobject":104,"./_to-length":105}],129:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(1);d(d.P+d.F*!a("./_strict-method")([].map,!0),"Array",{map:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],130:[function(a,b,c){"use strict";var d=a("./_export");d(d.S+d.F*a("./_fails")(function(){function a(){}return!(Array.of.call(a)instanceof a)}),"Array",{of:function(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)c[a]=arguments[a++];return c.length=b,c}})},{"./_export":30,"./_fails":32}],131:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(a){return e(this,a,arguments.length,arguments[1],!0)}})},{"./_array-reduce":14,"./_export":30,"./_strict-method":93}],132:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-reduce");d(d.P+d.F*!a("./_strict-method")([].reduce,!0),"Array",{reduce:function(a){return e(this,a,arguments.length,arguments[1],!1)}})},{"./_array-reduce":14,"./_export":30,"./_strict-method":93}],133:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_html"),f=a("./_cof"),g=a("./_to-index"),h=a("./_to-length"),i=[].slice;d(d.P+d.F*a("./_fails")(function(){e&&i.call(e)}),"Array",{slice:function(a,b){var c=h(this.length),d=f(this);if(b=void 0===b?c:b,"Array"==d)return i.call(this,a,b);for(var e=g(a,c),j=g(b,c),k=h(j-e),l=Array(k),m=0;k>m;m++)l[m]="String"==d?this.charAt(e+m):this[e+m];return l}})},{"./_cof":18,"./_export":30,"./_fails":32,"./_html":39,"./_to-index":102,"./_to-length":105}],134:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-methods")(3);d(d.P+d.F*!a("./_strict-method")([].some,!0),"Array",{some:function(a){return e(this,a,arguments[1])}})},{"./_array-methods":13,"./_export":30,"./_strict-method":93}],135:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_a-function"),f=a("./_to-object"),g=a("./_fails"),h=[].sort,i=[1,2,3];d(d.P+d.F*(g(function(){i.sort(void 0)})||!g(function(){i.sort(null)})||!a("./_strict-method")(h)),"Array",{sort:function(a){return void 0===a?h.call(f(this)):h.call(f(this),e(a))}})},{"./_a-function":4,"./_export":30,"./_fails":32,"./_strict-method":93,"./_to-object":106}],136:[function(a,b,c){a("./_set-species")("Array")},{"./_set-species":88}],137:[function(a,b,c){var d=a("./_export");d(d.S,"Date",{now:function(){return(new Date).getTime()}})},{"./_export":30}],138:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_fails"),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},{"./_export":30,"./_fails":32}],139:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-object"),f=a("./_to-primitive");d(d.P+d.F*a("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},{"./_export":30,"./_fails":32,"./_to-object":106,"./_to-primitive":107}],140:[function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&a("./_redefine")(d,f,function(){var a=h.call(this);return a===a?g.call(this):e})},{"./_redefine":84}],141:[function(a,b,c){var d=a("./_export");d(d.P,"Function",{bind:a("./_bind")})},{"./_bind":16,"./_export":30}],142:[function(a,b,c){"use strict";var d=a("./_is-object"),e=a("./_object-gpo"),f=a("./_wks")("hasInstance"),g=Function.prototype;f in g||a("./_object-dp").f(g,f,{value:function(a){if("function"!=typeof this||!d(a))return!1;if(!d(this.prototype))return a instanceof this;for(;a=e(a);)if(this.prototype===a)return!0;return!1}})},{"./_is-object":47,"./_object-dp":65,"./_object-gpo":71,"./_wks":112}],143:[function(a,b,c){var d=a("./_object-dp").f,e=a("./_property-desc"),f=a("./_has"),g=Function.prototype,h=/^\s*function ([^ (]*)/,i="name";i in g||a("./_descriptors")&&d(g,i,{configurable:!0,get:function(){var a=(""+this).match(h),b=a?a[1]:"";return f(this,i)||d(this,i,e(5,b)),b}})},{"./_descriptors":26,"./_has":37,"./_object-dp":65,"./_property-desc":82}],144:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Map",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{get:function(a){var b=d.getEntry(this,a);return b&&b.v},set:function(a,b){return d.def(this,0===a?0:a,b)}},d,!0)},{"./_collection":22,"./_collection-strong":19}],145:[function(a,b,c){var d=a("./_export"),e=a("./_math-log1p"),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))),"Math",{acosh:function(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},{"./_export":30,"./_math-log1p":58}],146:[function(a,b,c){function d(a){return isFinite(a=+a)&&0!=a?0>a?-d(-a):Math.log(a+Math.sqrt(a*a+1)):a}var e=a("./_export");e(e.S,"Math",{asinh:d})},{"./_export":30}],147:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{atanh:function(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},{"./_export":30}],148:[function(a,b,c){var d=a("./_export"),e=a("./_math-sign");d(d.S,"Math",{cbrt:function(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},{"./_export":30,"./_math-sign":59}],149:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{clz32:function(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},{"./_export":30}],150:[function(a,b,c){var d=a("./_export"),e=Math.exp;d(d.S,"Math",{cosh:function(a){return(e(a=+a)+e(-a))/2}})},{"./_export":30}],151:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{expm1:a("./_math-expm1")})},{"./_export":30,"./_math-expm1":57}],152:[function(a,b,c){var d=a("./_export"),e=a("./_math-sign"),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){
+return a+1/g-1/g};d(d.S,"Math",{fround:function(a){var b,c,d=Math.abs(a),f=e(a);return j>d?f*k(d/j/h)*j*h:(b=(1+h/g)*d,c=b-(b-d),c>i||c!=c?f*(1/0):f*c)}})},{"./_export":30,"./_math-sign":59}],153:[function(a,b,c){var d=a("./_export"),e=Math.abs;d(d.S,"Math",{hypot:function(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;h>g;)c=e(arguments[g++]),c>i?(d=i/c,f=f*d*d+1,i=c):c>0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},{"./_export":30}],154:[function(a,b,c){var d=a("./_export"),e=Math.imul;d(d.S+d.F*a("./_fails")(function(){return-5!=e(4294967295,5)||2!=e.length}),"Math",{imul:function(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},{"./_export":30,"./_fails":32}],155:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log10:function(a){return Math.log(a)/Math.LN10}})},{"./_export":30}],156:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log1p:a("./_math-log1p")})},{"./_export":30,"./_math-log1p":58}],157:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{log2:function(a){return Math.log(a)/Math.LN2}})},{"./_export":30}],158:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{sign:a("./_math-sign")})},{"./_export":30,"./_math-sign":59}],159:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S+d.F*a("./_fails")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},{"./_export":30,"./_fails":32,"./_math-expm1":57}],160:[function(a,b,c){var d=a("./_export"),e=a("./_math-expm1"),f=Math.exp;d(d.S,"Math",{tanh:function(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},{"./_export":30,"./_math-expm1":57}],161:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{trunc:function(a){return(a>0?Math.floor:Math.ceil)(a)}})},{"./_export":30}],162:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_has"),f=a("./_cof"),g=a("./_inherit-if-required"),h=a("./_to-primitive"),i=a("./_fails"),j=a("./_object-gopn").f,k=a("./_object-gopd").f,l=a("./_object-dp").f,m=a("./_string-trim").trim,n="Number",o=d[n],p=o,q=o.prototype,r=f(a("./_object-create")(q))==n,s="trim"in String.prototype,t=function(a){var b=h(a,!1);if("string"==typeof b&&b.length>2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;k>j;j++)if(g=i.charCodeAt(j),48>g||g>e)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=a("./_descriptors")?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,a("./_redefine")(d,n,o)}},{"./_cof":18,"./_descriptors":26,"./_fails":32,"./_global":36,"./_has":37,"./_inherit-if-required":41,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_redefine":84,"./_string-trim":99,"./_to-primitive":107}],163:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":30}],164:[function(a,b,c){var d=a("./_export"),e=a("./_global").isFinite;d(d.S,"Number",{isFinite:function(a){return"number"==typeof a&&e(a)}})},{"./_export":30,"./_global":36}],165:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isInteger:a("./_is-integer")})},{"./_export":30,"./_is-integer":46}],166:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{isNaN:function(a){return a!=a}})},{"./_export":30}],167:[function(a,b,c){var d=a("./_export"),e=a("./_is-integer"),f=Math.abs;d(d.S,"Number",{isSafeInteger:function(a){return e(a)&&f(a)<=9007199254740991}})},{"./_export":30,"./_is-integer":46}],168:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":30}],169:[function(a,b,c){var d=a("./_export");d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":30}],170:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},{"./_export":30,"./_parse-float":78}],171:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},{"./_export":30,"./_parse-int":79}],172:[function(a,b,c){"use strict";var d=a("./_export"),e=(a("./_an-instance"),a("./_to-integer")),f=a("./_a-number-value"),g=a("./_string-repeat"),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!a("./_fails")(function(){h.call({})})),"Number",{toFixed:function(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(0>j||j>20)throw RangeError(k);if(i!=i)return"NaN";if(-1e21>=i||i>=1e21)return String(i);if(0>i&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=0>b?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(j>=h?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},{"./_a-number-value":5,"./_an-instance":7,"./_export":30,"./_fails":32,"./_string-repeat":98,"./_to-integer":103}],173:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_fails"),f=a("./_a-number-value"),g=1..toPrecision;d(d.P+d.F*(e(function(){return"1"!==g.call(1,void 0)})||!e(function(){g.call({})})),"Number",{toPrecision:function(a){var b=f(this,"Number#toPrecision: incorrect invocation!");return void 0===a?g.call(b):g.call(b,a)}})},{"./_a-number-value":5,"./_export":30,"./_fails":32}],174:[function(a,b,c){var d=a("./_export");d(d.S+d.F,"Object",{assign:a("./_object-assign")})},{"./_export":30,"./_object-assign":63}],175:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{create:a("./_object-create")})},{"./_export":30,"./_object-create":64}],176:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperties:a("./_object-dps")})},{"./_descriptors":26,"./_export":30,"./_object-dps":66}],177:[function(a,b,c){var d=a("./_export");d(d.S+d.F*!a("./_descriptors"),"Object",{defineProperty:a("./_object-dp").f})},{"./_descriptors":26,"./_export":30,"./_object-dp":65}],178:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("freeze",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],179:[function(a,b,c){var d=a("./_to-iobject"),e=a("./_object-gopd").f;a("./_object-sap")("getOwnPropertyDescriptor",function(){return function(a,b){return e(d(a),b)}})},{"./_object-gopd":67,"./_object-sap":75,"./_to-iobject":104}],180:[function(a,b,c){a("./_object-sap")("getOwnPropertyNames",function(){return a("./_object-gopn-ext").f})},{"./_object-gopn-ext":68,"./_object-sap":75}],181:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-gpo");a("./_object-sap")("getPrototypeOf",function(){return function(a){return e(d(a))}})},{"./_object-gpo":71,"./_object-sap":75,"./_to-object":106}],182:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isExtensible",function(a){return function(b){return d(b)?a?a(b):!0:!1}})},{"./_is-object":47,"./_object-sap":75}],183:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isFrozen",function(a){return function(b){return d(b)?a?a(b):!1:!0}})},{"./_is-object":47,"./_object-sap":75}],184:[function(a,b,c){var d=a("./_is-object");a("./_object-sap")("isSealed",function(a){return function(b){return d(b)?a?a(b):!1:!0}})},{"./_is-object":47,"./_object-sap":75}],185:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{is:a("./_same-value")})},{"./_export":30,"./_same-value":86}],186:[function(a,b,c){var d=a("./_to-object"),e=a("./_object-keys");a("./_object-sap")("keys",function(){return function(a){return e(d(a))}})},{"./_object-keys":73,"./_object-sap":75,"./_to-object":106}],187:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("preventExtensions",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],188:[function(a,b,c){var d=a("./_is-object"),e=a("./_meta").onFreeze;a("./_object-sap")("seal",function(a){return function(b){return a&&d(b)?a(e(b)):b}})},{"./_is-object":47,"./_meta":60,"./_object-sap":75}],189:[function(a,b,c){var d=a("./_export");d(d.S,"Object",{setPrototypeOf:a("./_set-proto").set})},{"./_export":30,"./_set-proto":87}],190:[function(a,b,c){"use strict";var d=a("./_classof"),e={};e[a("./_wks")("toStringTag")]="z",e+""!="[object z]"&&a("./_redefine")(Object.prototype,"toString",function(){return"[object "+d(this)+"]"},!0)},{"./_classof":17,"./_redefine":84,"./_wks":112}],191:[function(a,b,c){var d=a("./_export"),e=a("./_parse-float");d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},{"./_export":30,"./_parse-float":78}],192:[function(a,b,c){var d=a("./_export"),e=a("./_parse-int");d(d.G+d.F*(parseInt!=e),{parseInt:e})},{"./_export":30,"./_parse-int":79}],193:[function(a,b,c){"use strict";var d,e,f,g=a("./_library"),h=a("./_global"),i=a("./_ctx"),j=a("./_classof"),k=a("./_export"),l=a("./_is-object"),m=(a("./_an-object"),a("./_a-function")),n=a("./_an-instance"),o=a("./_for-of"),p=(a("./_set-proto").set,a("./_species-constructor")),q=a("./_task").set,r=a("./_microtask"),s="Promise",t=h.TypeError,u=h.process,v=h[s],u=h.process,w="process"==j(u),x=function(){},y=!!function(){try{var b=v.resolve(1),c=(b.constructor={})[a("./_wks")("species")]=function(a){a(x,x)};return(w||"function"==typeof PromiseRejectionEvent)&&b.then(x)instanceof c}catch(d){}}(),z=function(a,b){return a===b||a===v&&b===f},A=function(a){var b;return l(a)&&"function"==typeof(b=a.then)?b:!1},B=function(a){return z(v,a)?new C(a):new e(a)},C=e=function(a){var b,c;this.promise=new a(function(a,d){if(void 0!==b||void 0!==c)throw t("Bad Promise constructor");b=a,c=d}),this.resolve=m(b),this.reject=m(c)},D=function(a){try{a()}catch(b){return{error:b}}},E=function(a,b){if(!a._n){a._n=!0;var c=a._c;r(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&H(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(t("Promise-chain cycle")):(f=A(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&F(a)})}},F=function(a){q.call(h,function(){var b,c,d,e=a._v;if(G(a)&&(b=D(function(){w?u.emit("unhandledRejection",e,a):(c=h.onunhandledrejection)?c({promise:a,reason:e}):(d=h.console)&&d.error&&d.error("Unhandled promise rejection",e)}),a._h=w||G(a)?2:1),a._a=void 0,b)throw b.error})},G=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!G(b.promise))return!1;return!0},H=function(a){q.call(h,function(){var b;w?u.emit("rejectionHandled",a):(b=h.onrejectionhandled)&&b({promise:a,reason:a._v})})},I=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),E(b,!0))},J=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw t("Promise can't be resolved itself");(b=A(a))?r(function(){var d={_w:c,_d:!1};try{b.call(a,i(J,d,1),i(I,d,1))}catch(e){I.call(d,e)}}):(c._v=a,c._s=1,E(c,!1))}catch(d){I.call({_w:c,_d:!1},d)}}};y||(v=function(a){n(this,v,s,"_h"),m(a),d.call(this);try{a(i(J,this,1),i(I,this,1))}catch(b){I.call(this,b)}},d=function(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},d.prototype=a("./_redefine-all")(v.prototype,{then:function(a,b){var c=B(p(this,v));return c.ok="function"==typeof a?a:!0,c.fail="function"==typeof b&&b,c.domain=w?u.domain:void 0,this._c.push(c),this._a&&this._a.push(c),this._s&&E(this,!1),c.promise},"catch":function(a){return this.then(void 0,a)}}),C=function(){var a=new d;this.promise=a,this.resolve=i(J,a,1),this.reject=i(I,a,1)}),k(k.G+k.W+k.F*!y,{Promise:v}),a("./_set-to-string-tag")(v,s),a("./_set-species")(s),f=a("./_core")[s],k(k.S+k.F*!y,s,{reject:function(a){var b=B(this),c=b.reject;return c(a),b.promise}}),k(k.S+k.F*(g||!y),s,{resolve:function(a){if(a instanceof v&&z(a.constructor,this))return a;var b=B(this),c=b.resolve;return c(a),b.promise}}),k(k.S+k.F*!(y&&a("./_iter-detect")(function(a){v.all(a)["catch"](x)})),s,{all:function(a){var b=this,c=B(b),d=c.resolve,e=c.reject,f=D(function(){var c=[],f=0,g=1;o(a,!1,function(a){var h=f++,i=!1;c.push(void 0),g++,b.resolve(a).then(function(a){i||(i=!0,c[h]=a,--g||d(c))},e)}),--g||d(c)});return f&&e(f.error),c.promise},race:function(a){var b=this,c=B(b),d=c.reject,e=D(function(){o(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},{"./_a-function":4,"./_an-instance":7,"./_an-object":8,"./_classof":17,"./_core":23,"./_ctx":24,"./_export":30,"./_for-of":35,"./_global":36,"./_is-object":47,"./_iter-detect":52,"./_library":56,"./_microtask":62,"./_redefine-all":83,"./_set-proto":87,"./_set-species":88,"./_set-to-string-tag":89,"./_species-constructor":92,"./_task":101,"./_wks":112}],194:[function(a,b,c){var d=a("./_export"),e=Function.apply;d(d.S,"Reflect",{apply:function(a,b,c){return e.call(a,b,c)}})},{"./_export":30}],195:[function(a,b,c){var d=a("./_export"),e=a("./_object-create"),f=a("./_a-function"),g=a("./_an-object"),h=a("./_is-object"),i=a("./_bind");d(d.S+d.F*a("./_fails")(function(){function a(){}return!(Reflect.construct(function(){},[],a)instanceof a)}),"Reflect",{construct:function(a,b){f(a);var c=arguments.length<3?a:f(arguments[2]);if(a==c){if(void 0!=b)switch(g(b).length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(i.apply(a,d))}var j=c.prototype,k=e(h(j)?j:Object.prototype),l=Function.apply.call(a,k,b);return h(l)?l:k}})},{"./_a-function":4,"./_an-object":8,"./_bind":16,"./_export":30,"./_fails":32,"./_is-object":47,"./_object-create":64}],196:[function(a,b,c){var d=a("./_object-dp"),e=a("./_export"),f=a("./_an-object"),g=a("./_to-primitive");e(e.S+e.F*a("./_fails")(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},{"./_an-object":8,"./_export":30,"./_fails":32,"./_object-dp":65,"./_to-primitive":107}],197:[function(a,b,c){var d=a("./_export"),e=a("./_object-gopd").f,f=a("./_an-object");d(d.S,"Reflect",{deleteProperty:function(a,b){var c=e(f(a),b);return c&&!c.configurable?!1:delete a[b]}})},{"./_an-object":8,"./_export":30,"./_object-gopd":67}],198:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_an-object"),f=function(a){this._t=e(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};a("./_iter-create")(f,"Object",function(){var a,b=this,c=b._k;do if(b._i>=c.length)return{value:void 0,done:!0};while(!((a=c[b._i++])in b._t));return{value:a,done:!1}}),d(d.S,"Reflect",{enumerate:function(a){return new f(a)}})},{"./_an-object":8,"./_export":30,"./_iter-create":50}],199:[function(a,b,c){var d=a("./_object-gopd"),e=a("./_export"),f=a("./_an-object");e(e.S,"Reflect",{getOwnPropertyDescriptor:function(a,b){return d.f(f(a),b)}})},{"./_an-object":8,"./_export":30,"./_object-gopd":67}],200:[function(a,b,c){var d=a("./_export"),e=a("./_object-gpo"),f=a("./_an-object");d(d.S,"Reflect",{getPrototypeOf:function(a){return e(f(a))}})},{"./_an-object":8,"./_export":30,"./_object-gpo":71}],201:[function(a,b,c){function d(a,b){var c,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(c=e.f(a,b))?g(c,"value")?c.value:void 0!==c.get?c.get.call(k):void 0:i(h=f(a))?d(h,b,k):void 0}var e=a("./_object-gopd"),f=a("./_object-gpo"),g=a("./_has"),h=a("./_export"),i=a("./_is-object"),j=a("./_an-object");h(h.S,"Reflect",{get:d})},{"./_an-object":8,"./_export":30,"./_has":37,"./_is-object":47,"./_object-gopd":67,"./_object-gpo":71}],202:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{has:function(a,b){return b in a}})},{"./_export":30}],203:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function(a){return e(a),f?f(a):!0}})},{"./_an-object":8,"./_export":30}],204:[function(a,b,c){var d=a("./_export");d(d.S,"Reflect",{ownKeys:a("./_own-keys")})},{"./_export":30,"./_own-keys":77}],205:[function(a,b,c){var d=a("./_export"),e=a("./_an-object"),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},{"./_an-object":8,"./_export":30}],206:[function(a,b,c){var d=a("./_export"),e=a("./_set-proto");e&&d(d.S,"Reflect",{setPrototypeOf:function(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},{"./_export":30,"./_set-proto":87}],207:[function(a,b,c){function d(a,b,c){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return d(m,b,c,n);o=j(0)}return h(o,"value")?o.writable!==!1&&l(n)?(i=f.f(n,b)||j(0),i.value=c,e.f(n,b,i),!0):!1:void 0===o.set?!1:(o.set.call(n,c),!0)}var e=a("./_object-dp"),f=a("./_object-gopd"),g=a("./_object-gpo"),h=a("./_has"),i=a("./_export"),j=a("./_property-desc"),k=a("./_an-object"),l=a("./_is-object");i(i.S,"Reflect",{set:d})},{"./_an-object":8,"./_export":30,"./_has":37,"./_is-object":47,"./_object-dp":65,"./_object-gopd":67,"./_object-gpo":71,"./_property-desc":82}],208:[function(a,b,c){var d=a("./_global"),e=a("./_inherit-if-required"),f=a("./_object-dp").f,g=a("./_object-gopn").f,h=a("./_is-regexp"),i=a("./_flags"),j=d.RegExp,k=j,l=j.prototype,m=/a/g,n=/a/g,o=new j(m)!==m;if(a("./_descriptors")&&(!o||a("./_fails")(function(){return n[a("./_wks")("match")]=!1,j(m)!=m||j(n)==n||"/a/i"!=j(m,"i")}))){j=function(a,b){var c=this instanceof j,d=h(a),f=void 0===b;return!c&&d&&a.constructor===j&&f?a:e(o?new k(d&&!f?a.source:a,b):k((d=a instanceof j)?a.source:a,d&&f?i.call(a):b),c?this:l,j)};for(var p=(function(a){a in j||f(j,a,{configurable:!0,get:function(){return k[a]},set:function(b){k[a]=b}})}),q=g(k),r=0;q.length>r;)p(q[r++]);l.constructor=j,j.prototype=l,a("./_redefine")(d,"RegExp",j)}a("./_set-species")("RegExp")},{"./_descriptors":26,"./_fails":32,"./_flags":34,"./_global":36,"./_inherit-if-required":41,"./_is-regexp":48,"./_object-dp":65,"./_object-gopn":69,"./_redefine":84,"./_set-species":88,"./_wks":112}],209:[function(a,b,c){a("./_descriptors")&&"g"!=/./g.flags&&a("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:a("./_flags")})},{"./_descriptors":26,"./_flags":34,"./_object-dp":65}],210:[function(a,b,c){a("./_fix-re-wks")("match",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":33}],211:[function(a,b,c){a("./_fix-re-wks")("replace",2,function(a,b,c){return[function(d,e){"use strict";var f=a(this),g=void 0==d?void 0:d[b];return void 0!==g?g.call(d,f,e):c.call(String(f),d,e)},c]})},{"./_fix-re-wks":33}],212:[function(a,b,c){a("./_fix-re-wks")("search",1,function(a,b,c){return[function(c){"use strict";var d=a(this),e=void 0==c?void 0:c[b];return void 0!==e?e.call(c,d):new RegExp(c)[b](String(d))},c]})},{"./_fix-re-wks":33}],213:[function(a,b,c){a("./_fix-re-wks")("split",2,function(b,c,d){"use strict";var e=a("./_is-regexp"),f=d,g=[].push,h="split",i="length",j="lastIndex";if("c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[i]||2!="ab"[h](/(?:ab)*/)[i]||4!="."[h](/(.?)(.?)/)[i]||"."[h](/()()/)[i]>1||""[h](/.?/)[i]){var k=void 0===/()??/.exec("")[1];d=function(a,b){var c=String(this);if(void 0===a&&0===b)return[];if(!e(a))return f.call(c,a,b);var d,h,l,m,n,o=[],p=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),q=0,r=void 0===b?4294967295:b>>>0,s=new RegExp(a.source,p+"g");for(k||(d=new RegExp("^"+s.source+"$(?!\\s)",p));(h=s.exec(c))&&(l=h.index+h[0][i],!(l>q&&(o.push(c.slice(q,h.index)),!k&&h[i]>1&&h[0].replace(d,function(){for(n=1;n1&&h.index=r)));)s[j]===h.index&&s[j]++;return q===c[i]?(m||!s.test(""))&&o.push(""):o.push(c.slice(q)),o[i]>r?o.slice(0,r):o}}else"0"[h](void 0,0)[i]&&(d=function(a,b){return void 0===a&&0===b?[]:f.call(this,a,b)});return[function(a,e){var f=b(this),g=void 0==a?void 0:a[c];return void 0!==g?g.call(a,f,e):d.call(String(f),a,e)},d]})},{"./_fix-re-wks":33,"./_is-regexp":48}],214:[function(a,b,c){"use strict";a("./es6.regexp.flags");var d=a("./_an-object"),e=a("./_flags"),f=a("./_descriptors"),g="toString",h=/./[g],i=function(b){a("./_redefine")(RegExp.prototype,g,b,!0)};a("./_fails")(function(){return"/a/b"!=h.call({source:"a",flags:"b"})})?i(function(){var a=d(this);return"/".concat(a.source,"/","flags"in a?a.flags:!f&&a instanceof RegExp?e.call(a):void 0)}):h.name!=g&&i(function(){return h.call(this)})},{"./_an-object":8,"./_descriptors":26,"./_fails":32,"./_flags":34,"./_redefine":84,"./es6.regexp.flags":209}],215:[function(a,b,c){"use strict";var d=a("./_collection-strong");b.exports=a("./_collection")("Set",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a=0===a?0:a,a)}},d)},{"./_collection":22,"./_collection-strong":19}],216:[function(a,b,c){"use strict";a("./_string-html")("anchor",function(a){return function(b){return a(this,"a","name",b)}})},{"./_string-html":96}],217:[function(a,b,c){"use strict";a("./_string-html")("big",function(a){return function(){return a(this,"big","","")}})},{"./_string-html":96}],218:[function(a,b,c){"use strict";a("./_string-html")("blink",function(a){return function(){return a(this,"blink","","")}})},{"./_string-html":96}],219:[function(a,b,c){"use strict";a("./_string-html")("bold",function(a){return function(){return a(this,"b","","")}})},{"./_string-html":96}],220:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-at")(!1);d(d.P,"String",{codePointAt:function(a){return e(this,a)}})},{"./_export":30,"./_string-at":94}],221:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-length"),f=a("./_string-context"),g="endsWith",h=""[g];d(d.P+d.F*a("./_fails-is-regexp")(g),"String",{endsWith:function(a){var b=f(this,a,g),c=arguments.length>1?arguments[1]:void 0,d=e(b.length),i=void 0===c?d:Math.min(e(c),d),j=String(a);return h?h.call(b,j,i):b.slice(i-j.length,i)===j}})},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95,"./_to-length":105}],222:[function(a,b,c){"use strict";a("./_string-html")("fixed",function(a){return function(){return a(this,"tt","","")}})},{"./_string-html":96}],223:[function(a,b,c){"use strict";a("./_string-html")("fontcolor",function(a){return function(b){return a(this,"font","color",b)}})},{"./_string-html":96}],224:[function(a,b,c){"use strict";a("./_string-html")("fontsize",function(a){return function(b){return a(this,"font","size",b)}})},{"./_string-html":96}],225:[function(a,b,c){var d=a("./_export"),e=a("./_to-index"),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(65536>b?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},{"./_export":30,"./_to-index":102}],226:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-context"),f="includes";d(d.P+d.F*a("./_fails-is-regexp")(f),"String",{includes:function(a){return!!~e(this,a,f).indexOf(a,arguments.length>1?arguments[1]:void 0)}})},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95}],227:[function(a,b,c){"use strict";a("./_string-html")("italics",function(a){return function(){return a(this,"i","","")}})},{"./_string-html":96}],228:[function(a,b,c){"use strict";var d=a("./_string-at")(!0);a("./_iter-define")(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},{"./_iter-define":51,"./_string-at":94}],229:[function(a,b,c){"use strict";a("./_string-html")("link",function(a){return function(b){return a(this,"a","href",b)}})},{"./_string-html":96}],230:[function(a,b,c){var d=a("./_export"),e=a("./_to-iobject"),f=a("./_to-length");d(d.S,"String",{raw:function(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),d>h&&g.push(String(arguments[h]));return g.join("")}})},{"./_export":30,"./_to-iobject":104,"./_to-length":105}],231:[function(a,b,c){var d=a("./_export");d(d.P,"String",{repeat:a("./_string-repeat")})},{"./_export":30,"./_string-repeat":98}],232:[function(a,b,c){"use strict";a("./_string-html")("small",function(a){return function(){return a(this,"small","","")}})},{"./_string-html":96}],233:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_to-length"),f=a("./_string-context"),g="startsWith",h=""[g];d(d.P+d.F*a("./_fails-is-regexp")(g),"String",{startsWith:function(a){var b=f(this,a,g),c=e(Math.min(arguments.length>1?arguments[1]:void 0,b.length)),d=String(a);return h?h.call(b,d,c):b.slice(c,c+d.length)===d}})},{"./_export":30,"./_fails-is-regexp":31,"./_string-context":95,"./_to-length":105}],234:[function(a,b,c){"use strict";a("./_string-html")("strike",function(a){return function(){return a(this,"strike","","")}})},{"./_string-html":96}],235:[function(a,b,c){"use strict";a("./_string-html")("sub",function(a){return function(){return a(this,"sub","","")}})},{"./_string-html":96}],236:[function(a,b,c){"use strict";a("./_string-html")("sup",function(a){return function(){return a(this,"sup","","")}})},{"./_string-html":96}],237:[function(a,b,c){"use strict";a("./_string-trim")("trim",function(a){return function(){return a(this,3)}})},{"./_string-trim":99}],238:[function(a,b,c){"use strict";var d=a("./_global"),e=a("./_core"),f=a("./_has"),g=a("./_descriptors"),h=a("./_export"),i=a("./_redefine"),j=a("./_meta").KEY,k=a("./_fails"),l=a("./_shared"),m=a("./_set-to-string-tag"),n=a("./_uid"),o=a("./_wks"),p=a("./_keyof"),q=a("./_enum-keys"),r=a("./_is-array"),s=a("./_an-object"),t=a("./_to-iobject"),u=a("./_to-primitive"),v=a("./_property-desc"),w=a("./_object-create"),x=a("./_object-gopn-ext"),y=a("./_object-gopd"),z=a("./_object-dp"),A=y.f,B=z.f,C=x.f,D=d.Symbol,E=d.JSON,F=E&&E.stringify,G=!1,H=o("_hidden"),I={}.propertyIsEnumerable,J=l("symbol-registry"),K=l("symbols"),L=Object.prototype,M="function"==typeof D,N=d.QObject,O=g&&k(function(){return 7!=w(B({},"a",{get:function(){return B(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=A(L,b);d&&delete L[b],B(a,b,c),d&&a!==L&&B(L,b,d)}:B,P=function(a){var b=K[a]=w(D.prototype);return b._k=a,g&&G&&O(L,a,{configurable:!0,set:function(b){f(this,H)&&f(this[H],a)&&(this[H][a]=!1),O(this,a,v(1,b))}}),b},Q=function(a){return"symbol"==typeof a},R=function(a,b,c){return s(a),b=u(b,!0),s(c),f(K,b)?(c.enumerable?(f(a,H)&&a[H][b]&&(a[H][b]=!1),c=w(c,{enumerable:v(0,!1)})):(f(a,H)||B(a,H,v(1,{})),a[H][b]=!0),O(a,b,c)):B(a,b,c)},S=function(a,b){s(a);for(var c,d=q(b=t(b)),e=0,f=d.length;f>e;)R(a,c=d[e++],b[c]);return a},T=function(a,b){return void 0===b?w(a):S(w(a),b)},U=function(a){var b=I.call(this,a=u(a,!0));return b||!f(this,a)||!f(K,a)||f(this,H)&&this[H][a]?b:!0},V=function(a,b){var c=A(a=t(a),b=u(b,!0));return!c||!f(K,b)||f(a,H)&&a[H][b]||(c.enumerable=!0),c},W=function(a){for(var b,c=C(t(a)),d=[],e=0;c.length>e;)f(K,b=c[e++])||b==H||b==j||d.push(b);return d},X=function(a){for(var b,c=C(t(a)),d=[],e=0;c.length>e;)f(K,b=c[e++])&&d.push(K[b]);return d},Y=function(a){if(void 0!==a&&!Q(a)){for(var b,c,d=[a],e=1;arguments.length>e;)d.push(arguments[e++]);return b=d[1],"function"==typeof b&&(c=b),(c||!r(b))&&(b=function(a,b){return c&&(b=c.call(this,a,b)),Q(b)?void 0:b}),d[1]=b,F.apply(E,d)}},Z=k(function(){var a=D();return"[null]"!=F([a])||"{}"!=F({a:a})||"{}"!=F(Object(a))});M||(D=function(){if(Q(this))throw TypeError("Symbol is not a constructor");return P(n(arguments.length>0?arguments[0]:void 0))},i(D.prototype,"toString",function(){return this._k}),Q=function(a){return a instanceof D},y.f=V,z.f=R,a("./_object-gopn").f=x.f=W,a("./_object-pie").f=U,a("./_object-gops").f=X,g&&!a("./_library")&&i(L,"propertyIsEnumerable",U,!0)),h(h.G+h.W+h.F*!M,{Symbol:D});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),_=0;$.length>_;){var aa=$[_++],ba=e.Symbol,ca=o(aa);aa in ba||B(ba,aa,{value:M?ca:P(ca)})}N&&N.prototype&&N.prototype.findChild||(G=!0),h(h.S+h.F*!M,"Symbol",{"for":function(a){return f(J,a+="")?J[a]:J[a]=D(a)},keyFor:function(a){return p(J,a)},useSetter:function(){G=!0},useSimple:function(){G=!1}}),h(h.S+h.F*!M,"Object",{create:T,defineProperty:R,defineProperties:S,getOwnPropertyDescriptor:V,getOwnPropertyNames:W,getOwnPropertySymbols:X}),E&&h(h.S+h.F*(!M||Z),"JSON",{stringify:Y}),m(D,"Symbol"),m(Math,"Math",!0),m(d.JSON,"JSON",!0)},{"./_an-object":8,"./_core":23,"./_descriptors":26,"./_enum-keys":29,"./_export":30,"./_fails":32,"./_global":36,"./_has":37,"./_is-array":45,"./_keyof":55,"./_library":56,"./_meta":60,"./_object-create":64,"./_object-dp":65,"./_object-gopd":67,"./_object-gopn":69,"./_object-gopn-ext":68,"./_object-gops":70,"./_object-pie":74,"./_property-desc":82,"./_redefine":84,"./_set-to-string-tag":89,"./_shared":91,"./_to-iobject":104,"./_to-primitive":107,"./_uid":111,"./_wks":112}],239:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_typed"),f=a("./_typed-buffer"),g=a("./_an-object"),h=a("./_to-index"),i=a("./_to-length"),j=a("./_is-object"),k=(a("./_wks")("typed_array"),a("./_global").ArrayBuffer),l=a("./_species-constructor"),m=f.ArrayBuffer,n=f.DataView,o=e.ABV&&k.isView,p=m.prototype.slice,q=e.VIEW,r="ArrayBuffer";d(d.G+d.W+d.F*(k!==m),{ArrayBuffer:m}),d(d.S+d.F*!e.CONSTR,r,{isView:function(a){return o&&o(a)||j(a)&&q in a}}),d(d.P+d.U+d.F*a("./_fails")(function(){return!new m(2).slice(1,void 0).byteLength}),r,{slice:function(a,b){if(void 0!==p&&void 0===b)return p.call(g(this),a);for(var c=g(this).byteLength,d=h(a,c),e=h(void 0===b?c:b,c),f=new(l(this,m))(i(e-d)),j=new n(this),k=new n(f),o=0;e>d;)k.setUint8(o++,j.getUint8(d++));return f}}),a("./_set-species")(r)},{"./_an-object":8,"./_export":30,"./_fails":32,"./_global":36,"./_is-object":47,"./_set-species":88,"./_species-constructor":92,"./_to-index":102,"./_to-length":105,"./_typed":110,"./_typed-buffer":109,"./_wks":112}],240:[function(a,b,c){var d=a("./_export");d(d.G+d.W+d.F*!a("./_typed").ABV,{DataView:a("./_typed-buffer").DataView})},{"./_export":30,"./_typed":110,"./_typed-buffer":109}],241:[function(a,b,c){a("./_typed-array")("Float32",4,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],242:[function(a,b,c){a("./_typed-array")("Float64",8,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],243:[function(a,b,c){a("./_typed-array")("Int16",2,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],244:[function(a,b,c){a("./_typed-array")("Int32",4,function(a){
+return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],245:[function(a,b,c){a("./_typed-array")("Int8",1,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],246:[function(a,b,c){a("./_typed-array")("Uint16",2,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],247:[function(a,b,c){a("./_typed-array")("Uint32",4,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],248:[function(a,b,c){a("./_typed-array")("Uint8",1,function(a){return function(b,c,d){return a(this,b,c,d)}})},{"./_typed-array":108}],249:[function(a,b,c){a("./_typed-array")("Uint8",1,function(a){return function(b,c,d){return a(this,b,c,d)}},!0)},{"./_typed-array":108}],250:[function(a,b,c){"use strict";var d,e=a("./_array-methods")(0),f=a("./_redefine"),g=a("./_meta"),h=a("./_object-assign"),i=a("./_collection-weak"),j=a("./_is-object"),k=(a("./_has"),g.getWeak),l=Object.isExtensible,m=i.ufstore,n={},o=function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},p={get:function(a){if(j(a)){var b=k(a);return b===!0?m(this).get(a):b?b[this._i]:void 0}},set:function(a,b){return i.def(this,a,b)}},q=b.exports=a("./_collection")("WeakMap",o,p,i,!0,!0);7!=(new q).set((Object.freeze||Object)(n),7).get(n)&&(d=i.getConstructor(o),h(d.prototype,p),g.NEED=!0,e(["delete","has","get","set"],function(a){var b=q.prototype,c=b[a];f(b,a,function(b,e){if(j(b)&&!l(b)){this._f||(this._f=new d);var f=this._f[a](b,e);return"set"==a?this:f}return c.call(this,b,e)})}))},{"./_array-methods":13,"./_collection":22,"./_collection-weak":21,"./_has":37,"./_is-object":47,"./_meta":60,"./_object-assign":63,"./_redefine":84}],251:[function(a,b,c){"use strict";var d=a("./_collection-weak");a("./_collection")("WeakSet",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a,!0)}},d,!1,!0)},{"./_collection":22,"./_collection-weak":21}],252:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_array-includes")(!0);d(d.P,"Array",{includes:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),a("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":6,"./_array-includes":12,"./_export":30}],253:[function(a,b,c){var d=a("./_export"),e=a("./_cof");d(d.S,"Error",{isError:function(a){return"Error"===e(a)}})},{"./_cof":18,"./_export":30}],254:[function(a,b,c){var d=a("./_export");d(d.P+d.R,"Map",{toJSON:a("./_collection-to-json")("Map")})},{"./_collection-to-json":20,"./_export":30}],255:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{iaddh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},{"./_export":30}],256:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{imulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},{"./_export":30}],257:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{isubh:function(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},{"./_export":30}],258:[function(a,b,c){var d=a("./_export");d(d.S,"Math",{umulh:function(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},{"./_export":30}],259:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!0);d(d.S,"Object",{entries:function(a){return e(a)}})},{"./_export":30,"./_object-to-array":76}],260:[function(a,b,c){var d=a("./_export"),e=a("./_own-keys"),f=a("./_to-iobject"),g=a("./_property-desc"),h=a("./_object-gopd"),i=a("./_object-dp");d(d.S,"Object",{getOwnPropertyDescriptors:function(a){for(var b,c,d=f(a),j=h.f,k=e(d),l={},m=0;k.length>m;)c=j(d,b=k[m++]),b in l?i.f(l,b,g(0,c)):l[b]=c;return l}})},{"./_export":30,"./_object-dp":65,"./_object-gopd":67,"./_own-keys":77,"./_property-desc":82,"./_to-iobject":104}],261:[function(a,b,c){var d=a("./_export"),e=a("./_object-to-array")(!1);d(d.S,"Object",{values:function(a){return e(a)}})},{"./_export":30,"./_object-to-array":76}],262:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.key,g=d.set;d.exp({defineMetadata:function(a,b,c,d){g(a,b,e(c),f(d))}})},{"./_an-object":8,"./_metadata":61}],263:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.key,g=d.map,h=d.store;d.exp({deleteMetadata:function(a,b){var c=arguments.length<3?void 0:f(arguments[2]),d=g(e(b),c,!1);if(void 0===d||!d["delete"](a))return!1;if(d.size)return!0;var i=h.get(b);return i["delete"](c),!!i.size||h["delete"](b)}})},{"./_an-object":8,"./_metadata":61}],264:[function(a,b,c){var d=a("./es6.set"),e=a("./_array-from-iterable"),f=a("./_metadata"),g=a("./_an-object"),h=a("./_object-gpo"),i=f.keys,j=f.key,k=function(a,b){var c=i(a,b),f=h(a);if(null===f)return c;var g=k(f,b);return g.length?c.length?e(new d(c.concat(g))):g:c};f.exp({getMetadataKeys:function(a){return k(g(a),arguments.length<2?void 0:j(arguments[1]))}})},{"./_an-object":8,"./_array-from-iterable":11,"./_metadata":61,"./_object-gpo":71,"./es6.set":215}],265:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_object-gpo"),g=d.has,h=d.get,i=d.key,j=function(a,b,c){var d=g(a,b,c);if(d)return h(a,b,c);var e=f(b);return null!==e?j(a,e,c):void 0};d.exp({getMetadata:function(a,b){return j(a,e(b),arguments.length<3?void 0:i(arguments[2]))}})},{"./_an-object":8,"./_metadata":61,"./_object-gpo":71}],266:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.keys,g=d.key;d.exp({getOwnMetadataKeys:function(a){return f(e(a),arguments.length<2?void 0:g(arguments[1]))}})},{"./_an-object":8,"./_metadata":61}],267:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.get,g=d.key;d.exp({getOwnMetadata:function(a,b){return f(a,e(b),arguments.length<3?void 0:g(arguments[2]))}})},{"./_an-object":8,"./_metadata":61}],268:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_object-gpo"),g=d.has,h=d.key,i=function(a,b,c){var d=g(a,b,c);if(d)return!0;var e=f(b);return null!==e?i(a,e,c):!1};d.exp({hasMetadata:function(a,b){return i(a,e(b),arguments.length<3?void 0:h(arguments[2]))}})},{"./_an-object":8,"./_metadata":61,"./_object-gpo":71}],269:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=d.has,g=d.key;d.exp({hasOwnMetadata:function(a,b){return f(a,e(b),arguments.length<3?void 0:g(arguments[2]))}})},{"./_an-object":8,"./_metadata":61}],270:[function(a,b,c){var d=a("./_metadata"),e=a("./_an-object"),f=a("./_a-function"),g=d.key,h=d.set;d.exp({metadata:function(a,b){return function(c,d){h(a,b,(void 0!==d?e:f)(c),g(d))}}})},{"./_a-function":4,"./_an-object":8,"./_metadata":61}],271:[function(a,b,c){var d=a("./_export");d(d.P+d.R,"Set",{toJSON:a("./_collection-to-json")("Set")})},{"./_collection-to-json":20,"./_export":30}],272:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-at")(!0);d(d.P,"String",{at:function(a){return e(this,a)}})},{"./_export":30,"./_string-at":94}],273:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-pad");d(d.P,"String",{padEnd:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0,!1)}})},{"./_export":30,"./_string-pad":97}],274:[function(a,b,c){"use strict";var d=a("./_export"),e=a("./_string-pad");d(d.P,"String",{padStart:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":30,"./_string-pad":97}],275:[function(a,b,c){"use strict";a("./_string-trim")("trimLeft",function(a){return function(){return a(this,1)}},"trimStart")},{"./_string-trim":99}],276:[function(a,b,c){"use strict";a("./_string-trim")("trimRight",function(a){return function(){return a(this,2)}},"trimEnd")},{"./_string-trim":99}],277:[function(a,b,c){var d=a("./_export");d(d.S,"System",{global:a("./_global")})},{"./_export":30,"./_global":36}],278:[function(a,b,c){for(var d=a("./es6.array.iterator"),e=a("./_redefine"),f=a("./_global"),g=a("./_hide"),h=a("./_iterators"),i=a("./_wks"),j=i("iterator"),k=i("toStringTag"),l=h.Array,m=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],n=0;5>n;n++){var o,p=m[n],q=f[p],r=q&&q.prototype;if(r){r[j]||g(r,j,l),r[k]||g(r,k,p),h[p]=l;for(o in d)r[o]||e(r,o,d[o],!0)}}},{"./_global":36,"./_hide":38,"./_iterators":54,"./_redefine":84,"./_wks":112,"./es6.array.iterator":126}],279:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":30,"./_task":101}],280:[function(a,b,c){var d=a("./_global"),e=a("./_export"),f=a("./_invoke"),g=a("./_partial"),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},{"./_export":30,"./_global":36,"./_invoke":42,"./_partial":80}],281:[function(a,b,c){a("./modules/es6.symbol"),a("./modules/es6.object.create"),a("./modules/es6.object.define-property"),a("./modules/es6.object.define-properties"),a("./modules/es6.object.get-own-property-descriptor"),a("./modules/es6.object.get-prototype-of"),a("./modules/es6.object.keys"),a("./modules/es6.object.get-own-property-names"),a("./modules/es6.object.freeze"),a("./modules/es6.object.seal"),a("./modules/es6.object.prevent-extensions"),a("./modules/es6.object.is-frozen"),a("./modules/es6.object.is-sealed"),a("./modules/es6.object.is-extensible"),a("./modules/es6.object.assign"),a("./modules/es6.object.is"),a("./modules/es6.object.set-prototype-of"),a("./modules/es6.object.to-string"),a("./modules/es6.function.bind"),a("./modules/es6.function.name"),a("./modules/es6.function.has-instance"),a("./modules/es6.parse-int"),a("./modules/es6.parse-float"),a("./modules/es6.number.constructor"),a("./modules/es6.number.to-fixed"),a("./modules/es6.number.to-precision"),a("./modules/es6.number.epsilon"),a("./modules/es6.number.is-finite"),a("./modules/es6.number.is-integer"),a("./modules/es6.number.is-nan"),a("./modules/es6.number.is-safe-integer"),a("./modules/es6.number.max-safe-integer"),a("./modules/es6.number.min-safe-integer"),a("./modules/es6.number.parse-float"),a("./modules/es6.number.parse-int"),a("./modules/es6.math.acosh"),a("./modules/es6.math.asinh"),a("./modules/es6.math.atanh"),a("./modules/es6.math.cbrt"),a("./modules/es6.math.clz32"),a("./modules/es6.math.cosh"),a("./modules/es6.math.expm1"),a("./modules/es6.math.fround"),a("./modules/es6.math.hypot"),a("./modules/es6.math.imul"),a("./modules/es6.math.log10"),a("./modules/es6.math.log1p"),a("./modules/es6.math.log2"),a("./modules/es6.math.sign"),a("./modules/es6.math.sinh"),a("./modules/es6.math.tanh"),a("./modules/es6.math.trunc"),a("./modules/es6.string.from-code-point"),a("./modules/es6.string.raw"),a("./modules/es6.string.trim"),a("./modules/es6.string.iterator"),a("./modules/es6.string.code-point-at"),a("./modules/es6.string.ends-with"),a("./modules/es6.string.includes"),a("./modules/es6.string.repeat"),a("./modules/es6.string.starts-with"),a("./modules/es6.string.anchor"),a("./modules/es6.string.big"),a("./modules/es6.string.blink"),a("./modules/es6.string.bold"),a("./modules/es6.string.fixed"),a("./modules/es6.string.fontcolor"),a("./modules/es6.string.fontsize"),a("./modules/es6.string.italics"),a("./modules/es6.string.link"),a("./modules/es6.string.small"),a("./modules/es6.string.strike"),a("./modules/es6.string.sub"),a("./modules/es6.string.sup"),a("./modules/es6.date.now"),a("./modules/es6.date.to-string"),a("./modules/es6.date.to-iso-string"),a("./modules/es6.date.to-json"),a("./modules/es6.array.is-array"),a("./modules/es6.array.from"),a("./modules/es6.array.of"),a("./modules/es6.array.join"),a("./modules/es6.array.slice"),a("./modules/es6.array.sort"),a("./modules/es6.array.for-each"),a("./modules/es6.array.map"),a("./modules/es6.array.filter"),a("./modules/es6.array.some"),a("./modules/es6.array.every"),a("./modules/es6.array.reduce"),a("./modules/es6.array.reduce-right"),a("./modules/es6.array.index-of"),a("./modules/es6.array.last-index-of"),a("./modules/es6.array.copy-within"),a("./modules/es6.array.fill"),a("./modules/es6.array.find"),a("./modules/es6.array.find-index"),a("./modules/es6.array.species"),a("./modules/es6.array.iterator"),a("./modules/es6.regexp.constructor"),a("./modules/es6.regexp.to-string"),a("./modules/es6.regexp.flags"),a("./modules/es6.regexp.match"),a("./modules/es6.regexp.replace"),a("./modules/es6.regexp.search"),a("./modules/es6.regexp.split"),a("./modules/es6.promise"),a("./modules/es6.map"),a("./modules/es6.set"),a("./modules/es6.weak-map"),a("./modules/es6.weak-set"),a("./modules/es6.typed.array-buffer"),a("./modules/es6.typed.data-view"),a("./modules/es6.typed.int8-array"),a("./modules/es6.typed.uint8-array"),a("./modules/es6.typed.uint8-clamped-array"),a("./modules/es6.typed.int16-array"),a("./modules/es6.typed.uint16-array"),a("./modules/es6.typed.int32-array"),a("./modules/es6.typed.uint32-array"),a("./modules/es6.typed.float32-array"),a("./modules/es6.typed.float64-array"),a("./modules/es6.reflect.apply"),a("./modules/es6.reflect.construct"),a("./modules/es6.reflect.define-property"),a("./modules/es6.reflect.delete-property"),a("./modules/es6.reflect.enumerate"),a("./modules/es6.reflect.get"),a("./modules/es6.reflect.get-own-property-descriptor"),a("./modules/es6.reflect.get-prototype-of"),a("./modules/es6.reflect.has"),a("./modules/es6.reflect.is-extensible"),a("./modules/es6.reflect.own-keys"),a("./modules/es6.reflect.prevent-extensions"),a("./modules/es6.reflect.set"),a("./modules/es6.reflect.set-prototype-of"),a("./modules/es7.array.includes"),a("./modules/es7.string.at"),a("./modules/es7.string.pad-start"),a("./modules/es7.string.pad-end"),a("./modules/es7.string.trim-left"),a("./modules/es7.string.trim-right"),a("./modules/es7.object.get-own-property-descriptors"),a("./modules/es7.object.values"),a("./modules/es7.object.entries"),a("./modules/es7.map.to-json"),a("./modules/es7.set.to-json"),a("./modules/es7.system.global"),a("./modules/es7.error.is-error"),a("./modules/es7.math.iaddh"),a("./modules/es7.math.isubh"),a("./modules/es7.math.imulh"),a("./modules/es7.math.umulh"),a("./modules/es7.reflect.define-metadata"),a("./modules/es7.reflect.delete-metadata"),a("./modules/es7.reflect.get-metadata"),a("./modules/es7.reflect.get-metadata-keys"),a("./modules/es7.reflect.get-own-metadata"),a("./modules/es7.reflect.get-own-metadata-keys"),a("./modules/es7.reflect.has-metadata"),a("./modules/es7.reflect.has-own-metadata"),a("./modules/es7.reflect.metadata"),a("./modules/web.timers"),a("./modules/web.immediate"),a("./modules/web.dom.iterable"),b.exports=a("./modules/_core")},{"./modules/_core":23,"./modules/es6.array.copy-within":116,"./modules/es6.array.every":117,"./modules/es6.array.fill":118,"./modules/es6.array.filter":119,"./modules/es6.array.find":121,"./modules/es6.array.find-index":120,"./modules/es6.array.for-each":122,"./modules/es6.array.from":123,"./modules/es6.array.index-of":124,"./modules/es6.array.is-array":125,"./modules/es6.array.iterator":126,"./modules/es6.array.join":127,"./modules/es6.array.last-index-of":128,"./modules/es6.array.map":129,"./modules/es6.array.of":130,"./modules/es6.array.reduce":132,"./modules/es6.array.reduce-right":131,"./modules/es6.array.slice":133,"./modules/es6.array.some":134,"./modules/es6.array.sort":135,"./modules/es6.array.species":136,"./modules/es6.date.now":137,"./modules/es6.date.to-iso-string":138,"./modules/es6.date.to-json":139,"./modules/es6.date.to-string":140,"./modules/es6.function.bind":141,"./modules/es6.function.has-instance":142,"./modules/es6.function.name":143,"./modules/es6.map":144,"./modules/es6.math.acosh":145,"./modules/es6.math.asinh":146,"./modules/es6.math.atanh":147,"./modules/es6.math.cbrt":148,"./modules/es6.math.clz32":149,"./modules/es6.math.cosh":150,"./modules/es6.math.expm1":151,"./modules/es6.math.fround":152,"./modules/es6.math.hypot":153,"./modules/es6.math.imul":154,"./modules/es6.math.log10":155,"./modules/es6.math.log1p":156,"./modules/es6.math.log2":157,"./modules/es6.math.sign":158,"./modules/es6.math.sinh":159,"./modules/es6.math.tanh":160,"./modules/es6.math.trunc":161,"./modules/es6.number.constructor":162,"./modules/es6.number.epsilon":163,"./modules/es6.number.is-finite":164,"./modules/es6.number.is-integer":165,"./modules/es6.number.is-nan":166,"./modules/es6.number.is-safe-integer":167,"./modules/es6.number.max-safe-integer":168,"./modules/es6.number.min-safe-integer":169,"./modules/es6.number.parse-float":170,"./modules/es6.number.parse-int":171,"./modules/es6.number.to-fixed":172,"./modules/es6.number.to-precision":173,"./modules/es6.object.assign":174,"./modules/es6.object.create":175,"./modules/es6.object.define-properties":176,"./modules/es6.object.define-property":177,"./modules/es6.object.freeze":178,"./modules/es6.object.get-own-property-descriptor":179,"./modules/es6.object.get-own-property-names":180,"./modules/es6.object.get-prototype-of":181,"./modules/es6.object.is":185,"./modules/es6.object.is-extensible":182,"./modules/es6.object.is-frozen":183,"./modules/es6.object.is-sealed":184,"./modules/es6.object.keys":186,"./modules/es6.object.prevent-extensions":187,"./modules/es6.object.seal":188,"./modules/es6.object.set-prototype-of":189,"./modules/es6.object.to-string":190,"./modules/es6.parse-float":191,"./modules/es6.parse-int":192,"./modules/es6.promise":193,"./modules/es6.reflect.apply":194,"./modules/es6.reflect.construct":195,"./modules/es6.reflect.define-property":196,"./modules/es6.reflect.delete-property":197,"./modules/es6.reflect.enumerate":198,"./modules/es6.reflect.get":201,"./modules/es6.reflect.get-own-property-descriptor":199,"./modules/es6.reflect.get-prototype-of":200,"./modules/es6.reflect.has":202,"./modules/es6.reflect.is-extensible":203,"./modules/es6.reflect.own-keys":204,"./modules/es6.reflect.prevent-extensions":205,"./modules/es6.reflect.set":207,"./modules/es6.reflect.set-prototype-of":206,"./modules/es6.regexp.constructor":208,"./modules/es6.regexp.flags":209,"./modules/es6.regexp.match":210,"./modules/es6.regexp.replace":211,"./modules/es6.regexp.search":212,"./modules/es6.regexp.split":213,"./modules/es6.regexp.to-string":214,"./modules/es6.set":215,"./modules/es6.string.anchor":216,"./modules/es6.string.big":217,"./modules/es6.string.blink":218,"./modules/es6.string.bold":219,"./modules/es6.string.code-point-at":220,"./modules/es6.string.ends-with":221,"./modules/es6.string.fixed":222,"./modules/es6.string.fontcolor":223,"./modules/es6.string.fontsize":224,"./modules/es6.string.from-code-point":225,"./modules/es6.string.includes":226,"./modules/es6.string.italics":227,"./modules/es6.string.iterator":228,"./modules/es6.string.link":229,"./modules/es6.string.raw":230,"./modules/es6.string.repeat":231,"./modules/es6.string.small":232,"./modules/es6.string.starts-with":233,"./modules/es6.string.strike":234,"./modules/es6.string.sub":235,"./modules/es6.string.sup":236,"./modules/es6.string.trim":237,"./modules/es6.symbol":238,"./modules/es6.typed.array-buffer":239,"./modules/es6.typed.data-view":240,"./modules/es6.typed.float32-array":241,"./modules/es6.typed.float64-array":242,"./modules/es6.typed.int16-array":243,"./modules/es6.typed.int32-array":244,"./modules/es6.typed.int8-array":245,"./modules/es6.typed.uint16-array":246,"./modules/es6.typed.uint32-array":247,"./modules/es6.typed.uint8-array":248,"./modules/es6.typed.uint8-clamped-array":249,"./modules/es6.weak-map":250,"./modules/es6.weak-set":251,"./modules/es7.array.includes":252,"./modules/es7.error.is-error":253,"./modules/es7.map.to-json":254,"./modules/es7.math.iaddh":255,"./modules/es7.math.imulh":256,"./modules/es7.math.isubh":257,"./modules/es7.math.umulh":258,"./modules/es7.object.entries":259,"./modules/es7.object.get-own-property-descriptors":260,"./modules/es7.object.values":261,"./modules/es7.reflect.define-metadata":262,"./modules/es7.reflect.delete-metadata":263,"./modules/es7.reflect.get-metadata":265,"./modules/es7.reflect.get-metadata-keys":264,"./modules/es7.reflect.get-own-metadata":267,"./modules/es7.reflect.get-own-metadata-keys":266,"./modules/es7.reflect.has-metadata":268,"./modules/es7.reflect.has-own-metadata":269,"./modules/es7.reflect.metadata":270,"./modules/es7.set.to-json":271,"./modules/es7.string.at":272,"./modules/es7.string.pad-end":273,"./modules/es7.string.pad-start":274,"./modules/es7.string.trim-left":275,"./modules/es7.string.trim-right":276,"./modules/es7.system.global":277,"./modules/web.dom.iterable":278,"./modules/web.immediate":279,"./modules/web.timers":280}],282:[function(a,b,c){(function(a,c){!function(c){"use strict";function d(a,b,c,d){var e=Object.create((b||f).prototype),g=new o(d||[]);return e._invoke=l(a,c,g),e}function e(a,b,c){try{return{type:"normal",arg:a.call(b,c)}}catch(d){return{type:"throw",arg:d}}}function f(){}function g(){}function h(){}function i(a){["next","throw","return"].forEach(function(b){a[b]=function(a){return this._invoke(b,a)}})}function j(a){this.arg=a}function k(b){function c(a,c){var d=b[a](c),e=d.value;return e instanceof j?Promise.resolve(e.arg).then(f,g):Promise.resolve(e).then(function(a){return d.value=a,d})}function d(a,b){function d(){return c(a,b)}return e=e?e.then(d,d):new Promise(function(a){a(d())})}"object"==typeof a&&a.domain&&(c=a.domain.bind(c));var e,f=c.bind(b,"next"),g=c.bind(b,"throw");c.bind(b,"return");this._invoke=d}function l(a,b,c){var d=w;return function(f,g){if(d===y)throw new Error("Generator is already running");if(d===z){if("throw"===f)throw g;return q()}for(;;){var h=c.delegate;if(h){if("return"===f||"throw"===f&&h.iterator[f]===r){c.delegate=null;var i=h.iterator["return"];if(i){var j=e(i,h.iterator,g);if("throw"===j.type){f="throw",g=j.arg;continue}}if("return"===f)continue}var j=e(h.iterator[f],h.iterator,g);if("throw"===j.type){c.delegate=null,f="throw",g=j.arg;continue}f="next",g=r;var k=j.arg;if(!k.done)return d=x,k;c[h.resultName]=k.value,c.next=h.nextLoc,c.delegate=null}if("next"===f)c._sent=g,d===x?c.sent=g:c.sent=r;else if("throw"===f){if(d===w)throw d=z,g;c.dispatchException(g)&&(f="next",g=r)}else"return"===f&&c.abrupt("return",g);d=y;var j=e(a,b,c);if("normal"===j.type){d=c.done?z:x;var k={value:j.arg,done:c.done};if(j.arg!==A)return k;c.delegate&&"next"===f&&(g=r)}else"throw"===j.type&&(d=z,f="throw",g=j.arg)}}}function m(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}function n(a){var b=a.completion||{};b.type="normal",delete b.arg,a.completion=b}function o(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(m,this),this.reset(!0)}function p(a){if(a){var b=a[t];if(b)return b.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var c=-1,d=function e(){for(;++c=0;--d){var e=this.tryEntries[d],f=e.completion;if("root"===e.tryLoc)return b("end");if(e.tryLoc<=this.prev){var g=s.call(e,"catchLoc"),h=s.call(e,"finallyLoc");if(g&&h){if(this.prev=0;--c){var d=this.tryEntries[c];if(d.tryLoc<=this.prev&&s.call(d,"finallyLoc")&&this.prev=0;--b){var c=this.tryEntries[b];if(c.finallyLoc===a)return this.complete(c.completion,c.afterLoc),n(c),A}},"catch":function(a){for(var b=this.tryEntries.length-1;b>=0;--b){var c=this.tryEntries[b];if(c.tryLoc===a){var d=c.completion;if("throw"===d.type){var e=d.arg;n(c)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(a,b,c){return this.delegate={iterator:p(a),resultName:b,nextLoc:c},A}}}("object"==typeof c?c:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:289}],283:[function(a,b,c){b.exports={"default":a("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":284}],284:[function(a,b,c){var d=a("../../modules/$");b.exports=function(a,b,c){return d.setDesc(a,b,c)}},{"../../modules/$":285}],285:[function(a,b,c){var d=Object;b.exports={create:d.create,getProto:d.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:d.getOwnPropertyDescriptor,setDesc:d.defineProperty,setDescs:d.defineProperties,getKeys:d.keys,getNames:d.getOwnPropertyNames,getSymbols:d.getOwnPropertySymbols,each:[].forEach}},{}],286:[function(a,b,c){(function(a){"use strict";function b(a,b,c){return new Promise(function(d,e){"function"==typeof b&&(c=b,b=void 0);var g=b?f().open(a,b):f().open(a);g.onblocked=function(a){var b=new Promise(function(a,b){g.onsuccess=function(b){return a(b.target.result)},g.onerror=function(a){a.preventDefault(),b(a)}});a.resume=b,e(a)},"function"==typeof c&&(g.onupgradeneeded=function(a){try{c(a)}catch(b){a.target.result.close(),e(b)}}),g.onerror=function(a){a.preventDefault(),e(a)},g.onsuccess=function(a){d(a.target.result)}})}function d(a){var b="string"!=typeof a?a.name:a;return new Promise(function(c,d){var e=function(){var a=f().deleteDatabase(b);a.onblocked=function(b){b=null===b.newVersion||"undefined"==typeof Proxy?b:new Proxy(b,{get:function(a,b){return"newVersion"===b?null:a[b]}});var c=new Promise(function(c,d){a.onsuccess=function(a){"newVersion"in a||(a.newVersion=b.newVersion),"oldVersion"in a||(a.oldVersion=b.oldVersion),c(a)},a.onerror=function(a){a.preventDefault(),d(a)}});b.resume=c,d(b)},a.onerror=function(a){a.preventDefault(),d(a)},a.onsuccess=function(a){"newVersion"in a||(a.newVersion=null),c(a)}};"string"!=typeof a?(a.close(),setTimeout(e,100)):e()})}function e(a,b){return f().cmp(a,b)}function f(){return a.forceIndexedDB||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.msIndexedDB||a.shimIndexedDB}Object.defineProperty(c,"__esModule",{value:!0}),c.open=b,c.del=d,c.cmp=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],287:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a){return Array.isArray(a)?a.map(function(a){return f(a)}):(0,m["default"])(a)?Object.keys(a).reduce(function(b,c){return b[c]=f(a[c]),b},{}):a}function g(a){return function(b){var c=b.oldVersion>s?0:b.oldVersion;a(b,c)}}function h(a,b,c,d){function e(){var a=k.next();if(a.done)return j.dropIndexes.forEach(function(a){h.objectStore(a.storeName).deleteIndex(a.name)}),j.indexes.forEach(function(a){h.objectStore(a.storeName).createIndex(a.name,a.field,{unique:a.unique,multiEntry:a.multiEntry})}),void(d&&d());var b=a.value,c={},f=void 0,i=void 0;if(b.copyFrom){f=b.copyFrom.name,i=h.objectStore(f);var l=b.copyFrom.options||{};null!==l.keyPath&&void 0!==l.keyPath?c.keyPath=l.keyPath:null!==i.keyPath&&void 0!==b.keyPath&&(c.keyPath=i.keyPath),void 0!==l.autoIncrement?c.autoIncrement=l.autoIncrement:i.autoIncrement&&(c.autoIncrement=i.autoIncrement)}else null!==b.keyPath&&void 0!==b.keyPath&&(c.keyPath=b.keyPath),b.autoIncrement&&(c.autoIncrement=b.autoIncrement);var m=g.createObjectStore(b.name,c);if(!b.copyFrom)return void e();var n=i.getAll();n.onsuccess=function(){var a=n.result,c=0;return!a.length&&b.copyFrom.deleteOld?(g.deleteObjectStore(f),void e()):void a.forEach(function(d){var h=m.add(d);h.onsuccess=function(){c++,c===a.length&&(b.copyFrom.deleteOld&&g.deleteObjectStore(f),e())}})}}var f=this;if(!(c>=a)){var g=b.target.result,h=b.target.transaction,i=this.lastEnteredVersion();this._versions[a].earlyCallbacks.forEach(function(c){f.setCurrentVersion(a),c.call(f,b)}),this.setCurrentVersion(i);var j=this._versions[a];j.dropStores.forEach(function(a){g.deleteObjectStore(a.name)});var k=j.stores.values();e()}}Object.defineProperty(c,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol?"symbol":typeof a},j=function(){function a(a,b){for(var c=0;ca||a>s)throw new TypeError("invalid version");return this.setCurrentVersion(a),this._versions[a]={stores:[],dropStores:[],indexes:[],dropIndexes:[],callbacks:[],earlyCallbacks:[],version:a},this}},{key:"addStore",value:function(a){var b=this,c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("string"!=typeof a)throw new TypeError('"name" is required');if(this._stores[a])throw new DOMException('"'+a+'" store is already defined',"ConstraintError");(0,m["default"])(c)&&(0,
+m["default"])(c.copyFrom)&&!function(){var a=c.copyFrom,d=a.name;if("string"!=typeof d)throw new TypeError('"copyFrom.name" is required when `copyFrom` is present');if(b._versions[b.lastEnteredVersion()].dropStores.some(function(a){return a.name===d}))throw new TypeError('"copyFrom.name" must not be a store slated for deletion.');if(a.deleteOld){var e=b._stores[d];e&&delete b._stores[d]}}();var d={name:a,indexes:{},keyPath:c.key||c.keyPath,autoIncrement:c.increment||c.autoIncrement||!1,copyFrom:c.copyFrom||null};if(d.keyPath||""===d.keyPath||(d.keyPath=null),d.autoIncrement&&(""===d.keyPath||Array.isArray(d.keyPath)))throw new DOMException("keyPath must not be the empty string or a sequence if autoIncrement is in use","InvalidAccessError");return this._stores[a]=d,this._versions[this.lastEnteredVersion()].stores.push(d),this._current.store=d,this}},{key:"delStore",value:function(a){if("string"!=typeof a)throw new TypeError('"name" is required');this._versions[this.lastEnteredVersion()].stores.forEach(function(b){var c=b.copyFrom;if((0,m["default"])(c)&&a===c.name){if(c.deleteOld)throw new TypeError('"name" is already slated for deletion');throw new TypeError("set `deleteOld` on `copyFrom` to delete this store.")}});var b=this._stores[a];return b?delete this._stores[a]:b={name:a},this._versions[this.lastEnteredVersion()].dropStores.push(b),this._current.store=null,this}},{key:"renameStore",value:function(a,b,c){return this.copyStore(a,b,c,!0)}},{key:"copyStore",value:function(a,b,c){var d=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];if("string"!=typeof a)throw new TypeError('"oldName" is required');if("string"!=typeof b)throw new TypeError('"newName" is required');return c=(0,m["default"])(c)?f(c):{},c.copyFrom={name:a,deleteOld:d,options:c},this.addStore(b,c)}},{key:"getStore",value:function(a){var b=this;if(a&&"object"===("undefined"==typeof a?"undefined":i(a))&&"name"in a&&"indexNames"in a&&!function(){var c=a;a=c.name;var d={name:a,indexes:Array.from(c.indexNames).reduce(function(b,d){var e=c.index(d);return b[d]={name:d,storeName:a,field:e.keyPath,unique:e.unique,multiEntry:e.multiEntry},b},{}),keyPath:c.keyPath,autoIncrement:c.autoIncrement,copyFrom:null};b._stores[a]=d}(),"string"!=typeof a)throw new DOMException('"name" is required',"NotFoundError");if(!this._stores[a])throw new TypeError('"'+a+'" store is not defined');return this._current.store=this._stores[a],this}},{key:"addIndex",value:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if("string"!=typeof a)throw new TypeError('"name" is required');if("string"!=typeof b&&!Array.isArray(b))throw new SyntaxError('"field" is required');var d=this._current.store;if(!d)throw new TypeError('set current store using "getStore" or "addStore"');if(d.indexes[a])throw new DOMException('"'+a+'" index is already defined',"ConstraintError");var e={name:a,field:b,storeName:d.name,multiEntry:c.multi||c.multiEntry||!1,unique:c.unique||!1};return d.indexes[a]=e,this._versions[this.lastEnteredVersion()].indexes.push(e),this}},{key:"delIndex",value:function(a){if("string"!=typeof a)throw new TypeError('"name" is required');var b=this._current.store.indexes[a];if(!b)throw new DOMException('"'+a+'" index is not defined',"NotFoundError");return delete this._current.store.indexes[a],this._versions[this.lastEnteredVersion()].dropIndexes.push(b),this}},{key:"addCallback",value:function(a){return this._versions[this.lastEnteredVersion()].callbacks.push(a),this}},{key:"addEarlyCallback",value:function(a){return this._versions[this.lastEnteredVersion()].earlyCallbacks.push(a),this}},{key:"flushIncomplete",value:function(a){var b=q("idb-incompleteUpgrades");delete b[a],r("idb-incompleteUpgrades",b)}},{key:"open",value:function(a,b){return this.upgrade(a,b,!0)}},{key:"upgrade",value:function(a,b,c){var d=this,e=void 0,f=void 0,j=void 0,l=function(){f=n(d._versions).sort(function(a,b){return a.version-b.version}).map(function(a){return a.version}).values()},m=function(a){return function(b){if(b&&"blocked"===b.type)return void a(b);throw b}};l();var o=function(i,l,m,n){var o=i.version,p=!0,q=void 0,r=void 0;for(r=f.next();!r.done&&r.value<=o;r=f.next())q=r.value;return e=r.value,r.done||e>b?void(void 0!==n?(e=q,j(i,l,m,n)):c?l(i):(i.close(),l())):(i.close(),void setTimeout(function(){(0,k.open)(a,e,g(function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];p=!1,h.call.apply(h,[d,e].concat(b,[function(){p=!0}]))})).then(function(a){var b=setInterval(function(){p&&(clearInterval(b),j(a,l,m,n))},100)})["catch"](function(a){m(a)})}))};return j=function(b,c,f,g){var h=function(c,e){if(c="string"==typeof c?new Error(c):c,c.retry=function(){return new Promise(function(c,f){var g=function(b){d.flushIncomplete(a),c(b)};b.close(),(0,k.open)(a)["catch"](m(f)).then(function(a){l(),o(a,g,f,e)})["catch"](f)})},p){var g=q("idb-incompleteUpgrades");g[a]={version:b.version,error:c.message,callbackIndex:e},r("idb-incompleteUpgrades",g)}b.close(),f(c)},i=Promise.resolve(),j=void 0,n=d._versions[e],s=n.callbacks.some(function(a,c){if(void 0!==g&&g>c)return!1;var d=void 0;try{d=a(b)}catch(e){return h(e,c),!0}return d&&d.then?(i=n.callbacks.slice(c+1).reduce(function(a,c){return a.then(function(){return c(b)})},d),j=c,!0):void 0}),t=void 0!==j;(!s||t)&&(i=i.then(function(){return o(b,c,f)}),t&&(i=i["catch"](function(a){h(a,j)})))},new Promise(function(c,l){if(b=b||d.version(),"number"!=typeof b||1>b)return void l(new Error("Bad version supplied for idb-schema upgrade"));var n=void 0,r=void 0;if(p&&(n=q("idb-incompleteUpgrades"),r=n[a]),r){var s=function(){var b=new Error("An upgrade previously failed to complete for version: "+r.version+" due to reason: "+r.error);return b.badVersion=r.version,b.retry=function(){for(var c=f.next();!c.done&&c.valuec;c++)b[c]=arguments[c];t=!1;var g=f.next();if(g.done)throw new Error("No schema versions added for upgrade");e=g.value,h.call.apply(h,[d,e].concat(b,[function(){t=!0}]))});(0,k.open)(a,u)["catch"](m(l)).then(function(a){var d=setInterval(function(){return t?(clearInterval(d),b1)for(var c=1;c Object.prototype.hasOwnProperty.call(obj, prop);\r\nconst compareStringified = (a, b) => stringify(a) === stringify(b);\r\n\r\nexport default class IdbImport extends IdbSchema {\r\n constructor () {\r\n super();\r\n }\r\n _setup (schema, cb, mergePatch) {\r\n const isNUL = schema === '\\0';\r\n if (!schema || typeof schema !== 'object' && !(mergePatch && isNUL)) {\r\n throw new Error('Bad schema object');\r\n }\r\n this.addEarlyCallback((e) => {\r\n const db = e.target.result;\r\n const transaction = e.target.transaction;\r\n if (mergePatch && isNUL) {\r\n this._deleteAllUnused(db, transaction, {}, true);\r\n return;\r\n }\r\n return cb(e, db, transaction);\r\n });\r\n }\r\n _deleteIndexes (transaction, storeName, exceptionIndexes) {\r\n const store = transaction.objectStore(storeName); // Shouldn't throw\r\n Array.from(store.indexNames).forEach((indexName) => {\r\n if (!exceptionIndexes || !hasOwn(exceptionIndexes, indexName)) {\r\n this.delIndex(indexName);\r\n }\r\n });\r\n }\r\n _deleteAllUnused (db, transaction, schema, clearUnusedStores, clearUnusedIndexes) {\r\n if (clearUnusedStores || clearUnusedIndexes) {\r\n Array.from(db.objectStoreNames).forEach((storeName) => {\r\n if (clearUnusedStores && !hasOwn(schema, storeName)) {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `TransactionInactiveError` (as by the upgrade having already\r\n // completed or somehow aborting) - since we've just started and\r\n // should be without risk in this loop\r\n // `NotFoundError` - since we are iterating the dynamically updated\r\n // `objectStoreNames`\r\n // this._versions[version].dropStores.push({name: storeName});\r\n // Avoid deleting if going to delete in a move/copy\r\n if (!Object.keys(schema).some((key) => [schema[key].moveFrom, schema[key].copyFrom].includes(storeName))) {\r\n this.delStore(storeName); // Shouldn't throw // Keep this and delete previous line if this PR is accepted: https://github.com/treojs/idb-schema/pull/14\r\n }\r\n } else if (clearUnusedIndexes) {\r\n this._deleteIndexes(transaction, storeName, schema[storeName].indexes);\r\n }\r\n });\r\n }\r\n }\r\n _createStoreIfNotSame (db, transaction, schema, storeName, mergePatch) {\r\n const newStore = schema[storeName];\r\n let store;\r\n let storeParams = {};\r\n function setCanonicalProps (storeProp) {\r\n let canonicalPropValue;\r\n if (hasOwn(newStore, 'key')) { // Support old approach of db.js\r\n canonicalPropValue = newStore.key[storeProp];\r\n } else if (hasOwn(newStore, storeProp)) {\r\n canonicalPropValue = newStore[storeProp];\r\n } else {\r\n canonicalPropValue = storeProp === 'keyPath' ? null : false;\r\n }\r\n if (mergePatch && typeof canonicalPropValue === 'string') {\r\n if (canonicalPropValue === '\\0') {\r\n canonicalPropValue = storeProp === 'keyPath' ? null : false;\r\n } else {\r\n canonicalPropValue = canonicalPropValue.replace(/^\\0/, ''); // Remove escape if present\r\n }\r\n }\r\n storeParams[storeProp] = canonicalPropValue;\r\n }\r\n const copyFrom = newStore.copyFrom;\r\n const moveFrom = newStore.moveFrom;\r\n try {\r\n ['keyPath', 'autoIncrement'].forEach(setCanonicalProps);\r\n if (!db.objectStoreNames.contains(storeName)) {\r\n throw new Error('goto catch to build store');\r\n }\r\n store = transaction.objectStore(storeName); // Shouldn't throw\r\n this.getStore(store);\r\n if (!['keyPath', 'autoIncrement'].every((storeProp) => {\r\n return compareStringified(storeParams[storeProp], store[storeProp]);\r\n })) {\r\n // Avoid deleting if going to delete in a move/copy\r\n if (!copyFrom && !moveFrom) this.delStore(storeName);\r\n throw new Error('goto catch to build store');\r\n }\r\n } catch (err) {\r\n if (err.message !== 'goto catch to build store') {\r\n throw err;\r\n }\r\n if (copyFrom) {\r\n this.copyStore(copyFrom, storeName, storeParams); // May throw\r\n } else if (moveFrom) {\r\n this.renameStore(moveFrom, storeName, storeParams); // May throw\r\n } else {\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction.\r\n // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.\r\n // `ConstraintError` - The above condition should prevent the name already existing.\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the store but then abort the transaction.\r\n // `SyntaxError` - if an invalid `storeParams.keyPath` is supplied.\r\n // `InvalidAccessError` - if `storeParams.autoIncrement` is `true` and `storeParams.keyPath` is an\r\n // empty string or any sequence (empty or otherwise).\r\n this.addStore(storeName, storeParams); // May throw\r\n }\r\n }\r\n return [store, newStore];\r\n }\r\n _createIndex (store, indexes, indexName, mergePatch) {\r\n let newIndex = indexes[indexName];\r\n let indexParams = {};\r\n function setCanonicalProps (indexProp) {\r\n let canonicalPropValue;\r\n if (hasOwn(newIndex, indexProp)) {\r\n canonicalPropValue = newIndex[indexProp];\r\n } else {\r\n canonicalPropValue = indexProp === 'keyPath' ? null : false;\r\n }\r\n if (mergePatch && typeof canonicalPropValue === 'string') {\r\n if (canonicalPropValue === '\\0') {\r\n canonicalPropValue = indexProp === 'keyPath' ? null : false;\r\n } else {\r\n canonicalPropValue = canonicalPropValue.replace(/^\\0/, ''); // Remove escape if present\r\n }\r\n }\r\n indexParams[indexProp] = canonicalPropValue;\r\n }\r\n try {\r\n ['keyPath', 'unique', 'multiEntry', 'locale'].forEach(setCanonicalProps);\r\n if (!store || !store.indexNames.contains(indexName)) {\r\n throw new Error('goto catch to build index');\r\n }\r\n const oldIndex = store.index(indexName);\r\n if (!['keyPath', 'unique', 'multiEntry', 'locale'].every((indexProp) => {\r\n return compareStringified(indexParams[indexProp], oldIndex[indexProp]);\r\n })) {\r\n this.delIndex(indexName);\r\n throw new Error('goto catch to build index');\r\n }\r\n } catch (err) {\r\n if (err.message !== 'goto catch to build index') {\r\n throw err;\r\n }\r\n // Errors for which we are not concerned and why:\r\n // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.\r\n // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist\r\n //\r\n // Possible errors:\r\n // `TransactionInactiveError` - if the upgrade had already aborted,\r\n // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return\r\n // the index object but then abort the transaction.\r\n // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path\r\n // `InvalidAccessError` - If `multiEntry` on `index` is `true` and\r\n // `keyPath` (second argument) is a sequence\r\n this.addIndex(indexName, indexParams.keyPath !== null ? indexParams.keyPath : indexName, indexParams);\r\n }\r\n }\r\n createIdbSchemaPatchSchema (schema) {\r\n schema(this); // May throw\r\n }\r\n // Modified JSON Merge Patch type schemas: https://github.com/json-schema-org/json-schema-spec/issues/15#issuecomment-211142145\r\n createMergePatchSchema (schema) {\r\n this._setup(schema, (e, db, transaction) => {\r\n Object.keys(schema).forEach((storeName) => {\r\n const schemaObj = schema[storeName];\r\n const isNUL = schemaObj === '\\0';\r\n if (isNUL) {\r\n this.delStore(storeName);\r\n return;\r\n }\r\n if (!schemaObj || typeof schemaObj !== 'object') {\r\n throw new Error('Invalid merge patch schema object (type: ' + typeof schemaObj + '): ' + schemaObj);\r\n }\r\n const [store] = this._createStoreIfNotSame(db, transaction, schema, storeName, true);\r\n if (hasOwn(schemaObj, 'indexes')) {\r\n const indexes = schemaObj.indexes;\r\n const isNUL = indexes === '\\0';\r\n if (isNUL) {\r\n this._deleteIndexes(transaction, storeName);\r\n return;\r\n }\r\n if (!indexes || typeof indexes !== 'object') {\r\n throw new Error('Invalid merge patch indexes object (type: ' + typeof indexes + '): ' + indexes);\r\n }\r\n Object.keys(indexes).forEach((indexName) => {\r\n const indexObj = indexes[indexName];\r\n const isNUL = indexObj === '\\0';\r\n if (isNUL) {\r\n this.delIndex(indexName);\r\n return;\r\n }\r\n if (!indexObj || typeof indexObj !== 'object') {\r\n throw new Error('Invalid merge patch index object (type: ' + typeof indexObj + '): ' + indexObj);\r\n }\r\n this._createIndex(store, indexes, indexName, true);\r\n });\r\n }\r\n });\r\n });\r\n }\r\n createWholePatchSchema (schema, clearUnusedStores = true, clearUnusedIndexes = true) {\r\n this._setup(schema, (e, db, transaction) => {\r\n this._deleteAllUnused(db, transaction, schema, clearUnusedStores, clearUnusedIndexes);\r\n\r\n Object.keys(schema).forEach((storeName) => {\r\n const [store, newStore] = this._createStoreIfNotSame(db, transaction, schema, storeName);\r\n const indexes = newStore.indexes;\r\n Object.keys(indexes || {}).forEach((indexName) => {\r\n this._createIndex(store, indexes, indexName);\r\n });\r\n });\r\n });\r\n }\r\n createVersionedSchema (schemas, schemaType, clearUnusedStores, clearUnusedIndexes) {\r\n const createPatches = (schemaObj, schemaType) => {\r\n switch (schemaType) {\r\n case 'mixed': {\r\n schemaObj.forEach((mixedObj) => {\r\n const schemaType = Object.keys(mixedObj)[0];\r\n let schema = mixedObj[schemaType];\r\n if (schemaType !== 'idb-schema' && schema === 'function') {\r\n schema = schema(this); // May throw\r\n }\r\n // These could immediately throw with a bad version\r\n switch (schemaType) {\r\n case 'idb-schema': { // Function called above\r\n this.createIdbSchemaPatchSchema(schema);\r\n break;\r\n }\r\n case 'merge': {\r\n this.createMergePatchSchema(schema);\r\n break;\r\n }\r\n case 'whole': {\r\n this.createWholePatchSchema(schema, clearUnusedStores, clearUnusedIndexes);\r\n break;\r\n }\r\n case 'mixed': {\r\n createPatches(schema, schemaType);\r\n break;\r\n }\r\n default:\r\n throw new Error('Unrecognized schema type');\r\n }\r\n });\r\n break;\r\n }\r\n case 'merge': {\r\n this.createMergePatchSchema(schemaObj);\r\n break;\r\n }\r\n case 'idb-schema': {\r\n this.createIdbSchemaPatchSchema(schemaObj);\r\n break;\r\n }\r\n case 'whole': {\r\n this.createWholePatchSchema(schemaObj, clearUnusedStores, clearUnusedIndexes);\r\n break;\r\n }\r\n }\r\n };\r\n Object.keys(schemas || {}).sort().forEach((schemaVersion) => {\r\n const version = parseInt(schemaVersion, 10);\r\n let schemaObj = schemas[version];\r\n if (schemaType !== 'idb-schema' && typeof schemaObj === 'function') {\r\n schemaObj = schemaObj(this); // May throw\r\n }\r\n this.version(version);\r\n createPatches(schemaObj, schemaType, version);\r\n });\r\n }\r\n}\r\n"]}
\ No newline at end of file
diff --git a/karma.conf.js b/karma.conf.js
index 8d55ca0..9339146 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -21,6 +21,7 @@ module.exports = function (config) {
// list of files / patterns to load in the browser
files: [
'dist/db.min.js',
+ 'dist/idb-import.min.js',
'node_modules/chai/chai.js',
'node_modules/babel-polyfill/dist/polyfill.js',
'node_modules/jquery/dist/jquery.min.js',
diff --git a/package.json b/package.json
index adf8cf1..5b7802a 100644
--- a/package.json
+++ b/package.json
@@ -21,8 +21,10 @@
},
"scripts": {
"test": "./node_modules/.bin/grunt test",
+ "test:local": "./node_modules/.bin/grunt test:local",
"karma": "./node_modules/.bin/karma",
- "grunt": "./node_modules/.bin/grunt"
+ "grunt": "./node_modules/.bin/grunt",
+ "phantom": "./node_modules/.bin/grunt phantom"
},
"dependencies": {},
"devDependencies": {
@@ -46,6 +48,7 @@
"grunt-eslint": "^17.3.1",
"grunt-karma": "^0.12.1",
"grunt-saucelabs": "^8.6.0",
+ "idb-schema": "https://github.com/brettz9/idb-schema#tmp-publish",
"jade": "^1.11.0",
"jquery": "^2.2.2",
"karma": "^0.13.21",
diff --git a/src/db.js b/src/db.js
index 05e8e75..059da0b 100644
--- a/src/db.js
+++ b/src/db.js
@@ -1,22 +1,25 @@
+import IdbImport from './idb-import';
+
(function (local) {
'use strict';
- const IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;
- const transactionModes = {
- readonly: 'readonly',
- readwrite: 'readwrite'
- };
const hasOwn = Object.prototype.hasOwnProperty;
- const defaultMapper = x => x;
const indexedDB = local.indexedDB || local.webkitIndexedDB ||
local.mozIndexedDB || local.oIndexedDB || local.msIndexedDB ||
local.shimIndexedDB || (function () {
throw new Error('IndexedDB required');
}());
+ const IDBKeyRange = local.IDBKeyRange || local.webkitIDBKeyRange;
- const dbCache = {};
+ const defaultMapper = x => x;
const serverEvents = ['abort', 'error', 'versionchange'];
+ const transactionModes = {
+ readonly: 'readonly',
+ readwrite: 'readwrite'
+ };
+
+ const dbCache = {};
function isObject (item) {
return item && typeof item === 'object';
@@ -58,7 +61,7 @@
}
function mongoifyKey (key) {
if (key && typeof key === 'object' && !(key instanceof IDBKeyRange)) {
- let [type, args] = mongoDBToKeyRangeArgs(key);
+ const [type, args] = mongoDBToKeyRangeArgs(key);
return IDBKeyRange[type](...args);
}
return key;
@@ -69,13 +72,7 @@
const runQuery = function (type, args, cursorType, direction, limitRange, filters, mapper) {
return new Promise(function (resolve, reject) {
- let keyRange;
- try {
- keyRange = type ? IDBKeyRange[type](...args) : null;
- } catch (e) {
- reject(e);
- return;
- }
+ const keyRange = type ? IDBKeyRange[type](...args) : null; // May throw
filters = filters || [];
limitRange = limitRange || null;
@@ -122,37 +119,33 @@
let matchFilter = true;
let result = 'value' in cursor ? cursor.value : cursor.key;
- try {
+ try { // We must manually catch for this promise as we are within an async event function
filters.forEach(function (filter) {
- if (typeof filter[0] === 'function') {
- matchFilter = matchFilter && filter[0](result);
+ let propObj = filter[0];
+ if (typeof propObj === 'function') {
+ matchFilter = matchFilter && propObj(result); // May throw with filter on non-object
} else {
- matchFilter = matchFilter && (result[filter[0]] === filter[1]);
+ if (!propObj || typeof propObj !== 'object') {
+ propObj = {[propObj]: filter[1]};
+ }
+ Object.keys(propObj).forEach((prop) => {
+ matchFilter = matchFilter && (result[prop] === propObj[prop]); // May throw with error in filter function
+ });
}
});
- } catch (err) { // Could be filter on non-object or error in filter function
- reject(err);
- return;
- }
- if (matchFilter) {
- counter++;
- // If we're doing a modify, run it now
- if (modifyObj) {
- try {
- result = modifyRecord(result);
- cursor.update(result); // `result` should only be a "structured clone"-able object
- } catch (err) {
- reject(err);
- return;
+ if (matchFilter) {
+ counter++;
+ // If we're doing a modify, run it now
+ if (modifyObj) {
+ result = modifyRecord(result); // May throw
+ cursor.update(result); // May throw as `result` should only be a "structured clone"-able object
}
+ results.push(mapper(result)); // May throw
}
- try {
- results.push(mapper(result));
- } catch (err) {
- reject(err);
- return;
- }
+ } catch (err) {
+ reject(err);
+ return;
}
cursor.continue();
}
@@ -180,116 +173,46 @@
const count = function () {
direction = null;
cursorType = 'count';
-
- return {
- execute
- };
+ return {execute};
};
const keys = function () {
cursorType = 'openKeyCursor';
-
- return {
- desc,
- distinct,
- execute,
- filter,
- limit,
- map
- };
+ return {desc, distinct, execute, filter, limit, map};
};
const limit = function (start, end) {
limitRange = !end ? [0, start] : [start, end];
error = limitRange.some(val => typeof val !== 'number') ? new Error('limit() arguments must be numeric') : error;
-
- return {
- desc,
- distinct,
- filter,
- keys,
- execute,
- map,
- modify
- };
+ return {desc, distinct, filter, keys, execute, map, modify};
};
const filter = function (prop, val) {
filters.push([prop, val]);
-
- return {
- desc,
- distinct,
- execute,
- filter,
- keys,
- limit,
- map,
- modify
- };
+ return {desc, distinct, execute, filter, keys, limit, map, modify};
};
const desc = function () {
direction = 'prev';
-
- return {
- distinct,
- execute,
- filter,
- keys,
- limit,
- map,
- modify
- };
+ return {distinct, execute, filter, keys, limit, map, modify};
};
const distinct = function () {
unique = true;
- return {
- count,
- desc,
- execute,
- filter,
- keys,
- limit,
- map,
- modify
- };
+ return {count, desc, execute, filter, keys, limit, map, modify};
};
const modify = function (update) {
modifyObj = update && typeof update === 'object' ? update : null;
- return {
- execute
- };
+ return {execute};
};
const map = function (fn) {
mapper = fn;
-
- return {
- count,
- desc,
- distinct,
- execute,
- filter,
- keys,
- limit,
- modify
- };
+ return {count, desc, distinct, execute, filter, keys, limit, modify};
};
- return {
- count,
- desc,
- distinct,
- execute,
- filter,
- keys,
- limit,
- map,
- modify
- };
+ return {count, desc, distinct, execute, filter, keys, limit, map, modify};
};
['only', 'bound', 'upperBound', 'lowerBound'].forEach((name) => {
@@ -319,6 +242,19 @@
};
};
+ const setupTransactionAndStore = (db, table, records, resolve, reject, readonly) => {
+ const transaction = db.transaction(table, readonly ? transactionModes.readonly : transactionModes.readwrite);
+ transaction.onerror = e => {
+ // prevent throwing aborting (hard)
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
+ e.preventDefault();
+ reject(e);
+ };
+ transaction.onabort = e => reject(e);
+ transaction.oncomplete = () => resolve(records);
+ return transaction.objectStore(table);
+ };
+
const Server = function (db, name, version, noServerMethods) {
let closed = false;
@@ -341,42 +277,23 @@
return records.concat(aip);
}, []);
- const transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = e => {
- // prevent throwing a ConstraintError and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = e => reject(e);
- transaction.oncomplete = () => resolve(records);
+ const store = setupTransactionAndStore(db, table, records, resolve, reject);
- const store = transaction.objectStore(table);
records.some(function (record) {
let req, key;
if (isObject(record) && hasOwn.call(record, 'item')) {
key = record.key;
record = record.item;
if (key != null) {
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return true;
- }
+ key = mongoifyKey(key); // May throw
}
}
- try {
- // Safe to add since in readwrite
- if (key != null) {
- req = store.add(record, key);
- } else {
- req = store.add(record);
- }
- } catch (e) {
- reject(e);
- return true;
+ // Safe to add since in readwrite, but may still throw
+ if (key != null) {
+ req = store.add(record, key);
+ } else {
+ req = store.add(record);
}
req.onsuccess = function (e) {
@@ -411,17 +328,7 @@
return records.concat(aip);
}, []);
- const transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = e => {
- // prevent throwing aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = e => reject(e);
- transaction.oncomplete = () => resolve(records);
-
- const store = transaction.objectStore(table);
+ const store = setupTransactionAndStore(db, table, records, resolve, reject);
records.some(function (record) {
let req, key;
@@ -429,24 +336,14 @@
key = record.key;
record = record.item;
if (key != null) {
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return true;
- }
+ key = mongoifyKey(key); // May throw
}
}
- try {
- // These can throw DataError, e.g., if function passed in
- if (key != null) {
- req = store.put(record, key);
- } else {
- req = store.put(record);
- }
- } catch (err) {
- reject(err);
- return true;
+ // These can throw DataError, e.g., if function passed in
+ if (key != null) {
+ req = store.put(record, key);
+ } else {
+ req = store.put(record);
}
req.onsuccess = function (e) {
@@ -480,33 +377,15 @@
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
+ key = mongoifyKey(key); // May throw
- const transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = e => {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = e => reject(e);
- transaction.oncomplete = () => resolve(key);
+ const store = setupTransactionAndStore(db, table, key, resolve, reject);
- const store = transaction.objectStore(table);
- try {
- store.delete(key);
- } catch (err) {
- reject(err);
- }
+ store.delete(key); // May throw
});
};
- this.delete = function (...args) {
+ this.del = this.delete = function (...args) {
return this.remove(...args);
};
@@ -516,12 +395,7 @@
reject(new Error('Database has been closed'));
return;
}
- const transaction = db.transaction(table, transactionModes.readwrite);
- transaction.onerror = e => reject(e);
- transaction.onabort = e => reject(e);
- transaction.oncomplete = () => resolve();
-
- const store = transaction.objectStore(table);
+ const store = setupTransactionAndStore(db, table, undefined, resolve, reject);
store.clear();
});
};
@@ -532,9 +406,9 @@
reject(new Error('Database has been closed'));
return;
}
- db.close();
closed = true;
delete dbCache[name][version];
+ db.close();
resolve();
});
};
@@ -545,30 +419,11 @@
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
-
- const transaction = db.transaction(table);
- transaction.onerror = e => {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = e => reject(e);
+ key = mongoifyKey(key); // May throw
- const store = transaction.objectStore(table);
+ const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);
- let req;
- try {
- req = store.get(key);
- } catch (err) {
- reject(err);
- }
+ const req = store.get(key);
req.onsuccess = e => resolve(e.target.result);
});
};
@@ -579,29 +434,11 @@
reject(new Error('Database has been closed'));
return;
}
- try {
- key = mongoifyKey(key);
- } catch (e) {
- reject(e);
- return;
- }
+ key = mongoifyKey(key); // May throw
- const transaction = db.transaction(table);
- transaction.onerror = e => {
- // prevent throwing and aborting (hard)
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- e.preventDefault();
- reject(e);
- };
- transaction.onabort = e => reject(e);
+ const store = setupTransactionAndStore(db, table, undefined, resolve, reject, true);
- const store = transaction.objectStore(table);
- let req;
- try {
- req = key == null ? store.count() : store.count(key);
- } catch (err) {
- reject(err);
- }
+ const req = key == null ? store.count() : store.count(key); // May throw
req.onsuccess = e => resolve(e.target.result);
});
};
@@ -612,7 +449,7 @@
}
if (eventName === 'error') {
db.addEventListener(eventName, function (e) {
- e.preventDefault(); // Needed by Firefox to prevent hard abort with ConstraintError
+ e.preventDefault(); // Needed to prevent hard abort with ConstraintError
handler(e);
});
return;
@@ -639,7 +476,7 @@
}
let err;
- [].some.call(db.objectStoreNames, storeName => {
+ Array.from(db.objectStoreNames).some(storeName => {
if (this[storeName]) {
err = new Error('The store name, "' + storeName + '", which you have attempted to load, conflicts with db.js method names."');
this.close();
@@ -655,160 +492,125 @@
return err;
};
- const createSchema = function (e, request, schema, db, server, version) {
- if (!schema || schema.length === 0) {
- return;
- }
-
- for (let i = 0; i < db.objectStoreNames.length; i++) {
- const name = db.objectStoreNames[i];
- if (!hasOwn.call(schema, name)) {
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction.
- // `TransactionInactiveError` (as by the upgrade having already
- // completed or somehow aborting) - since we've just started and
- // should be without risk in this loop
- // `NotFoundError` - since we are iterating the dynamically updated
- // `objectStoreNames`
- db.deleteObjectStore(name);
- }
- }
-
- let ret;
- Object.keys(schema).some(function (tableName) {
- const table = schema[tableName];
- let store;
- if (db.objectStoreNames.contains(tableName)) {
- store = request.transaction.objectStore(tableName); // Shouldn't throw
- } else {
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction.
- // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.
- // `ConstraintError` - The above condition should prevent the name already existing.
- //
- // Possible errors:
- // `TransactionInactiveError` - if the upgrade had already aborted,
- // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
- // the store but then abort the transaction.
- // `SyntaxError` - if an invalid `table.key.keyPath` is supplied.
- // `InvalidAccessError` - if `table.key.autoIncrement` is `true` and `table.key.keyPath` is an
- // empty string or any sequence (empty or otherwise).
- try {
- store = db.createObjectStore(tableName, table.key);
- } catch (err) {
- ret = err;
- return true;
- }
- }
-
- Object.keys(table.indexes || {}).some(function (indexKey) {
- try {
- store.index(indexKey);
- } catch (err) {
- let index = table.indexes[indexKey];
- index = index && typeof index === 'object' ? index : {};
- // Errors for which we are not concerned and why:
- // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.
- // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist
- //
- // Possible errors:
- // `TransactionInactiveError` - if the upgrade had already aborted,
- // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
- // the index object but then abort the transaction.
- // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path
- // `InvalidAccessError` - If `multiEntry` on `index` is `true` and
- // `keyPath` (second argument) is a sequence
- try {
- store.createIndex(indexKey, index.keyPath || index.key || indexKey, index);
- } catch (err2) {
- ret = err2;
- return true;
- }
- }
- });
- });
- return ret;
- };
-
- const open = function (e, server, version, noServerMethods) {
- const db = e.target.result;
+ const open = function (db, server, version, noServerMethods) {
dbCache[server][version] = db;
- const s = new Server(db, server, version, noServerMethods);
- return s instanceof Error ? Promise.reject(s) : Promise.resolve(s);
+ return new Server(db, server, version, noServerMethods);
};
const db = {
version: '0.15.0',
open: function (options) {
- let server = options.server;
+ const server = options.server;
+ const noServerMethods = options.noServerMethods;
+ const clearUnusedStores = options.clearUnusedStores !== false;
+ const clearUnusedIndexes = options.clearUnusedIndexes !== false;
let version = options.version || 1;
let schema = options.schema;
- let noServerMethods = options.noServerMethods;
-
+ let schemas = options.schemas;
+ let schemaType = options.schemaType || (schema ? 'whole' : 'mixed');
if (!dbCache[server]) {
dbCache[server] = {};
}
+ const openDb = function (db) {
+ const s = open(db, server, version, noServerMethods);
+ if (s instanceof Error) {
+ throw s;
+ }
+ return s;
+ };
+
return new Promise(function (resolve, reject) {
if (dbCache[server][version]) {
- open({
- target: {
- result: dbCache[server][version]
- }
- }, server, version, noServerMethods)
- .then(resolve, reject);
- } else {
- if (typeof schema === 'function') {
- try {
- schema = schema();
- } catch (e) {
- reject(e);
- return;
- }
+ const s = open(dbCache[server][version], server, version, noServerMethods);
+ if (s instanceof Error) {
+ reject(s);
+ return;
}
- const request = indexedDB.open(server, version);
-
- request.onsuccess = e => open(e, server, version, noServerMethods).then(resolve, reject);
- request.onerror = e => {
- // Prevent default for `BadVersion` and `AbortError` errors, etc.
- // These are not necessarily reported in console in Chrome but present; see
- // https://bugzilla.mozilla.org/show_bug.cgi?id=872873
- // http://stackoverflow.com/questions/36225779/aborterror-within-indexeddb-upgradeneeded-event/36266502
- e.preventDefault();
- reject(e);
- };
- request.onupgradeneeded = e => {
- let err = createSchema(e, request, schema, e.target.result, server, version);
- if (err) {
- reject(err);
+ resolve(s);
+ return;
+ }
+ const idbimport = new IdbImport();
+ let p = Promise.resolve();
+ if (schema || schemas || options.schemaBuilder) {
+ const _addCallback = idbimport.addCallback;
+ idbimport.addCallback = function (cb) {
+ function newCb (db) {
+ const s = open(db, server, version, noServerMethods);
+ if (s instanceof Error) {
+ throw s;
+ }
+ return cb(db, s);
}
+ return _addCallback.call(idbimport, newCb);
};
- request.onblocked = e => {
- const resume = new Promise(function (res, rej) {
- // We overwrite handlers rather than make a new
- // open() since the original request is still
- // open and its onsuccess will still fire if
- // the user unblocks by closing the blocking
- // connection
- request.onsuccess = (ev) => {
- open(ev, server, version, noServerMethods)
- .then(res, rej);
- };
- request.onerror = e => rej(e);
- });
- e.resume = resume;
- reject(e);
- };
+
+ p = p.then(() => {
+ if (options.schemaBuilder) {
+ return options.schemaBuilder(idbimport);
+ }
+ }).then(() => {
+ if (schema) {
+ switch (schemaType) {
+ case 'mixed': case 'idb-schema': case 'merge': case 'whole': {
+ schemas = {[version]: schema};
+ break;
+ }
+ }
+ }
+ if (schemas) {
+ idbimport.createVersionedSchema(schemas, schemaType, clearUnusedStores, clearUnusedIndexes);
+ }
+ const idbschemaVersion = idbimport.version();
+ if (options.version && idbschemaVersion < version) {
+ throw new Error(
+ 'Your highest schema building (IDBSchema) version (' + idbschemaVersion + ') ' +
+ 'must not be less than your designated version (' + version + ').'
+ );
+ }
+ if (!options.version && idbschemaVersion > version) {
+ version = idbschemaVersion;
+ }
+ });
}
+
+ p.then(() => {
+ return idbimport.open(server, version);
+ }).catch((err) => {
+ if (err.resume) {
+ err.resume = err.resume.then(openDb);
+ }
+ if (err.retry) {
+ const _retry = err.retry;
+ err.retry = function () {
+ _retry.call(err).then(openDb);
+ };
+ }
+ throw err;
+ }).then(openDb).then(resolve).catch((e) => {
+ reject(e);
+ });
});
},
+ del: function (dbName) {
+ return this.delete(dbName);
+ },
delete: function (dbName) {
return new Promise(function (resolve, reject) {
const request = indexedDB.deleteDatabase(dbName); // Does not throw
- request.onsuccess = e => resolve(e);
- request.onerror = e => reject(e); // No errors currently
+ request.onsuccess = e => {
+ // The following is needed currently by PhantomJS (though we cannot polyfill `oldVersion`): https://github.com/ariya/phantomjs/issues/14141
+ if (!('newVersion' in e)) {
+ e.newVersion = null;
+ }
+ resolve(e);
+ };
+ request.onerror = e => { // No errors currently
+ e.preventDefault();
+ reject(e);
+ };
request.onblocked = e => {
// The following addresses part of https://bugzilla.mozilla.org/show_bug.cgi?id=1220279
e = e.newVersion === null || typeof Proxy === 'undefined' ? e : new Proxy(e, {get: function (target, name) {
@@ -832,7 +634,10 @@
res(ev);
};
- request.onerror = e => rej(e);
+ request.onerror = e => {
+ e.preventDefault();
+ rej(e);
+ };
});
e.resume = resume;
reject(e);
@@ -842,11 +647,7 @@
cmp: function (param1, param2) {
return new Promise(function (resolve, reject) {
- try {
- resolve(indexedDB.cmp(param1, param2));
- } catch (e) {
- reject(e);
- }
+ resolve(indexedDB.cmp(param1, param2)); // May throw
});
}
};
diff --git a/src/idb-import.js b/src/idb-import.js
new file mode 100644
index 0000000..f8c6796
--- /dev/null
+++ b/src/idb-import.js
@@ -0,0 +1,297 @@
+/*
+# Notes
+
+1. Could use/adapt [jtlt](https://github.com/brettz9/jtlt/) for changing JSON data
+
+# Possible to-dos
+
+1. Support data within adapted JSON Merge Patch
+1. Allow JSON Schema to be specified during import (and export): https://github.com/aaronpowell/db.js/issues/181
+1. JSON format above database level to allow for deleting or moving/copying of whole databases
+1. `copyFrom`/`moveFrom` for indexes
+*/
+
+self._babelPolyfill = false; // Need by Phantom in avoiding duplicate babel polyfill error
+import IdbSchema from 'idb-schema';
+
+const stringify = JSON.stringify;
+const hasOwn = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
+const compareStringified = (a, b) => stringify(a) === stringify(b);
+
+export default class IdbImport extends IdbSchema {
+ constructor () {
+ super();
+ }
+ _setup (schema, cb, mergePatch) {
+ const isNUL = schema === '\0';
+ if (!schema || typeof schema !== 'object' && !(mergePatch && isNUL)) {
+ throw new Error('Bad schema object');
+ }
+ this.addEarlyCallback((e) => {
+ const db = e.target.result;
+ const transaction = e.target.transaction;
+ if (mergePatch && isNUL) {
+ this._deleteAllUnused(db, transaction, {}, true);
+ return;
+ }
+ return cb(e, db, transaction);
+ });
+ }
+ _deleteIndexes (transaction, storeName, exceptionIndexes) {
+ const store = transaction.objectStore(storeName); // Shouldn't throw
+ Array.from(store.indexNames).forEach((indexName) => {
+ if (!exceptionIndexes || !hasOwn(exceptionIndexes, indexName)) {
+ this.delIndex(indexName);
+ }
+ });
+ }
+ _deleteAllUnused (db, transaction, schema, clearUnusedStores, clearUnusedIndexes) {
+ if (clearUnusedStores || clearUnusedIndexes) {
+ Array.from(db.objectStoreNames).forEach((storeName) => {
+ if (clearUnusedStores && !hasOwn(schema, storeName)) {
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction.
+ // `TransactionInactiveError` (as by the upgrade having already
+ // completed or somehow aborting) - since we've just started and
+ // should be without risk in this loop
+ // `NotFoundError` - since we are iterating the dynamically updated
+ // `objectStoreNames`
+ // this._versions[version].dropStores.push({name: storeName});
+ // Avoid deleting if going to delete in a move/copy
+ if (!Object.keys(schema).some((key) => [schema[key].moveFrom, schema[key].copyFrom].includes(storeName))) {
+ this.delStore(storeName); // Shouldn't throw // Keep this and delete previous line if this PR is accepted: https://github.com/treojs/idb-schema/pull/14
+ }
+ } else if (clearUnusedIndexes) {
+ this._deleteIndexes(transaction, storeName, schema[storeName].indexes);
+ }
+ });
+ }
+ }
+ _createStoreIfNotSame (db, transaction, schema, storeName, mergePatch) {
+ const newStore = schema[storeName];
+ let store;
+ let storeParams = {};
+ function setCanonicalProps (storeProp) {
+ let canonicalPropValue;
+ if (hasOwn(newStore, 'key')) { // Support old approach of db.js
+ canonicalPropValue = newStore.key[storeProp];
+ } else if (hasOwn(newStore, storeProp)) {
+ canonicalPropValue = newStore[storeProp];
+ } else {
+ canonicalPropValue = storeProp === 'keyPath' ? null : false;
+ }
+ if (mergePatch && typeof canonicalPropValue === 'string') {
+ if (canonicalPropValue === '\0') {
+ canonicalPropValue = storeProp === 'keyPath' ? null : false;
+ } else {
+ canonicalPropValue = canonicalPropValue.replace(/^\0/, ''); // Remove escape if present
+ }
+ }
+ storeParams[storeProp] = canonicalPropValue;
+ }
+ const copyFrom = newStore.copyFrom;
+ const moveFrom = newStore.moveFrom;
+ try {
+ ['keyPath', 'autoIncrement'].forEach(setCanonicalProps);
+ if (!db.objectStoreNames.contains(storeName)) {
+ throw new Error('goto catch to build store');
+ }
+ store = transaction.objectStore(storeName); // Shouldn't throw
+ this.getStore(store);
+ if (!['keyPath', 'autoIncrement'].every((storeProp) => {
+ return compareStringified(storeParams[storeProp], store[storeProp]);
+ })) {
+ // Avoid deleting if going to delete in a move/copy
+ if (!copyFrom && !moveFrom) this.delStore(storeName);
+ throw new Error('goto catch to build store');
+ }
+ } catch (err) {
+ if (err.message !== 'goto catch to build store') {
+ throw err;
+ }
+ if (copyFrom) {
+ this.copyStore(copyFrom, storeName, storeParams); // May throw
+ } else if (moveFrom) {
+ this.renameStore(moveFrom, storeName, storeParams); // May throw
+ } else {
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction.
+ // `ConstraintError` - We are just starting (and probably never too large anyways) for a key generator.
+ // `ConstraintError` - The above condition should prevent the name already existing.
+ //
+ // Possible errors:
+ // `TransactionInactiveError` - if the upgrade had already aborted,
+ // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
+ // the store but then abort the transaction.
+ // `SyntaxError` - if an invalid `storeParams.keyPath` is supplied.
+ // `InvalidAccessError` - if `storeParams.autoIncrement` is `true` and `storeParams.keyPath` is an
+ // empty string or any sequence (empty or otherwise).
+ this.addStore(storeName, storeParams); // May throw
+ }
+ }
+ return [store, newStore];
+ }
+ _createIndex (store, indexes, indexName, mergePatch) {
+ let newIndex = indexes[indexName];
+ let indexParams = {};
+ function setCanonicalProps (indexProp) {
+ let canonicalPropValue;
+ if (hasOwn(newIndex, indexProp)) {
+ canonicalPropValue = newIndex[indexProp];
+ } else {
+ canonicalPropValue = indexProp === 'keyPath' ? null : false;
+ }
+ if (mergePatch && typeof canonicalPropValue === 'string') {
+ if (canonicalPropValue === '\0') {
+ canonicalPropValue = indexProp === 'keyPath' ? null : false;
+ } else {
+ canonicalPropValue = canonicalPropValue.replace(/^\0/, ''); // Remove escape if present
+ }
+ }
+ indexParams[indexProp] = canonicalPropValue;
+ }
+ try {
+ ['keyPath', 'unique', 'multiEntry', 'locale'].forEach(setCanonicalProps);
+ if (!store || !store.indexNames.contains(indexName)) {
+ throw new Error('goto catch to build index');
+ }
+ const oldIndex = store.index(indexName);
+ if (!['keyPath', 'unique', 'multiEntry', 'locale'].every((indexProp) => {
+ return compareStringified(indexParams[indexProp], oldIndex[indexProp]);
+ })) {
+ this.delIndex(indexName);
+ throw new Error('goto catch to build index');
+ }
+ } catch (err) {
+ if (err.message !== 'goto catch to build index') {
+ throw err;
+ }
+ // Errors for which we are not concerned and why:
+ // `InvalidStateError` - We are in the upgrade transaction and store found above should not have already been deleted.
+ // `ConstraintError` - We have already tried getting the index, so it shouldn't already exist
+ //
+ // Possible errors:
+ // `TransactionInactiveError` - if the upgrade had already aborted,
+ // e.g., from a previous `QuotaExceededError` which is supposed to nevertheless return
+ // the index object but then abort the transaction.
+ // `SyntaxError` - If the `keyPath` (second argument) is an invalid key path
+ // `InvalidAccessError` - If `multiEntry` on `index` is `true` and
+ // `keyPath` (second argument) is a sequence
+ this.addIndex(indexName, indexParams.keyPath !== null ? indexParams.keyPath : indexName, indexParams);
+ }
+ }
+ createIdbSchemaPatchSchema (schema) {
+ schema(this); // May throw
+ }
+ // Modified JSON Merge Patch type schemas: https://github.com/json-schema-org/json-schema-spec/issues/15#issuecomment-211142145
+ createMergePatchSchema (schema) {
+ this._setup(schema, (e, db, transaction) => {
+ Object.keys(schema).forEach((storeName) => {
+ const schemaObj = schema[storeName];
+ const isNUL = schemaObj === '\0';
+ if (isNUL) {
+ this.delStore(storeName);
+ return;
+ }
+ if (!schemaObj || typeof schemaObj !== 'object') {
+ throw new Error('Invalid merge patch schema object (type: ' + typeof schemaObj + '): ' + schemaObj);
+ }
+ const [store] = this._createStoreIfNotSame(db, transaction, schema, storeName, true);
+ if (hasOwn(schemaObj, 'indexes')) {
+ const indexes = schemaObj.indexes;
+ const isNUL = indexes === '\0';
+ if (isNUL) {
+ this._deleteIndexes(transaction, storeName);
+ return;
+ }
+ if (!indexes || typeof indexes !== 'object') {
+ throw new Error('Invalid merge patch indexes object (type: ' + typeof indexes + '): ' + indexes);
+ }
+ Object.keys(indexes).forEach((indexName) => {
+ const indexObj = indexes[indexName];
+ const isNUL = indexObj === '\0';
+ if (isNUL) {
+ this.delIndex(indexName);
+ return;
+ }
+ if (!indexObj || typeof indexObj !== 'object') {
+ throw new Error('Invalid merge patch index object (type: ' + typeof indexObj + '): ' + indexObj);
+ }
+ this._createIndex(store, indexes, indexName, true);
+ });
+ }
+ });
+ });
+ }
+ createWholePatchSchema (schema, clearUnusedStores = true, clearUnusedIndexes = true) {
+ this._setup(schema, (e, db, transaction) => {
+ this._deleteAllUnused(db, transaction, schema, clearUnusedStores, clearUnusedIndexes);
+
+ Object.keys(schema).forEach((storeName) => {
+ const [store, newStore] = this._createStoreIfNotSame(db, transaction, schema, storeName);
+ const indexes = newStore.indexes;
+ Object.keys(indexes || {}).forEach((indexName) => {
+ this._createIndex(store, indexes, indexName);
+ });
+ });
+ });
+ }
+ createVersionedSchema (schemas, schemaType, clearUnusedStores, clearUnusedIndexes) {
+ const createPatches = (schemaObj, schemaType) => {
+ switch (schemaType) {
+ case 'mixed': {
+ schemaObj.forEach((mixedObj) => {
+ const schemaType = Object.keys(mixedObj)[0];
+ let schema = mixedObj[schemaType];
+ if (schemaType !== 'idb-schema' && schema === 'function') {
+ schema = schema(this); // May throw
+ }
+ // These could immediately throw with a bad version
+ switch (schemaType) {
+ case 'idb-schema': { // Function called above
+ this.createIdbSchemaPatchSchema(schema);
+ break;
+ }
+ case 'merge': {
+ this.createMergePatchSchema(schema);
+ break;
+ }
+ case 'whole': {
+ this.createWholePatchSchema(schema, clearUnusedStores, clearUnusedIndexes);
+ break;
+ }
+ case 'mixed': {
+ createPatches(schema, schemaType);
+ break;
+ }
+ default:
+ throw new Error('Unrecognized schema type');
+ }
+ });
+ break;
+ }
+ case 'merge': {
+ this.createMergePatchSchema(schemaObj);
+ break;
+ }
+ case 'idb-schema': {
+ this.createIdbSchemaPatchSchema(schemaObj);
+ break;
+ }
+ case 'whole': {
+ this.createWholePatchSchema(schemaObj, clearUnusedStores, clearUnusedIndexes);
+ break;
+ }
+ }
+ };
+ Object.keys(schemas || {}).sort().forEach((schemaVersion) => {
+ const version = parseInt(schemaVersion, 10);
+ let schemaObj = schemas[version];
+ if (schemaType !== 'idb-schema' && typeof schemaObj === 'function') {
+ schemaObj = schemaObj(this); // May throw
+ }
+ this.version(version);
+ createPatches(schemaObj, schemaType, version);
+ });
+ }
+}
diff --git a/src/test-worker.js b/src/test-worker.js
index 9957b94..aac34d0 100644
--- a/src/test-worker.js
+++ b/src/test-worker.js
@@ -2,6 +2,7 @@
(function () {
'use strict';
importScripts('/node_modules/babel-polyfill/dist/polyfill.js');
+ self._babelPolyfill = false; // Hack for babel polyfill which checks for there being only one instance per this flag
importScripts('/dist/db.min.js');
self.onmessage = function (e) {
var dbName = e.data.dbName;
diff --git a/tests/specs/_web-workers.js b/tests/specs/_web-workers.js
index c34f1a9..3fbc7fc 100644
--- a/tests/specs/_web-workers.js
+++ b/tests/specs/_web-workers.js
@@ -43,13 +43,21 @@
it('should open a created db in a service worker', function (done) {
var spec = this;
- navigator.serviceWorker.register('test-worker.js').then(function () {
+ var registration;
+ navigator.serviceWorker.register('test-worker.js').then(function (reg) {
+ registration = reg;
return navigator.serviceWorker.ready;
}).then(function (serviceWorker) {
var messageChannel = new MessageChannel();
messageChannel.port1.onmessage = function (e) {
expect(e.data).to.be.true;
- done();
+ registration.unregister().then(function (success) {
+ if (!success) {
+ console.log('Problem unregistering service worker');
+ return;
+ }
+ done();
+ });
};
var controller = navigator.serviceWorker.controller || serviceWorker.active;
diff --git a/tests/specs/bad-args.js b/tests/specs/bad-args.js
index 66a2ac9..063dedf 100644
--- a/tests/specs/bad-args.js
+++ b/tests/specs/bad-args.js
@@ -76,30 +76,6 @@
done();
});
});
- it('should catch when keyPath is an array and multiEntry=true', function (done) {
- db.open({
- server: this.dbName,
- version: 2,
- schema: {
- test: {
- key: {
- keyPath: ['lastName', 'firstName']
- },
- indexes: {
- name: {
- keyPath: ['lastName', 'firstName'],
- multiEntry: true
- },
- lastName: {},
- firstName: {}
- }
- }
- }
- }).catch(function (err) {
- expect(err.name).to.equal('InvalidAccessError');
- done();
- });
- });
});
describe('open: createSchema', function () {
@@ -124,7 +100,7 @@
}
}
}}).catch(function (err) {
- expect(err.name).to.equal('InvalidAccessError');
+ expect(err.name).to.equal('InvalidAccessError'); // PhantomJS fails here, but this is correct per current and draft spec
done();
});
});
diff --git a/tests/specs/caching.js b/tests/specs/caching.js
new file mode 100644
index 0000000..159d0d0
--- /dev/null
+++ b/tests/specs/caching.js
@@ -0,0 +1,73 @@
+/*global window, guid*/
+(function (db, describe, it, expect, beforeEach, afterEach) {
+ describe('caching', function () {
+ this.timeout(5000);
+
+ beforeEach(function (done) {
+ this.dbName = guid();
+ done();
+ });
+ afterEach(function () {
+ if (this.server && !this.server.isClosed()) {
+ this.server.close();
+ }
+ this.server = undefined;
+
+ indexedDB.deleteDatabase(this.dbName);
+ });
+
+ it('should obtain the same (cached) db result (without blocking problems) with unnumbered version', function (done) {
+ var spec = this;
+ db.open({server: this.dbName}).then(function (s) {
+ var db1 = s.getIndexedDB();
+ db.open({server: spec.dbName}).then(function (server) {
+ var db2 = server.getIndexedDB();
+ expect(db1).to.equal(db2);
+ done();
+ });
+ });
+ });
+
+ it('should obtain the same (cached) db result (without blocking problems) with numbered version', function (done) {
+ var spec = this;
+ db.open({server: this.dbName, version: 2}).then(function (s) {
+ var db1 = s.getIndexedDB();
+ db.open({server: spec.dbName, version: 2}).then(function (server) {
+ var db2 = server.getIndexedDB();
+ expect(db1).to.equal(db2);
+ done();
+ });
+ });
+ });
+
+ it('should obtain different (cached) db results for differently numbered versions', function (done) {
+ var spec = this;
+ db.open({server: this.dbName, version: 1}).then(function (s) {
+ var db1 = s.getIndexedDB();
+ db.open({server: spec.dbName, version: 2})
+ .then(function (server) {
+ var db2 = server.getIndexedDB();
+ expect(db1).to.not.equal(db2);
+ server.close();
+ done();
+ });
+ });
+ });
+
+ it('should obtain different (cached) db results (without blocking problems) with different server names', function (done) {
+ db.open({server: this.dbName}).then(function (s) {
+ var db1 = s.getIndexedDB();
+ var anotherName = 'anotherName';
+ db.open({server: anotherName}).then(function (server) {
+ var db2 = server.getIndexedDB();
+ expect(db1).to.not.equal(db2);
+ server.close();
+ // Clean-up for any subsequent tests
+ db.delete(anotherName).then(function () {
+ done();
+ });
+ });
+ });
+ });
+ });
+}(window.db, window.describe, window.it, window.expect, window.beforeEach, window.afterEach));
diff --git a/tests/specs/query.js b/tests/specs/query.js
index c944b6c..bcd804f 100644
--- a/tests/specs/query.js
+++ b/tests/specs/query.js
@@ -133,7 +133,7 @@
});
});
- it('should query against a single property', function (done) {
+ it('should query against a single property filter', function (done) {
var spec = this;
this.server
.query('test')
@@ -149,6 +149,22 @@
});
});
+ it('should query using an object filter', function (done) {
+ var spec = this;
+ this.server
+ .query('test')
+ .filter({firstName: 'Aaron', lastName: 'Powell'})
+ .execute()
+ .then(function (results) {
+ expect(results).to.not.be.undefined;
+ expect(results.length).to.equal(1);
+ expect(results[0].firstName).to.equal(spec.item1.firstName);
+ expect(results[0].firstName).to.equal(spec.item1.firstName);
+
+ done();
+ });
+ });
+
it('should query using a function filter', function (done) {
var spec = this;
this.server
diff --git a/tests/specs/schema-building.js b/tests/specs/schema-building.js
new file mode 100644
index 0000000..af33801
--- /dev/null
+++ b/tests/specs/schema-building.js
@@ -0,0 +1,266 @@
+/*global window, guid*/
+(function (db, describe, it, expect, beforeEach, afterEach) {
+ 'use strict';
+ describe('schema-building', function () {
+ describe('schemas', function () {
+ this.timeout(5000);
+ var indexedDB = window.indexedDB || window.webkitIndexedDB ||
+ window.mozIndexedDB || window.oIndexedDB || window.msIndexedDB;
+
+ beforeEach(function (done) {
+ this.dbName = guid();
+ done();
+ });
+
+ afterEach(function () {
+ if (this.server && !this.server.isClosed()) {
+ this.server.close();
+ }
+ this.server = undefined;
+
+ indexedDB.deleteDatabase(this.dbName);
+ });
+
+ function confirmSchema (s, dbName, cb) {
+ s.close();
+ var req = indexedDB.open(dbName);
+ req.onsuccess = function (e) {
+ var res = e.target.result;
+ expect(res.objectStoreNames.contains('oldStore')).to.equal(false);
+ expect(res.objectStoreNames.contains('person')).to.equal(false);
+ expect(res.objectStoreNames.contains('addresses')).to.equal(true);
+ expect(res.objectStoreNames.contains('phoneNumbers')).to.equal(true);
+ expect(res.objectStoreNames.contains('people')).to.equal(true);
+ var trans = res.transaction(['people', 'addresses']);
+ var people = trans.objectStore('people');
+ expect(people.keyPath).to.equal('id');
+ expect(people.autoIncrement).to.equal(true);
+ expect(people.indexNames.contains('firstName')).to.equal(true);
+ expect(people.indexNames.contains('answer')).to.equal(true);
+ var answer = people.index('answer');
+ expect(answer.unique).to.equal(true);
+ var addresses = trans.objectStore('addresses');
+ expect(addresses.keyPath).to.equal(null);
+ cb();
+ };
+ }
+
+ it('should support "whole" type schemas', function (done) {
+ // Parallels "merge" type test
+ var spec = this;
+ var schemas = {
+ 1: {
+ oldStore: {},
+ person: {},
+ addresses: {'keyPath': 'old'},
+ phoneNumbers: {}
+ },
+ 2: {
+ addresses: {},
+ phoneNumbers: {},
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }
+ };
+ db.open({server: this.dbName, schemaType: 'whole', schemas: schemas}).then(function (s) {
+ confirmSchema(s, spec.dbName, done);
+ });
+ });
+ it('should support "merge" type schemas', function (done) {
+ // Parallels "whole" type test
+ var spec = this;
+ var schemas = {
+ 1: {
+ oldStore: {},
+ person: {},
+ addresses: {'keyPath': 'old'},
+ phoneNumbers: {}
+ },
+ 2: {
+ oldStore: '\0',
+ addresses: {},
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }
+ };
+ db.open({server: this.dbName, schemaType: 'merge', schemas: schemas}).then(function (s) {
+ confirmSchema(s, spec.dbName, done);
+ });
+ });
+ it('should support "mixed" type schemas', function (done) {
+ // Test whole, merge, idb-schema, mixed children
+ var spec = this;
+ var schemas = {
+ 1: [
+ {'whole': {
+ addresses: {'keyPath': 'old'},
+ phoneNumbers: {}
+ }},
+ {'idb-schema': function (idbschema) {
+ idbschema.addStore('oldStore').addStore('person');
+ }}
+ ],
+ 2: [{'merge': {
+ oldStore: '\0',
+ addresses: {},
+ people: {
+ moveFrom: 'person',
+ // Optionally add parameters for creating the object store
+ keyPath: 'id',
+ autoIncrement: true,
+ // Optionally add indexes
+ indexes: {
+ firstName: {},
+ answer: {unique: true}
+ }
+ }
+ }}]
+ };
+ db.open({server: this.dbName, schemaType: 'mixed', schemas: schemas}).then(function (s) {
+ confirmSchema(s, spec.dbName, done);
+ });
+ });
+ it('should support "idb-schema" type schemas', function (done) {
+ // Parallels test for schemaBuilder
+ var spec = this;
+ var v1to3 = {
+ 1: function (idbs) {
+ idbs
+ .addStore('books', { keyPath: 'isbn' })
+ .addIndex('byTitle', 'title', { unique: true })
+ .addIndex('byAuthor', 'author');
+ },
+ 2: function (idbs) {
+ idbs
+ .getStore('books')
+ .addIndex('byDate', ['year', 'month']);
+ },
+ 3: function (idbs) {
+ idbs
+ .addStore('magazines')
+ .addIndex('byPublisher', 'publisher')
+ .addIndex('byFrequency', 'frequency');
+ }
+ };
+ var v1to4 = Object.assign({
+ 4: function (idbs) {
+ idbs
+ .getStore('magazines')
+ .delIndex('byPublisher')
+ .addCallback(function (e, s) {
+ return s.books.query('byTitle').all().modify({
+ textISBN: function (record) {
+ return 'My ISBN: ' + (record.isbn || '(none)');
+ }
+ }).execute();
+ });
+ }
+ }, v1to3);
+ var gotISBN = false;
+ db.open({server: this.dbName, schemaType: 'idb-schema', schemas: v1to3}).then(function (s3) {
+ return s3.books.add({title: 'A Long Time Ago', isbn: '1234567890'}).then(function (result) {
+ s3.close();
+ return db.open({server: spec.dbName, schemaType: 'idb-schema', schemas: v1to4, version: 4});
+ }).then(function (s4) {
+ s4.books.get('1234567890').then(function (record) {
+ gotISBN = true;
+ expect(record.textISBN).to.equal('My ISBN: 1234567890');
+ return s4.magazines.query('byPublisher').all().execute();
+ }).catch(function (errorFromNowMissingIndex) {
+ expect(gotISBN).to.equal(true);
+ expect(errorFromNowMissingIndex.name).to.equal('NotFoundError');
+ s4.close();
+ done();
+ });
+ });
+ });
+ });
+ });
+ describe('schemaBuilder', function () {
+ // Parallels test for idb-schema
+ this.timeout(5000);
+ var indexedDB = window.indexedDB || window.webkitIndexedDB ||
+ window.mozIndexedDB || window.oIndexedDB || window.msIndexedDB;
+
+ beforeEach(function (done) {
+ this.dbName = guid();
+ done();
+ });
+
+ afterEach(function () {
+ if (this.server && !this.server.isClosed()) {
+ this.server.close();
+ }
+ this.server = undefined;
+
+ indexedDB.deleteDatabase(this.dbName);
+ });
+
+ it('should let schemaBuilder modify stores, indexes, and add callback (to modify content) by incremental versions', function (done) {
+ var spec = this;
+ function v1to3 (idbs) {
+ idbs.version(1)
+ .addStore('books', { keyPath: 'isbn' })
+ .addIndex('byTitle', 'title', { unique: true })
+ .addIndex('byAuthor', 'author')
+ .version(2)
+ .getStore('books')
+ .addIndex('byDate', ['year', 'month'])
+ .version(3)
+ .addStore('magazines')
+ .addIndex('byPublisher', 'publisher')
+ .addIndex('byFrequency', 'frequency');
+ }
+ function v1to4 (idbs) {
+ v1to3(idbs);
+ idbs.version(4)
+ .getStore('magazines')
+ .delIndex('byPublisher')
+ .addCallback(function (e, s) {
+ return s.books.query('byTitle').all().modify({
+ textISBN: function (record) {
+ return 'My ISBN: ' + (record.isbn || '(none)');
+ }
+ }).execute();
+ });
+ }
+ var gotISBN = false;
+ db.open({server: this.dbName, schemaBuilder: v1to3}).then(function (s3) {
+ return s3.books.add({title: 'A Long Time Ago', isbn: '1234567890'}).then(function (result) {
+ s3.close();
+ return db.open({server: spec.dbName, schemaBuilder: v1to4, version: 4});
+ }).then(function (s4) {
+ s4.books.get('1234567890').then(function (record) {
+ gotISBN = true;
+ expect(record.textISBN).to.equal('My ISBN: 1234567890');
+ return s4.magazines.query('byPublisher').all().execute();
+ }).catch(function (errorFromNowMissingIndex) {
+ expect(gotISBN).to.equal(true);
+ expect(errorFromNowMissingIndex.name).to.equal('NotFoundError');
+ s4.close();
+ done();
+ });
+ });
+ });
+ });
+ });
+ });
+}(window.db, window.describe, window.it, window.expect, window.beforeEach, window.afterEach));
diff --git a/tests/specs/server-handlers.js b/tests/specs/server-handlers.js
index 31aad22..fce82eb 100644
--- a/tests/specs/server-handlers.js
+++ b/tests/specs/server-handlers.js
@@ -123,6 +123,7 @@
it('should receive IDBDatabase error events', function (done) {
this.server.close();
var badVersion = 1;
+ // PhantomJS is currently failing here because it doesn't yet support DOMException as a constructor
db.open({
server: this.dbName,
version: badVersion,
@@ -134,7 +135,7 @@
}).catch(function (err) {
expect(err.oldVersion).to.be.undefined;
expect(err.newVersion).to.be.undefined;
- expect(err.type).to.equal('error');
+ expect(err.name).to.equal('VersionError');
done();
});
});
diff --git a/tests/test-worker.js b/tests/test-worker.js
index efc3034..d240767 100644
--- a/tests/test-worker.js
+++ b/tests/test-worker.js
@@ -1,2 +1,2 @@
-"use strict";!function(){importScripts("/node_modules/babel-polyfill/dist/polyfill.js"),importScripts("/dist/db.min.js"),self.onmessage=function(a){var b=a.data.dbName,c=a.data.message,d=a.data.version;switch(c){case"web worker open":db.open({server:b,version:d}).then(function(a){var b="undefined"!=typeof a;a.close(),postMessage(b)});break;case"service worker open":db.open({server:b,version:d}).then(function(b){var c="undefined"!=typeof b;b.close(),a.ports[0].postMessage(c)})}}}();
+"use strict";!function(){importScripts("/node_modules/babel-polyfill/dist/polyfill.js"),self._babelPolyfill=!1,importScripts("/dist/db.min.js"),self.onmessage=function(a){var b=a.data.dbName,c=a.data.message,d=a.data.version;switch(c){case"web worker open":db.open({server:b,version:d}).then(function(a){var b="undefined"!=typeof a;a.close(),postMessage(b)});break;case"service worker open":db.open({server:b,version:d}).then(function(b){var c="undefined"!=typeof b;b.close(),a.ports[0].postMessage(c)})}}}();
//# sourceMappingURL=test-worker.js.map
\ No newline at end of file
diff --git a/tests/test-worker.js.map b/tests/test-worker.js.map
index cecd634..7272ca0 100644
--- a/tests/test-worker.js.map
+++ b/tests/test-worker.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/test-worker.js"],"names":["importScripts","self","onmessage","e","dbName","data","msg","message","version","db","open","server","then","result","close","postMessage","ports"],"mappings":"cACA,WAEIA,cAAc,iDACdA,cAAc,mBACdC,KAAKC,UAAY,SAAUC,GACvB,GAAIC,GAASD,EAAEE,KAAKD,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AAXA,SAJ0B;KAAb,CAJR;CAAZ,GAAD","file":"test-worker.js","sourcesContent":["/*global importScripts, db */\r\n(function () {\r\n 'use strict';\r\n importScripts('/node_modules/babel-polyfill/dist/polyfill.js');\r\n importScripts('/dist/db.min.js');\r\n self.onmessage = function (e) {\r\n var dbName = e.data.dbName;\r\n var msg = e.data.message;\r\n var version = e.data.version;\r\n switch (msg) {\r\n case 'web worker open':\r\n db.open({\r\n server: dbName,\r\n version: version\r\n }).then(function (server) {\r\n let result = typeof server !== 'undefined';\r\n server.close(); // Prevent subsequent blocking\r\n postMessage(result);\r\n });\r\n break;\r\n case 'service worker open':\r\n db.open({\r\n server: dbName,\r\n version: version\r\n }).then(function (server) {\r\n let result = typeof server !== 'undefined';\r\n server.close(); // Prevent subsequent blocking\r\n e.ports[0].postMessage(result);\r\n });\r\n break;\r\n }\r\n };\r\n}());\r\n"]}
\ No newline at end of file
+{"version":3,"sources":["../src/test-worker.js"],"names":["importScripts","self","_babelPolyfill","onmessage","e","dbName","data","msg","message","version","db","open","server","then","result","close","postMessage","ports"],"mappings":"cACA,WAEIA,cAAc,iDACdC,KAAKC,gBAAiB,EAHbF,cAIK,mBACdC,KAAKE,UAAY,SAAUC,GACvB,GAAIC,GAASD,EAAEE,KAAKD,OAChBE,EAAMH,EAAEE,KAAKE,QACbC,EAAUL,EAAEE,KAAKG,OACrB,QAAQF,GACR,IAAK,kBACDG,GAAGC,MACCC,OAAQP,EACRI,QAASA,IACVI,KAAK,SAAUD,GACd,GAAIE,GAA2B,mBAAXF,EACpBA,GAAOG,QAFeC,YAGVF,IAEhB,MAVJ,KAWK,sBACDJ,GAAGC,MACCC,OAAQP,EACRI,QAASA,IACVI,KAAK,SAAUD,GACd,GAAIE,GAA2B,mBAAXF,EACpBA,GAAOG,QAFeX,EAGpBa,MAAM,GAAGD,YAAYF;;;AA3BvC,CAAC,YAAY;AACT,iBADS;;AAET,kBAAc,+CAAd,EAFS;AAGT,SAAK,cAAL,GAAsB,KAAtB;AAHS,iBAIT,CAAc,iBAAd,EAJS;AAKT,SAAK,SAAL,GAAiB,UAAU,CAAV,EAAa;AAC1B,YAAI,SAAS,EAAE,IAAF,CAAO,MAAP,CADa;AAE1B,YAAI,MAAM,EAAE,IAAF,CAAO,OAAP,CAFgB;AAG1B,YAAI,UAAU,EAAE,IAAF,CAAO,OAAP,CAHY;AAI1B,gBAAQ,GAAR;AACA,iBAAK,iBAAL;AACI,mBAAG,IAAH,CAAQ;AACJ,4BAAQ,MAAR;AACA,6BAAS,OAAT;iBAFJ,EAGG,IAHH,CAGQ,UAAU,MAAV,EAAkB;AACtB,wBAAI,SAAS,OAAO,MAAP,KAAkB,WAAlB,CADS;AAEtB,2BAAO,KAAP;AAFsB,+BAGtB,CAAY,MAAZ,EAHsB;iBAAlB,CAHR,CADJ;AASI,sBATJ;AADA,iBAWK,qBAAL;AACI,mBAAG,IAAH,CAAQ;AACJ,4BAAQ,MAAR;AACA,6BAAS,OAAT;iBAFJ,EAGG,IAHH,CAGQ,UAAU,MAAV,EAAkB;AACtB,wBAAI,SAAS,OAAO,MAAP,KAAkB,WAAlB,CADS;AAEtB,2BAAO,KAAP;AAFsB,qBAGtB,CAAE,KAAF,CAAQ,CAAR,EAAW,WAAX,CAAuB,MAAvB,EAHsB;iBAAlB,CAHR,CADJ;AASI,sBATJ;AAXA,SAJ0B;KAAb,CALR;CAAZ,GAAD","file":"test-worker.js","sourcesContent":["/*global importScripts, db */\r\n(function () {\r\n 'use strict';\r\n importScripts('/node_modules/babel-polyfill/dist/polyfill.js');\r\n self._babelPolyfill = false; // Hack for babel polyfill which checks for there being only one instance per this flag\r\n importScripts('/dist/db.min.js');\r\n self.onmessage = function (e) {\r\n var dbName = e.data.dbName;\r\n var msg = e.data.message;\r\n var version = e.data.version;\r\n switch (msg) {\r\n case 'web worker open':\r\n db.open({\r\n server: dbName,\r\n version: version\r\n }).then(function (server) {\r\n let result = typeof server !== 'undefined';\r\n server.close(); // Prevent subsequent blocking\r\n postMessage(result);\r\n });\r\n break;\r\n case 'service worker open':\r\n db.open({\r\n server: dbName,\r\n version: version\r\n }).then(function (server) {\r\n let result = typeof server !== 'undefined';\r\n server.close(); // Prevent subsequent blocking\r\n e.ports[0].postMessage(result);\r\n });\r\n break;\r\n }\r\n };\r\n}());\r\n"]}
\ No newline at end of file
diff --git a/tests/views/index.jade b/tests/views/index.jade
index 7e6d987..71f7219 100644
--- a/tests/views/index.jade
+++ b/tests/views/index.jade
@@ -6,8 +6,10 @@ append scripts
script(src='specs/open-db.js')
script(src='specs/close-db.js')
script(src='specs/blocked-events.js')
+ script(src='specs/caching.js')
script(src='specs/cmp.js')
script(src='specs/delete-db.js')
+ script(src='specs/schema-building.js')
script(src='specs/server-handlers.js')
script(src='specs/server-add.js')
script(src='specs/server-count.js')
diff --git a/tests/views/layout.jade b/tests/views/layout.jade
index da53974..48190a9 100644
--- a/tests/views/layout.jade
+++ b/tests/views/layout.jade
@@ -1,5 +1,5 @@
doctype html
-html
+html(lang='en')
head
meta(charset='utf-8')
link(type='text/css', rel='stylesheet', href='../node_modules/mocha/mocha.css')