From 373bc5a0ca11f8c8bf3506ca158dfefed048a9c3 Mon Sep 17 00:00:00 2001 From: pubkey Date: Mon, 2 Jul 2018 19:07:47 +0200 Subject: [PATCH] UPGRADE deps --- .babelrc | 46 + .eslintrc.json | 36 + .gitignore | 9 + .npmignore | 15 + .npmrc | 2 + .travis.yml | 19 + LICENSE | 21 + README.md | 131 + config/.eslintignore | 4 + config/karma.conf.js | 75 + dist/es/browserify.index.js | 3 + dist/es/index.es5.js | 12 + dist/es/index.js | 164 + dist/es/method-chooser.js | 45 + dist/es/methods/cookies.js | 4 + dist/es/methods/indexed-db.js | 261 + dist/es/methods/localstorage.js | 138 + dist/es/methods/native.js | 42 + dist/es/methods/node.js | 944 +++ dist/es/options.js | 23 + dist/es/util.js | 33 + dist/lib/browserify.index.js | 5 + dist/lib/index.es5.js | 16 + dist/lib/index.js | 170 + dist/lib/method-chooser.js | 51 + dist/lib/methods/cookies.js | 5 + dist/lib/methods/indexed-db.js | 281 + dist/lib/methods/localstorage.js | 154 + dist/lib/methods/native.js | 52 + dist/lib/methods/node.js | 1011 +++ dist/lib/options.js | 29 + dist/lib/util.js | 42 + docs/iframe.html | 8 + docs/iframe.js | 8422 +++++++++++++++++++++ docs/index.html | 65 + docs/index.js | 9687 +++++++++++++++++++++++++ docs/kirby.gif | Bin 0 -> 109471 bytes docs/worker.js | 8423 +++++++++++++++++++++ index.d.ts | 48 + package.json | 117 + perf.txt | 68 + src/browserify.index.js | 3 + src/index.es5.js | 12 + src/index.js | 184 + src/method-chooser.js | 45 + src/methods/cookies.js | 4 + src/methods/indexed-db.js | 263 + src/methods/localstorage.js | 150 + src/methods/native.js | 42 + src/methods/node.js | 492 ++ src/options.js | 24 + src/util.js | 33 + test/e2e.test.js | 33 + test/index.test.js | 12 + test/integration.test.js | 371 + test/issues.test.js | 4 + test/performance.test.js | 2 + test/scripts/iframe.js | 37 + test/scripts/index.js | 132 + test/scripts/util.js | 10 + test/scripts/windows.sh | 11 + test/scripts/worker.js | 58 + test/typings.test.js | 122 + test/unit.test.js | 4 + test/unit/indexed-db.method.test.js | 272 + test/unit/localstorage.method.test.js | 94 + test/unit/native.method.test.js | 10 + test/unit/node.method.test.js | 445 ++ 68 files changed, 33550 insertions(+) create mode 100644 .babelrc create mode 100644 .eslintrc.json create mode 100755 .gitignore create mode 100644 .npmignore create mode 100644 .npmrc create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 config/.eslintignore create mode 100644 config/karma.conf.js create mode 100644 dist/es/browserify.index.js create mode 100644 dist/es/index.es5.js create mode 100644 dist/es/index.js create mode 100644 dist/es/method-chooser.js create mode 100644 dist/es/methods/cookies.js create mode 100644 dist/es/methods/indexed-db.js create mode 100644 dist/es/methods/localstorage.js create mode 100644 dist/es/methods/native.js create mode 100644 dist/es/methods/node.js create mode 100644 dist/es/options.js create mode 100644 dist/es/util.js create mode 100644 dist/lib/browserify.index.js create mode 100644 dist/lib/index.es5.js create mode 100644 dist/lib/index.js create mode 100644 dist/lib/method-chooser.js create mode 100644 dist/lib/methods/cookies.js create mode 100644 dist/lib/methods/indexed-db.js create mode 100644 dist/lib/methods/localstorage.js create mode 100644 dist/lib/methods/native.js create mode 100644 dist/lib/methods/node.js create mode 100644 dist/lib/options.js create mode 100644 dist/lib/util.js create mode 100644 docs/iframe.html create mode 100644 docs/iframe.js create mode 100644 docs/index.html create mode 100644 docs/index.js create mode 100644 docs/kirby.gif create mode 100644 docs/worker.js create mode 100644 index.d.ts create mode 100644 package.json create mode 100644 perf.txt create mode 100644 src/browserify.index.js create mode 100644 src/index.es5.js create mode 100644 src/index.js create mode 100644 src/method-chooser.js create mode 100644 src/methods/cookies.js create mode 100644 src/methods/indexed-db.js create mode 100644 src/methods/localstorage.js create mode 100644 src/methods/native.js create mode 100644 src/methods/node.js create mode 100644 src/options.js create mode 100644 src/util.js create mode 100644 test/e2e.test.js create mode 100644 test/index.test.js create mode 100644 test/integration.test.js create mode 100644 test/issues.test.js create mode 100644 test/performance.test.js create mode 100644 test/scripts/iframe.js create mode 100644 test/scripts/index.js create mode 100644 test/scripts/util.js create mode 100644 test/scripts/windows.sh create mode 100644 test/scripts/worker.js create mode 100644 test/typings.test.js create mode 100644 test/unit.test.js create mode 100644 test/unit/indexed-db.method.test.js create mode 100644 test/unit/localstorage.method.test.js create mode 100644 test/unit/native.method.test.js create mode 100644 test/unit/node.method.test.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..ecb53b32 --- /dev/null +++ b/.babelrc @@ -0,0 +1,46 @@ +{ + "plugins": [ + ["transform-es2015-template-literals", { + "loose": true + }], + "transform-es2015-literals", + "transform-es2015-function-name", + "transform-es2015-arrow-functions", + "transform-es2015-block-scoped-functions", ["transform-es2015-classes", { + "loose": true + }], + "transform-es2015-object-super", + "transform-es2015-shorthand-properties", ["transform-es2015-computed-properties", { + "loose": true + }], + ["transform-es2015-for-of", { + "loose": true + }], + "transform-es2015-sticky-regex", + "transform-es2015-unicode-regex", + "check-es2015-constants", ["transform-es2015-spread", { + "loose": true + }], + "transform-es2015-parameters", ["transform-es2015-destructuring", { + "loose": true + }], + "transform-es2015-block-scoping", + "transform-object-rest-spread", + "transform-es3-member-expression-literals", + "transform-es3-property-literals", + "transform-async-to-generator", + "transform-regenerator", + ["transform-runtime", { + "polyfill": false, + "regenerator": true + }] + ], + "env": { + "es5": { + "presets": ["es2015"] + }, + "es6": { + "presets": ["es2017"] + } + } +} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..c512d62d --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,36 @@ +{ + "parser": "babel-eslint", + "env": { + "browser": true, + "es6": true, + "node": true + }, + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "indent": [ + "error", + 4, { + "MemberExpression": "off", + "SwitchCase": 1 + } + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ], + "no-console": "off", + "no-unused-vars": "error", + "no-var": "error", + "no-throw-literal": "error" + } +} diff --git a/.gitignore b/.gitignore new file mode 100755 index 00000000..b00e0a09 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +package-lock.json +.idea/ +.vscode/ +.transpile_state.json +.com.google.* +shelljs_* +test_tmp/ +tmp/ \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..f5b3c3db --- /dev/null +++ b/.npmignore @@ -0,0 +1,15 @@ +.git/ +config/ +docs/ +test/ +test_tmp/ +tmp/ +.babelrc +.editorconfig +.eslintrc.json +.gitignore +.travis.yml +ISSUE_TEMPLATE.md +PULL_REQUEST_TEMPLATE.md + +log.txt diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..41a34295 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +unsafe-perm = true +package-lock=false diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..b713882e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +sudo: required +os: + - linux +node_js: + - "9.4.0" +before_install: + - export CHROME_BIN=chromium-browser + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start +script: +- travis_retry npm install --depth 0 --silent +- npm run lint +- npm run build +- travis_retry npm run test:node +- travis_retry npm run test:browser +- travis_retry npm run test:e2e +- npm run test:typings +- npm run test:size \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..42ff19a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Daniel Meyer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..bd13d397 --- /dev/null +++ b/README.md @@ -0,0 +1,131 @@ + +

+ + + +

+ +

BroadcastChannel

+

+ A BroadcastChannel that works in old browsers, new browsers, WebWorkers and NodeJs +

+ +

+ + + + follow on Twitter +

+ +
+ +* * * + +A BroadcastChannel allows simple communication between browsing contexts with the same origin or different NodeJs processes. + +This implementation works with old browsers, new browsers, WebWorkers and NodeJs. You can use it to send messages between multiple browser-tabs, iframes, WebWorkers and NodeJs-processes. + +This behaves similar to the [BroadcastChannel-API](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) which is currently not featured in all browsers. + +## Usage + +This API behaves similar to the [javascript-standard](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API). + +```bash +npm install --save broadcast-channel +``` + +Create a channel in one tab/process and send a message. + +```js +const BroadcastChannel = require('broadcast-channel'); +const channel = new BroadcastChannel('foobar'); +channel.postMessage('I am not alone'); +``` + +Create a channel with the same name in another tab/process and recieve messages. + +```js +const BroadcastChannel = require('broadcast-channel'); +const channel = new BroadcastChannel('foobar'); +channel.onmessage = msg => console.dir(msg); +// > 'I am not alone' +``` + + +Add and remove multiple eventlisteners + +```js +const BroadcastChannel = require('broadcast-channel'); +const channel = new BroadcastChannel('foobar'); + +const handler = msg => console.log(msg); +channel.addEventListener('message', handler); + +// remove it +channel.removeEventListener('message', handler); +``` + +Close the channel if you do not need it anymore. + +```js +channel.close(); +``` + +Set options when creating a channel (optional): + +```js +const options = { + type: 'localstorage', // (optional) enforce a type, oneOf['native', 'idb', 'localstorage', 'node'] + webWorkerSupport: true; // (optional) set this to false if you know that your channel will never be used in a WebWorker (increases performance) +}; +const channel = new BroadcastChannel('foobar', options); +``` + +Create a typed channel in typescript: + +```typescript +import BroadcastChannel from 'broadcast-channel'; +declare type Message = { + foo: string; +}; +const channel: BroadcastChannel = new BroadcastChannel('foobar'); +channel.postMessage({ + foo: 'bar' +}); +``` + +## Methods: + +Depending in which environment this is used, a proper method is automatically selected to ensure it always works. + +| Method | Used in | Description | +| ---------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Native** | [Modern Browsers](https://caniuse.com/broadcastchannel) | If the browser supports the BroadcastChannel-API, this method will be used because it is the fastest | +| **IndexedDB** | [Browsers with WebWorkers](https://caniuse.com/#feat=indexeddb) | If there is no native BroadcastChannel support, the IndexedDB method is used because it supports messaging between browser-tabs, iframes and WebWorkers | +| **LocalStorage** | [Older Browsers](https://caniuse.com/#feat=namevalue-storage) | In older browsers that do not support IndexedDb, a localstorage-method is used | +| **Sockets** | NodeJs | In NodeJs the communication is handled by sockets that send each other messages | + + +## What this is + +This module is optimised for: + +- **low latency**: When you postMessage on one channel, it should take as low as possible time until other channels recieve the message. +- **lossless**: When you send a message, it should be impossible that the message is lost before other channels recieved it +- **low idle workload**: During the time when no messages are send, there should be a low processor footprint. + +## What this is not + +- This is not a polyfill. Do not set this module to `window.BroadcastChannel`. This implementation behaves similiar to the [BroadcastChannel-Standard](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API) with these limitations: + - You can only send data that can be `JSON.stringify`-ed. + - While the offical API emits [onmessage-events](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel/onmessage), this module directly emitts the data which was posted +- This is not a replacement for a message queue. If you use this in NodeJs and want send more than 50 messages per second, you should use proper [IPC-Tooling](https://en.wikipedia.org/wiki/Message_queue) + + +## Browser Support +I have tested this in all browsers that I could find. For ie8 and ie9 you must transpile the code before you can use this. If you want to know if this works with your browser, [open the demo page](https://pubkey.github.io/broadcast-channel/). + +## Thanks +Thanks to [Hemanth.HM](https://github.com/hemanth) for the module name. diff --git a/config/.eslintignore b/config/.eslintignore new file mode 100644 index 00000000..9a7ae27f --- /dev/null +++ b/config/.eslintignore @@ -0,0 +1,4 @@ +../dist/ +../node_modules/ +../tmp/ +../test/scripts/worker.js diff --git a/config/karma.conf.js b/config/karma.conf.js new file mode 100644 index 00000000..14777309 --- /dev/null +++ b/config/karma.conf.js @@ -0,0 +1,75 @@ +const configuration = { + basePath: '', + frameworks: [ + 'mocha', + 'browserify', + 'detectBrowsers' + ], + files: [ + '../test/index.test.js' + ], + // reporters: ['progress'], + port: 9876, + colors: true, + autoWatch: false, + + /** + * see + * @link https://github.com/litixsoft/karma-detect-browsers + */ + detectBrowsers: { + enabled: true, + usePhantomJS: false, + postDetection: function (availableBrowser) { + // return ['Chrome']; // comment in to test specific browser + // return ['Firefox']; // comment in to test specific browser + const browsers = availableBrowser + .filter(b => !['PhantomJS', 'FirefoxAurora', 'FirefoxNightly'].includes(b)) + .map(b => { + if (process.env.TRAVIS && b === 'Chrome') return 'Chrome_travis_ci'; + else return b; + }); + return browsers; + } + }, + + // Karma plugins loaded + plugins: [ + 'karma-mocha', + 'karma-browserify', + 'karma-chrome-launcher', + 'karma-edge-launcher', + 'karma-firefox-launcher', + 'karma-ie-launcher', + 'karma-opera-launcher', + 'karma-detect-browsers' + ], + + // Source files that you wanna generate coverage for. + // Do not include tests or libraries (these files will be instrumented by Istanbul) + preprocessors: { + '../test/*.test.js': ['browserify'] + }, + + client: { + mocha: { + bail: false, + timeout: 6000 + }, + captureConsole: true + }, + // browsers: ['ChromeNoSandbox'], + browserDisconnectTimeout: 8000, + processKillTimeout: 8000, + customLaunchers: { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, + singleRun: true +}; + +module.exports = function (config) { + config.set(configuration); +}; diff --git a/dist/es/browserify.index.js b/dist/es/browserify.index.js new file mode 100644 index 00000000..785f9211 --- /dev/null +++ b/dist/es/browserify.index.js @@ -0,0 +1,3 @@ +var BroadcastChannel = require('./index.es5.js'); + +window['BroadcastChannel2'] = BroadcastChannel; \ No newline at end of file diff --git a/dist/es/index.es5.js b/dist/es/index.es5.js new file mode 100644 index 00000000..e94ea060 --- /dev/null +++ b/dist/es/index.es5.js @@ -0,0 +1,12 @@ +/** + * because babel can only export on default-attribute, + * we use this for the non-module-build + * this ensures that users do not have to use + * var BroadcastChannel = require('broadcast-channel').default; + * but + * var BroadcastChannel = require('broadcast-channel'); + */ + +import BroadcastChannel from './index.js'; + +module.exports = BroadcastChannel; \ No newline at end of file diff --git a/dist/es/index.js b/dist/es/index.js new file mode 100644 index 00000000..40aa1474 --- /dev/null +++ b/dist/es/index.js @@ -0,0 +1,164 @@ +import { isPromise } from './util.js'; + +import { chooseMethod } from './method-chooser.js'; + +import { fillOptionsWithDefaults } from './options.js'; + +var BroadcastChannel = function BroadcastChannel(name, options) { + this.name = name; + this.options = fillOptionsWithDefaults(options); + this.method = chooseMethod(this.options); + + this._isListening = false; + + /** + * setting onmessage twice, + * will overwrite the first listener + */ + this._onMessageListener = null; + + this._addEventListeners = { + message: [], + internal: [] + }; + + this._preparePromise = null; + _prepareChannel(this); +}; + +BroadcastChannel.prototype = { + postMessage: function postMessage(msg) { + var _this = this; + + var msgObj = { + time: new Date().getTime(), + type: 'message', + data: msg + }; + + if (this.closed) { + throw new Error('BroadcastChannel.postMessage(): ' + 'Cannot post message after channel has closed'); + } + + var awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + return awaitPrepare.then(function () { + return _this.method.postMessage(_this._state, msgObj); + }); + }, + + set onmessage(fn) { + var time = new Date().getTime() - 5; + var listenObj = { + time: time, + fn: fn + }; + _removeListenerObject(this, 'message', this._onMessageListener); + if (fn && typeof fn === 'function') { + this._onMessageListener = listenObj; + _addListenerObject(this, 'message', listenObj); + } else { + this._onMessageListener = null; + } + }, + + addEventListener: function addEventListener(type, fn) { + var time = new Date().getTime() - 5; + var listenObj = { + time: time, + fn: fn + }; + _addListenerObject(this, type, listenObj); + }, + removeEventListener: function removeEventListener(type, fn) { + var obj = this._addEventListeners[type].find(function (obj) { + return obj.fn === fn; + }); + _removeListenerObject(this, type, obj); + }, + close: function close() { + var _this2 = this; + + this.closed = true; + var awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + + this._onMessageListener = null; + this._addEventListeners.message = []; + + return awaitPrepare.then(function () { + return _this2.method.close(_this2._state); + }); + }, + + get type() { + return this.method.type; + } +}; + +function _prepareChannel(channel) { + var maybePromise = channel.method.create(channel.name, channel.options); + if (isPromise(maybePromise)) { + channel._preparePromise = maybePromise; + maybePromise.then(function (s) { + // used in tests to simulate slow runtime + /*if (channel.options.prepareDelay) { + await new Promise(res => setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(function (o) { + return o !== obj; + }); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + var listenerFn = function listenerFn(msgObj) { + channel._addEventListeners[msgObj.type].forEach(function (obj) { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + var time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(function () { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + }); + } else { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + var time = new Date().getTime() - 5; + channel.method.onMessage(channel._state, null, time); + } +} + +export default BroadcastChannel; \ No newline at end of file diff --git a/dist/es/method-chooser.js b/dist/es/method-chooser.js new file mode 100644 index 00000000..2716e0b7 --- /dev/null +++ b/dist/es/method-chooser.js @@ -0,0 +1,45 @@ +var isNode = require('detect-node'); + +var NativeMethod = require('./methods/native.js'); +var IndexeDbMethod = require('./methods/indexed-db.js'); +var LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +var METHODS = [NativeMethod, // fastest +IndexeDbMethod, LocalstorageMethod]; + +var REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + var NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + +export function chooseMethod(options) { + // directly chosen + if (options.type) { + var ret = METHODS.find(function (m) { + return m.type === options.type; + }); + if (!ret) throw new Error('method-type ' + options.type + ' not found');else return ret; + } + + var chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(function (m) { + return m.type !== 'idb'; + }); + } + + var useMethod = chooseMethods.find(function (method) { + return method.canBeUsed(); + }); + if (!useMethod) throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(function (m) { + return m.type; + })));else return useMethod; +} \ No newline at end of file diff --git a/dist/es/methods/cookies.js b/dist/es/methods/cookies.js new file mode 100644 index 00000000..f0cf25c8 --- /dev/null +++ b/dist/es/methods/cookies.js @@ -0,0 +1,4 @@ +/** + * if you really need this method, + * implement it + */ \ No newline at end of file diff --git a/dist/es/methods/indexed-db.js b/dist/es/methods/indexed-db.js new file mode 100644 index 00000000..f948aeb5 --- /dev/null +++ b/dist/es/methods/indexed-db.js @@ -0,0 +1,261 @@ +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +var isNode = require('detect-node'); + +import { sleep, randomInt, randomToken } from '../util.js'; + +import { fillOptionsWithDefaults } from '../options'; + +var DB_PREFIX = 'pubkey.broadcast-channel-0-'; +var OBJECT_STORE_ID = 'messages'; + +export var type = 'idb'; + +export function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +export function createDatabase(channelName) { + var IndexedDB = getIdb(); + + // create table + var dbName = DB_PREFIX + channelName; + var openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = function (ev) { + var db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + var dbPromise = new Promise(function (res, rej) { + openRequest.onerror = function (ev) { + return rej(ev); + }; + openRequest.onsuccess = function () { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +export function writeMessage(db, readerUuid, messageJson) { + var time = new Date().getTime(); + var writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + + var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise(function (res, rej) { + transaction.oncomplete = function () { + return res(); + }; + transaction.onerror = function (ev) { + return rej(ev); + }; + + var objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +export function getAllMessages(db) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +export function getMessagesHigherThen(db, lastCursorId) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(function (res) { + objectStore.openCursor(keyRangeValue).onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +export function removeMessageById(db, id) { + var request = db.transaction([OBJECT_STORE_ID], 'readwrite').objectStore(OBJECT_STORE_ID)['delete'](id); + return new Promise(function (res) { + request.onsuccess = function () { + return res(); + }; + }); +} + +export function getOldMessages(db, ttl) { + var olderThen = new Date().getTime() - ttl; + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + var msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +export function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl).then(function (tooOld) { + return Promise.all(tooOld.map(function (msgObj) { + return removeMessageById(db, msgObj.id); + })); + }); +} + +export function create(channelName, options) { + options = fillOptionsWithDefaults(options); + + var uuid = randomToken(10); + + return createDatabase(channelName).then(function (db) { + var state = { + closed: false, + lastCursorId: 0, + channelName: channelName, + options: options, + uuid: uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db: db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state).then(function () { + return sleep(state.options.idb.fallbackInterval); + }).then(function () { + return _readLoop(state); + }); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId).then(function (newerMessages) { + var useMessages = newerMessages.map(function (msgObj) { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }).filter(function (msgObj) { + return msgObj.uuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.id); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + + useMessages.forEach(function (msgObj) { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.id); + }, state.options.idb.ttl * 2); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +export function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +export function postMessage(channelState, messageJson) { + return writeMessage(channelState.db, channelState.uuid, messageJson).then(function () { + if (randomInt(0, 10) === 0) { + /* await (do not await) */cleanOldMessages(channelState.db, channelState.options.idb.ttl); + } + }); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +export function canBeUsed() { + if (isNode) return false; + var idb = getIdb(); + + if (!idb) return false; + return true; +}; \ No newline at end of file diff --git a/dist/es/methods/localstorage.js b/dist/es/methods/localstorage.js new file mode 100644 index 00000000..45919573 --- /dev/null +++ b/dist/es/methods/localstorage.js @@ -0,0 +1,138 @@ +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +var isNode = require('detect-node'); + +import { fillOptionsWithDefaults } from '../options'; + +import { sleep, randomToken } from '../util'; + +var KEY_PREFIX = 'pubkey.broadcastChannel-'; +export var type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +export function getLocalStorage() { + var localStorage = void 0; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +export function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +export function postMessage(channelState, messageJson) { + return new Promise(function (res) { + sleep().then(function () { + var key = storageKey(channelState.channelName); + var writeObj = { + token: randomToken(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + var value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + var ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +export function addStorageEventListener(channelName, fn) { + var key = storageKey(channelName); + var listener = function listener(ev) { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +export function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +export function create(channelName, options) { + options = fillOptionsWithDefaults(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + var startTime = new Date().getTime(); + var uuid = randomToken(10); + + // contains all messages that have been emitted before + var emittedMessagesIds = new Set(); + + var state = { + startTime: startTime, + channelName: channelName, + options: options, + uuid: uuid, + emittedMessagesIds: emittedMessagesIds + }; + + state.listener = addStorageEventListener(channelName, function (msgObj) { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return emittedMessagesIds['delete'](msgObj.token); + }, options.localstorage.removeTimeout); + state.messagesCallback(msgObj.data); + }); + + return state; +} + +export function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +export function canBeUsed() { + if (isNode) return false; + var ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; \ No newline at end of file diff --git a/dist/es/methods/native.js b/dist/es/methods/native.js new file mode 100644 index 00000000..6b66caa4 --- /dev/null +++ b/dist/es/methods/native.js @@ -0,0 +1,42 @@ +var isNode = require('detect-node'); + +export var type = 'native'; + +export function create(channelName, options) { + if (!options) options = {}; + var state = { + channelName: channelName, + options: options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = function (msg) { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +export function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +export function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +export function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; \ No newline at end of file diff --git a/dist/es/methods/node.js b/dist/es/methods/node.js new file mode 100644 index 00000000..9bc10d4d --- /dev/null +++ b/dist/es/methods/node.js @@ -0,0 +1,944 @@ +import _regeneratorRuntime from 'babel-runtime/regenerator'; +import _asyncToGenerator from 'babel-runtime/helpers/asyncToGenerator'; +/** + * this method is used in nodejs-environments. + * The ipc is handled via sockets and file-writes to the tmp-folder + */ + +import * as util from 'util'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as events from 'events'; +import * as net from 'net'; +import * as path from 'path'; +import { sha3_224 } from 'js-sha3'; + +import isNode from 'detect-node'; +import IdleQueue from 'custom-idle-queue'; +import unload from 'unload'; + +import { fillOptionsWithDefaults } from '../options'; + +import { randomInt, randomToken } from '../util'; + +/** + * windows sucks, so we have handle windows-type of socket-paths + * @link https://gist.github.com/domenic/2790533#gistcomment-331356 + */ +export function cleanPipeName(str) { + if (process.platform === 'win32' && !str.startsWith('\\\\.\\pipe\\')) { + str = str.replace(/^\//, ''); + str = str.replace(/\//g, '-'); + return '\\\\.\\pipe\\' + str; + } else { + return str; + } +}; + +var mkdir = util.promisify(fs.mkdir); +var writeFile = util.promisify(fs.writeFile); +var readFile = util.promisify(fs.readFile); +var unlink = util.promisify(fs.unlink); +var readdir = util.promisify(fs.readdir); + +var TMP_FOLDER_NAME = 'pubkey.broadcast-channel'; + +export function getPaths(channelName) { + var folderPathBase = path.join(os.tmpdir(), TMP_FOLDER_NAME); + var channelPathBase = path.join(os.tmpdir(), TMP_FOLDER_NAME, sha3_224(channelName) // use hash incase of strange characters + ); + var folderPathReaders = path.join(channelPathBase, 'readers'); + var folderPathMessages = path.join(channelPathBase, 'messages'); + + return { + base: folderPathBase, + channelBase: channelPathBase, + readers: folderPathReaders, + messages: folderPathMessages + }; +} + +export var ensureFoldersExist = function () { + var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(channelName) { + var paths; + return _regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + paths = getPaths(channelName); + _context.next = 3; + return mkdir(paths.base)['catch'](function () { + return null; + }); + + case 3: + _context.next = 5; + return mkdir(paths.channelBase)['catch'](function () { + return null; + }); + + case 5: + _context.t0 = Promise; + _context.next = 8; + return mkdir(paths.readers)['catch'](function () { + return null; + }); + + case 8: + _context.t1 = _context.sent; + _context.next = 11; + return mkdir(paths.messages)['catch'](function () { + return null; + }); + + case 11: + _context.t2 = _context.sent; + _context.t3 = [_context.t1, _context.t2]; + _context.next = 15; + return _context.t0.all.call(_context.t0, _context.t3); + + case 15: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function ensureFoldersExist(_x) { + return _ref.apply(this, arguments); + }; +}();; + +export function socketPath(channelName, readerUuid) { + + var paths = getPaths(channelName); + var socketPath = path.join(paths.readers, readerUuid + '.s'); + return cleanPipeName(socketPath); +} + +export function socketInfoPath(channelName, readerUuid) { + var paths = getPaths(channelName); + var socketPath = path.join(paths.readers, readerUuid + '.json'); + return socketPath; +} + +/** + * Because it is not possible to get all socket-files in a folder, + * when used under fucking windows, + * we have to set a normal file so other readers know our socket exists + */ +export var createSocketInfoFile = function () { + var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(channelName, readerUuid) { + var pathToFile; + return _regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return ensureFoldersExist(channelName); + + case 2: + pathToFile = socketInfoPath(channelName, readerUuid); + _context2.next = 5; + return writeFile(pathToFile, JSON.stringify({ + time: new Date().getTime() + })); + + case 5: + return _context2.abrupt('return', pathToFile); + + case 6: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function createSocketInfoFile(_x2, _x3) { + return _ref2.apply(this, arguments); + }; +}(); + +/** + * creates the socket-file and subscribes to it + * @return {{emitter: EventEmitter, server: any}} + */ +export var createSocketEventEmitter = function () { + var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(channelName, readerUuid) { + var pathToSocket, emitter, server; + return _regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + pathToSocket = socketPath(channelName, readerUuid); + emitter = new events.EventEmitter(); + server = net.createServer(function (stream) { + stream.on('end', function () { + // console.log('server: end'); + }); + + stream.on('data', function (msg) { + // console.log('server: got data:'); + // console.dir(msg.toString()); + emitter.emit('data', msg.toString()); + }); + }); + _context3.next = 5; + return new Promise(function (res) { + server.listen(pathToSocket, function () { + res(); + }); + }); + + case 5: + server.on('connection', function () { + // console.log('server: Client connected.'); + }); + + return _context3.abrupt('return', { + path: pathToSocket, + emitter: emitter, + server: server + }); + + case 7: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + })); + + return function createSocketEventEmitter(_x4, _x5) { + return _ref3.apply(this, arguments); + }; +}(); + +export var openClientConnection = function () { + var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(channelName, readerUuid) { + var pathToSocket, client; + return _regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + pathToSocket = socketPath(channelName, readerUuid); + client = new net.Socket(); + _context4.next = 4; + return new Promise(function (res) { + client.connect(pathToSocket, res); + }); + + case 4: + return _context4.abrupt('return', client); + + case 5: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + })); + + return function openClientConnection(_x6, _x7) { + return _ref4.apply(this, arguments); + }; +}(); + +/** + * writes the new message to the file-system + * so other readers can find it + */ +export var writeMessage = function () { + var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(channelName, readerUuid, messageJson) { + var time, writeObject, token, fileName, msgPath; + return _regeneratorRuntime.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + time = new Date().getTime(); + writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + token = randomToken(12); + fileName = time + '_' + readerUuid + '_' + token + '.json'; + msgPath = path.join(getPaths(channelName).messages, fileName); + _context5.next = 7; + return writeFile(msgPath, JSON.stringify(writeObject)); + + case 7: + return _context5.abrupt('return', { + time: time, + uuid: readerUuid, + token: token, + path: msgPath + }); + + case 8: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + })); + + return function writeMessage(_x8, _x9, _x10) { + return _ref5.apply(this, arguments); + }; +}(); + +/** + * returns the uuids of all readers + * @return {string[]} + */ +export var getReadersUuids = function () { + var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(channelName) { + var readersPath, files; + return _regeneratorRuntime.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + readersPath = getPaths(channelName).readers; + _context6.next = 3; + return readdir(readersPath); + + case 3: + files = _context6.sent; + return _context6.abrupt('return', files.map(function (file) { + return file.split('.'); + }).filter(function (split) { + return split[1] === 'json'; + }) // do not scan .socket-files + .map(function (split) { + return split[0]; + })); + + case 5: + case 'end': + return _context6.stop(); + } + } + }, _callee6, this); + })); + + return function getReadersUuids(_x11) { + return _ref6.apply(this, arguments); + }; +}(); + +export var messagePath = function () { + var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(channelName, time, token, writerUuid) { + var fileName, msgPath; + return _regeneratorRuntime.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + fileName = time + '_' + writerUuid + '_' + token + '.json'; + msgPath = path.join(getPaths(channelName).messages, fileName); + return _context7.abrupt('return', msgPath); + + case 3: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + })); + + return function messagePath(_x12, _x13, _x14, _x15) { + return _ref7.apply(this, arguments); + }; +}(); + +export var getAllMessages = function () { + var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(channelName) { + var messagesPath, files; + return _regeneratorRuntime.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + messagesPath = getPaths(channelName).messages; + _context8.next = 3; + return readdir(messagesPath); + + case 3: + files = _context8.sent; + return _context8.abrupt('return', files.map(function (file) { + var fileName = file.split('.')[0]; + var split = fileName.split('_'); + + return { + path: path.join(messagesPath, file), + time: parseInt(split[0]), + senderUuid: split[1], + token: split[2] + }; + })); + + case 5: + case 'end': + return _context8.stop(); + } + } + }, _callee8, this); + })); + + return function getAllMessages(_x16) { + return _ref8.apply(this, arguments); + }; +}(); + +export function getSingleMessage(channelName, msgObj) { + var messagesPath = getPaths(channelName).messages; + + return { + path: path.join(messagesPath, msgObj.t + '_' + msgObj.u + '_' + msgObj.to + '.json'), + time: msgObj.t, + senderUuid: msgObj.u, + token: msgObj.to + }; +} + +export var readMessage = function () { + var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(messageObj) { + var content; + return _regeneratorRuntime.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return readFile(messageObj.path, 'utf8'); + + case 2: + content = _context9.sent; + return _context9.abrupt('return', JSON.parse(content)); + + case 4: + case 'end': + return _context9.stop(); + } + } + }, _callee9, this); + })); + + return function readMessage(_x17) { + return _ref9.apply(this, arguments); + }; +}(); + +export var cleanOldMessages = function () { + var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(messageObjects, ttl) { + var olderThen; + return _regeneratorRuntime.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + olderThen = new Date().getTime() - ttl; + _context10.next = 3; + return Promise.all(messageObjects.filter(function (obj) { + return obj.time < olderThen; + }).map(function (obj) { + return unlink(obj.path)['catch'](function () { + return null; + }); + })); + + case 3: + case 'end': + return _context10.stop(); + } + } + }, _callee10, this); + })); + + return function cleanOldMessages(_x18, _x19) { + return _ref10.apply(this, arguments); + }; +}(); + +export var type = 'node'; + +export var create = function () { + var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(channelName) { + var _this = this; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var uuid, _ref12, otherReaderUuids, socketEE, infoFilePath, otherReaderClients, readQueue, writeQueue, state; + + return _regeneratorRuntime.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + options = fillOptionsWithDefaults(options); + + _context12.next = 3; + return ensureFoldersExist(channelName); + + case 3: + uuid = randomToken(10); + _context12.next = 6; + return Promise.all([getReadersUuids(channelName), createSocketEventEmitter(channelName, uuid), createSocketInfoFile(channelName, uuid)]); + + case 6: + _ref12 = _context12.sent; + otherReaderUuids = _ref12[0]; + socketEE = _ref12[1]; + infoFilePath = _ref12[2]; + otherReaderClients = {}; + _context12.next = 13; + return Promise.all(otherReaderUuids.filter(function (readerUuid) { + return readerUuid !== uuid; + }) // not own + .map(function () { + var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(readerUuid) { + var client; + return _regeneratorRuntime.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return openClientConnection(channelName, readerUuid); + + case 2: + client = _context11.sent; + + otherReaderClients[readerUuid] = client; + + case 4: + case 'end': + return _context11.stop(); + } + } + }, _callee11, _this); + })); + + return function (_x22) { + return _ref13.apply(this, arguments); + }; + }())); + + case 13: + + // ensures we do not read messages in parrallel + readQueue = new IdleQueue(1); + writeQueue = new IdleQueue(1); + state = { + channelName: channelName, + options: options, + uuid: uuid, + socketEE: socketEE, + infoFilePath: infoFilePath, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallbackTime: null, + messagesCallback: null, + readQueue: readQueue, + writeQueue: writeQueue, + otherReaderUuids: otherReaderUuids, + otherReaderClients: otherReaderClients, + // ensure if process crashes, everything is cleaned up + removeUnload: unload.add(function () { + return close(state); + }) + }; + + // when new message comes in, we read it and emit it + + socketEE.emitter.on('data', function (data) { + var obj = JSON.parse(data); + if (obj.a === 'msg') { + handleMessagePing(state, obj.d); + return; + } + }); + + return _context12.abrupt('return', state); + + case 18: + case 'end': + return _context12.stop(); + } + } + }, _callee12, this); + })); + + return function create(_x20) { + return _ref11.apply(this, arguments); + }; +}(); + +/** + * when the socket pings, so that we now new messages came, + * run this + */ +export var handleMessagePing = function () { + var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(state) { + var _this2 = this; + + var msgObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + return _regeneratorRuntime.wrap(function _callee14$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + if (state.messagesCallback) { + _context15.next = 2; + break; + } + + return _context15.abrupt('return'); + + case 2: + _context15.next = 4; + return state.readQueue.requestIdlePromise(); + + case 4: + _context15.next = 6; + return state.readQueue.wrapCall(_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() { + var messages, useMessages, _loop, _iterator, _isArray, _i, _ref16, _ret; + + return _regeneratorRuntime.wrap(function _callee13$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + messages = void 0; + + if (msgObj) { + _context14.next = 7; + break; + } + + _context14.next = 4; + return getAllMessages(state.channelName); + + case 4: + messages = _context14.sent; + _context14.next = 8; + break; + + case 7: + // get single message + messages = [getSingleMessage(state.channelName, msgObj)]; + + case 8: + useMessages = messages.filter(function (msgObj) { + return msgObj.senderUuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.token); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + if (!state.messagesCallback) { + _context14.next = 18; + break; + } + + _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() { + var msgObj, content; + return _regeneratorRuntime.wrap(function _loop$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + if (!_isArray) { + _context13.next = 6; + break; + } + + if (!(_i >= _iterator.length)) { + _context13.next = 3; + break; + } + + return _context13.abrupt('return', 'break'); + + case 3: + _ref16 = _iterator[_i++]; + _context13.next = 10; + break; + + case 6: + _i = _iterator.next(); + + if (!_i.done) { + _context13.next = 9; + break; + } + + return _context13.abrupt('return', 'break'); + + case 9: + _ref16 = _i.value; + + case 10: + msgObj = _ref16; + _context13.next = 13; + return readMessage(msgObj); + + case 13: + content = _context13.sent; + + state.emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.token); + }, state.options.node.ttl * 2); + + if (state.messagesCallback) { + state.messagesCallback(content.data); + } + + case 17: + case 'end': + return _context13.stop(); + } + } + }, _loop, _this2); + }); + _iterator = useMessages, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator](); + + case 12: + return _context14.delegateYield(_loop(), 't0', 13); + + case 13: + _ret = _context14.t0; + + if (!(_ret === 'break')) { + _context14.next = 16; + break; + } + + return _context14.abrupt('break', 18); + + case 16: + _context14.next = 12; + break; + + case 18: + case 'end': + return _context14.stop(); + } + } + }, _callee13, _this2); + }))); + + case 6: + case 'end': + return _context15.stop(); + } + } + }, _callee14, this); + })); + + return function handleMessagePing(_x23) { + return _ref14.apply(this, arguments); + }; +}(); + +export var refreshReaderClients = function () { + var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(channelState) { + var _this3 = this; + + var otherReaders; + return _regeneratorRuntime.wrap(function _callee16$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return getReadersUuids(channelState.channelName); + + case 2: + otherReaders = _context17.sent; + + + // remove subscriptions to closed readers + Object.keys(channelState.otherReaderClients).filter(function (readerUuid) { + return !otherReaders.includes(readerUuid); + }).forEach(function (readerUuid) { + channelState.otherReaderClients[readerUuid].close(); + delete channelState.otherReaderClients[readerUuid]; + }); + + _context17.next = 6; + return Promise.all(otherReaders.filter(function (readerUuid) { + return readerUuid !== channelState.uuid; + }) // not own + .filter(function (readerUuid) { + return !channelState.otherReaderClients[readerUuid]; + }) // not already has client + .map(function () { + var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(readerUuid) { + var client; + return _regeneratorRuntime.wrap(function _callee15$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return openClientConnection(channelState.channelName, readerUuid); + + case 2: + client = _context16.sent; + + channelState.otherReaderClients[readerUuid] = client; + + case 4: + case 'end': + return _context16.stop(); + } + } + }, _callee15, _this3); + })); + + return function (_x26) { + return _ref18.apply(this, arguments); + }; + }())); + + case 6: + case 'end': + return _context17.stop(); + } + } + }, _callee16, this); + })); + + return function refreshReaderClients(_x25) { + return _ref17.apply(this, arguments); + }; +}(); + +export var postMessage = function () { + var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(channelState, messageJson) { + var _this4 = this; + + return _regeneratorRuntime.wrap(function _callee18$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + _context19.next = 2; + return channelState.writeQueue.requestIdlePromise(); + + case 2: + _context19.next = 4; + return channelState.writeQueue.wrapCall(_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() { + var msgObj, pingObj, messages; + return _regeneratorRuntime.wrap(function _callee17$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return refreshReaderClients(channelState); + + case 2: + _context18.next = 4; + return writeMessage(channelState.channelName, channelState.uuid, messageJson); + + case 4: + msgObj = _context18.sent; + + + // ping other readers + pingObj = { + a: 'msg', + d: { + t: msgObj.time, + u: msgObj.uuid, + to: msgObj.token + } + }; + _context18.next = 8; + return Promise.all(Object.values(channelState.otherReaderClients).map(function (client) { + return client.write(JSON.stringify(pingObj)); + })); + + case 8: + if (!(randomInt(0, 10) === 0)) { + _context18.next = 14; + break; + } + + _context18.next = 11; + return getAllMessages(channelState.channelName); + + case 11: + messages = _context18.sent; + _context18.next = 14; + return cleanOldMessages(messages, channelState.options.node.ttl); + + case 14: + case 'end': + return _context18.stop(); + } + } + }, _callee17, _this4); + })) + + // emit to own eventEmitter + // channelState.socketEE.emitter.emit('data', JSON.parse(JSON.stringify(messageJson))); + ); + + case 4: + case 'end': + return _context19.stop(); + } + } + }, _callee18, this); + })); + + return function postMessage(_x27, _x28) { + return _ref19.apply(this, arguments); + }; +}(); + +export function onMessage(channelState, fn) { + var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Date().getTime(); + + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + handleMessagePing(channelState); +} + +export var close = function () { + var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(channelState) { + return _regeneratorRuntime.wrap(function _callee19$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + channelState.removeUnload(); + channelState.socketEE.server.close(); + channelState.socketEE.emitter.removeAllListeners(); + channelState.readQueue.clear(); + channelState.writeQueue.clear(); + + _context20.next = 7; + return unlink(channelState.infoFilePath); + + case 7: + + Object.values(channelState.otherReaderClients).forEach(function (client) { + return client.destroy(); + }); + + case 8: + case 'end': + return _context20.stop(); + } + } + }, _callee19, this); + })); + + return function close(_x30) { + return _ref21.apply(this, arguments); + }; +}(); + +export function canBeUsed() { + return isNode; +}; \ No newline at end of file diff --git a/dist/es/options.js b/dist/es/options.js new file mode 100644 index 00000000..5c4f8ab3 --- /dev/null +++ b/dist/es/options.js @@ -0,0 +1,23 @@ +export function fillOptionsWithDefaults(options) { + if (!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} \ No newline at end of file diff --git a/dist/es/util.js b/dist/es/util.js new file mode 100644 index 00000000..0f3a389a --- /dev/null +++ b/dist/es/util.js @@ -0,0 +1,33 @@ +/** + * returns true if the given object is a promise + */ +export function isPromise(obj) { + if (obj && typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +export function sleep(time) { + if (!time) time = 0; + return new Promise(function (res) { + return setTimeout(res, time); + }); +} + +export function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +export function randomToken(length) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + }return text; +} \ No newline at end of file diff --git a/dist/lib/browserify.index.js b/dist/lib/browserify.index.js new file mode 100644 index 00000000..24a71883 --- /dev/null +++ b/dist/lib/browserify.index.js @@ -0,0 +1,5 @@ +'use strict'; + +var BroadcastChannel = require('./index.es5.js'); + +window['BroadcastChannel2'] = BroadcastChannel; \ No newline at end of file diff --git a/dist/lib/index.es5.js b/dist/lib/index.es5.js new file mode 100644 index 00000000..8916ea4d --- /dev/null +++ b/dist/lib/index.es5.js @@ -0,0 +1,16 @@ +'use strict'; + +var _index = require('./index.js'); + +var _index2 = _interopRequireDefault(_index); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +module.exports = _index2['default']; /** + * because babel can only export on default-attribute, + * we use this for the non-module-build + * this ensures that users do not have to use + * var BroadcastChannel = require('broadcast-channel').default; + * but + * var BroadcastChannel = require('broadcast-channel'); + */ \ No newline at end of file diff --git a/dist/lib/index.js b/dist/lib/index.js new file mode 100644 index 00000000..3100e4c1 --- /dev/null +++ b/dist/lib/index.js @@ -0,0 +1,170 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _util = require('./util.js'); + +var _methodChooser = require('./method-chooser.js'); + +var _options = require('./options.js'); + +var BroadcastChannel = function BroadcastChannel(name, options) { + this.name = name; + this.options = (0, _options.fillOptionsWithDefaults)(options); + this.method = (0, _methodChooser.chooseMethod)(this.options); + + this._isListening = false; + + /** + * setting onmessage twice, + * will overwrite the first listener + */ + this._onMessageListener = null; + + this._addEventListeners = { + message: [], + internal: [] + }; + + this._preparePromise = null; + _prepareChannel(this); +}; + +BroadcastChannel.prototype = { + postMessage: function postMessage(msg) { + var _this = this; + + var msgObj = { + time: new Date().getTime(), + type: 'message', + data: msg + }; + + if (this.closed) { + throw new Error('BroadcastChannel.postMessage(): ' + 'Cannot post message after channel has closed'); + } + + var awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + return awaitPrepare.then(function () { + return _this.method.postMessage(_this._state, msgObj); + }); + }, + + set onmessage(fn) { + var time = new Date().getTime() - 5; + var listenObj = { + time: time, + fn: fn + }; + _removeListenerObject(this, 'message', this._onMessageListener); + if (fn && typeof fn === 'function') { + this._onMessageListener = listenObj; + _addListenerObject(this, 'message', listenObj); + } else { + this._onMessageListener = null; + } + }, + + addEventListener: function addEventListener(type, fn) { + var time = new Date().getTime() - 5; + var listenObj = { + time: time, + fn: fn + }; + _addListenerObject(this, type, listenObj); + }, + removeEventListener: function removeEventListener(type, fn) { + var obj = this._addEventListeners[type].find(function (obj) { + return obj.fn === fn; + }); + _removeListenerObject(this, type, obj); + }, + close: function close() { + var _this2 = this; + + this.closed = true; + var awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + + this._onMessageListener = null; + this._addEventListeners.message = []; + + return awaitPrepare.then(function () { + return _this2.method.close(_this2._state); + }); + }, + + get type() { + return this.method.type; + } +}; + +function _prepareChannel(channel) { + var maybePromise = channel.method.create(channel.name, channel.options); + if ((0, _util.isPromise)(maybePromise)) { + channel._preparePromise = maybePromise; + maybePromise.then(function (s) { + // used in tests to simulate slow runtime + /*if (channel.options.prepareDelay) { + await new Promise(res => setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(function (o) { + return o !== obj; + }); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + var listenerFn = function listenerFn(msgObj) { + channel._addEventListeners[msgObj.type].forEach(function (obj) { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + var time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(function () { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + }); + } else { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + var time = new Date().getTime() - 5; + channel.method.onMessage(channel._state, null, time); + } +} + +exports['default'] = BroadcastChannel; \ No newline at end of file diff --git a/dist/lib/method-chooser.js b/dist/lib/method-chooser.js new file mode 100644 index 00000000..857d15db --- /dev/null +++ b/dist/lib/method-chooser.js @@ -0,0 +1,51 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.chooseMethod = chooseMethod; +var isNode = require('detect-node'); + +var NativeMethod = require('./methods/native.js'); +var IndexeDbMethod = require('./methods/indexed-db.js'); +var LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +var METHODS = [NativeMethod, // fastest +IndexeDbMethod, LocalstorageMethod]; + +var REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + var NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + +function chooseMethod(options) { + // directly chosen + if (options.type) { + var ret = METHODS.find(function (m) { + return m.type === options.type; + }); + if (!ret) throw new Error('method-type ' + options.type + ' not found');else return ret; + } + + var chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(function (m) { + return m.type !== 'idb'; + }); + } + + var useMethod = chooseMethods.find(function (method) { + return method.canBeUsed(); + }); + if (!useMethod) throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(function (m) { + return m.type; + })));else return useMethod; +} \ No newline at end of file diff --git a/dist/lib/methods/cookies.js b/dist/lib/methods/cookies.js new file mode 100644 index 00000000..0011f3e2 --- /dev/null +++ b/dist/lib/methods/cookies.js @@ -0,0 +1,5 @@ +/** + * if you really need this method, + * implement it + */ +"use strict"; \ No newline at end of file diff --git a/dist/lib/methods/indexed-db.js b/dist/lib/methods/indexed-db.js new file mode 100644 index 00000000..1d86c7db --- /dev/null +++ b/dist/lib/methods/indexed-db.js @@ -0,0 +1,281 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getIdb = getIdb; +exports.createDatabase = createDatabase; +exports.writeMessage = writeMessage; +exports.getAllMessages = getAllMessages; +exports.getMessagesHigherThen = getMessagesHigherThen; +exports.removeMessageById = removeMessageById; +exports.getOldMessages = getOldMessages; +exports.cleanOldMessages = cleanOldMessages; +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _util = require('../util.js'); + +var _options = require('../options'); + +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +var isNode = require('detect-node'); + +var DB_PREFIX = 'pubkey.broadcast-channel-0-'; +var OBJECT_STORE_ID = 'messages'; + +var type = exports.type = 'idb'; + +function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +function createDatabase(channelName) { + var IndexedDB = getIdb(); + + // create table + var dbName = DB_PREFIX + channelName; + var openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = function (ev) { + var db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + var dbPromise = new Promise(function (res, rej) { + openRequest.onerror = function (ev) { + return rej(ev); + }; + openRequest.onsuccess = function () { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +function writeMessage(db, readerUuid, messageJson) { + var time = new Date().getTime(); + var writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + + var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise(function (res, rej) { + transaction.oncomplete = function () { + return res(); + }; + transaction.onerror = function (ev) { + return rej(ev); + }; + + var objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +function getAllMessages(db) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function getMessagesHigherThen(db, lastCursorId) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(function (res) { + objectStore.openCursor(keyRangeValue).onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function removeMessageById(db, id) { + var request = db.transaction([OBJECT_STORE_ID], 'readwrite').objectStore(OBJECT_STORE_ID)['delete'](id); + return new Promise(function (res) { + request.onsuccess = function () { + return res(); + }; + }); +} + +function getOldMessages(db, ttl) { + var olderThen = new Date().getTime() - ttl; + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + var msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl).then(function (tooOld) { + return Promise.all(tooOld.map(function (msgObj) { + return removeMessageById(db, msgObj.id); + })); + }); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + + var uuid = (0, _util.randomToken)(10); + + return createDatabase(channelName).then(function (db) { + var state = { + closed: false, + lastCursorId: 0, + channelName: channelName, + options: options, + uuid: uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db: db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state).then(function () { + return (0, _util.sleep)(state.options.idb.fallbackInterval); + }).then(function () { + return _readLoop(state); + }); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId).then(function (newerMessages) { + var useMessages = newerMessages.map(function (msgObj) { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }).filter(function (msgObj) { + return msgObj.uuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.id); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + + useMessages.forEach(function (msgObj) { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.id); + }, state.options.idb.ttl * 2); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +function postMessage(channelState, messageJson) { + return writeMessage(channelState.db, channelState.uuid, messageJson).then(function () { + if ((0, _util.randomInt)(0, 10) === 0) { + /* await (do not await) */cleanOldMessages(channelState.db, channelState.options.idb.ttl); + } + }); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +function canBeUsed() { + if (isNode) return false; + var idb = getIdb(); + + if (!idb) return false; + return true; +}; \ No newline at end of file diff --git a/dist/lib/methods/localstorage.js b/dist/lib/methods/localstorage.js new file mode 100644 index 00000000..f2e58d69 --- /dev/null +++ b/dist/lib/methods/localstorage.js @@ -0,0 +1,154 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getLocalStorage = getLocalStorage; +exports.storageKey = storageKey; +exports.postMessage = postMessage; +exports.addStorageEventListener = addStorageEventListener; +exports.removeStorageEventListener = removeStorageEventListener; +exports.create = create; +exports.close = close; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _options = require('../options'); + +var _util = require('../util'); + +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +var isNode = require('detect-node'); + +var KEY_PREFIX = 'pubkey.broadcastChannel-'; +var type = exports.type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +function getLocalStorage() { + var localStorage = void 0; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +function postMessage(channelState, messageJson) { + return new Promise(function (res) { + (0, _util.sleep)().then(function () { + var key = storageKey(channelState.channelName); + var writeObj = { + token: (0, _util.randomToken)(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + var value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + var ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +function addStorageEventListener(channelName, fn) { + var key = storageKey(channelName); + var listener = function listener(ev) { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + var startTime = new Date().getTime(); + var uuid = (0, _util.randomToken)(10); + + // contains all messages that have been emitted before + var emittedMessagesIds = new Set(); + + var state = { + startTime: startTime, + channelName: channelName, + options: options, + uuid: uuid, + emittedMessagesIds: emittedMessagesIds + }; + + state.listener = addStorageEventListener(channelName, function (msgObj) { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return emittedMessagesIds['delete'](msgObj.token); + }, options.localstorage.removeTimeout); + state.messagesCallback(msgObj.data); + }); + + return state; +} + +function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + var ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; \ No newline at end of file diff --git a/dist/lib/methods/native.js b/dist/lib/methods/native.js new file mode 100644 index 00000000..30d0f4ce --- /dev/null +++ b/dist/lib/methods/native.js @@ -0,0 +1,52 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; +var isNode = require('detect-node'); + +var type = exports.type = 'native'; + +function create(channelName, options) { + if (!options) options = {}; + var state = { + channelName: channelName, + options: options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = function (msg) { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; \ No newline at end of file diff --git a/dist/lib/methods/node.js b/dist/lib/methods/node.js new file mode 100644 index 00000000..15d242cd --- /dev/null +++ b/dist/lib/methods/node.js @@ -0,0 +1,1011 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.close = exports.postMessage = exports.refreshReaderClients = exports.handleMessagePing = exports.create = exports.type = exports.cleanOldMessages = exports.readMessage = exports.getAllMessages = exports.messagePath = exports.getReadersUuids = exports.writeMessage = exports.openClientConnection = exports.createSocketEventEmitter = exports.createSocketInfoFile = exports.ensureFoldersExist = undefined; + +var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray'); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _regenerator = require('babel-runtime/regenerator'); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var ensureFoldersExist = exports.ensureFoldersExist = function () { + var _ref = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee(channelName) { + var paths; + return _regenerator2['default'].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + paths = getPaths(channelName); + _context.next = 3; + return mkdir(paths.base)['catch'](function () { + return null; + }); + + case 3: + _context.next = 5; + return mkdir(paths.channelBase)['catch'](function () { + return null; + }); + + case 5: + _context.t0 = Promise; + _context.next = 8; + return mkdir(paths.readers)['catch'](function () { + return null; + }); + + case 8: + _context.t1 = _context.sent; + _context.next = 11; + return mkdir(paths.messages)['catch'](function () { + return null; + }); + + case 11: + _context.t2 = _context.sent; + _context.t3 = [_context.t1, _context.t2]; + _context.next = 15; + return _context.t0.all.call(_context.t0, _context.t3); + + case 15: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function ensureFoldersExist(_x) { + return _ref.apply(this, arguments); + }; +}(); + +/** + * Because it is not possible to get all socket-files in a folder, + * when used under fucking windows, + * we have to set a normal file so other readers know our socket exists + */ +var createSocketInfoFile = exports.createSocketInfoFile = function () { + var _ref2 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee2(channelName, readerUuid) { + var pathToFile; + return _regenerator2['default'].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return ensureFoldersExist(channelName); + + case 2: + pathToFile = socketInfoPath(channelName, readerUuid); + _context2.next = 5; + return writeFile(pathToFile, JSON.stringify({ + time: new Date().getTime() + })); + + case 5: + return _context2.abrupt('return', pathToFile); + + case 6: + case 'end': + return _context2.stop(); + } + } + }, _callee2, this); + })); + + return function createSocketInfoFile(_x2, _x3) { + return _ref2.apply(this, arguments); + }; +}(); + +/** + * creates the socket-file and subscribes to it + * @return {{emitter: EventEmitter, server: any}} + */ + + +var createSocketEventEmitter = exports.createSocketEventEmitter = function () { + var _ref3 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee3(channelName, readerUuid) { + var pathToSocket, emitter, server; + return _regenerator2['default'].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + pathToSocket = socketPath(channelName, readerUuid); + emitter = new events.EventEmitter(); + server = net.createServer(function (stream) { + stream.on('end', function () { + // console.log('server: end'); + }); + + stream.on('data', function (msg) { + // console.log('server: got data:'); + // console.dir(msg.toString()); + emitter.emit('data', msg.toString()); + }); + }); + _context3.next = 5; + return new Promise(function (res) { + server.listen(pathToSocket, function () { + res(); + }); + }); + + case 5: + server.on('connection', function () { + // console.log('server: Client connected.'); + }); + + return _context3.abrupt('return', { + path: pathToSocket, + emitter: emitter, + server: server + }); + + case 7: + case 'end': + return _context3.stop(); + } + } + }, _callee3, this); + })); + + return function createSocketEventEmitter(_x4, _x5) { + return _ref3.apply(this, arguments); + }; +}(); + +var openClientConnection = exports.openClientConnection = function () { + var _ref4 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee4(channelName, readerUuid) { + var pathToSocket, client; + return _regenerator2['default'].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + pathToSocket = socketPath(channelName, readerUuid); + client = new net.Socket(); + _context4.next = 4; + return new Promise(function (res) { + client.connect(pathToSocket, res); + }); + + case 4: + return _context4.abrupt('return', client); + + case 5: + case 'end': + return _context4.stop(); + } + } + }, _callee4, this); + })); + + return function openClientConnection(_x6, _x7) { + return _ref4.apply(this, arguments); + }; +}(); + +/** + * writes the new message to the file-system + * so other readers can find it + */ + + +var writeMessage = exports.writeMessage = function () { + var _ref5 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee5(channelName, readerUuid, messageJson) { + var time, writeObject, token, fileName, msgPath; + return _regenerator2['default'].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + time = new Date().getTime(); + writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + token = (0, _util2.randomToken)(12); + fileName = time + '_' + readerUuid + '_' + token + '.json'; + msgPath = path.join(getPaths(channelName).messages, fileName); + _context5.next = 7; + return writeFile(msgPath, JSON.stringify(writeObject)); + + case 7: + return _context5.abrupt('return', { + time: time, + uuid: readerUuid, + token: token, + path: msgPath + }); + + case 8: + case 'end': + return _context5.stop(); + } + } + }, _callee5, this); + })); + + return function writeMessage(_x8, _x9, _x10) { + return _ref5.apply(this, arguments); + }; +}(); + +/** + * returns the uuids of all readers + * @return {string[]} + */ + + +var getReadersUuids = exports.getReadersUuids = function () { + var _ref6 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee6(channelName) { + var readersPath, files; + return _regenerator2['default'].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + readersPath = getPaths(channelName).readers; + _context6.next = 3; + return readdir(readersPath); + + case 3: + files = _context6.sent; + return _context6.abrupt('return', files.map(function (file) { + return file.split('.'); + }).filter(function (split) { + return split[1] === 'json'; + }) // do not scan .socket-files + .map(function (split) { + return split[0]; + })); + + case 5: + case 'end': + return _context6.stop(); + } + } + }, _callee6, this); + })); + + return function getReadersUuids(_x11) { + return _ref6.apply(this, arguments); + }; +}(); + +var messagePath = exports.messagePath = function () { + var _ref7 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee7(channelName, time, token, writerUuid) { + var fileName, msgPath; + return _regenerator2['default'].wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + fileName = time + '_' + writerUuid + '_' + token + '.json'; + msgPath = path.join(getPaths(channelName).messages, fileName); + return _context7.abrupt('return', msgPath); + + case 3: + case 'end': + return _context7.stop(); + } + } + }, _callee7, this); + })); + + return function messagePath(_x12, _x13, _x14, _x15) { + return _ref7.apply(this, arguments); + }; +}(); + +var getAllMessages = exports.getAllMessages = function () { + var _ref8 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee8(channelName) { + var messagesPath, files; + return _regenerator2['default'].wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + messagesPath = getPaths(channelName).messages; + _context8.next = 3; + return readdir(messagesPath); + + case 3: + files = _context8.sent; + return _context8.abrupt('return', files.map(function (file) { + var fileName = file.split('.')[0]; + var split = fileName.split('_'); + + return { + path: path.join(messagesPath, file), + time: parseInt(split[0]), + senderUuid: split[1], + token: split[2] + }; + })); + + case 5: + case 'end': + return _context8.stop(); + } + } + }, _callee8, this); + })); + + return function getAllMessages(_x16) { + return _ref8.apply(this, arguments); + }; +}(); + +var readMessage = exports.readMessage = function () { + var _ref9 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee9(messageObj) { + var content; + return _regenerator2['default'].wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return readFile(messageObj.path, 'utf8'); + + case 2: + content = _context9.sent; + return _context9.abrupt('return', JSON.parse(content)); + + case 4: + case 'end': + return _context9.stop(); + } + } + }, _callee9, this); + })); + + return function readMessage(_x17) { + return _ref9.apply(this, arguments); + }; +}(); + +var cleanOldMessages = exports.cleanOldMessages = function () { + var _ref10 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee10(messageObjects, ttl) { + var olderThen; + return _regenerator2['default'].wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + olderThen = new Date().getTime() - ttl; + _context10.next = 3; + return Promise.all(messageObjects.filter(function (obj) { + return obj.time < olderThen; + }).map(function (obj) { + return unlink(obj.path)['catch'](function () { + return null; + }); + })); + + case 3: + case 'end': + return _context10.stop(); + } + } + }, _callee10, this); + })); + + return function cleanOldMessages(_x18, _x19) { + return _ref10.apply(this, arguments); + }; +}(); + +var create = exports.create = function () { + var _ref11 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee12(channelName) { + var _this = this; + + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var uuid, _ref12, _ref13, otherReaderUuids, socketEE, infoFilePath, otherReaderClients, readQueue, writeQueue, state; + + return _regenerator2['default'].wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + options = (0, _options.fillOptionsWithDefaults)(options); + + _context12.next = 3; + return ensureFoldersExist(channelName); + + case 3: + uuid = (0, _util2.randomToken)(10); + _context12.next = 6; + return Promise.all([getReadersUuids(channelName), createSocketEventEmitter(channelName, uuid), createSocketInfoFile(channelName, uuid)]); + + case 6: + _ref12 = _context12.sent; + _ref13 = (0, _slicedToArray3['default'])(_ref12, 3); + otherReaderUuids = _ref13[0]; + socketEE = _ref13[1]; + infoFilePath = _ref13[2]; + otherReaderClients = {}; + _context12.next = 14; + return Promise.all(otherReaderUuids.filter(function (readerUuid) { + return readerUuid !== uuid; + }) // not own + .map(function () { + var _ref14 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee11(readerUuid) { + var client; + return _regenerator2['default'].wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return openClientConnection(channelName, readerUuid); + + case 2: + client = _context11.sent; + + otherReaderClients[readerUuid] = client; + + case 4: + case 'end': + return _context11.stop(); + } + } + }, _callee11, _this); + })); + + return function (_x22) { + return _ref14.apply(this, arguments); + }; + }())); + + case 14: + + // ensures we do not read messages in parrallel + readQueue = new _customIdleQueue2['default'](1); + writeQueue = new _customIdleQueue2['default'](1); + state = { + channelName: channelName, + options: options, + uuid: uuid, + socketEE: socketEE, + infoFilePath: infoFilePath, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallbackTime: null, + messagesCallback: null, + readQueue: readQueue, + writeQueue: writeQueue, + otherReaderUuids: otherReaderUuids, + otherReaderClients: otherReaderClients, + // ensure if process crashes, everything is cleaned up + removeUnload: _unload2['default'].add(function () { + return close(state); + }) + }; + + // when new message comes in, we read it and emit it + + socketEE.emitter.on('data', function (data) { + var obj = JSON.parse(data); + if (obj.a === 'msg') { + handleMessagePing(state, obj.d); + return; + } + }); + + return _context12.abrupt('return', state); + + case 19: + case 'end': + return _context12.stop(); + } + } + }, _callee12, this); + })); + + return function create(_x21) { + return _ref11.apply(this, arguments); + }; +}(); + +/** + * when the socket pings, so that we now new messages came, + * run this + */ + + +var handleMessagePing = exports.handleMessagePing = function () { + var _ref15 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee14(state) { + var _this2 = this; + + var msgObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + return _regenerator2['default'].wrap(function _callee14$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + if (state.messagesCallback) { + _context15.next = 2; + break; + } + + return _context15.abrupt('return'); + + case 2: + _context15.next = 4; + return state.readQueue.requestIdlePromise(); + + case 4: + _context15.next = 6; + return state.readQueue.wrapCall((0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee13() { + var messages, useMessages, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step; + + return _regenerator2['default'].wrap(function _callee13$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + messages = void 0; + + if (msgObj) { + _context14.next = 7; + break; + } + + _context14.next = 4; + return getAllMessages(state.channelName); + + case 4: + messages = _context14.sent; + _context14.next = 8; + break; + + case 7: + // get single message + messages = [getSingleMessage(state.channelName, msgObj)]; + + case 8: + useMessages = messages.filter(function (msgObj) { + return msgObj.senderUuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.token); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + if (!state.messagesCallback) { + _context14.next = 35; + break; + } + + _iteratorNormalCompletion = true; + _didIteratorError = false; + _iteratorError = undefined; + _context14.prev = 13; + _loop = /*#__PURE__*/_regenerator2['default'].mark(function _loop() { + var msgObj, content; + return _regenerator2['default'].wrap(function _loop$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + msgObj = _step.value; + _context13.next = 3; + return readMessage(msgObj); + + case 3: + content = _context13.sent; + + state.emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.token); + }, state.options.node.ttl * 2); + + if (state.messagesCallback) { + state.messagesCallback(content.data); + } + + case 7: + case 'end': + return _context13.stop(); + } + } + }, _loop, _this2); + }); + _iterator = useMessages[Symbol.iterator](); + + case 16: + if (_iteratorNormalCompletion = (_step = _iterator.next()).done) { + _context14.next = 21; + break; + } + + return _context14.delegateYield(_loop(), 't0', 18); + + case 18: + _iteratorNormalCompletion = true; + _context14.next = 16; + break; + + case 21: + _context14.next = 27; + break; + + case 23: + _context14.prev = 23; + _context14.t1 = _context14['catch'](13); + _didIteratorError = true; + _iteratorError = _context14.t1; + + case 27: + _context14.prev = 27; + _context14.prev = 28; + + if (!_iteratorNormalCompletion && _iterator['return']) { + _iterator['return'](); + } + + case 30: + _context14.prev = 30; + + if (!_didIteratorError) { + _context14.next = 33; + break; + } + + throw _iteratorError; + + case 33: + return _context14.finish(30); + + case 34: + return _context14.finish(27); + + case 35: + case 'end': + return _context14.stop(); + } + } + }, _callee13, _this2, [[13, 23, 27, 35], [28,, 30, 34]]); + }))); + + case 6: + case 'end': + return _context15.stop(); + } + } + }, _callee14, this); + })); + + return function handleMessagePing(_x24) { + return _ref15.apply(this, arguments); + }; +}(); + +var refreshReaderClients = exports.refreshReaderClients = function () { + var _ref17 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee16(channelState) { + var _this3 = this; + + var otherReaders; + return _regenerator2['default'].wrap(function _callee16$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return getReadersUuids(channelState.channelName); + + case 2: + otherReaders = _context17.sent; + + + // remove subscriptions to closed readers + Object.keys(channelState.otherReaderClients).filter(function (readerUuid) { + return !otherReaders.includes(readerUuid); + }).forEach(function (readerUuid) { + channelState.otherReaderClients[readerUuid].close(); + delete channelState.otherReaderClients[readerUuid]; + }); + + _context17.next = 6; + return Promise.all(otherReaders.filter(function (readerUuid) { + return readerUuid !== channelState.uuid; + }) // not own + .filter(function (readerUuid) { + return !channelState.otherReaderClients[readerUuid]; + }) // not already has client + .map(function () { + var _ref18 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee15(readerUuid) { + var client; + return _regenerator2['default'].wrap(function _callee15$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return openClientConnection(channelState.channelName, readerUuid); + + case 2: + client = _context16.sent; + + channelState.otherReaderClients[readerUuid] = client; + + case 4: + case 'end': + return _context16.stop(); + } + } + }, _callee15, _this3); + })); + + return function (_x26) { + return _ref18.apply(this, arguments); + }; + }())); + + case 6: + case 'end': + return _context17.stop(); + } + } + }, _callee16, this); + })); + + return function refreshReaderClients(_x25) { + return _ref17.apply(this, arguments); + }; +}(); + +var postMessage = exports.postMessage = function () { + var _ref19 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee18(channelState, messageJson) { + var _this4 = this; + + return _regenerator2['default'].wrap(function _callee18$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + _context19.next = 2; + return channelState.writeQueue.requestIdlePromise(); + + case 2: + _context19.next = 4; + return channelState.writeQueue.wrapCall((0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee17() { + var msgObj, pingObj, messages; + return _regenerator2['default'].wrap(function _callee17$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return refreshReaderClients(channelState); + + case 2: + _context18.next = 4; + return writeMessage(channelState.channelName, channelState.uuid, messageJson); + + case 4: + msgObj = _context18.sent; + + + // ping other readers + pingObj = { + a: 'msg', + d: { + t: msgObj.time, + u: msgObj.uuid, + to: msgObj.token + } + }; + _context18.next = 8; + return Promise.all(Object.values(channelState.otherReaderClients).map(function (client) { + return client.write(JSON.stringify(pingObj)); + })); + + case 8: + if (!((0, _util2.randomInt)(0, 10) === 0)) { + _context18.next = 14; + break; + } + + _context18.next = 11; + return getAllMessages(channelState.channelName); + + case 11: + messages = _context18.sent; + _context18.next = 14; + return cleanOldMessages(messages, channelState.options.node.ttl); + + case 14: + case 'end': + return _context18.stop(); + } + } + }, _callee17, _this4); + })) + + // emit to own eventEmitter + // channelState.socketEE.emitter.emit('data', JSON.parse(JSON.stringify(messageJson))); + ); + + case 4: + case 'end': + return _context19.stop(); + } + } + }, _callee18, this); + })); + + return function postMessage(_x27, _x28) { + return _ref19.apply(this, arguments); + }; +}(); + +var close = exports.close = function () { + var _ref21 = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee19(channelState) { + return _regenerator2['default'].wrap(function _callee19$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + channelState.removeUnload(); + channelState.socketEE.server.close(); + channelState.socketEE.emitter.removeAllListeners(); + channelState.readQueue.clear(); + channelState.writeQueue.clear(); + + _context20.next = 7; + return unlink(channelState.infoFilePath); + + case 7: + + Object.values(channelState.otherReaderClients).forEach(function (client) { + return client.destroy(); + }); + + case 8: + case 'end': + return _context20.stop(); + } + } + }, _callee19, this); + })); + + return function close(_x30) { + return _ref21.apply(this, arguments); + }; +}(); + +exports.cleanPipeName = cleanPipeName; +exports.getPaths = getPaths; +exports.socketPath = socketPath; +exports.socketInfoPath = socketInfoPath; +exports.getSingleMessage = getSingleMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _util = require('util'); + +var util = _interopRequireWildcard(_util); + +var _fs = require('fs'); + +var fs = _interopRequireWildcard(_fs); + +var _os = require('os'); + +var os = _interopRequireWildcard(_os); + +var _events = require('events'); + +var events = _interopRequireWildcard(_events); + +var _net = require('net'); + +var net = _interopRequireWildcard(_net); + +var _path = require('path'); + +var path = _interopRequireWildcard(_path); + +var _jsSha = require('js-sha3'); + +var _detectNode = require('detect-node'); + +var _detectNode2 = _interopRequireDefault(_detectNode); + +var _customIdleQueue = require('custom-idle-queue'); + +var _customIdleQueue2 = _interopRequireDefault(_customIdleQueue); + +var _unload = require('unload'); + +var _unload2 = _interopRequireDefault(_unload); + +var _options = require('../options'); + +var _util2 = require('../util'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/** + * windows sucks, so we have handle windows-type of socket-paths + * @link https://gist.github.com/domenic/2790533#gistcomment-331356 + */ +/** + * this method is used in nodejs-environments. + * The ipc is handled via sockets and file-writes to the tmp-folder + */ + +function cleanPipeName(str) { + if (process.platform === 'win32' && !str.startsWith('\\\\.\\pipe\\')) { + str = str.replace(/^\//, ''); + str = str.replace(/\//g, '-'); + return '\\\\.\\pipe\\' + str; + } else { + return str; + } +}; + +var mkdir = util.promisify(fs.mkdir); +var writeFile = util.promisify(fs.writeFile); +var readFile = util.promisify(fs.readFile); +var unlink = util.promisify(fs.unlink); +var readdir = util.promisify(fs.readdir); + +var TMP_FOLDER_NAME = 'pubkey.broadcast-channel'; + +function getPaths(channelName) { + var folderPathBase = path.join(os.tmpdir(), TMP_FOLDER_NAME); + var channelPathBase = path.join(os.tmpdir(), TMP_FOLDER_NAME, (0, _jsSha.sha3_224)(channelName) // use hash incase of strange characters + ); + var folderPathReaders = path.join(channelPathBase, 'readers'); + var folderPathMessages = path.join(channelPathBase, 'messages'); + + return { + base: folderPathBase, + channelBase: channelPathBase, + readers: folderPathReaders, + messages: folderPathMessages + }; +} + +; + +function socketPath(channelName, readerUuid) { + + var paths = getPaths(channelName); + var socketPath = path.join(paths.readers, readerUuid + '.s'); + return cleanPipeName(socketPath); +} + +function socketInfoPath(channelName, readerUuid) { + var paths = getPaths(channelName); + var socketPath = path.join(paths.readers, readerUuid + '.json'); + return socketPath; +}function getSingleMessage(channelName, msgObj) { + var messagesPath = getPaths(channelName).messages; + + return { + path: path.join(messagesPath, msgObj.t + '_' + msgObj.u + '_' + msgObj.to + '.json'), + time: msgObj.t, + senderUuid: msgObj.u, + token: msgObj.to + }; +} + +var type = exports.type = 'node'; + +function onMessage(channelState, fn) { + var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Date().getTime(); + + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + handleMessagePing(channelState); +} + +function canBeUsed() { + return _detectNode2['default']; +}; \ No newline at end of file diff --git a/dist/lib/options.js b/dist/lib/options.js new file mode 100644 index 00000000..b9f7282e --- /dev/null +++ b/dist/lib/options.js @@ -0,0 +1,29 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fillOptionsWithDefaults = fillOptionsWithDefaults; +function fillOptionsWithDefaults(options) { + if (!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} \ No newline at end of file diff --git a/dist/lib/util.js b/dist/lib/util.js new file mode 100644 index 00000000..aed6bf8f --- /dev/null +++ b/dist/lib/util.js @@ -0,0 +1,42 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isPromise = isPromise; +exports.sleep = sleep; +exports.randomInt = randomInt; +exports.randomToken = randomToken; +/** + * returns true if the given object is a promise + */ +function isPromise(obj) { + if (obj && typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +function sleep(time) { + if (!time) time = 0; + return new Promise(function (res) { + return setTimeout(res, time); + }); +} + +function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +function randomToken(length) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + }return text; +} \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html new file mode 100644 index 00000000..3f670f6e --- /dev/null +++ b/docs/iframe.html @@ -0,0 +1,8 @@ + + + +
+ + + + \ No newline at end of file diff --git a/docs/iframe.js b/docs/iframe.js new file mode 100644 index 00000000..02fa503b --- /dev/null +++ b/docs/iframe.js @@ -0,0 +1,8422 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(function (o) { + return o !== obj; + }); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + var listenerFn = function listenerFn(msgObj) { + channel._addEventListeners[msgObj.type].forEach(function (obj) { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + var time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(function () { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + }); + } else { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + var time = new Date().getTime() - 5; + channel.method.onMessage(channel._state, null, time); + } +} + +exports['default'] = BroadcastChannel; +},{"./method-chooser.js":3,"./options.js":7,"./util.js":8}],3:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.chooseMethod = chooseMethod; +var isNode = require('detect-node'); + +var NativeMethod = require('./methods/native.js'); +var IndexeDbMethod = require('./methods/indexed-db.js'); +var LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +var METHODS = [NativeMethod, // fastest +IndexeDbMethod, LocalstorageMethod]; + +var REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + var NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + +function chooseMethod(options) { + // directly chosen + if (options.type) { + var ret = METHODS.find(function (m) { + return m.type === options.type; + }); + if (!ret) throw new Error('method-type ' + options.type + ' not found');else return ret; + } + + var chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(function (m) { + return m.type !== 'idb'; + }); + } + + var useMethod = chooseMethods.find(function (method) { + return method.canBeUsed(); + }); + if (!useMethod) throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(function (m) { + return m.type; + })));else return useMethod; +} +},{"./methods/indexed-db.js":4,"./methods/localstorage.js":5,"./methods/native.js":6,"detect-node":335}],4:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getIdb = getIdb; +exports.createDatabase = createDatabase; +exports.writeMessage = writeMessage; +exports.getAllMessages = getAllMessages; +exports.getMessagesHigherThen = getMessagesHigherThen; +exports.removeMessageById = removeMessageById; +exports.getOldMessages = getOldMessages; +exports.cleanOldMessages = cleanOldMessages; +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _util = require('../util.js'); + +var _options = require('../options'); + +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +var isNode = require('detect-node'); + +var DB_PREFIX = 'pubkey.broadcast-channel-0-'; +var OBJECT_STORE_ID = 'messages'; + +var type = exports.type = 'idb'; + +function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +function createDatabase(channelName) { + var IndexedDB = getIdb(); + + // create table + var dbName = DB_PREFIX + channelName; + var openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = function (ev) { + var db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + var dbPromise = new Promise(function (res, rej) { + openRequest.onerror = function (ev) { + return rej(ev); + }; + openRequest.onsuccess = function () { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +function writeMessage(db, readerUuid, messageJson) { + var time = new Date().getTime(); + var writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + + var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise(function (res, rej) { + transaction.oncomplete = function () { + return res(); + }; + transaction.onerror = function (ev) { + return rej(ev); + }; + + var objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +function getAllMessages(db) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function getMessagesHigherThen(db, lastCursorId) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(function (res) { + objectStore.openCursor(keyRangeValue).onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function removeMessageById(db, id) { + var request = db.transaction([OBJECT_STORE_ID], 'readwrite').objectStore(OBJECT_STORE_ID)['delete'](id); + return new Promise(function (res) { + request.onsuccess = function () { + return res(); + }; + }); +} + +function getOldMessages(db, ttl) { + var olderThen = new Date().getTime() - ttl; + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + var msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl).then(function (tooOld) { + return Promise.all(tooOld.map(function (msgObj) { + return removeMessageById(db, msgObj.id); + })); + }); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + + var uuid = (0, _util.randomToken)(10); + + return createDatabase(channelName).then(function (db) { + var state = { + closed: false, + lastCursorId: 0, + channelName: channelName, + options: options, + uuid: uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db: db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state).then(function () { + return (0, _util.sleep)(state.options.idb.fallbackInterval); + }).then(function () { + return _readLoop(state); + }); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId).then(function (newerMessages) { + var useMessages = newerMessages.map(function (msgObj) { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }).filter(function (msgObj) { + return msgObj.uuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.id); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + + useMessages.forEach(function (msgObj) { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.id); + }, state.options.idb.ttl * 2); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +function postMessage(channelState, messageJson) { + return writeMessage(channelState.db, channelState.uuid, messageJson).then(function () { + if ((0, _util.randomInt)(0, 10) === 0) { + /* await (do not await) */cleanOldMessages(channelState.db, channelState.options.idb.ttl); + } + }); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +function canBeUsed() { + if (isNode) return false; + var idb = getIdb(); + + if (!idb) return false; + return true; +}; +},{"../options":7,"../util.js":8,"detect-node":335}],5:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getLocalStorage = getLocalStorage; +exports.storageKey = storageKey; +exports.postMessage = postMessage; +exports.addStorageEventListener = addStorageEventListener; +exports.removeStorageEventListener = removeStorageEventListener; +exports.create = create; +exports.close = close; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _options = require('../options'); + +var _util = require('../util'); + +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +var isNode = require('detect-node'); + +var KEY_PREFIX = 'pubkey.broadcastChannel-'; +var type = exports.type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +function getLocalStorage() { + var localStorage = void 0; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +function postMessage(channelState, messageJson) { + return new Promise(function (res) { + (0, _util.sleep)().then(function () { + var key = storageKey(channelState.channelName); + var writeObj = { + token: (0, _util.randomToken)(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + var value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + var ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +function addStorageEventListener(channelName, fn) { + var key = storageKey(channelName); + var listener = function listener(ev) { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + var startTime = new Date().getTime(); + var uuid = (0, _util.randomToken)(10); + + // contains all messages that have been emitted before + var emittedMessagesIds = new Set(); + + var state = { + startTime: startTime, + channelName: channelName, + options: options, + uuid: uuid, + emittedMessagesIds: emittedMessagesIds + }; + + state.listener = addStorageEventListener(channelName, function (msgObj) { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return emittedMessagesIds['delete'](msgObj.token); + }, options.localstorage.removeTimeout); + state.messagesCallback(msgObj.data); + }); + + return state; +} + +function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + var ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; +},{"../options":7,"../util":8,"detect-node":335}],6:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; +var isNode = require('detect-node'); + +var type = exports.type = 'native'; + +function create(channelName, options) { + if (!options) options = {}; + var state = { + channelName: channelName, + options: options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = function (msg) { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; +},{"detect-node":335}],7:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fillOptionsWithDefaults = fillOptionsWithDefaults; +function fillOptionsWithDefaults(options) { + if (!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} +},{}],8:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isPromise = isPromise; +exports.sleep = sleep; +exports.randomInt = randomInt; +exports.randomToken = randomToken; +/** + * returns true if the given object is a promise + */ +function isPromise(obj) { + if (obj && typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +function sleep(time) { + if (!time) time = 0; + return new Promise(function (res) { + return setTimeout(res, time); + }); +} + +function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +function randomToken(length) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + }return text; +} +},{}],9:[function(require,module,exports){ +(function (global){ +"use strict"; + +require("core-js/shim"); + +require("regenerator-runtime/runtime"); + +require("core-js/fn/regexp/escape"); + +if (global._babelPolyfill) { + throw new Error("only one instance of babel-polyfill is allowed"); +} +global._babelPolyfill = true; + +var DEFINE_PROPERTY = "defineProperty"; +function define(O, key, value) { + O[key] || Object[DEFINE_PROPERTY](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 : {}) +},{"core-js/fn/regexp/escape":11,"core-js/shim":334,"regenerator-runtime/runtime":10}],10:[function(require,module,exports){ +(function (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 Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + 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 and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.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() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + 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; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + 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 + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return 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; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + 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 + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // 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(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.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; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + 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; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + 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; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + 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.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + 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 = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + 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 + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + 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,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],11:[function(require,module,exports){ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; + +},{"../../modules/_core":32,"../../modules/core.regexp.escape":137}],12:[function(require,module,exports){ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + +},{}],13:[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":27}],14:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + +},{"./_hide":51,"./_wks":135}],15:[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; +}; + +},{}],16:[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":60}],17:[function(require,module,exports){ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var 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-absolute-index":120,"./_to-length":124,"./_to-object":125}],18:[function(require,module,exports){ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + +},{"./_to-absolute-index":120,"./_to-length":124,"./_to-object":125}],19:[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":48}],20:[function(require,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +},{"./_to-absolute-index":120,"./_to-iobject":123,"./_to-length":124}],21:[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'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var 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":24,"./_ctx":34,"./_iobject":56,"./_to-length":124,"./_to-object":125}],22:[function(require,module,exports){ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var 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":12,"./_iobject":56,"./_to-length":124,"./_to-object":125}],23:[function(require,module,exports){ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + 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 C === undefined ? Array : C; +}; + +},{"./_is-array":58,"./_is-object":60,"./_wks":135}],24:[function(require,module,exports){ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + +},{"./_array-species-constructor":23}],25:[function(require,module,exports){ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + 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); + var 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":12,"./_invoke":55,"./_is-object":60}],26:[function(require,module,exports){ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var 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":27,"./_wks":135}],27:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +},{}],28:[function(require,module,exports){ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var 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._t = NAME; // collection type + 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 = validate(this, NAME), 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 = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var 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 */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var 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(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var 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 = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var 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":15,"./_ctx":34,"./_descriptors":38,"./_for-of":48,"./_iter-define":64,"./_iter-step":66,"./_meta":74,"./_object-create":79,"./_object-dp":80,"./_redefine-all":99,"./_set-species":106,"./_validate-collection":132}],29:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var 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":19,"./_classof":26}],30:[function(require,module,exports){ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var 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._t = NAME; // collection type + 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(validate(this, NAME))['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(validate(this, NAME)).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":15,"./_an-object":16,"./_array-methods":21,"./_for-of":48,"./_has":50,"./_is-object":60,"./_meta":74,"./_redefine-all":99,"./_validate-collection":132}],31:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var 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 + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var 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":15,"./_export":42,"./_fails":44,"./_for-of":48,"./_global":49,"./_inherit-if-required":54,"./_is-object":60,"./_iter-detect":65,"./_meta":74,"./_redefine":100,"./_redefine-all":99,"./_set-to-string-tag":107}],32:[function(require,module,exports){ +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + +},{}],33:[function(require,module,exports){ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +},{"./_object-dp":80,"./_property-desc":98}],34:[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":12}],35:[function(require,module,exports){ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var 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'; +} : $toISOString; + +},{"./_fails":44}],36:[function(require,module,exports){ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + +},{"./_an-object":16,"./_to-primitive":126}],37:[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; +}; + +},{}],38:[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":44}],39:[function(require,module,exports){ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + +},{"./_global":49,"./_is-object":60}],40:[function(require,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +},{}],41:[function(require,module,exports){ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + +},{"./_object-gops":86,"./_object-keys":89,"./_object-pie":90}],42:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var 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":32,"./_ctx":34,"./_global":49,"./_hide":51,"./_redefine":100}],43:[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":135}],44:[function(require,module,exports){ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +},{}],45:[function(require,module,exports){ +'use strict'; +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var 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":37,"./_fails":44,"./_hide":51,"./_redefine":100,"./_wks":135}],46:[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); + var 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":16}],47:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + +},{"./_ctx":34,"./_is-array":58,"./_is-object":60,"./_to-length":124,"./_wks":135}],48:[function(require,module,exports){ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + 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++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +},{"./_an-object":16,"./_ctx":34,"./_is-array-iter":57,"./_iter-call":62,"./_to-length":124,"./core.get-iterator-method":136}],49:[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 + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + +},{}],50:[function(require,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +},{}],51:[function(require,module,exports){ +var dP = require('./_object-dp'); +var 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":38,"./_object-dp":80,"./_property-desc":98}],52:[function(require,module,exports){ +var document = require('./_global').document; +module.exports = document && document.documentElement; + +},{"./_global":49}],53:[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":38,"./_dom-create":39,"./_fails":44}],54:[function(require,module,exports){ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + +},{"./_is-object":60,"./_set-proto":105}],55:[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); +}; + +},{}],56:[function(require,module,exports){ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +},{"./_cof":27}],57:[function(require,module,exports){ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +},{"./_iterators":67,"./_wks":135}],58:[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":27}],59:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + +},{"./_is-object":60}],60:[function(require,module,exports){ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +},{}],61:[function(require,module,exports){ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + +},{"./_cof":27,"./_is-object":60,"./_wks":135}],62:[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":16}],63:[function(require,module,exports){ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var 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":51,"./_object-create":79,"./_property-desc":98,"./_set-to-string-tag":107,"./_wks":135}],64:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var 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'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') 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":42,"./_hide":51,"./_iter-create":63,"./_iterators":67,"./_library":68,"./_object-gpo":87,"./_redefine":100,"./_set-to-string-tag":107,"./_wks":135}],65:[function(require,module,exports){ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + 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]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + +},{"./_wks":135}],66:[function(require,module,exports){ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + +},{}],67:[function(require,module,exports){ +module.exports = {}; + +},{}],68:[function(require,module,exports){ +module.exports = false; + +},{}],69:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + +},{}],70:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + +},{"./_math-sign":73}],71:[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); +}; + +},{}],72:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + +},{}],73:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + +},{}],74:[function(require,module,exports){ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var 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":44,"./_has":50,"./_is-object":60,"./_object-dp":80,"./_uid":130}],75:[function(require,module,exports){ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var 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); + var 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":42,"./_shared":109,"./es6.map":167,"./es6.weak-map":273}],76:[function(require,module,exports){ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var 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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.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); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + +},{"./_cof":27,"./_global":49,"./_task":119}],77:[function(require,module,exports){ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(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); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + +},{"./_a-function":12}],78:[function(require,module,exports){ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var 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); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + +},{"./_fails":44,"./_iobject":56,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_to-object":125}],79:[function(require,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var 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'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var 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(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + +},{"./_an-object":16,"./_dom-create":39,"./_enum-bug-keys":40,"./_html":52,"./_object-dps":81,"./_shared-key":108}],80:[function(require,module,exports){ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + +},{"./_an-object":16,"./_descriptors":38,"./_ie8-dom-define":53,"./_to-primitive":126}],81:[function(require,module,exports){ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +},{"./_an-object":16,"./_descriptors":38,"./_object-dp":80,"./_object-keys":89}],82:[function(require,module,exports){ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); + +},{"./_fails":44,"./_global":49,"./_library":68}],83:[function(require,module,exports){ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var 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":38,"./_has":50,"./_ie8-dom-define":53,"./_object-pie":90,"./_property-desc":98,"./_to-iobject":123,"./_to-primitive":126}],84:[function(require,module,exports){ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(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":85,"./_to-iobject":123}],85:[function(require,module,exports){ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + +},{"./_enum-bug-keys":40,"./_object-keys-internal":88}],86:[function(require,module,exports){ +exports.f = Object.getOwnPropertySymbols; + +},{}],87:[function(require,module,exports){ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var 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":50,"./_shared-key":108,"./_to-object":125}],88:[function(require,module,exports){ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var 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":20,"./_has":50,"./_shared-key":108,"./_to-iobject":123}],89:[function(require,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + +},{"./_enum-bug-keys":40,"./_object-keys-internal":88}],90:[function(require,module,exports){ +exports.f = {}.propertyIsEnumerable; + +},{}],91:[function(require,module,exports){ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + +},{"./_core":32,"./_export":42,"./_fails":44}],92:[function(require,module,exports){ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + +},{"./_object-keys":89,"./_object-pie":90,"./_to-iobject":123}],93:[function(require,module,exports){ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + +},{"./_an-object":16,"./_global":49,"./_object-gopn":85,"./_object-gops":86}],94:[function(require,module,exports){ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + +},{"./_global":49,"./_string-trim":117,"./_string-ws":118}],95:[function(require,module,exports){ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var 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":49,"./_string-trim":117,"./_string-ws":118}],96:[function(require,module,exports){ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + +},{}],97:[function(require,module,exports){ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + +},{"./_an-object":16,"./_is-object":60,"./_new-promise-capability":77}],98:[function(require,module,exports){ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +},{}],99:[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":100}],100:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var 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":32,"./_global":49,"./_has":50,"./_hide":51,"./_uid":130}],101:[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); + }; +}; + +},{}],102:[function(require,module,exports){ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + +},{}],103:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + +},{"./_a-function":12,"./_ctx":34,"./_export":42,"./_for-of":48}],104:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + +},{"./_export":42}],105:[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'); +var 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":16,"./_ctx":34,"./_is-object":60,"./_object-gopd":83}],106:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var 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":38,"./_global":49,"./_object-dp":80,"./_wks":135}],107:[function(require,module,exports){ +var def = require('./_object-dp').f; +var has = require('./_has'); +var 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":50,"./_object-dp":80,"./_wks":135}],108:[function(require,module,exports){ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + +},{"./_shared":109,"./_uid":130}],109:[function(require,module,exports){ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + +},{"./_core":32,"./_global":49,"./_library":68}],110:[function(require,module,exports){ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +},{"./_a-function":12,"./_an-object":16,"./_wks":135}],111:[function(require,module,exports){ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + +},{"./_fails":44}],112:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var 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":37,"./_to-integer":122}],113:[function(require,module,exports){ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var 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":37,"./_is-regexp":61}],114:[function(require,module,exports){ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +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":37,"./_export":42,"./_fails":44}],115:[function(require,module,exports){ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var 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":37,"./_string-repeat":116,"./_to-length":124}],116:[function(require,module,exports){ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var 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":37,"./_to-integer":122}],117:[function(require,module,exports){ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var 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":37,"./_export":42,"./_fails":44,"./_string-ws":118}],118:[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'; + +},{}],119:[function(require,module,exports){ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + 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 = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + 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)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(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":27,"./_ctx":34,"./_dom-create":39,"./_global":49,"./_html":52,"./_invoke":55}],120:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +},{"./_to-integer":122}],121:[function(require,module,exports){ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + +},{"./_to-integer":122,"./_to-length":124}],122:[function(require,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +},{}],123:[function(require,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; + +},{"./_defined":37,"./_iobject":56}],124:[function(require,module,exports){ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +},{"./_to-integer":122}],125:[function(require,module,exports){ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; + +},{"./_defined":37}],126:[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":60}],127:[function(require,module,exports){ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + 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; + var length = list.length; + var 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); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var 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; + var length = arguments.length; + var 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; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + 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); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var 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; + } 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$, { + slice: $slice, + 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]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var 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; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + 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 (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // 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(toIndex(data)); + 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]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $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 + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $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); + }; +} else module.exports = function () { /* empty */ }; + +},{"./_an-instance":15,"./_array-copy-within":17,"./_array-fill":18,"./_array-includes":20,"./_array-methods":21,"./_classof":26,"./_ctx":34,"./_descriptors":38,"./_export":42,"./_fails":44,"./_global":49,"./_has":50,"./_hide":51,"./_is-array-iter":57,"./_is-object":60,"./_iter-detect":65,"./_iterators":67,"./_library":68,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_object-gpo":87,"./_property-desc":98,"./_redefine-all":99,"./_set-species":106,"./_species-constructor":110,"./_to-absolute-index":120,"./_to-index":121,"./_to-integer":122,"./_to-length":124,"./_to-object":125,"./_to-primitive":126,"./_typed":129,"./_typed-buffer":128,"./_uid":130,"./_wks":135,"./core.get-iterator-method":136,"./es6.array.iterator":148}],128:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + 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; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var 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); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new 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]; + var 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 () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(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)); + var $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":15,"./_array-fill":18,"./_descriptors":38,"./_fails":44,"./_global":49,"./_hide":51,"./_library":68,"./_object-dp":80,"./_object-gopn":85,"./_redefine-all":99,"./_set-to-string-tag":107,"./_to-index":121,"./_to-integer":122,"./_to-length":124,"./_typed":129}],129:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var 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":49,"./_hide":51,"./_uid":130}],130:[function(require,module,exports){ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +},{}],131:[function(require,module,exports){ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + +},{"./_global":49}],132:[function(require,module,exports){ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + +},{"./_is-object":60}],133:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + +},{"./_core":32,"./_global":49,"./_library":68,"./_object-dp":80,"./_wks-ext":134}],134:[function(require,module,exports){ +exports.f = require('./_wks'); + +},{"./_wks":135}],135:[function(require,module,exports){ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +},{"./_global":49,"./_shared":109,"./_uid":130}],136:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +},{"./_classof":26,"./_core":32,"./_iterators":67,"./_wks":135}],137:[function(require,module,exports){ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + +},{"./_export":42,"./_replacer":101}],138:[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":14,"./_array-copy-within":17,"./_export":42}],139:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],140:[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":14,"./_array-fill":18,"./_export":42}],141:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],142:[function(require,module,exports){ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var 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":14,"./_array-methods":21,"./_export":42}],143:[function(require,module,exports){ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var 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":14,"./_array-methods":21,"./_export":42}],144:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var 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":21,"./_export":42,"./_strict-method":111}],145:[function(require,module,exports){ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var 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); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var 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++) { + createProperty(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++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + +},{"./_create-property":33,"./_ctx":34,"./_export":42,"./_is-array-iter":57,"./_iter-call":62,"./_iter-detect":65,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":136}],146:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + +},{"./_array-includes":20,"./_export":42,"./_strict-method":111}],147:[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":42,"./_is-array":58}],148:[function(require,module,exports){ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var 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; + var kind = this._k; + var 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":14,"./_iter-define":64,"./_iter-step":66,"./_iterators":67,"./_to-iobject":123}],149:[function(require,module,exports){ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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":42,"./_iobject":56,"./_strict-method":111,"./_to-iobject":123}],150:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var 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 || 0; + return -1; + } +}); + +},{"./_export":42,"./_strict-method":111,"./_to-integer":122,"./_to-iobject":123,"./_to-length":124}],151:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],152:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + +},{"./_create-property":33,"./_export":42,"./_fails":44}],153:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":22,"./_export":42,"./_strict-method":111}],154:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":22,"./_export":42,"./_strict-method":111}],155:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var 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); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + +},{"./_cof":27,"./_export":42,"./_fails":44,"./_html":52,"./_to-absolute-index":120,"./_to-length":124}],156:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],157:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var 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":12,"./_export":42,"./_fails":44,"./_strict-method":111,"./_to-object":125}],158:[function(require,module,exports){ +require('./_set-species')('Array'); + +},{"./_set-species":106}],159:[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":42}],160:[function(require,module,exports){ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + +},{"./_date-to-iso-string":35,"./_export":42}],161:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var 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', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + +},{"./_export":42,"./_fails":44,"./_to-object":125,"./_to-primitive":126}],162:[function(require,module,exports){ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); + +},{"./_date-to-primitive":36,"./_hide":51,"./_wks":135}],163:[function(require,module,exports){ +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + require('./_redefine')(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + +},{"./_redefine":100}],164:[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":25,"./_export":42}],165:[function(require,module,exports){ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var 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":60,"./_object-dp":80,"./_object-gpo":87,"./_wks":135}],166:[function(require,module,exports){ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + +},{"./_descriptors":38,"./_object-dp":80}],167:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 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(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + +},{"./_collection":31,"./_collection-strong":28,"./_validate-collection":132}],168:[function(require,module,exports){ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), '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":42,"./_math-log1p":71}],169:[function(require,module,exports){ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + +},{"./_export":42}],170:[function(require,module,exports){ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + +},{"./_export":42}],171:[function(require,module,exports){ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + +},{"./_export":42,"./_math-sign":73}],172:[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":42}],173:[function(require,module,exports){ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + +},{"./_export":42}],174:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + +},{"./_export":42,"./_math-expm1":69}],175:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); + +},{"./_export":42,"./_math-fround":70}],176:[function(require,module,exports){ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var 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":42}],177:[function(require,module,exports){ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $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; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + +},{"./_export":42,"./_fails":44}],178:[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.LOG10E; + } +}); + +},{"./_export":42}],179:[function(require,module,exports){ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); + +},{"./_export":42,"./_math-log1p":71}],180:[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":42}],181:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); + +},{"./_export":42,"./_math-sign":73}],182:[function(require,module,exports){ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var 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":42,"./_fails":44,"./_math-expm1":69}],183:[function(require,module,exports){ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + +},{"./_export":42,"./_math-expm1":69}],184:[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":42}],185:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; +var 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); + var 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; + var 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":27,"./_descriptors":38,"./_fails":44,"./_global":49,"./_has":50,"./_inherit-if-required":54,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_redefine":100,"./_string-trim":117,"./_to-primitive":126}],186:[function(require,module,exports){ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + +},{"./_export":42}],187:[function(require,module,exports){ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + +},{"./_export":42,"./_global":49}],188:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); + +},{"./_export":42,"./_is-integer":59}],189:[function(require,module,exports){ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + +},{"./_export":42}],190:[function(require,module,exports){ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + +},{"./_export":42,"./_is-integer":59}],191:[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":42}],192:[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":42}],193:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + +},{"./_export":42,"./_parse-float":94}],194:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + +},{"./_export":42,"./_parse-int":95}],195:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var 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; + var 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.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + 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":13,"./_export":42,"./_fails":44,"./_string-repeat":116,"./_to-integer":122}],196:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.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":13,"./_export":42,"./_fails":44}],197:[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":42,"./_object-assign":78}],198:[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":42,"./_object-create":79}],199:[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":38,"./_export":42,"./_object-dps":81}],200:[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":38,"./_export":42,"./_object-dp":80}],201:[function(require,module,exports){ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],202:[function(require,module,exports){ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + +},{"./_object-gopd":83,"./_object-sap":91,"./_to-iobject":123}],203:[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":84,"./_object-sap":91}],204:[function(require,module,exports){ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + +},{"./_object-gpo":87,"./_object-sap":91,"./_to-object":125}],205:[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":60,"./_object-sap":91}],206:[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":60,"./_object-sap":91}],207:[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":60,"./_object-sap":91}],208:[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":42,"./_same-value":102}],209:[function(require,module,exports){ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + +},{"./_object-keys":89,"./_object-sap":91,"./_to-object":125}],210:[function(require,module,exports){ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],211:[function(require,module,exports){ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],212:[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":42,"./_set-proto":105}],213:[function(require,module,exports){ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + +},{"./_classof":26,"./_redefine":100,"./_wks":135}],214:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + +},{"./_export":42,"./_parse-float":94}],215:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + +},{"./_export":42,"./_parse-int":95}],216:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var 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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = 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 (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +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; + var 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); + } + }; + // eslint-disable-next-line no-unused-vars + 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); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$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); + var $$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) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$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; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var 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 (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + +},{"./_a-function":12,"./_an-instance":15,"./_classof":26,"./_core":32,"./_ctx":34,"./_export":42,"./_for-of":48,"./_global":49,"./_is-object":60,"./_iter-detect":65,"./_library":68,"./_microtask":76,"./_new-promise-capability":77,"./_perform":96,"./_promise-resolve":97,"./_redefine-all":99,"./_set-species":106,"./_set-to-string-tag":107,"./_species-constructor":110,"./_task":119,"./_user-agent":131,"./_wks":135}],217:[function(require,module,exports){ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + +},{"./_a-function":12,"./_an-object":16,"./_export":42,"./_fails":44,"./_global":49}],218:[function(require,module,exports){ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (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; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + +},{"./_a-function":12,"./_an-object":16,"./_bind":25,"./_export":42,"./_fails":44,"./_global":49,"./_is-object":60,"./_object-create":79}],219:[function(require,module,exports){ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + 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":16,"./_export":42,"./_fails":44,"./_object-dp":80,"./_to-primitive":126}],220:[function(require,module,exports){ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var 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":16,"./_export":42,"./_object-gopd":83}],221:[function(require,module,exports){ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var 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":16,"./_export":42,"./_iter-create":63}],222:[function(require,module,exports){ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + +},{"./_an-object":16,"./_export":42,"./_object-gopd":83}],223:[function(require,module,exports){ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + +},{"./_an-object":16,"./_export":42,"./_object-gpo":87}],224:[function(require,module,exports){ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var 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":16,"./_export":42,"./_has":50,"./_is-object":60,"./_object-gopd":83,"./_object-gpo":87}],225:[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":42}],226:[function(require,module,exports){ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + +},{"./_an-object":16,"./_export":42}],227:[function(require,module,exports){ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); + +},{"./_export":42,"./_own-keys":93}],228:[function(require,module,exports){ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $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":16,"./_export":42}],229:[function(require,module,exports){ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var 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":42,"./_set-proto":105}],230:[function(require,module,exports){ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var 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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + +},{"./_an-object":16,"./_export":42,"./_has":50,"./_is-object":60,"./_object-dp":80,"./_object-gopd":83,"./_object-gpo":87,"./_property-desc":98}],231:[function(require,module,exports){ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var 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; + var piRE = isRegExp(p); + var 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":38,"./_fails":44,"./_flags":46,"./_global":49,"./_inherit-if-required":54,"./_is-regexp":61,"./_object-dp":80,"./_object-gopn":85,"./_redefine":100,"./_set-species":106,"./_wks":135}],232:[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":38,"./_flags":46,"./_object-dp":80}],233:[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); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + +},{"./_fix-re-wks":45}],234:[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); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + +},{"./_fix-re-wks":45}],235:[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); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + +},{"./_fix-re-wks":45}],236:[function(require,module,exports){ +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = require('./_is-regexp'); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var 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 + // eslint-disable-next-line no-loop-func + 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); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + +},{"./_fix-re-wks":45,"./_is-regexp":61}],237:[function(require,module,exports){ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $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":16,"./_descriptors":38,"./_fails":44,"./_flags":46,"./_redefine":100,"./es6.regexp.flags":232}],238:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 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(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + +},{"./_collection":31,"./_collection-strong":28,"./_validate-collection":132}],239:[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":114}],240:[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":114}],241:[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":114}],242:[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":114}],243:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":42,"./_string-at":112}],244:[function(require,module,exports){ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $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); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + +},{"./_export":42,"./_fails-is-regexp":43,"./_string-context":113,"./_to-length":124}],245:[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":114}],246:[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":114}],247:[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":114}],248:[function(require,module,exports){ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $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 = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(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":42,"./_to-absolute-index":120}],249:[function(require,module,exports){ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var 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":42,"./_fails-is-regexp":43,"./_string-context":113}],250:[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":114}],251:[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; + var index = this._i; + var 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":64,"./_string-at":112}],252:[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":114}],253:[function(require,module,exports){ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + +},{"./_export":42,"./_to-iobject":123,"./_to-length":124}],254:[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":42,"./_string-repeat":116}],255:[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":114}],256:[function(require,module,exports){ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $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); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + +},{"./_export":42,"./_fails-is-regexp":43,"./_string-context":113,"./_to-length":124}],257:[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":114}],258:[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":114}],259:[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":114}],260:[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":117}],261:[function(require,module,exports){ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// 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; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, 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)); + var i = 0; + var l = keys.length; + var 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)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + 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)); + var result = []; + var i = 0; + var 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 IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $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); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$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(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return 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 || $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)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 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":16,"./_descriptors":38,"./_enum-keys":41,"./_export":42,"./_fails":44,"./_global":49,"./_has":50,"./_hide":51,"./_is-array":58,"./_is-object":60,"./_library":68,"./_meta":74,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_object-gopn-ext":84,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_property-desc":98,"./_redefine":100,"./_set-to-string-tag":107,"./_shared":109,"./_to-iobject":123,"./_to-primitive":126,"./_uid":130,"./_wks":135,"./_wks-define":133,"./_wks-ext":134}],262:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var 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; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); + +},{"./_an-object":16,"./_export":42,"./_fails":44,"./_global":49,"./_is-object":60,"./_set-species":106,"./_species-constructor":110,"./_to-absolute-index":120,"./_to-length":124,"./_typed":129,"./_typed-buffer":128}],263:[function(require,module,exports){ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); + +},{"./_export":42,"./_typed":129,"./_typed-buffer":128}],264:[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":127}],265:[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":127}],266:[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":127}],267:[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":127}],268:[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":127}],269:[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":127}],270:[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":127}],271:[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":127}],272:[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":127}],273:[function(require,module,exports){ +'use strict'; +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var validate = require('./_validate-collection'); +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var tmp = {}; +var 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(validate(this, WEAK_MAP)).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(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var 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":21,"./_collection":31,"./_collection-weak":30,"./_fails":44,"./_is-object":60,"./_meta":74,"./_object-assign":78,"./_redefine":100,"./_validate-collection":132}],274:[function(require,module,exports){ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, 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(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + +},{"./_collection":31,"./_collection-weak":30,"./_validate-collection":132}],275:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); + +},{"./_a-function":12,"./_add-to-unscopables":14,"./_array-species-create":24,"./_export":42,"./_flatten-into-array":47,"./_to-length":124,"./_to-object":125}],276:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); + +},{"./_add-to-unscopables":14,"./_array-species-create":24,"./_export":42,"./_flatten-into-array":47,"./_to-integer":122,"./_to-length":124,"./_to-object":125}],277:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); + +},{"./_add-to-unscopables":14,"./_array-includes":20,"./_export":42}],278:[function(require,module,exports){ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + +},{"./_cof":27,"./_export":42,"./_global":49,"./_microtask":76}],279:[function(require,module,exports){ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + +},{"./_cof":27,"./_export":42}],280:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); + +},{"./_export":42,"./_global":49}],281:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); + +},{"./_set-collection-from":103}],282:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); + +},{"./_set-collection-of":104}],283:[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":29,"./_export":42}],284:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + +},{"./_export":42}],285:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + +},{"./_export":42}],286:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + +},{"./_export":42}],287:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + +},{"./_export":42,"./_math-fround":70,"./_math-scale":72}],288:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + +},{"./_export":42}],289:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + +},{"./_export":42}],290:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + +},{"./_export":42}],291:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + +},{"./_export":42}],292:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + +},{"./_export":42}],293:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); + +},{"./_export":42,"./_math-scale":72}],294:[function(require,module,exports){ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + +},{"./_export":42}],295:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + +},{"./_export":42}],296:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":12,"./_descriptors":38,"./_export":42,"./_object-dp":80,"./_object-forced-pam":82,"./_to-object":125}],297:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":12,"./_descriptors":38,"./_export":42,"./_object-dp":80,"./_object-forced-pam":82,"./_to-object":125}],298:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + +},{"./_export":42,"./_object-to-array":92}],299:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + +},{"./_create-property":33,"./_export":42,"./_object-gopd":83,"./_own-keys":93,"./_to-iobject":123}],300:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":38,"./_export":42,"./_object-forced-pam":82,"./_object-gopd":83,"./_object-gpo":87,"./_to-object":125,"./_to-primitive":126}],301:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":38,"./_export":42,"./_object-forced-pam":82,"./_object-gopd":83,"./_object-gpo":87,"./_to-object":125,"./_to-primitive":126}],302:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + +},{"./_export":42,"./_object-to-array":92}],303:[function(require,module,exports){ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); + +},{"./_a-function":12,"./_an-instance":15,"./_an-object":16,"./_core":32,"./_export":42,"./_for-of":48,"./_global":49,"./_hide":51,"./_microtask":76,"./_redefine-all":99,"./_set-species":106,"./_wks":135}],304:[function(require,module,exports){ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + +},{"./_core":32,"./_export":42,"./_global":49,"./_promise-resolve":97,"./_species-constructor":110}],305:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + +},{"./_export":42,"./_new-promise-capability":77,"./_perform":96}],306:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + +},{"./_an-object":16,"./_metadata":75}],307:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var 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":16,"./_metadata":75}],308:[function(require,module,exports){ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var 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":16,"./_array-from-iterable":19,"./_metadata":75,"./_object-gpo":87,"./es6.set":238}],309:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var 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":16,"./_metadata":75,"./_object-gpo":87}],310:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + +},{"./_an-object":16,"./_metadata":75}],311:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var 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":16,"./_metadata":75}],312:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":16,"./_metadata":75,"./_object-gpo":87}],313:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":16,"./_metadata":75}],314:[function(require,module,exports){ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var 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":12,"./_an-object":16,"./_metadata":75}],315:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); + +},{"./_set-collection-from":103}],316:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); + +},{"./_set-collection-of":104}],317:[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":29,"./_export":42}],318:[function(require,module,exports){ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + +},{"./_export":42,"./_string-at":112}],319:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + +},{"./_defined":37,"./_export":42,"./_flags":46,"./_is-regexp":61,"./_iter-create":63,"./_to-length":124}],320:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + +},{"./_export":42,"./_string-pad":115,"./_user-agent":131}],321:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + +},{"./_export":42,"./_string-pad":115,"./_user-agent":131}],322:[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":117}],323:[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":117}],324:[function(require,module,exports){ +require('./_wks-define')('asyncIterator'); + +},{"./_wks-define":133}],325:[function(require,module,exports){ +require('./_wks-define')('observable'); + +},{"./_wks-define":133}],326:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); + +},{"./_export":42,"./_global":49}],327:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); + +},{"./_set-collection-from":103}],328:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); + +},{"./_set-collection-of":104}],329:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); + +},{"./_set-collection-from":103}],330:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); + +},{"./_set-collection-of":104}],331:[function(require,module,exports){ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + +},{"./_global":49,"./_hide":51,"./_iterators":67,"./_object-keys":89,"./_redefine":100,"./_wks":135,"./es6.array.iterator":148}],332:[function(require,module,exports){ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + +},{"./_export":42,"./_task":119}],333:[function(require,module,exports){ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + +},{"./_export":42,"./_global":49,"./_user-agent":131}],334:[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-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +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.array.flat-map'); +require('./modules/es7.array.flatten'); +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.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +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/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); + +},{"./modules/_core":32,"./modules/es6.array.copy-within":138,"./modules/es6.array.every":139,"./modules/es6.array.fill":140,"./modules/es6.array.filter":141,"./modules/es6.array.find":143,"./modules/es6.array.find-index":142,"./modules/es6.array.for-each":144,"./modules/es6.array.from":145,"./modules/es6.array.index-of":146,"./modules/es6.array.is-array":147,"./modules/es6.array.iterator":148,"./modules/es6.array.join":149,"./modules/es6.array.last-index-of":150,"./modules/es6.array.map":151,"./modules/es6.array.of":152,"./modules/es6.array.reduce":154,"./modules/es6.array.reduce-right":153,"./modules/es6.array.slice":155,"./modules/es6.array.some":156,"./modules/es6.array.sort":157,"./modules/es6.array.species":158,"./modules/es6.date.now":159,"./modules/es6.date.to-iso-string":160,"./modules/es6.date.to-json":161,"./modules/es6.date.to-primitive":162,"./modules/es6.date.to-string":163,"./modules/es6.function.bind":164,"./modules/es6.function.has-instance":165,"./modules/es6.function.name":166,"./modules/es6.map":167,"./modules/es6.math.acosh":168,"./modules/es6.math.asinh":169,"./modules/es6.math.atanh":170,"./modules/es6.math.cbrt":171,"./modules/es6.math.clz32":172,"./modules/es6.math.cosh":173,"./modules/es6.math.expm1":174,"./modules/es6.math.fround":175,"./modules/es6.math.hypot":176,"./modules/es6.math.imul":177,"./modules/es6.math.log10":178,"./modules/es6.math.log1p":179,"./modules/es6.math.log2":180,"./modules/es6.math.sign":181,"./modules/es6.math.sinh":182,"./modules/es6.math.tanh":183,"./modules/es6.math.trunc":184,"./modules/es6.number.constructor":185,"./modules/es6.number.epsilon":186,"./modules/es6.number.is-finite":187,"./modules/es6.number.is-integer":188,"./modules/es6.number.is-nan":189,"./modules/es6.number.is-safe-integer":190,"./modules/es6.number.max-safe-integer":191,"./modules/es6.number.min-safe-integer":192,"./modules/es6.number.parse-float":193,"./modules/es6.number.parse-int":194,"./modules/es6.number.to-fixed":195,"./modules/es6.number.to-precision":196,"./modules/es6.object.assign":197,"./modules/es6.object.create":198,"./modules/es6.object.define-properties":199,"./modules/es6.object.define-property":200,"./modules/es6.object.freeze":201,"./modules/es6.object.get-own-property-descriptor":202,"./modules/es6.object.get-own-property-names":203,"./modules/es6.object.get-prototype-of":204,"./modules/es6.object.is":208,"./modules/es6.object.is-extensible":205,"./modules/es6.object.is-frozen":206,"./modules/es6.object.is-sealed":207,"./modules/es6.object.keys":209,"./modules/es6.object.prevent-extensions":210,"./modules/es6.object.seal":211,"./modules/es6.object.set-prototype-of":212,"./modules/es6.object.to-string":213,"./modules/es6.parse-float":214,"./modules/es6.parse-int":215,"./modules/es6.promise":216,"./modules/es6.reflect.apply":217,"./modules/es6.reflect.construct":218,"./modules/es6.reflect.define-property":219,"./modules/es6.reflect.delete-property":220,"./modules/es6.reflect.enumerate":221,"./modules/es6.reflect.get":224,"./modules/es6.reflect.get-own-property-descriptor":222,"./modules/es6.reflect.get-prototype-of":223,"./modules/es6.reflect.has":225,"./modules/es6.reflect.is-extensible":226,"./modules/es6.reflect.own-keys":227,"./modules/es6.reflect.prevent-extensions":228,"./modules/es6.reflect.set":230,"./modules/es6.reflect.set-prototype-of":229,"./modules/es6.regexp.constructor":231,"./modules/es6.regexp.flags":232,"./modules/es6.regexp.match":233,"./modules/es6.regexp.replace":234,"./modules/es6.regexp.search":235,"./modules/es6.regexp.split":236,"./modules/es6.regexp.to-string":237,"./modules/es6.set":238,"./modules/es6.string.anchor":239,"./modules/es6.string.big":240,"./modules/es6.string.blink":241,"./modules/es6.string.bold":242,"./modules/es6.string.code-point-at":243,"./modules/es6.string.ends-with":244,"./modules/es6.string.fixed":245,"./modules/es6.string.fontcolor":246,"./modules/es6.string.fontsize":247,"./modules/es6.string.from-code-point":248,"./modules/es6.string.includes":249,"./modules/es6.string.italics":250,"./modules/es6.string.iterator":251,"./modules/es6.string.link":252,"./modules/es6.string.raw":253,"./modules/es6.string.repeat":254,"./modules/es6.string.small":255,"./modules/es6.string.starts-with":256,"./modules/es6.string.strike":257,"./modules/es6.string.sub":258,"./modules/es6.string.sup":259,"./modules/es6.string.trim":260,"./modules/es6.symbol":261,"./modules/es6.typed.array-buffer":262,"./modules/es6.typed.data-view":263,"./modules/es6.typed.float32-array":264,"./modules/es6.typed.float64-array":265,"./modules/es6.typed.int16-array":266,"./modules/es6.typed.int32-array":267,"./modules/es6.typed.int8-array":268,"./modules/es6.typed.uint16-array":269,"./modules/es6.typed.uint32-array":270,"./modules/es6.typed.uint8-array":271,"./modules/es6.typed.uint8-clamped-array":272,"./modules/es6.weak-map":273,"./modules/es6.weak-set":274,"./modules/es7.array.flat-map":275,"./modules/es7.array.flatten":276,"./modules/es7.array.includes":277,"./modules/es7.asap":278,"./modules/es7.error.is-error":279,"./modules/es7.global":280,"./modules/es7.map.from":281,"./modules/es7.map.of":282,"./modules/es7.map.to-json":283,"./modules/es7.math.clamp":284,"./modules/es7.math.deg-per-rad":285,"./modules/es7.math.degrees":286,"./modules/es7.math.fscale":287,"./modules/es7.math.iaddh":288,"./modules/es7.math.imulh":289,"./modules/es7.math.isubh":290,"./modules/es7.math.rad-per-deg":291,"./modules/es7.math.radians":292,"./modules/es7.math.scale":293,"./modules/es7.math.signbit":294,"./modules/es7.math.umulh":295,"./modules/es7.object.define-getter":296,"./modules/es7.object.define-setter":297,"./modules/es7.object.entries":298,"./modules/es7.object.get-own-property-descriptors":299,"./modules/es7.object.lookup-getter":300,"./modules/es7.object.lookup-setter":301,"./modules/es7.object.values":302,"./modules/es7.observable":303,"./modules/es7.promise.finally":304,"./modules/es7.promise.try":305,"./modules/es7.reflect.define-metadata":306,"./modules/es7.reflect.delete-metadata":307,"./modules/es7.reflect.get-metadata":309,"./modules/es7.reflect.get-metadata-keys":308,"./modules/es7.reflect.get-own-metadata":311,"./modules/es7.reflect.get-own-metadata-keys":310,"./modules/es7.reflect.has-metadata":312,"./modules/es7.reflect.has-own-metadata":313,"./modules/es7.reflect.metadata":314,"./modules/es7.set.from":315,"./modules/es7.set.of":316,"./modules/es7.set.to-json":317,"./modules/es7.string.at":318,"./modules/es7.string.match-all":319,"./modules/es7.string.pad-end":320,"./modules/es7.string.pad-start":321,"./modules/es7.string.trim-left":322,"./modules/es7.string.trim-right":323,"./modules/es7.symbol.async-iterator":324,"./modules/es7.symbol.observable":325,"./modules/es7.system.global":326,"./modules/es7.weak-map.from":327,"./modules/es7.weak-map.of":328,"./modules/es7.weak-set.from":329,"./modules/es7.weak-set.of":330,"./modules/web.dom.iterable":331,"./modules/web.immediate":332,"./modules/web.timers":333}],335:[function(require,module,exports){ +(function (global){ +module.exports = false; + +// Only Node.JS has a process variable that is of [[Class]] process +try { + module.exports = Object.prototype.toString.call(global.process) === '[object process]' +} catch(e) {} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],336:[function(require,module,exports){ +'use strict'; + +var _util = require('./util.js'); + +/* eslint-disable */ +/** + * used in docs/iframe.html + */ +require('babel-polyfill'); + + +var BroadcastChannel = require('../../'); + +var channelName = (0, _util.getParameterByName)('channelName'); +var methodType = (0, _util.getParameterByName)('methodType'); + +// overwrite console.log +var logBefore = console.log; +console.log = function (str) { + logBefore('iframe: ' + str); +}; + +var channel = new BroadcastChannel(channelName, { + type: methodType +}); +var msgContainer = document.getElementById('messages'); +channel.onmessage = function (msg) { + console.log('recieved message(' + msg.step + ') from ' + msg.from + ': ' + JSON.stringify(msg)); + + var textnode = document.createTextNode(JSON.stringify(msg) + '
'); + msgContainer.appendChild(textnode); + + if (!msg.answer) { + console.log('answer back(' + msg.step + ')'); + channel.postMessage({ + answer: true, + from: 'iframe', + original: msg + }); + } +}; +},{"../../":1,"./util.js":337,"babel-polyfill":9}],337:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getParameterByName = getParameterByName; +// https://stackoverflow.com/a/901144/3443137 +function getParameterByName(name, url) { + if (!url) url = window.location.href; + name = name.replace(/[\[\]]/g, '\\$&'); + var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); + var results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, ' ')); +} +},{}]},{},[336]); diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..df837708 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,65 @@ + + + + + + + + + Fork me on GitHub + + + +
+ + + + \ No newline at end of file diff --git a/docs/index.js b/docs/index.js new file mode 100644 index 00000000..a43debb3 --- /dev/null +++ b/docs/index.js @@ -0,0 +1,9687 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(function (o) { + return o !== obj; + }); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + var listenerFn = function listenerFn(msgObj) { + channel._addEventListeners[msgObj.type].forEach(function (obj) { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + var time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(function () { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + }); + } else { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + var time = new Date().getTime() - 5; + channel.method.onMessage(channel._state, null, time); + } +} + +exports['default'] = BroadcastChannel; +},{"./method-chooser.js":3,"./options.js":7,"./util.js":8}],3:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.chooseMethod = chooseMethod; +var isNode = require('detect-node'); + +var NativeMethod = require('./methods/native.js'); +var IndexeDbMethod = require('./methods/indexed-db.js'); +var LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +var METHODS = [NativeMethod, // fastest +IndexeDbMethod, LocalstorageMethod]; + +var REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + var NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + +function chooseMethod(options) { + // directly chosen + if (options.type) { + var ret = METHODS.find(function (m) { + return m.type === options.type; + }); + if (!ret) throw new Error('method-type ' + options.type + ' not found');else return ret; + } + + var chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(function (m) { + return m.type !== 'idb'; + }); + } + + var useMethod = chooseMethods.find(function (method) { + return method.canBeUsed(); + }); + if (!useMethod) throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(function (m) { + return m.type; + })));else return useMethod; +} +},{"./methods/indexed-db.js":4,"./methods/localstorage.js":5,"./methods/native.js":6,"detect-node":426}],4:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getIdb = getIdb; +exports.createDatabase = createDatabase; +exports.writeMessage = writeMessage; +exports.getAllMessages = getAllMessages; +exports.getMessagesHigherThen = getMessagesHigherThen; +exports.removeMessageById = removeMessageById; +exports.getOldMessages = getOldMessages; +exports.cleanOldMessages = cleanOldMessages; +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _util = require('../util.js'); + +var _options = require('../options'); + +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +var isNode = require('detect-node'); + +var DB_PREFIX = 'pubkey.broadcast-channel-0-'; +var OBJECT_STORE_ID = 'messages'; + +var type = exports.type = 'idb'; + +function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +function createDatabase(channelName) { + var IndexedDB = getIdb(); + + // create table + var dbName = DB_PREFIX + channelName; + var openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = function (ev) { + var db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + var dbPromise = new Promise(function (res, rej) { + openRequest.onerror = function (ev) { + return rej(ev); + }; + openRequest.onsuccess = function () { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +function writeMessage(db, readerUuid, messageJson) { + var time = new Date().getTime(); + var writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + + var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise(function (res, rej) { + transaction.oncomplete = function () { + return res(); + }; + transaction.onerror = function (ev) { + return rej(ev); + }; + + var objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +function getAllMessages(db) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function getMessagesHigherThen(db, lastCursorId) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(function (res) { + objectStore.openCursor(keyRangeValue).onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function removeMessageById(db, id) { + var request = db.transaction([OBJECT_STORE_ID], 'readwrite').objectStore(OBJECT_STORE_ID)['delete'](id); + return new Promise(function (res) { + request.onsuccess = function () { + return res(); + }; + }); +} + +function getOldMessages(db, ttl) { + var olderThen = new Date().getTime() - ttl; + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + var msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl).then(function (tooOld) { + return Promise.all(tooOld.map(function (msgObj) { + return removeMessageById(db, msgObj.id); + })); + }); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + + var uuid = (0, _util.randomToken)(10); + + return createDatabase(channelName).then(function (db) { + var state = { + closed: false, + lastCursorId: 0, + channelName: channelName, + options: options, + uuid: uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db: db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state).then(function () { + return (0, _util.sleep)(state.options.idb.fallbackInterval); + }).then(function () { + return _readLoop(state); + }); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId).then(function (newerMessages) { + var useMessages = newerMessages.map(function (msgObj) { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }).filter(function (msgObj) { + return msgObj.uuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.id); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + + useMessages.forEach(function (msgObj) { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.id); + }, state.options.idb.ttl * 2); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +function postMessage(channelState, messageJson) { + return writeMessage(channelState.db, channelState.uuid, messageJson).then(function () { + if ((0, _util.randomInt)(0, 10) === 0) { + /* await (do not await) */cleanOldMessages(channelState.db, channelState.options.idb.ttl); + } + }); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +function canBeUsed() { + if (isNode) return false; + var idb = getIdb(); + + if (!idb) return false; + return true; +}; +},{"../options":7,"../util.js":8,"detect-node":426}],5:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getLocalStorage = getLocalStorage; +exports.storageKey = storageKey; +exports.postMessage = postMessage; +exports.addStorageEventListener = addStorageEventListener; +exports.removeStorageEventListener = removeStorageEventListener; +exports.create = create; +exports.close = close; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _options = require('../options'); + +var _util = require('../util'); + +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +var isNode = require('detect-node'); + +var KEY_PREFIX = 'pubkey.broadcastChannel-'; +var type = exports.type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +function getLocalStorage() { + var localStorage = void 0; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +function postMessage(channelState, messageJson) { + return new Promise(function (res) { + (0, _util.sleep)().then(function () { + var key = storageKey(channelState.channelName); + var writeObj = { + token: (0, _util.randomToken)(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + var value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + var ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +function addStorageEventListener(channelName, fn) { + var key = storageKey(channelName); + var listener = function listener(ev) { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + var startTime = new Date().getTime(); + var uuid = (0, _util.randomToken)(10); + + // contains all messages that have been emitted before + var emittedMessagesIds = new Set(); + + var state = { + startTime: startTime, + channelName: channelName, + options: options, + uuid: uuid, + emittedMessagesIds: emittedMessagesIds + }; + + state.listener = addStorageEventListener(channelName, function (msgObj) { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return emittedMessagesIds['delete'](msgObj.token); + }, options.localstorage.removeTimeout); + state.messagesCallback(msgObj.data); + }); + + return state; +} + +function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + var ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; +},{"../options":7,"../util":8,"detect-node":426}],6:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; +var isNode = require('detect-node'); + +var type = exports.type = 'native'; + +function create(channelName, options) { + if (!options) options = {}; + var state = { + channelName: channelName, + options: options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = function (msg) { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; +},{"detect-node":426}],7:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fillOptionsWithDefaults = fillOptionsWithDefaults; +function fillOptionsWithDefaults(options) { + if (!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} +},{}],8:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isPromise = isPromise; +exports.sleep = sleep; +exports.randomInt = randomInt; +exports.randomToken = randomToken; +/** + * returns true if the given object is a promise + */ +function isPromise(obj) { + if (obj && typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +function sleep(time) { + if (!time) time = 0; + return new Promise(function (res) { + return setTimeout(res, time); + }); +} + +function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +function randomToken(length) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + }return text; +} +},{}],9:[function(require,module,exports){ +(function (global){ +"use strict"; + +require("core-js/shim"); + +require("regenerator-runtime/runtime"); + +require("core-js/fn/regexp/escape"); + +if (global._babelPolyfill) { + throw new Error("only one instance of babel-polyfill is allowed"); +} +global._babelPolyfill = true; + +var DEFINE_PROPERTY = "defineProperty"; +function define(O, key, value) { + O[key] || Object[DEFINE_PROPERTY](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 : {}) +},{"core-js/fn/regexp/escape":17,"core-js/shim":425,"regenerator-runtime/runtime":10}],10:[function(require,module,exports){ +(function (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 Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + 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 and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.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() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + 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; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + 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 + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return 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; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + 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 + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // 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(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.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; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + 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; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + 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; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + 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.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + 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 = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + 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 + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + 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,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],11:[function(require,module,exports){ +module.exports = { "default": require("core-js/library/fn/promise"), __esModule: true }; +},{"core-js/library/fn/promise":18}],12:[function(require,module,exports){ +module.exports = { "default": require("core-js/library/fn/symbol"), __esModule: true }; +},{"core-js/library/fn/symbol":19}],13:[function(require,module,exports){ +module.exports = { "default": require("core-js/library/fn/symbol/iterator"), __esModule: true }; +},{"core-js/library/fn/symbol/iterator":20}],14:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +var _promise = require("../core-js/promise"); + +var _promise2 = _interopRequireDefault(_promise); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (fn) { + return function () { + var gen = fn.apply(this, arguments); + return new _promise2.default(function (resolve, reject) { + function step(key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + return _promise2.default.resolve(value).then(function (value) { + step("next", value); + }, function (err) { + step("throw", err); + }); + } + } + + return step("next"); + }); + }; +}; +},{"../core-js/promise":11}],15:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +var _iterator = require("../core-js/symbol/iterator"); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = require("../core-js/symbol"); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; +},{"../core-js/symbol":12,"../core-js/symbol/iterator":13}],16:[function(require,module,exports){ +module.exports = require("regenerator-runtime"); + +},{"regenerator-runtime":427}],17:[function(require,module,exports){ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; + +},{"../../modules/_core":123,"../../modules/core.regexp.escape":228}],18:[function(require,module,exports){ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +require('../modules/es7.promise.finally'); +require('../modules/es7.promise.try'); +module.exports = require('../modules/_core').Promise; + +},{"../modules/_core":28,"../modules/es6.object.to-string":94,"../modules/es6.promise":95,"../modules/es6.string.iterator":96,"../modules/es7.promise.finally":98,"../modules/es7.promise.try":99,"../modules/web.dom.iterable":102}],19:[function(require,module,exports){ +require('../../modules/es6.symbol'); +require('../../modules/es6.object.to-string'); +require('../../modules/es7.symbol.async-iterator'); +require('../../modules/es7.symbol.observable'); +module.exports = require('../../modules/_core').Symbol; + +},{"../../modules/_core":28,"../../modules/es6.object.to-string":94,"../../modules/es6.symbol":97,"../../modules/es7.symbol.async-iterator":100,"../../modules/es7.symbol.observable":101}],20:[function(require,module,exports){ +require('../../modules/es6.string.iterator'); +require('../../modules/web.dom.iterable'); +module.exports = require('../../modules/_wks-ext').f('iterator'); + +},{"../../modules/_wks-ext":90,"../../modules/es6.string.iterator":96,"../../modules/web.dom.iterable":102}],21:[function(require,module,exports){ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + +},{}],22:[function(require,module,exports){ +module.exports = function () { /* empty */ }; + +},{}],23:[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; +}; + +},{}],24:[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":47}],25:[function(require,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +},{"./_to-absolute-index":81,"./_to-iobject":83,"./_to-length":84}],26:[function(require,module,exports){ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var 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":27,"./_wks":91}],27:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +},{}],28:[function(require,module,exports){ +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + +},{}],29:[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":21}],30:[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; +}; + +},{}],31:[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":36}],32:[function(require,module,exports){ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + +},{"./_global":38,"./_is-object":47}],33:[function(require,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +},{}],34:[function(require,module,exports){ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + +},{"./_object-gops":64,"./_object-keys":67,"./_object-pie":68}],35:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var ctx = require('./_ctx'); +var hide = require('./_hide'); +var has = require('./_has'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// 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":28,"./_ctx":29,"./_global":38,"./_has":39,"./_hide":40}],36:[function(require,module,exports){ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +},{}],37:[function(require,module,exports){ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + 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++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +},{"./_an-object":24,"./_ctx":29,"./_is-array-iter":45,"./_iter-call":48,"./_to-length":84,"./core.get-iterator-method":92}],38:[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 + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + +},{}],39:[function(require,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +},{}],40:[function(require,module,exports){ +var dP = require('./_object-dp'); +var 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":31,"./_object-dp":59,"./_property-desc":71}],41:[function(require,module,exports){ +var document = require('./_global').document; +module.exports = document && document.documentElement; + +},{"./_global":38}],42:[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":31,"./_dom-create":32,"./_fails":36}],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'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +},{"./_cof":27}],45:[function(require,module,exports){ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +},{"./_iterators":53,"./_wks":91}],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":27}],47:[function(require,module,exports){ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +},{}],48:[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":24}],49:[function(require,module,exports){ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var 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":40,"./_object-create":58,"./_property-desc":71,"./_set-to-string-tag":75,"./_wks":91}],50:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var 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'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') 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":35,"./_hide":40,"./_iter-create":49,"./_iterators":53,"./_library":54,"./_object-gpo":65,"./_redefine":73,"./_set-to-string-tag":75,"./_wks":91}],51:[function(require,module,exports){ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + 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]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + +},{"./_wks":91}],52:[function(require,module,exports){ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + +},{}],53:[function(require,module,exports){ +module.exports = {}; + +},{}],54:[function(require,module,exports){ +module.exports = true; + +},{}],55:[function(require,module,exports){ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var 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":36,"./_has":39,"./_is-object":47,"./_object-dp":59,"./_uid":87}],56:[function(require,module,exports){ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var 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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.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); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + +},{"./_cof":27,"./_global":38,"./_task":80}],57:[function(require,module,exports){ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(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); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + +},{"./_a-function":21}],58:[function(require,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var 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'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var 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(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + +},{"./_an-object":24,"./_dom-create":32,"./_enum-bug-keys":33,"./_html":41,"./_object-dps":60,"./_shared-key":76}],59:[function(require,module,exports){ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + +},{"./_an-object":24,"./_descriptors":31,"./_ie8-dom-define":42,"./_to-primitive":86}],60:[function(require,module,exports){ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +},{"./_an-object":24,"./_descriptors":31,"./_object-dp":59,"./_object-keys":67}],61:[function(require,module,exports){ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var 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":31,"./_has":39,"./_ie8-dom-define":42,"./_object-pie":68,"./_property-desc":71,"./_to-iobject":83,"./_to-primitive":86}],62:[function(require,module,exports){ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(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":63,"./_to-iobject":83}],63:[function(require,module,exports){ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + +},{"./_enum-bug-keys":33,"./_object-keys-internal":66}],64:[function(require,module,exports){ +exports.f = Object.getOwnPropertySymbols; + +},{}],65:[function(require,module,exports){ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var 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":39,"./_shared-key":76,"./_to-object":85}],66:[function(require,module,exports){ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var 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":25,"./_has":39,"./_shared-key":76,"./_to-iobject":83}],67:[function(require,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + +},{"./_enum-bug-keys":33,"./_object-keys-internal":66}],68:[function(require,module,exports){ +exports.f = {}.propertyIsEnumerable; + +},{}],69:[function(require,module,exports){ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + +},{}],70:[function(require,module,exports){ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + +},{"./_an-object":24,"./_is-object":47,"./_new-promise-capability":57}],71:[function(require,module,exports){ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +},{}],72:[function(require,module,exports){ +var hide = require('./_hide'); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + +},{"./_hide":40}],73:[function(require,module,exports){ +module.exports = require('./_hide'); + +},{"./_hide":40}],74:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var core = require('./_core'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + +},{"./_core":28,"./_descriptors":31,"./_global":38,"./_object-dp":59,"./_wks":91}],75:[function(require,module,exports){ +var def = require('./_object-dp').f; +var has = require('./_has'); +var 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":39,"./_object-dp":59,"./_wks":91}],76:[function(require,module,exports){ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + +},{"./_shared":77,"./_uid":87}],77:[function(require,module,exports){ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + +},{"./_core":28,"./_global":38,"./_library":54}],78:[function(require,module,exports){ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +},{"./_a-function":21,"./_an-object":24,"./_wks":91}],79:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var 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":30,"./_to-integer":82}],80:[function(require,module,exports){ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + 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 = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + 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)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(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":27,"./_ctx":29,"./_dom-create":32,"./_global":38,"./_html":41,"./_invoke":43}],81:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +},{"./_to-integer":82}],82:[function(require,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +},{}],83:[function(require,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; + +},{"./_defined":30,"./_iobject":44}],84:[function(require,module,exports){ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +},{"./_to-integer":82}],85:[function(require,module,exports){ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; + +},{"./_defined":30}],86:[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}],87:[function(require,module,exports){ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +},{}],88:[function(require,module,exports){ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + +},{"./_global":38}],89:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + +},{"./_core":28,"./_global":38,"./_library":54,"./_object-dp":59,"./_wks-ext":90}],90:[function(require,module,exports){ +exports.f = require('./_wks'); + +},{"./_wks":91}],91:[function(require,module,exports){ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +},{"./_global":38,"./_shared":77,"./_uid":87}],92:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +},{"./_classof":26,"./_core":28,"./_iterators":53,"./_wks":91}],93:[function(require,module,exports){ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var 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; + var kind = this._k; + var 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":22,"./_iter-define":50,"./_iter-step":52,"./_iterators":53,"./_to-iobject":83}],94:[function(require,module,exports){ + +},{}],95:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var 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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = 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 (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +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; + var 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); + } + }; + // eslint-disable-next-line no-unused-vars + 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); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$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); + var $$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) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$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; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var 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 (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + +},{"./_a-function":21,"./_an-instance":23,"./_classof":26,"./_core":28,"./_ctx":29,"./_export":35,"./_for-of":37,"./_global":38,"./_is-object":47,"./_iter-detect":51,"./_library":54,"./_microtask":56,"./_new-promise-capability":57,"./_perform":69,"./_promise-resolve":70,"./_redefine-all":72,"./_set-species":74,"./_set-to-string-tag":75,"./_species-constructor":78,"./_task":80,"./_user-agent":88,"./_wks":91}],96:[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; + var index = this._i; + var 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":50,"./_string-at":79}],97:[function(require,module,exports){ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// 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; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, 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)); + var i = 0; + var l = keys.length; + var 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)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + 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)); + var result = []; + var i = 0; + var 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 IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $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); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$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(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return 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 || $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)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 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":24,"./_descriptors":31,"./_enum-keys":34,"./_export":35,"./_fails":36,"./_global":38,"./_has":39,"./_hide":40,"./_is-array":46,"./_is-object":47,"./_library":54,"./_meta":55,"./_object-create":58,"./_object-dp":59,"./_object-gopd":61,"./_object-gopn":63,"./_object-gopn-ext":62,"./_object-gops":64,"./_object-keys":67,"./_object-pie":68,"./_property-desc":71,"./_redefine":73,"./_set-to-string-tag":75,"./_shared":77,"./_to-iobject":83,"./_to-primitive":86,"./_uid":87,"./_wks":91,"./_wks-define":89,"./_wks-ext":90}],98:[function(require,module,exports){ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + +},{"./_core":28,"./_export":35,"./_global":38,"./_promise-resolve":70,"./_species-constructor":78}],99:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + +},{"./_export":35,"./_new-promise-capability":57,"./_perform":69}],100:[function(require,module,exports){ +require('./_wks-define')('asyncIterator'); + +},{"./_wks-define":89}],101:[function(require,module,exports){ +require('./_wks-define')('observable'); + +},{"./_wks-define":89}],102:[function(require,module,exports){ +require('./es6.array.iterator'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var TO_STRING_TAG = require('./_wks')('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + +},{"./_global":38,"./_hide":40,"./_iterators":53,"./_wks":91,"./es6.array.iterator":93}],103:[function(require,module,exports){ +arguments[4][21][0].apply(exports,arguments) +},{"dup":21}],104:[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":118}],105:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + +},{"./_hide":142,"./_wks":226}],106:[function(require,module,exports){ +arguments[4][23][0].apply(exports,arguments) +},{"dup":23}],107:[function(require,module,exports){ +arguments[4][24][0].apply(exports,arguments) +},{"./_is-object":151,"dup":24}],108:[function(require,module,exports){ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var 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-absolute-index":211,"./_to-length":215,"./_to-object":216}],109:[function(require,module,exports){ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + +},{"./_to-absolute-index":211,"./_to-length":215,"./_to-object":216}],110:[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":139}],111:[function(require,module,exports){ +arguments[4][25][0].apply(exports,arguments) +},{"./_to-absolute-index":211,"./_to-iobject":214,"./_to-length":215,"dup":25}],112:[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'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var 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":115,"./_ctx":125,"./_iobject":147,"./_to-length":215,"./_to-object":216}],113:[function(require,module,exports){ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var 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":103,"./_iobject":147,"./_to-length":215,"./_to-object":216}],114:[function(require,module,exports){ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + 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 C === undefined ? Array : C; +}; + +},{"./_is-array":149,"./_is-object":151,"./_wks":226}],115:[function(require,module,exports){ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + +},{"./_array-species-constructor":114}],116:[function(require,module,exports){ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + 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); + var 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":103,"./_invoke":146,"./_is-object":151}],117:[function(require,module,exports){ +arguments[4][26][0].apply(exports,arguments) +},{"./_cof":118,"./_wks":226,"dup":26}],118:[function(require,module,exports){ +arguments[4][27][0].apply(exports,arguments) +},{"dup":27}],119:[function(require,module,exports){ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var 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._t = NAME; // collection type + 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 = validate(this, NAME), 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 = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var 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 */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var 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(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var 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 = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var 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":106,"./_ctx":125,"./_descriptors":129,"./_for-of":139,"./_iter-define":155,"./_iter-step":157,"./_meta":165,"./_object-create":170,"./_object-dp":171,"./_redefine-all":190,"./_set-species":197,"./_validate-collection":223}],120:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var 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":110,"./_classof":117}],121:[function(require,module,exports){ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var 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._t = NAME; // collection type + 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(validate(this, NAME))['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(validate(this, NAME)).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":106,"./_an-object":107,"./_array-methods":112,"./_for-of":139,"./_has":141,"./_is-object":151,"./_meta":165,"./_redefine-all":190,"./_validate-collection":223}],122:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var 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 + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var 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":106,"./_export":133,"./_fails":135,"./_for-of":139,"./_global":140,"./_inherit-if-required":145,"./_is-object":151,"./_iter-detect":156,"./_meta":165,"./_redefine":191,"./_redefine-all":190,"./_set-to-string-tag":198}],123:[function(require,module,exports){ +arguments[4][28][0].apply(exports,arguments) +},{"dup":28}],124:[function(require,module,exports){ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +},{"./_object-dp":171,"./_property-desc":189}],125:[function(require,module,exports){ +arguments[4][29][0].apply(exports,arguments) +},{"./_a-function":103,"dup":29}],126:[function(require,module,exports){ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var 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'; +} : $toISOString; + +},{"./_fails":135}],127:[function(require,module,exports){ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + +},{"./_an-object":107,"./_to-primitive":217}],128:[function(require,module,exports){ +arguments[4][30][0].apply(exports,arguments) +},{"dup":30}],129:[function(require,module,exports){ +arguments[4][31][0].apply(exports,arguments) +},{"./_fails":135,"dup":31}],130:[function(require,module,exports){ +arguments[4][32][0].apply(exports,arguments) +},{"./_global":140,"./_is-object":151,"dup":32}],131:[function(require,module,exports){ +arguments[4][33][0].apply(exports,arguments) +},{"dup":33}],132:[function(require,module,exports){ +arguments[4][34][0].apply(exports,arguments) +},{"./_object-gops":177,"./_object-keys":180,"./_object-pie":181,"dup":34}],133:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var 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":123,"./_ctx":125,"./_global":140,"./_hide":142,"./_redefine":191}],134:[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":226}],135:[function(require,module,exports){ +arguments[4][36][0].apply(exports,arguments) +},{"dup":36}],136:[function(require,module,exports){ +'use strict'; +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var 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":128,"./_fails":135,"./_hide":142,"./_redefine":191,"./_wks":226}],137:[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); + var 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":107}],138:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + +},{"./_ctx":125,"./_is-array":149,"./_is-object":151,"./_to-length":215,"./_wks":226}],139:[function(require,module,exports){ +arguments[4][37][0].apply(exports,arguments) +},{"./_an-object":107,"./_ctx":125,"./_is-array-iter":148,"./_iter-call":153,"./_to-length":215,"./core.get-iterator-method":227,"dup":37}],140:[function(require,module,exports){ +arguments[4][38][0].apply(exports,arguments) +},{"dup":38}],141:[function(require,module,exports){ +arguments[4][39][0].apply(exports,arguments) +},{"dup":39}],142:[function(require,module,exports){ +arguments[4][40][0].apply(exports,arguments) +},{"./_descriptors":129,"./_object-dp":171,"./_property-desc":189,"dup":40}],143:[function(require,module,exports){ +arguments[4][41][0].apply(exports,arguments) +},{"./_global":140,"dup":41}],144:[function(require,module,exports){ +arguments[4][42][0].apply(exports,arguments) +},{"./_descriptors":129,"./_dom-create":130,"./_fails":135,"dup":42}],145:[function(require,module,exports){ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + +},{"./_is-object":151,"./_set-proto":196}],146:[function(require,module,exports){ +arguments[4][43][0].apply(exports,arguments) +},{"dup":43}],147:[function(require,module,exports){ +arguments[4][44][0].apply(exports,arguments) +},{"./_cof":118,"dup":44}],148:[function(require,module,exports){ +arguments[4][45][0].apply(exports,arguments) +},{"./_iterators":158,"./_wks":226,"dup":45}],149:[function(require,module,exports){ +arguments[4][46][0].apply(exports,arguments) +},{"./_cof":118,"dup":46}],150:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + +},{"./_is-object":151}],151:[function(require,module,exports){ +arguments[4][47][0].apply(exports,arguments) +},{"dup":47}],152:[function(require,module,exports){ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + +},{"./_cof":118,"./_is-object":151,"./_wks":226}],153:[function(require,module,exports){ +arguments[4][48][0].apply(exports,arguments) +},{"./_an-object":107,"dup":48}],154:[function(require,module,exports){ +arguments[4][49][0].apply(exports,arguments) +},{"./_hide":142,"./_object-create":170,"./_property-desc":189,"./_set-to-string-tag":198,"./_wks":226,"dup":49}],155:[function(require,module,exports){ +arguments[4][50][0].apply(exports,arguments) +},{"./_export":133,"./_hide":142,"./_iter-create":154,"./_iterators":158,"./_library":159,"./_object-gpo":178,"./_redefine":191,"./_set-to-string-tag":198,"./_wks":226,"dup":50}],156:[function(require,module,exports){ +arguments[4][51][0].apply(exports,arguments) +},{"./_wks":226,"dup":51}],157:[function(require,module,exports){ +arguments[4][52][0].apply(exports,arguments) +},{"dup":52}],158:[function(require,module,exports){ +arguments[4][53][0].apply(exports,arguments) +},{"dup":53}],159:[function(require,module,exports){ +module.exports = false; + +},{}],160:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + +},{}],161:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + +},{"./_math-sign":164}],162:[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); +}; + +},{}],163:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + +},{}],164:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + +},{}],165:[function(require,module,exports){ +arguments[4][55][0].apply(exports,arguments) +},{"./_fails":135,"./_has":141,"./_is-object":151,"./_object-dp":171,"./_uid":221,"dup":55}],166:[function(require,module,exports){ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var 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); + var 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":133,"./_shared":200,"./es6.map":258,"./es6.weak-map":364}],167:[function(require,module,exports){ +arguments[4][56][0].apply(exports,arguments) +},{"./_cof":118,"./_global":140,"./_task":210,"dup":56}],168:[function(require,module,exports){ +arguments[4][57][0].apply(exports,arguments) +},{"./_a-function":103,"dup":57}],169:[function(require,module,exports){ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var 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); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + +},{"./_fails":135,"./_iobject":147,"./_object-gops":177,"./_object-keys":180,"./_object-pie":181,"./_to-object":216}],170:[function(require,module,exports){ +arguments[4][58][0].apply(exports,arguments) +},{"./_an-object":107,"./_dom-create":130,"./_enum-bug-keys":131,"./_html":143,"./_object-dps":172,"./_shared-key":199,"dup":58}],171:[function(require,module,exports){ +arguments[4][59][0].apply(exports,arguments) +},{"./_an-object":107,"./_descriptors":129,"./_ie8-dom-define":144,"./_to-primitive":217,"dup":59}],172:[function(require,module,exports){ +arguments[4][60][0].apply(exports,arguments) +},{"./_an-object":107,"./_descriptors":129,"./_object-dp":171,"./_object-keys":180,"dup":60}],173:[function(require,module,exports){ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); + +},{"./_fails":135,"./_global":140,"./_library":159}],174:[function(require,module,exports){ +arguments[4][61][0].apply(exports,arguments) +},{"./_descriptors":129,"./_has":141,"./_ie8-dom-define":144,"./_object-pie":181,"./_property-desc":189,"./_to-iobject":214,"./_to-primitive":217,"dup":61}],175:[function(require,module,exports){ +arguments[4][62][0].apply(exports,arguments) +},{"./_object-gopn":176,"./_to-iobject":214,"dup":62}],176:[function(require,module,exports){ +arguments[4][63][0].apply(exports,arguments) +},{"./_enum-bug-keys":131,"./_object-keys-internal":179,"dup":63}],177:[function(require,module,exports){ +arguments[4][64][0].apply(exports,arguments) +},{"dup":64}],178:[function(require,module,exports){ +arguments[4][65][0].apply(exports,arguments) +},{"./_has":141,"./_shared-key":199,"./_to-object":216,"dup":65}],179:[function(require,module,exports){ +arguments[4][66][0].apply(exports,arguments) +},{"./_array-includes":111,"./_has":141,"./_shared-key":199,"./_to-iobject":214,"dup":66}],180:[function(require,module,exports){ +arguments[4][67][0].apply(exports,arguments) +},{"./_enum-bug-keys":131,"./_object-keys-internal":179,"dup":67}],181:[function(require,module,exports){ +arguments[4][68][0].apply(exports,arguments) +},{"dup":68}],182:[function(require,module,exports){ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + +},{"./_core":123,"./_export":133,"./_fails":135}],183:[function(require,module,exports){ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + +},{"./_object-keys":180,"./_object-pie":181,"./_to-iobject":214}],184:[function(require,module,exports){ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + +},{"./_an-object":107,"./_global":140,"./_object-gopn":176,"./_object-gops":177}],185:[function(require,module,exports){ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + +},{"./_global":140,"./_string-trim":208,"./_string-ws":209}],186:[function(require,module,exports){ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var 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":140,"./_string-trim":208,"./_string-ws":209}],187:[function(require,module,exports){ +arguments[4][69][0].apply(exports,arguments) +},{"dup":69}],188:[function(require,module,exports){ +arguments[4][70][0].apply(exports,arguments) +},{"./_an-object":107,"./_is-object":151,"./_new-promise-capability":168,"dup":70}],189:[function(require,module,exports){ +arguments[4][71][0].apply(exports,arguments) +},{"dup":71}],190:[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":191}],191:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var 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":123,"./_global":140,"./_has":141,"./_hide":142,"./_uid":221}],192:[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); + }; +}; + +},{}],193:[function(require,module,exports){ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + +},{}],194:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + +},{"./_a-function":103,"./_ctx":125,"./_export":133,"./_for-of":139}],195:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + +},{"./_export":133}],196:[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'); +var 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":107,"./_ctx":125,"./_is-object":151,"./_object-gopd":174}],197:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var 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":129,"./_global":140,"./_object-dp":171,"./_wks":226}],198:[function(require,module,exports){ +arguments[4][75][0].apply(exports,arguments) +},{"./_has":141,"./_object-dp":171,"./_wks":226,"dup":75}],199:[function(require,module,exports){ +arguments[4][76][0].apply(exports,arguments) +},{"./_shared":200,"./_uid":221,"dup":76}],200:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"./_core":123,"./_global":140,"./_library":159,"dup":77}],201:[function(require,module,exports){ +arguments[4][78][0].apply(exports,arguments) +},{"./_a-function":103,"./_an-object":107,"./_wks":226,"dup":78}],202:[function(require,module,exports){ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + +},{"./_fails":135}],203:[function(require,module,exports){ +arguments[4][79][0].apply(exports,arguments) +},{"./_defined":128,"./_to-integer":213,"dup":79}],204:[function(require,module,exports){ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var 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":128,"./_is-regexp":152}],205:[function(require,module,exports){ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +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":128,"./_export":133,"./_fails":135}],206:[function(require,module,exports){ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var 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":128,"./_string-repeat":207,"./_to-length":215}],207:[function(require,module,exports){ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var 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":128,"./_to-integer":213}],208:[function(require,module,exports){ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var 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":128,"./_export":133,"./_fails":135,"./_string-ws":209}],209:[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'; + +},{}],210:[function(require,module,exports){ +arguments[4][80][0].apply(exports,arguments) +},{"./_cof":118,"./_ctx":125,"./_dom-create":130,"./_global":140,"./_html":143,"./_invoke":146,"dup":80}],211:[function(require,module,exports){ +arguments[4][81][0].apply(exports,arguments) +},{"./_to-integer":213,"dup":81}],212:[function(require,module,exports){ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + +},{"./_to-integer":213,"./_to-length":215}],213:[function(require,module,exports){ +arguments[4][82][0].apply(exports,arguments) +},{"dup":82}],214:[function(require,module,exports){ +arguments[4][83][0].apply(exports,arguments) +},{"./_defined":128,"./_iobject":147,"dup":83}],215:[function(require,module,exports){ +arguments[4][84][0].apply(exports,arguments) +},{"./_to-integer":213,"dup":84}],216:[function(require,module,exports){ +arguments[4][85][0].apply(exports,arguments) +},{"./_defined":128,"dup":85}],217:[function(require,module,exports){ +arguments[4][86][0].apply(exports,arguments) +},{"./_is-object":151,"dup":86}],218:[function(require,module,exports){ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + 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; + var length = list.length; + var 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); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var 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; + var length = arguments.length; + var 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; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + 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); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var 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; + } 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$, { + slice: $slice, + 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]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var 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; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + 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 (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // 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(toIndex(data)); + 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]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $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 + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $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); + }; +} else module.exports = function () { /* empty */ }; + +},{"./_an-instance":106,"./_array-copy-within":108,"./_array-fill":109,"./_array-includes":111,"./_array-methods":112,"./_classof":117,"./_ctx":125,"./_descriptors":129,"./_export":133,"./_fails":135,"./_global":140,"./_has":141,"./_hide":142,"./_is-array-iter":148,"./_is-object":151,"./_iter-detect":156,"./_iterators":158,"./_library":159,"./_object-create":170,"./_object-dp":171,"./_object-gopd":174,"./_object-gopn":176,"./_object-gpo":178,"./_property-desc":189,"./_redefine-all":190,"./_set-species":197,"./_species-constructor":201,"./_to-absolute-index":211,"./_to-index":212,"./_to-integer":213,"./_to-length":215,"./_to-object":216,"./_to-primitive":217,"./_typed":220,"./_typed-buffer":219,"./_uid":221,"./_wks":226,"./core.get-iterator-method":227,"./es6.array.iterator":239}],219:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + 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; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var 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); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new 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]; + var 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 () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(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)); + var $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":106,"./_array-fill":109,"./_descriptors":129,"./_fails":135,"./_global":140,"./_hide":142,"./_library":159,"./_object-dp":171,"./_object-gopn":176,"./_redefine-all":190,"./_set-to-string-tag":198,"./_to-index":212,"./_to-integer":213,"./_to-length":215,"./_typed":220}],220:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var 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":140,"./_hide":142,"./_uid":221}],221:[function(require,module,exports){ +arguments[4][87][0].apply(exports,arguments) +},{"dup":87}],222:[function(require,module,exports){ +arguments[4][88][0].apply(exports,arguments) +},{"./_global":140,"dup":88}],223:[function(require,module,exports){ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + +},{"./_is-object":151}],224:[function(require,module,exports){ +arguments[4][89][0].apply(exports,arguments) +},{"./_core":123,"./_global":140,"./_library":159,"./_object-dp":171,"./_wks-ext":225,"dup":89}],225:[function(require,module,exports){ +arguments[4][90][0].apply(exports,arguments) +},{"./_wks":226,"dup":90}],226:[function(require,module,exports){ +arguments[4][91][0].apply(exports,arguments) +},{"./_global":140,"./_shared":200,"./_uid":221,"dup":91}],227:[function(require,module,exports){ +arguments[4][92][0].apply(exports,arguments) +},{"./_classof":117,"./_core":123,"./_iterators":158,"./_wks":226,"dup":92}],228:[function(require,module,exports){ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + +},{"./_export":133,"./_replacer":192}],229:[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":105,"./_array-copy-within":108,"./_export":133}],230:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":112,"./_export":133,"./_strict-method":202}],231:[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":105,"./_array-fill":109,"./_export":133}],232:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":112,"./_export":133,"./_strict-method":202}],233:[function(require,module,exports){ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var 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":105,"./_array-methods":112,"./_export":133}],234:[function(require,module,exports){ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var 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":105,"./_array-methods":112,"./_export":133}],235:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var 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":112,"./_export":133,"./_strict-method":202}],236:[function(require,module,exports){ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var 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); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var 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++) { + createProperty(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++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + +},{"./_create-property":124,"./_ctx":125,"./_export":133,"./_is-array-iter":148,"./_iter-call":153,"./_iter-detect":156,"./_to-length":215,"./_to-object":216,"./core.get-iterator-method":227}],237:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + +},{"./_array-includes":111,"./_export":133,"./_strict-method":202}],238:[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":133,"./_is-array":149}],239:[function(require,module,exports){ +arguments[4][93][0].apply(exports,arguments) +},{"./_add-to-unscopables":105,"./_iter-define":155,"./_iter-step":157,"./_iterators":158,"./_to-iobject":214,"dup":93}],240:[function(require,module,exports){ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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":133,"./_iobject":147,"./_strict-method":202,"./_to-iobject":214}],241:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var 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 || 0; + return -1; + } +}); + +},{"./_export":133,"./_strict-method":202,"./_to-integer":213,"./_to-iobject":214,"./_to-length":215}],242:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":112,"./_export":133,"./_strict-method":202}],243:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + +},{"./_create-property":124,"./_export":133,"./_fails":135}],244:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":113,"./_export":133,"./_strict-method":202}],245:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":113,"./_export":133,"./_strict-method":202}],246:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var 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); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + +},{"./_cof":118,"./_export":133,"./_fails":135,"./_html":143,"./_to-absolute-index":211,"./_to-length":215}],247:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":112,"./_export":133,"./_strict-method":202}],248:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var 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":103,"./_export":133,"./_fails":135,"./_strict-method":202,"./_to-object":216}],249:[function(require,module,exports){ +require('./_set-species')('Array'); + +},{"./_set-species":197}],250:[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":133}],251:[function(require,module,exports){ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + +},{"./_date-to-iso-string":126,"./_export":133}],252:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var 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', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + +},{"./_export":133,"./_fails":135,"./_to-object":216,"./_to-primitive":217}],253:[function(require,module,exports){ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); + +},{"./_date-to-primitive":127,"./_hide":142,"./_wks":226}],254:[function(require,module,exports){ +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + require('./_redefine')(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + +},{"./_redefine":191}],255:[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":116,"./_export":133}],256:[function(require,module,exports){ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var 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":151,"./_object-dp":171,"./_object-gpo":178,"./_wks":226}],257:[function(require,module,exports){ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + +},{"./_descriptors":129,"./_object-dp":171}],258:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 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(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + +},{"./_collection":122,"./_collection-strong":119,"./_validate-collection":223}],259:[function(require,module,exports){ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), '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":133,"./_math-log1p":162}],260:[function(require,module,exports){ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + +},{"./_export":133}],261:[function(require,module,exports){ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + +},{"./_export":133}],262:[function(require,module,exports){ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + +},{"./_export":133,"./_math-sign":164}],263:[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":133}],264:[function(require,module,exports){ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + +},{"./_export":133}],265:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + +},{"./_export":133,"./_math-expm1":160}],266:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); + +},{"./_export":133,"./_math-fround":161}],267:[function(require,module,exports){ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var 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":133}],268:[function(require,module,exports){ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $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; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + +},{"./_export":133,"./_fails":135}],269:[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.LOG10E; + } +}); + +},{"./_export":133}],270:[function(require,module,exports){ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); + +},{"./_export":133,"./_math-log1p":162}],271:[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":133}],272:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); + +},{"./_export":133,"./_math-sign":164}],273:[function(require,module,exports){ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var 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":133,"./_fails":135,"./_math-expm1":160}],274:[function(require,module,exports){ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + +},{"./_export":133,"./_math-expm1":160}],275:[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":133}],276:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; +var 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); + var 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; + var 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":118,"./_descriptors":129,"./_fails":135,"./_global":140,"./_has":141,"./_inherit-if-required":145,"./_object-create":170,"./_object-dp":171,"./_object-gopd":174,"./_object-gopn":176,"./_redefine":191,"./_string-trim":208,"./_to-primitive":217}],277:[function(require,module,exports){ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + +},{"./_export":133}],278:[function(require,module,exports){ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + +},{"./_export":133,"./_global":140}],279:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); + +},{"./_export":133,"./_is-integer":150}],280:[function(require,module,exports){ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + +},{"./_export":133}],281:[function(require,module,exports){ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + +},{"./_export":133,"./_is-integer":150}],282:[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":133}],283:[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":133}],284:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + +},{"./_export":133,"./_parse-float":185}],285:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + +},{"./_export":133,"./_parse-int":186}],286:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var 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; + var 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.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + 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":104,"./_export":133,"./_fails":135,"./_string-repeat":207,"./_to-integer":213}],287:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.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":104,"./_export":133,"./_fails":135}],288:[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":133,"./_object-assign":169}],289:[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":133,"./_object-create":170}],290:[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":129,"./_export":133,"./_object-dps":172}],291:[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":129,"./_export":133,"./_object-dp":171}],292:[function(require,module,exports){ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + +},{"./_is-object":151,"./_meta":165,"./_object-sap":182}],293:[function(require,module,exports){ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + +},{"./_object-gopd":174,"./_object-sap":182,"./_to-iobject":214}],294:[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":175,"./_object-sap":182}],295:[function(require,module,exports){ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + +},{"./_object-gpo":178,"./_object-sap":182,"./_to-object":216}],296:[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":151,"./_object-sap":182}],297:[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":151,"./_object-sap":182}],298:[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":151,"./_object-sap":182}],299:[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":133,"./_same-value":193}],300:[function(require,module,exports){ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + +},{"./_object-keys":180,"./_object-sap":182,"./_to-object":216}],301:[function(require,module,exports){ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + +},{"./_is-object":151,"./_meta":165,"./_object-sap":182}],302:[function(require,module,exports){ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + +},{"./_is-object":151,"./_meta":165,"./_object-sap":182}],303:[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":133,"./_set-proto":196}],304:[function(require,module,exports){ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + +},{"./_classof":117,"./_redefine":191,"./_wks":226}],305:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + +},{"./_export":133,"./_parse-float":185}],306:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + +},{"./_export":133,"./_parse-int":186}],307:[function(require,module,exports){ +arguments[4][95][0].apply(exports,arguments) +},{"./_a-function":103,"./_an-instance":106,"./_classof":117,"./_core":123,"./_ctx":125,"./_export":133,"./_for-of":139,"./_global":140,"./_is-object":151,"./_iter-detect":156,"./_library":159,"./_microtask":167,"./_new-promise-capability":168,"./_perform":187,"./_promise-resolve":188,"./_redefine-all":190,"./_set-species":197,"./_set-to-string-tag":198,"./_species-constructor":201,"./_task":210,"./_user-agent":222,"./_wks":226,"dup":95}],308:[function(require,module,exports){ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + +},{"./_a-function":103,"./_an-object":107,"./_export":133,"./_fails":135,"./_global":140}],309:[function(require,module,exports){ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (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; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + +},{"./_a-function":103,"./_an-object":107,"./_bind":116,"./_export":133,"./_fails":135,"./_global":140,"./_is-object":151,"./_object-create":170}],310:[function(require,module,exports){ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + 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":107,"./_export":133,"./_fails":135,"./_object-dp":171,"./_to-primitive":217}],311:[function(require,module,exports){ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var 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":107,"./_export":133,"./_object-gopd":174}],312:[function(require,module,exports){ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var 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":107,"./_export":133,"./_iter-create":154}],313:[function(require,module,exports){ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + +},{"./_an-object":107,"./_export":133,"./_object-gopd":174}],314:[function(require,module,exports){ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + +},{"./_an-object":107,"./_export":133,"./_object-gpo":178}],315:[function(require,module,exports){ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var 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":107,"./_export":133,"./_has":141,"./_is-object":151,"./_object-gopd":174,"./_object-gpo":178}],316:[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":133}],317:[function(require,module,exports){ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + +},{"./_an-object":107,"./_export":133}],318:[function(require,module,exports){ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); + +},{"./_export":133,"./_own-keys":184}],319:[function(require,module,exports){ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $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":107,"./_export":133}],320:[function(require,module,exports){ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var 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":133,"./_set-proto":196}],321:[function(require,module,exports){ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var 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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + +},{"./_an-object":107,"./_export":133,"./_has":141,"./_is-object":151,"./_object-dp":171,"./_object-gopd":174,"./_object-gpo":178,"./_property-desc":189}],322:[function(require,module,exports){ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var 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; + var piRE = isRegExp(p); + var 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":129,"./_fails":135,"./_flags":137,"./_global":140,"./_inherit-if-required":145,"./_is-regexp":152,"./_object-dp":171,"./_object-gopn":176,"./_redefine":191,"./_set-species":197,"./_wks":226}],323:[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":129,"./_flags":137,"./_object-dp":171}],324:[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); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + +},{"./_fix-re-wks":136}],325:[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); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + +},{"./_fix-re-wks":136}],326:[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); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + +},{"./_fix-re-wks":136}],327:[function(require,module,exports){ +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = require('./_is-regexp'); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var 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 + // eslint-disable-next-line no-loop-func + 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); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + +},{"./_fix-re-wks":136,"./_is-regexp":152}],328:[function(require,module,exports){ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $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":107,"./_descriptors":129,"./_fails":135,"./_flags":137,"./_redefine":191,"./es6.regexp.flags":323}],329:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 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(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + +},{"./_collection":122,"./_collection-strong":119,"./_validate-collection":223}],330:[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":205}],331:[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":205}],332:[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":205}],333:[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":205}],334:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":133,"./_string-at":203}],335:[function(require,module,exports){ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $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); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + +},{"./_export":133,"./_fails-is-regexp":134,"./_string-context":204,"./_to-length":215}],336:[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":205}],337:[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":205}],338:[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":205}],339:[function(require,module,exports){ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $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 = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(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":133,"./_to-absolute-index":211}],340:[function(require,module,exports){ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var 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":133,"./_fails-is-regexp":134,"./_string-context":204}],341:[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":205}],342:[function(require,module,exports){ +arguments[4][96][0].apply(exports,arguments) +},{"./_iter-define":155,"./_string-at":203,"dup":96}],343:[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":205}],344:[function(require,module,exports){ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + +},{"./_export":133,"./_to-iobject":214,"./_to-length":215}],345:[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":133,"./_string-repeat":207}],346:[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":205}],347:[function(require,module,exports){ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $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); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + +},{"./_export":133,"./_fails-is-regexp":134,"./_string-context":204,"./_to-length":215}],348:[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":205}],349:[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":205}],350:[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":205}],351:[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":208}],352:[function(require,module,exports){ +arguments[4][97][0].apply(exports,arguments) +},{"./_an-object":107,"./_descriptors":129,"./_enum-keys":132,"./_export":133,"./_fails":135,"./_global":140,"./_has":141,"./_hide":142,"./_is-array":149,"./_is-object":151,"./_library":159,"./_meta":165,"./_object-create":170,"./_object-dp":171,"./_object-gopd":174,"./_object-gopn":176,"./_object-gopn-ext":175,"./_object-gops":177,"./_object-keys":180,"./_object-pie":181,"./_property-desc":189,"./_redefine":191,"./_set-to-string-tag":198,"./_shared":200,"./_to-iobject":214,"./_to-primitive":217,"./_uid":221,"./_wks":226,"./_wks-define":224,"./_wks-ext":225,"dup":97}],353:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var 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; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); + +},{"./_an-object":107,"./_export":133,"./_fails":135,"./_global":140,"./_is-object":151,"./_set-species":197,"./_species-constructor":201,"./_to-absolute-index":211,"./_to-length":215,"./_typed":220,"./_typed-buffer":219}],354:[function(require,module,exports){ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); + +},{"./_export":133,"./_typed":220,"./_typed-buffer":219}],355:[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":218}],356:[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":218}],357:[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":218}],358:[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":218}],359:[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":218}],360:[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":218}],361:[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":218}],362:[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":218}],363:[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":218}],364:[function(require,module,exports){ +'use strict'; +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var validate = require('./_validate-collection'); +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var tmp = {}; +var 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(validate(this, WEAK_MAP)).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(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var 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":112,"./_collection":122,"./_collection-weak":121,"./_fails":135,"./_is-object":151,"./_meta":165,"./_object-assign":169,"./_redefine":191,"./_validate-collection":223}],365:[function(require,module,exports){ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, 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(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + +},{"./_collection":122,"./_collection-weak":121,"./_validate-collection":223}],366:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); + +},{"./_a-function":103,"./_add-to-unscopables":105,"./_array-species-create":115,"./_export":133,"./_flatten-into-array":138,"./_to-length":215,"./_to-object":216}],367:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); + +},{"./_add-to-unscopables":105,"./_array-species-create":115,"./_export":133,"./_flatten-into-array":138,"./_to-integer":213,"./_to-length":215,"./_to-object":216}],368:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); + +},{"./_add-to-unscopables":105,"./_array-includes":111,"./_export":133}],369:[function(require,module,exports){ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + +},{"./_cof":118,"./_export":133,"./_global":140,"./_microtask":167}],370:[function(require,module,exports){ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + +},{"./_cof":118,"./_export":133}],371:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); + +},{"./_export":133,"./_global":140}],372:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); + +},{"./_set-collection-from":194}],373:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); + +},{"./_set-collection-of":195}],374:[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":120,"./_export":133}],375:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + +},{"./_export":133}],376:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + +},{"./_export":133}],377:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + +},{"./_export":133}],378:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + +},{"./_export":133,"./_math-fround":161,"./_math-scale":163}],379:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + +},{"./_export":133}],380:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + +},{"./_export":133}],381:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + +},{"./_export":133}],382:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + +},{"./_export":133}],383:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + +},{"./_export":133}],384:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); + +},{"./_export":133,"./_math-scale":163}],385:[function(require,module,exports){ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + +},{"./_export":133}],386:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + +},{"./_export":133}],387:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":103,"./_descriptors":129,"./_export":133,"./_object-dp":171,"./_object-forced-pam":173,"./_to-object":216}],388:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":103,"./_descriptors":129,"./_export":133,"./_object-dp":171,"./_object-forced-pam":173,"./_to-object":216}],389:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + +},{"./_export":133,"./_object-to-array":183}],390:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + +},{"./_create-property":124,"./_export":133,"./_object-gopd":174,"./_own-keys":184,"./_to-iobject":214}],391:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":129,"./_export":133,"./_object-forced-pam":173,"./_object-gopd":174,"./_object-gpo":178,"./_to-object":216,"./_to-primitive":217}],392:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":129,"./_export":133,"./_object-forced-pam":173,"./_object-gopd":174,"./_object-gpo":178,"./_to-object":216,"./_to-primitive":217}],393:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + +},{"./_export":133,"./_object-to-array":183}],394:[function(require,module,exports){ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); + +},{"./_a-function":103,"./_an-instance":106,"./_an-object":107,"./_core":123,"./_export":133,"./_for-of":139,"./_global":140,"./_hide":142,"./_microtask":167,"./_redefine-all":190,"./_set-species":197,"./_wks":226}],395:[function(require,module,exports){ +arguments[4][98][0].apply(exports,arguments) +},{"./_core":123,"./_export":133,"./_global":140,"./_promise-resolve":188,"./_species-constructor":201,"dup":98}],396:[function(require,module,exports){ +arguments[4][99][0].apply(exports,arguments) +},{"./_export":133,"./_new-promise-capability":168,"./_perform":187,"dup":99}],397:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + +},{"./_an-object":107,"./_metadata":166}],398:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var 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":107,"./_metadata":166}],399:[function(require,module,exports){ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var 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":107,"./_array-from-iterable":110,"./_metadata":166,"./_object-gpo":178,"./es6.set":329}],400:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var 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":107,"./_metadata":166,"./_object-gpo":178}],401:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + +},{"./_an-object":107,"./_metadata":166}],402:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var 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":107,"./_metadata":166}],403:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":107,"./_metadata":166,"./_object-gpo":178}],404:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":107,"./_metadata":166}],405:[function(require,module,exports){ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var 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":103,"./_an-object":107,"./_metadata":166}],406:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); + +},{"./_set-collection-from":194}],407:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); + +},{"./_set-collection-of":195}],408:[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":120,"./_export":133}],409:[function(require,module,exports){ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + +},{"./_export":133,"./_string-at":203}],410:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + +},{"./_defined":128,"./_export":133,"./_flags":137,"./_is-regexp":152,"./_iter-create":154,"./_to-length":215}],411:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + +},{"./_export":133,"./_string-pad":206,"./_user-agent":222}],412:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + +},{"./_export":133,"./_string-pad":206,"./_user-agent":222}],413:[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":208}],414:[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":208}],415:[function(require,module,exports){ +arguments[4][100][0].apply(exports,arguments) +},{"./_wks-define":224,"dup":100}],416:[function(require,module,exports){ +arguments[4][101][0].apply(exports,arguments) +},{"./_wks-define":224,"dup":101}],417:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); + +},{"./_export":133,"./_global":140}],418:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); + +},{"./_set-collection-from":194}],419:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); + +},{"./_set-collection-of":195}],420:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); + +},{"./_set-collection-from":194}],421:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); + +},{"./_set-collection-of":195}],422:[function(require,module,exports){ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + +},{"./_global":140,"./_hide":142,"./_iterators":158,"./_object-keys":180,"./_redefine":191,"./_wks":226,"./es6.array.iterator":239}],423:[function(require,module,exports){ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + +},{"./_export":133,"./_task":210}],424:[function(require,module,exports){ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + +},{"./_export":133,"./_global":140,"./_user-agent":222}],425:[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-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +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.array.flat-map'); +require('./modules/es7.array.flatten'); +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.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +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/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); + +},{"./modules/_core":123,"./modules/es6.array.copy-within":229,"./modules/es6.array.every":230,"./modules/es6.array.fill":231,"./modules/es6.array.filter":232,"./modules/es6.array.find":234,"./modules/es6.array.find-index":233,"./modules/es6.array.for-each":235,"./modules/es6.array.from":236,"./modules/es6.array.index-of":237,"./modules/es6.array.is-array":238,"./modules/es6.array.iterator":239,"./modules/es6.array.join":240,"./modules/es6.array.last-index-of":241,"./modules/es6.array.map":242,"./modules/es6.array.of":243,"./modules/es6.array.reduce":245,"./modules/es6.array.reduce-right":244,"./modules/es6.array.slice":246,"./modules/es6.array.some":247,"./modules/es6.array.sort":248,"./modules/es6.array.species":249,"./modules/es6.date.now":250,"./modules/es6.date.to-iso-string":251,"./modules/es6.date.to-json":252,"./modules/es6.date.to-primitive":253,"./modules/es6.date.to-string":254,"./modules/es6.function.bind":255,"./modules/es6.function.has-instance":256,"./modules/es6.function.name":257,"./modules/es6.map":258,"./modules/es6.math.acosh":259,"./modules/es6.math.asinh":260,"./modules/es6.math.atanh":261,"./modules/es6.math.cbrt":262,"./modules/es6.math.clz32":263,"./modules/es6.math.cosh":264,"./modules/es6.math.expm1":265,"./modules/es6.math.fround":266,"./modules/es6.math.hypot":267,"./modules/es6.math.imul":268,"./modules/es6.math.log10":269,"./modules/es6.math.log1p":270,"./modules/es6.math.log2":271,"./modules/es6.math.sign":272,"./modules/es6.math.sinh":273,"./modules/es6.math.tanh":274,"./modules/es6.math.trunc":275,"./modules/es6.number.constructor":276,"./modules/es6.number.epsilon":277,"./modules/es6.number.is-finite":278,"./modules/es6.number.is-integer":279,"./modules/es6.number.is-nan":280,"./modules/es6.number.is-safe-integer":281,"./modules/es6.number.max-safe-integer":282,"./modules/es6.number.min-safe-integer":283,"./modules/es6.number.parse-float":284,"./modules/es6.number.parse-int":285,"./modules/es6.number.to-fixed":286,"./modules/es6.number.to-precision":287,"./modules/es6.object.assign":288,"./modules/es6.object.create":289,"./modules/es6.object.define-properties":290,"./modules/es6.object.define-property":291,"./modules/es6.object.freeze":292,"./modules/es6.object.get-own-property-descriptor":293,"./modules/es6.object.get-own-property-names":294,"./modules/es6.object.get-prototype-of":295,"./modules/es6.object.is":299,"./modules/es6.object.is-extensible":296,"./modules/es6.object.is-frozen":297,"./modules/es6.object.is-sealed":298,"./modules/es6.object.keys":300,"./modules/es6.object.prevent-extensions":301,"./modules/es6.object.seal":302,"./modules/es6.object.set-prototype-of":303,"./modules/es6.object.to-string":304,"./modules/es6.parse-float":305,"./modules/es6.parse-int":306,"./modules/es6.promise":307,"./modules/es6.reflect.apply":308,"./modules/es6.reflect.construct":309,"./modules/es6.reflect.define-property":310,"./modules/es6.reflect.delete-property":311,"./modules/es6.reflect.enumerate":312,"./modules/es6.reflect.get":315,"./modules/es6.reflect.get-own-property-descriptor":313,"./modules/es6.reflect.get-prototype-of":314,"./modules/es6.reflect.has":316,"./modules/es6.reflect.is-extensible":317,"./modules/es6.reflect.own-keys":318,"./modules/es6.reflect.prevent-extensions":319,"./modules/es6.reflect.set":321,"./modules/es6.reflect.set-prototype-of":320,"./modules/es6.regexp.constructor":322,"./modules/es6.regexp.flags":323,"./modules/es6.regexp.match":324,"./modules/es6.regexp.replace":325,"./modules/es6.regexp.search":326,"./modules/es6.regexp.split":327,"./modules/es6.regexp.to-string":328,"./modules/es6.set":329,"./modules/es6.string.anchor":330,"./modules/es6.string.big":331,"./modules/es6.string.blink":332,"./modules/es6.string.bold":333,"./modules/es6.string.code-point-at":334,"./modules/es6.string.ends-with":335,"./modules/es6.string.fixed":336,"./modules/es6.string.fontcolor":337,"./modules/es6.string.fontsize":338,"./modules/es6.string.from-code-point":339,"./modules/es6.string.includes":340,"./modules/es6.string.italics":341,"./modules/es6.string.iterator":342,"./modules/es6.string.link":343,"./modules/es6.string.raw":344,"./modules/es6.string.repeat":345,"./modules/es6.string.small":346,"./modules/es6.string.starts-with":347,"./modules/es6.string.strike":348,"./modules/es6.string.sub":349,"./modules/es6.string.sup":350,"./modules/es6.string.trim":351,"./modules/es6.symbol":352,"./modules/es6.typed.array-buffer":353,"./modules/es6.typed.data-view":354,"./modules/es6.typed.float32-array":355,"./modules/es6.typed.float64-array":356,"./modules/es6.typed.int16-array":357,"./modules/es6.typed.int32-array":358,"./modules/es6.typed.int8-array":359,"./modules/es6.typed.uint16-array":360,"./modules/es6.typed.uint32-array":361,"./modules/es6.typed.uint8-array":362,"./modules/es6.typed.uint8-clamped-array":363,"./modules/es6.weak-map":364,"./modules/es6.weak-set":365,"./modules/es7.array.flat-map":366,"./modules/es7.array.flatten":367,"./modules/es7.array.includes":368,"./modules/es7.asap":369,"./modules/es7.error.is-error":370,"./modules/es7.global":371,"./modules/es7.map.from":372,"./modules/es7.map.of":373,"./modules/es7.map.to-json":374,"./modules/es7.math.clamp":375,"./modules/es7.math.deg-per-rad":376,"./modules/es7.math.degrees":377,"./modules/es7.math.fscale":378,"./modules/es7.math.iaddh":379,"./modules/es7.math.imulh":380,"./modules/es7.math.isubh":381,"./modules/es7.math.rad-per-deg":382,"./modules/es7.math.radians":383,"./modules/es7.math.scale":384,"./modules/es7.math.signbit":385,"./modules/es7.math.umulh":386,"./modules/es7.object.define-getter":387,"./modules/es7.object.define-setter":388,"./modules/es7.object.entries":389,"./modules/es7.object.get-own-property-descriptors":390,"./modules/es7.object.lookup-getter":391,"./modules/es7.object.lookup-setter":392,"./modules/es7.object.values":393,"./modules/es7.observable":394,"./modules/es7.promise.finally":395,"./modules/es7.promise.try":396,"./modules/es7.reflect.define-metadata":397,"./modules/es7.reflect.delete-metadata":398,"./modules/es7.reflect.get-metadata":400,"./modules/es7.reflect.get-metadata-keys":399,"./modules/es7.reflect.get-own-metadata":402,"./modules/es7.reflect.get-own-metadata-keys":401,"./modules/es7.reflect.has-metadata":403,"./modules/es7.reflect.has-own-metadata":404,"./modules/es7.reflect.metadata":405,"./modules/es7.set.from":406,"./modules/es7.set.of":407,"./modules/es7.set.to-json":408,"./modules/es7.string.at":409,"./modules/es7.string.match-all":410,"./modules/es7.string.pad-end":411,"./modules/es7.string.pad-start":412,"./modules/es7.string.trim-left":413,"./modules/es7.string.trim-right":414,"./modules/es7.symbol.async-iterator":415,"./modules/es7.symbol.observable":416,"./modules/es7.system.global":417,"./modules/es7.weak-map.from":418,"./modules/es7.weak-map.of":419,"./modules/es7.weak-set.from":420,"./modules/es7.weak-set.of":421,"./modules/web.dom.iterable":422,"./modules/web.immediate":423,"./modules/web.timers":424}],426:[function(require,module,exports){ +(function (global){ +module.exports = false; + +// Only Node.JS has a process variable that is of [[Class]] process +try { + module.exports = Object.prototype.toString.call(global.process) === '[object process]' +} catch(e) {} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],427:[function(require,module,exports){ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = require("./runtime"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} + +},{"./runtime":428}],428:[function(require,module,exports){ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + 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 and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.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() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + 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; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + 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 + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return 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; + resolve(result); + }, reject); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + 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 + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // 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(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.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; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + 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; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + 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; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + 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.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + 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 = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + 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 + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); + +},{}],429:[function(require,module,exports){ +'use strict'; + +var _regenerator = require('babel-runtime/regenerator'); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); + +var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); + +var _typeof2 = require('babel-runtime/helpers/typeof'); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _util = require('./util.js'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +/* eslint-disable */ +/** + * used in docs/index.html + */ +require('babel-polyfill'); +var BroadcastChannel = require('../../'); + + +var methodType = (0, _util.getParameterByName)('methodType'); +if (!methodType || methodType === '' || methodType === 'default') methodType = undefined; + +// set select-input +var selectEl = document.getElementById('method-type-select'); +selectEl.onchange = function (ev) { + var newValue = selectEl.value; + var newUrl = location.origin + location.pathname + '?methodType=' + newValue; + location = newUrl; +}; +if (methodType) { + selectEl.value = methodType; +} + +var TEST_MESSAGES = 50; +var body = document.getElementById('body'); +var msgContainer = document.getElementById('messages'); +var rightContainer = document.getElementById('right'); +var messageCountContainer = document.getElementById('msg-count'); +var stateContainer = document.getElementById('state'); +var iframeEl = document.getElementById('test-iframe'); + +document.getElementById('user-agent').innerHTML = navigator.userAgent; + +var startTime; +var options = {}; +console.log('++++++'); +console.log(typeof BroadcastChannel === 'undefined' ? 'undefined' : (0, _typeof3['default'])(BroadcastChannel)); +var channel = new BroadcastChannel('foobar', { + type: methodType +}); +document.getElementById('method').innerHTML = channel.type; + +/** + * to measure the speed, we: + * 1. send message + * 2. wait until iframe and worker answers + * 3. repeat from 1. for TEST_MESSAGES times + */ +var messagesSend = 0; +var answerPool = {}; +var useWorker = false; + +function gotAllAnswers(answerPool) { + if (!answerPool.iframe) return false; + if (useWorker && !answerPool.worker) return false; + return true; +} + +channel.onmessage = function (msg) { + console.log('main: recieved msg' + JSON.stringify(msg)); + + answerPool[msg.from] = msg; + var textnode = document.createTextNode(JSON.stringify(msg) + '
'); + msgContainer.appendChild(textnode); + + if (gotAllAnswers(answerPool)) { + answerPool = {}; // reset + + if (messagesSend >= TEST_MESSAGES) { + // sucess + console.log('main: sucess'); + body.style.backgroundColor = 'green'; + stateContainer.innerHTML = 'SUCCESS'; + var amountTime = new Date().getTime() - startTime; + document.getElementById('time-amount').innerHTML = amountTime + 'ms'; + } else { + // send next message + messagesSend++; + console.log('main: send next message (' + messagesSend + ') ===================='); + messageCountContainer.innerHTML = messagesSend; + channel.postMessage({ + from: 'main', + foo: 'bar', + step: messagesSend + }); + } + } +}; + +var run = function () { + var _ref = (0, _asyncToGenerator3['default'])( /*#__PURE__*/_regenerator2['default'].mark(function _callee() { + var rand, worker; + return _regenerator2['default'].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + rand = new Date().getTime(); + + console.log('aaaa'); + + // load iframe + iframeEl.src = './iframe.html?channelName=' + channel.name + '&methodType=' + channel.type + '&t=' + rand; + _context.next = 5; + return new Promise(function (res) { + return iframeEl.onload = function () { + return res(); + }; + }); + + case 5: + console.log('main: Iframe has loaded'); + + // spawn web-worker if possible + + if (!(channel.type !== 'localstorage' && typeof window.Worker === 'function')) { + _context.next = 12; + break; + } + + useWorker = true; + worker = new Worker('worker.js?t=' + rand); + + worker.onerror = function (event) { + throw new Error('worker: ' + event.message + " (" + event.filename + ":" + event.lineno + ")"); + }; + _context.next = 12; + return new Promise(function (res) { + worker.addEventListener('message', function (e) { + // run when message returned, so we know the worker has started + console.log('main: Worker has started'); + res(); + }, false); + worker.postMessage({ + 'cmd': 'start', + 'msg': { + channelName: channel.name, + methodType: channel.type + } + }); + }); + + case 12: + console.log('========== START SENDING MESSAGES ' + channel.type); + startTime = new Date().getTime(); + channel.postMessage({ + from: 'main', + step: 0 + }); + console.log('main: message send (0)'); + + case 16: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + + return function run() { + return _ref.apply(this, arguments); + }; +}(); +run(); +},{"../../":1,"./util.js":430,"babel-polyfill":9,"babel-runtime/helpers/asyncToGenerator":14,"babel-runtime/helpers/typeof":15,"babel-runtime/regenerator":16}],430:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getParameterByName = getParameterByName; +// https://stackoverflow.com/a/901144/3443137 +function getParameterByName(name, url) { + if (!url) url = window.location.href; + name = name.replace(/[\[\]]/g, '\\$&'); + var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); + var results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, ' ')); +} +},{}]},{},[429]); diff --git a/docs/kirby.gif b/docs/kirby.gif new file mode 100644 index 0000000000000000000000000000000000000000..5adbfb9f473ed429e6e6f8b027d62ec585cf8867 GIT binary patch literal 109471 zcmcG#XIK+m6fHaf5<(9>fI#R)N+<$iA@rsYiZnq(Z=ykvCMEO^k=_YCR6~&_XaGe( zMY@Ox0RaI~5di@;T;A_K_qpZ&cYe(?v**k?Yo9Z-_S$<4jSVy|I*$M$z!y2-6i=aG zCQty9j3ALwBm@F+ilb1_6BO(O7Qhe?coKqu22eN{76~9GP~-_Txf+^<0{{||aEhD2 zBXDFSiGm@M(WF8eB{BfOU@#O6g+DV!l1Tu72GAq`fdjC37>)!Z5McNT%$XH{IqMTZ zq5*({C7+%($|;Gx3!Y@7zO}vz?lvDlt4klP?WRoVHg|&J8{+zim)lHk4NGN0K%7Dk&GeX02Bd+!viQZ z42=U|r@A>`&)+^ppia@aQ!E7mAdoO50e~R^Bm#y&0f=EfbpjH9ikZLw2nuRq0!i}Z z7CJR+q5v@R*#xm{|yX-IqMCHoH&~=3{Aq4 zPHkIK8Er5Caz^>yDe}w=H-R9NVWb{t6GK=$d5kz+arFmMXU zom~R{+cf}`3Y;>WGa?ZNVxgR}jw7Usp+uONNr_Qw<;zsKiqGOmY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 z<6M_e5p5w$^RBMbi}lXH(=tdrNP~82Su_M(C#$kYT_@>fcx7fZAv`&mE&)tkjKL~d z2F4|E+8s8g2`A7_6CgS~*=ZgGlLA2)pGPDW*ZP zq#0k%bRE^nnQf(jE}Vky>Vkgx?8G9W>k|^&IDkD_7q4t(YY(%9a1Q8%8f^($AQF~x z7L9NwjIu60jebmGA38Og^)QPK@6D*clKB zE7V9>J%@y}!+Im!GchLI7yu}x<&FRaY9tf`kRmF7CXFwdGA$qBqagzB2Ejk5f;xw+ z8$E(gXPE%E7zn%%lb1Dx{F|kspkgyXG zr9wi53JLK*W-n#ah+(=mI(<@&gm?gkTp+Z?tC5f;q;$ZRhM5EzW^naA*+AON-9>M1n}@iUS}K`A2jRcUH%pcc;$k z6o5`x06HOF0y^PNa#0FLf|IG8P$8i^3-uW)C%hM`O#yODmBN+e(yysNzfSmoLoT@3 zhdM6V3&s3uoL5q;xjiiJNgHzcWZ5~Z^5*)W8!YcuiGDko4T5Zkviwm@-W`5k6HcS6 z54gsc>efhIZcB+1((f2yH_0XPhVZ9TT=CKzl@lr|A-b~lc$vxxX|fO`@Nmuv6>2BM zSA`*EnxGTXWC&egd>PZdO1f7Mr7IAieUl%etIchyKeR%v9z*KIiL2e(Qd?QoX3&ee Ipc6X%3lEz1ng9R* literal 0 HcmV?d00001 diff --git a/docs/worker.js b/docs/worker.js new file mode 100644 index 00000000..2ebd2f07 --- /dev/null +++ b/docs/worker.js @@ -0,0 +1,8423 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(function (o) { + return o !== obj; + }); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + var listenerFn = function listenerFn(msgObj) { + channel._addEventListeners[msgObj.type].forEach(function (obj) { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + var time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(function () { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + }); + } else { + channel._isListening = true; + channel.method.onMessage(channel._state, listenerFn, time); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + var time = new Date().getTime() - 5; + channel.method.onMessage(channel._state, null, time); + } +} + +exports['default'] = BroadcastChannel; +},{"./method-chooser.js":3,"./options.js":7,"./util.js":8}],3:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.chooseMethod = chooseMethod; +var isNode = require('detect-node'); + +var NativeMethod = require('./methods/native.js'); +var IndexeDbMethod = require('./methods/indexed-db.js'); +var LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +var METHODS = [NativeMethod, // fastest +IndexeDbMethod, LocalstorageMethod]; + +var REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + var NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + +function chooseMethod(options) { + // directly chosen + if (options.type) { + var ret = METHODS.find(function (m) { + return m.type === options.type; + }); + if (!ret) throw new Error('method-type ' + options.type + ' not found');else return ret; + } + + var chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(function (m) { + return m.type !== 'idb'; + }); + } + + var useMethod = chooseMethods.find(function (method) { + return method.canBeUsed(); + }); + if (!useMethod) throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(function (m) { + return m.type; + })));else return useMethod; +} +},{"./methods/indexed-db.js":4,"./methods/localstorage.js":5,"./methods/native.js":6,"detect-node":335}],4:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getIdb = getIdb; +exports.createDatabase = createDatabase; +exports.writeMessage = writeMessage; +exports.getAllMessages = getAllMessages; +exports.getMessagesHigherThen = getMessagesHigherThen; +exports.removeMessageById = removeMessageById; +exports.getOldMessages = getOldMessages; +exports.cleanOldMessages = cleanOldMessages; +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _util = require('../util.js'); + +var _options = require('../options'); + +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +var isNode = require('detect-node'); + +var DB_PREFIX = 'pubkey.broadcast-channel-0-'; +var OBJECT_STORE_ID = 'messages'; + +var type = exports.type = 'idb'; + +function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +function createDatabase(channelName) { + var IndexedDB = getIdb(); + + // create table + var dbName = DB_PREFIX + channelName; + var openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = function (ev) { + var db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + var dbPromise = new Promise(function (res, rej) { + openRequest.onerror = function (ev) { + return rej(ev); + }; + openRequest.onsuccess = function () { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +function writeMessage(db, readerUuid, messageJson) { + var time = new Date().getTime(); + var writeObject = { + uuid: readerUuid, + time: time, + data: messageJson + }; + + var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise(function (res, rej) { + transaction.oncomplete = function () { + return res(); + }; + transaction.onerror = function (ev) { + return rej(ev); + }; + + var objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +function getAllMessages(db) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function getMessagesHigherThen(db, lastCursorId) { + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(function (res) { + objectStore.openCursor(keyRangeValue).onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + res(ret); + } + }; + }); +} + +function removeMessageById(db, id) { + var request = db.transaction([OBJECT_STORE_ID], 'readwrite').objectStore(OBJECT_STORE_ID)['delete'](id); + return new Promise(function (res) { + request.onsuccess = function () { + return res(); + }; + }); +} + +function getOldMessages(db, ttl) { + var olderThen = new Date().getTime() - ttl; + var objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + var ret = []; + return new Promise(function (res) { + objectStore.openCursor().onsuccess = function (ev) { + var cursor = ev.target.result; + if (cursor) { + var msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor['continue'](); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl).then(function (tooOld) { + return Promise.all(tooOld.map(function (msgObj) { + return removeMessageById(db, msgObj.id); + })); + }); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + + var uuid = (0, _util.randomToken)(10); + + return createDatabase(channelName).then(function (db) { + var state = { + closed: false, + lastCursorId: 0, + channelName: channelName, + options: options, + uuid: uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db: db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state).then(function () { + return (0, _util.sleep)(state.options.idb.fallbackInterval); + }).then(function () { + return _readLoop(state); + }); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId).then(function (newerMessages) { + var useMessages = newerMessages.map(function (msgObj) { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }).filter(function (msgObj) { + return msgObj.uuid !== state.uuid; + }) // not send by own + .filter(function (msgObj) { + return !state.emittedMessagesIds.has(msgObj.id); + }) // not already emitted + .filter(function (msgObj) { + return msgObj.time >= state.messagesCallbackTime; + }) // not older then onMessageCallback + .sort(function (msgObjA, msgObjB) { + return msgObjA.time - msgObjB.time; + }); // sort by time + + + useMessages.forEach(function (msgObj) { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout(function () { + return state.emittedMessagesIds['delete'](msgObj.id); + }, state.options.idb.ttl * 2); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +function postMessage(channelState, messageJson) { + return writeMessage(channelState.db, channelState.uuid, messageJson).then(function () { + if ((0, _util.randomInt)(0, 10) === 0) { + /* await (do not await) */cleanOldMessages(channelState.db, channelState.options.idb.ttl); + } + }); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +function canBeUsed() { + if (isNode) return false; + var idb = getIdb(); + + if (!idb) return false; + return true; +}; +},{"../options":7,"../util.js":8,"detect-node":335}],5:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.type = undefined; +exports.getLocalStorage = getLocalStorage; +exports.storageKey = storageKey; +exports.postMessage = postMessage; +exports.addStorageEventListener = addStorageEventListener; +exports.removeStorageEventListener = removeStorageEventListener; +exports.create = create; +exports.close = close; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; + +var _options = require('../options'); + +var _util = require('../util'); + +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +var isNode = require('detect-node'); + +var KEY_PREFIX = 'pubkey.broadcastChannel-'; +var type = exports.type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +function getLocalStorage() { + var localStorage = void 0; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +function postMessage(channelState, messageJson) { + return new Promise(function (res) { + (0, _util.sleep)().then(function () { + var key = storageKey(channelState.channelName); + var writeObj = { + token: (0, _util.randomToken)(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + var value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + var ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +function addStorageEventListener(channelName, fn) { + var key = storageKey(channelName); + var listener = function listener(ev) { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +function create(channelName, options) { + options = (0, _options.fillOptionsWithDefaults)(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + var startTime = new Date().getTime(); + var uuid = (0, _util.randomToken)(10); + + // contains all messages that have been emitted before + var emittedMessagesIds = new Set(); + + var state = { + startTime: startTime, + channelName: channelName, + options: options, + uuid: uuid, + emittedMessagesIds: emittedMessagesIds + }; + + state.listener = addStorageEventListener(channelName, function (msgObj) { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout(function () { + return emittedMessagesIds['delete'](msgObj.token); + }, options.localstorage.removeTimeout); + state.messagesCallback(msgObj.data); + }); + + return state; +} + +function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + var ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; +},{"../options":7,"../util":8,"detect-node":335}],6:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.create = create; +exports.close = close; +exports.postMessage = postMessage; +exports.onMessage = onMessage; +exports.canBeUsed = canBeUsed; +var isNode = require('detect-node'); + +var type = exports.type = 'native'; + +function create(channelName, options) { + if (!options) options = {}; + var state = { + channelName: channelName, + options: options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = function (msg) { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; +},{"detect-node":335}],7:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fillOptionsWithDefaults = fillOptionsWithDefaults; +function fillOptionsWithDefaults(options) { + if (!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} +},{}],8:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isPromise = isPromise; +exports.sleep = sleep; +exports.randomInt = randomInt; +exports.randomToken = randomToken; +/** + * returns true if the given object is a promise + */ +function isPromise(obj) { + if (obj && typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +function sleep(time) { + if (!time) time = 0; + return new Promise(function (res) { + return setTimeout(res, time); + }); +} + +function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +function randomToken(length) { + var text = ''; + var possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (var i = 0; i < 5; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + }return text; +} +},{}],9:[function(require,module,exports){ +(function (global){ +"use strict"; + +require("core-js/shim"); + +require("regenerator-runtime/runtime"); + +require("core-js/fn/regexp/escape"); + +if (global._babelPolyfill) { + throw new Error("only one instance of babel-polyfill is allowed"); +} +global._babelPolyfill = true; + +var DEFINE_PROPERTY = "defineProperty"; +function define(O, key, value) { + O[key] || Object[DEFINE_PROPERTY](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 : {}) +},{"core-js/fn/regexp/escape":11,"core-js/shim":334,"regenerator-runtime/runtime":10}],10:[function(require,module,exports){ +(function (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 Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + 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 and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.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() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + 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; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + 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 + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return 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; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + 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 + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // 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(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.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; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + 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; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + 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; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + 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.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + 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 = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + 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 + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + 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,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],11:[function(require,module,exports){ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; + +},{"../../modules/_core":32,"../../modules/core.regexp.escape":137}],12:[function(require,module,exports){ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + +},{}],13:[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":27}],14:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + +},{"./_hide":51,"./_wks":135}],15:[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; +}; + +},{}],16:[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":60}],17:[function(require,module,exports){ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var 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-absolute-index":120,"./_to-length":124,"./_to-object":125}],18:[function(require,module,exports){ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + +},{"./_to-absolute-index":120,"./_to-length":124,"./_to-object":125}],19:[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":48}],20:[function(require,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +},{"./_to-absolute-index":120,"./_to-iobject":123,"./_to-length":124}],21:[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'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var 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":24,"./_ctx":34,"./_iobject":56,"./_to-length":124,"./_to-object":125}],22:[function(require,module,exports){ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var 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":12,"./_iobject":56,"./_to-length":124,"./_to-object":125}],23:[function(require,module,exports){ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + 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 C === undefined ? Array : C; +}; + +},{"./_is-array":58,"./_is-object":60,"./_wks":135}],24:[function(require,module,exports){ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + +},{"./_array-species-constructor":23}],25:[function(require,module,exports){ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + 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); + var 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":12,"./_invoke":55,"./_is-object":60}],26:[function(require,module,exports){ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var 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":27,"./_wks":135}],27:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +},{}],28:[function(require,module,exports){ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var 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._t = NAME; // collection type + 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 = validate(this, NAME), 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 = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var 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 */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var 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(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var 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 = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var 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":15,"./_ctx":34,"./_descriptors":38,"./_for-of":48,"./_iter-define":64,"./_iter-step":66,"./_meta":74,"./_object-create":79,"./_object-dp":80,"./_redefine-all":99,"./_set-species":106,"./_validate-collection":132}],29:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var 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":19,"./_classof":26}],30:[function(require,module,exports){ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var 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._t = NAME; // collection type + 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(validate(this, NAME))['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(validate(this, NAME)).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":15,"./_an-object":16,"./_array-methods":21,"./_for-of":48,"./_has":50,"./_is-object":60,"./_meta":74,"./_redefine-all":99,"./_validate-collection":132}],31:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var 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 + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var 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":15,"./_export":42,"./_fails":44,"./_for-of":48,"./_global":49,"./_inherit-if-required":54,"./_is-object":60,"./_iter-detect":65,"./_meta":74,"./_redefine":100,"./_redefine-all":99,"./_set-to-string-tag":107}],32:[function(require,module,exports){ +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + +},{}],33:[function(require,module,exports){ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +},{"./_object-dp":80,"./_property-desc":98}],34:[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":12}],35:[function(require,module,exports){ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var 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'; +} : $toISOString; + +},{"./_fails":44}],36:[function(require,module,exports){ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + +},{"./_an-object":16,"./_to-primitive":126}],37:[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; +}; + +},{}],38:[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":44}],39:[function(require,module,exports){ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + +},{"./_global":49,"./_is-object":60}],40:[function(require,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +},{}],41:[function(require,module,exports){ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + +},{"./_object-gops":86,"./_object-keys":89,"./_object-pie":90}],42:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var 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":32,"./_ctx":34,"./_global":49,"./_hide":51,"./_redefine":100}],43:[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":135}],44:[function(require,module,exports){ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +},{}],45:[function(require,module,exports){ +'use strict'; +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + var fns = exec(defined, SYMBOL, ''[KEY]); + var strfn = fns[0]; + var 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":37,"./_fails":44,"./_hide":51,"./_redefine":100,"./_wks":135}],46:[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); + var 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":16}],47:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + +},{"./_ctx":34,"./_is-array":58,"./_is-object":60,"./_to-length":124,"./_wks":135}],48:[function(require,module,exports){ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + 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++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +},{"./_an-object":16,"./_ctx":34,"./_is-array-iter":57,"./_iter-call":62,"./_to-length":124,"./core.get-iterator-method":136}],49:[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 + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + +},{}],50:[function(require,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +},{}],51:[function(require,module,exports){ +var dP = require('./_object-dp'); +var 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":38,"./_object-dp":80,"./_property-desc":98}],52:[function(require,module,exports){ +var document = require('./_global').document; +module.exports = document && document.documentElement; + +},{"./_global":49}],53:[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":38,"./_dom-create":39,"./_fails":44}],54:[function(require,module,exports){ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + +},{"./_is-object":60,"./_set-proto":105}],55:[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); +}; + +},{}],56:[function(require,module,exports){ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +},{"./_cof":27}],57:[function(require,module,exports){ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +},{"./_iterators":67,"./_wks":135}],58:[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":27}],59:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + +},{"./_is-object":60}],60:[function(require,module,exports){ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +},{}],61:[function(require,module,exports){ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + +},{"./_cof":27,"./_is-object":60,"./_wks":135}],62:[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":16}],63:[function(require,module,exports){ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var 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":51,"./_object-create":79,"./_property-desc":98,"./_set-to-string-tag":107,"./_wks":135}],64:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var 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'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') 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":42,"./_hide":51,"./_iter-create":63,"./_iterators":67,"./_library":68,"./_object-gpo":87,"./_redefine":100,"./_set-to-string-tag":107,"./_wks":135}],65:[function(require,module,exports){ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + 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]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + +},{"./_wks":135}],66:[function(require,module,exports){ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + +},{}],67:[function(require,module,exports){ +module.exports = {}; + +},{}],68:[function(require,module,exports){ +module.exports = false; + +},{}],69:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + +},{}],70:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + +},{"./_math-sign":73}],71:[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); +}; + +},{}],72:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + +},{}],73:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + +},{}],74:[function(require,module,exports){ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var 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":44,"./_has":50,"./_is-object":60,"./_object-dp":80,"./_uid":130}],75:[function(require,module,exports){ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var 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); + var 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":42,"./_shared":109,"./es6.map":167,"./es6.weak-map":273}],76:[function(require,module,exports){ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var 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) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.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); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + +},{"./_cof":27,"./_global":49,"./_task":119}],77:[function(require,module,exports){ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(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); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + +},{"./_a-function":12}],78:[function(require,module,exports){ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var 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); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + +},{"./_fails":44,"./_iobject":56,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_to-object":125}],79:[function(require,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var 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'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var 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(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + +},{"./_an-object":16,"./_dom-create":39,"./_enum-bug-keys":40,"./_html":52,"./_object-dps":81,"./_shared-key":108}],80:[function(require,module,exports){ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + +},{"./_an-object":16,"./_descriptors":38,"./_ie8-dom-define":53,"./_to-primitive":126}],81:[function(require,module,exports){ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +},{"./_an-object":16,"./_descriptors":38,"./_object-dp":80,"./_object-keys":89}],82:[function(require,module,exports){ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); + +},{"./_fails":44,"./_global":49,"./_library":68}],83:[function(require,module,exports){ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var 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":38,"./_has":50,"./_ie8-dom-define":53,"./_object-pie":90,"./_property-desc":98,"./_to-iobject":123,"./_to-primitive":126}],84:[function(require,module,exports){ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(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":85,"./_to-iobject":123}],85:[function(require,module,exports){ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + +},{"./_enum-bug-keys":40,"./_object-keys-internal":88}],86:[function(require,module,exports){ +exports.f = Object.getOwnPropertySymbols; + +},{}],87:[function(require,module,exports){ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var 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":50,"./_shared-key":108,"./_to-object":125}],88:[function(require,module,exports){ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var 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":20,"./_has":50,"./_shared-key":108,"./_to-iobject":123}],89:[function(require,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + +},{"./_enum-bug-keys":40,"./_object-keys-internal":88}],90:[function(require,module,exports){ +exports.f = {}.propertyIsEnumerable; + +},{}],91:[function(require,module,exports){ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + +},{"./_core":32,"./_export":42,"./_fails":44}],92:[function(require,module,exports){ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + +},{"./_object-keys":89,"./_object-pie":90,"./_to-iobject":123}],93:[function(require,module,exports){ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + +},{"./_an-object":16,"./_global":49,"./_object-gopn":85,"./_object-gops":86}],94:[function(require,module,exports){ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + +},{"./_global":49,"./_string-trim":117,"./_string-ws":118}],95:[function(require,module,exports){ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var 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":49,"./_string-trim":117,"./_string-ws":118}],96:[function(require,module,exports){ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + +},{}],97:[function(require,module,exports){ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + +},{"./_an-object":16,"./_is-object":60,"./_new-promise-capability":77}],98:[function(require,module,exports){ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +},{}],99:[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":100}],100:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var TO_STRING = 'toString'; +var $toString = Function[TO_STRING]; +var 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":32,"./_global":49,"./_has":50,"./_hide":51,"./_uid":130}],101:[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); + }; +}; + +},{}],102:[function(require,module,exports){ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + +},{}],103:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + +},{"./_a-function":12,"./_ctx":34,"./_export":42,"./_for-of":48}],104:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + +},{"./_export":42}],105:[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'); +var 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":16,"./_ctx":34,"./_is-object":60,"./_object-gopd":83}],106:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var 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":38,"./_global":49,"./_object-dp":80,"./_wks":135}],107:[function(require,module,exports){ +var def = require('./_object-dp').f; +var has = require('./_has'); +var 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":50,"./_object-dp":80,"./_wks":135}],108:[function(require,module,exports){ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + +},{"./_shared":109,"./_uid":130}],109:[function(require,module,exports){ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + +},{"./_core":32,"./_global":49,"./_library":68}],110:[function(require,module,exports){ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +},{"./_a-function":12,"./_an-object":16,"./_wks":135}],111:[function(require,module,exports){ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + +},{"./_fails":44}],112:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var 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":37,"./_to-integer":122}],113:[function(require,module,exports){ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var 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":37,"./_is-regexp":61}],114:[function(require,module,exports){ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +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":37,"./_export":42,"./_fails":44}],115:[function(require,module,exports){ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var 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":37,"./_string-repeat":116,"./_to-length":124}],116:[function(require,module,exports){ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var 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":37,"./_to-integer":122}],117:[function(require,module,exports){ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var 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":37,"./_export":42,"./_fails":44,"./_string-ws":118}],118:[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'; + +},{}],119:[function(require,module,exports){ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + 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 = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + 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)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(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":27,"./_ctx":34,"./_dom-create":39,"./_global":49,"./_html":52,"./_invoke":55}],120:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +},{"./_to-integer":122}],121:[function(require,module,exports){ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + +},{"./_to-integer":122,"./_to-length":124}],122:[function(require,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +},{}],123:[function(require,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; + +},{"./_defined":37,"./_iobject":56}],124:[function(require,module,exports){ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +},{"./_to-integer":122}],125:[function(require,module,exports){ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; + +},{"./_defined":37}],126:[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":60}],127:[function(require,module,exports){ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + 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; + var length = list.length; + var 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); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var 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; + var length = arguments.length; + var 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; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + 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); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var 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; + } 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$, { + slice: $slice, + 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]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var 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; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + 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 (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // 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(toIndex(data)); + 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]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $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 + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $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); + }; +} else module.exports = function () { /* empty */ }; + +},{"./_an-instance":15,"./_array-copy-within":17,"./_array-fill":18,"./_array-includes":20,"./_array-methods":21,"./_classof":26,"./_ctx":34,"./_descriptors":38,"./_export":42,"./_fails":44,"./_global":49,"./_has":50,"./_hide":51,"./_is-array-iter":57,"./_is-object":60,"./_iter-detect":65,"./_iterators":67,"./_library":68,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_object-gpo":87,"./_property-desc":98,"./_redefine-all":99,"./_set-species":106,"./_species-constructor":110,"./_to-absolute-index":120,"./_to-index":121,"./_to-integer":122,"./_to-length":124,"./_to-object":125,"./_to-primitive":126,"./_typed":129,"./_typed-buffer":128,"./_uid":130,"./_wks":135,"./core.get-iterator-method":136,"./es6.array.iterator":148}],128:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + 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; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var 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); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new 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]; + var 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 () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(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)); + var $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":15,"./_array-fill":18,"./_descriptors":38,"./_fails":44,"./_global":49,"./_hide":51,"./_library":68,"./_object-dp":80,"./_object-gopn":85,"./_redefine-all":99,"./_set-to-string-tag":107,"./_to-index":121,"./_to-integer":122,"./_to-length":124,"./_typed":129}],129:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var 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":49,"./_hide":51,"./_uid":130}],130:[function(require,module,exports){ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +},{}],131:[function(require,module,exports){ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + +},{"./_global":49}],132:[function(require,module,exports){ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + +},{"./_is-object":60}],133:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + +},{"./_core":32,"./_global":49,"./_library":68,"./_object-dp":80,"./_wks-ext":134}],134:[function(require,module,exports){ +exports.f = require('./_wks'); + +},{"./_wks":135}],135:[function(require,module,exports){ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + +},{"./_global":49,"./_shared":109,"./_uid":130}],136:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +},{"./_classof":26,"./_core":32,"./_iterators":67,"./_wks":135}],137:[function(require,module,exports){ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + +},{"./_export":42,"./_replacer":101}],138:[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":14,"./_array-copy-within":17,"./_export":42}],139:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],140:[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":14,"./_array-fill":18,"./_export":42}],141:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],142:[function(require,module,exports){ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var 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":14,"./_array-methods":21,"./_export":42}],143:[function(require,module,exports){ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var 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":14,"./_array-methods":21,"./_export":42}],144:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var 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":21,"./_export":42,"./_strict-method":111}],145:[function(require,module,exports){ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var 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); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var 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++) { + createProperty(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++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + +},{"./_create-property":33,"./_ctx":34,"./_export":42,"./_is-array-iter":57,"./_iter-call":62,"./_iter-detect":65,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":136}],146:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + +},{"./_array-includes":20,"./_export":42,"./_strict-method":111}],147:[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":42,"./_is-array":58}],148:[function(require,module,exports){ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var 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; + var kind = this._k; + var 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":14,"./_iter-define":64,"./_iter-step":66,"./_iterators":67,"./_to-iobject":123}],149:[function(require,module,exports){ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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":42,"./_iobject":56,"./_strict-method":111,"./_to-iobject":123}],150:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var 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 || 0; + return -1; + } +}); + +},{"./_export":42,"./_strict-method":111,"./_to-integer":122,"./_to-iobject":123,"./_to-length":124}],151:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],152:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + +},{"./_create-property":33,"./_export":42,"./_fails":44}],153:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":22,"./_export":42,"./_strict-method":111}],154:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":22,"./_export":42,"./_strict-method":111}],155:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var 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); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + +},{"./_cof":27,"./_export":42,"./_fails":44,"./_html":52,"./_to-absolute-index":120,"./_to-length":124}],156:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":21,"./_export":42,"./_strict-method":111}],157:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var 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":12,"./_export":42,"./_fails":44,"./_strict-method":111,"./_to-object":125}],158:[function(require,module,exports){ +require('./_set-species')('Array'); + +},{"./_set-species":106}],159:[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":42}],160:[function(require,module,exports){ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + +},{"./_date-to-iso-string":35,"./_export":42}],161:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var 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', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + +},{"./_export":42,"./_fails":44,"./_to-object":125,"./_to-primitive":126}],162:[function(require,module,exports){ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); + +},{"./_date-to-primitive":36,"./_hide":51,"./_wks":135}],163:[function(require,module,exports){ +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + require('./_redefine')(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + +},{"./_redefine":100}],164:[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":25,"./_export":42}],165:[function(require,module,exports){ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var 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":60,"./_object-dp":80,"./_object-gpo":87,"./_wks":135}],166:[function(require,module,exports){ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + +},{"./_descriptors":38,"./_object-dp":80}],167:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 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(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + +},{"./_collection":31,"./_collection-strong":28,"./_validate-collection":132}],168:[function(require,module,exports){ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), '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":42,"./_math-log1p":71}],169:[function(require,module,exports){ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + +},{"./_export":42}],170:[function(require,module,exports){ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + +},{"./_export":42}],171:[function(require,module,exports){ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + +},{"./_export":42,"./_math-sign":73}],172:[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":42}],173:[function(require,module,exports){ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + +},{"./_export":42}],174:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + +},{"./_export":42,"./_math-expm1":69}],175:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); + +},{"./_export":42,"./_math-fround":70}],176:[function(require,module,exports){ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var 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":42}],177:[function(require,module,exports){ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $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; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + +},{"./_export":42,"./_fails":44}],178:[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.LOG10E; + } +}); + +},{"./_export":42}],179:[function(require,module,exports){ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); + +},{"./_export":42,"./_math-log1p":71}],180:[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":42}],181:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); + +},{"./_export":42,"./_math-sign":73}],182:[function(require,module,exports){ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var 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":42,"./_fails":44,"./_math-expm1":69}],183:[function(require,module,exports){ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + +},{"./_export":42,"./_math-expm1":69}],184:[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":42}],185:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; +var 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); + var 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; + var 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":27,"./_descriptors":38,"./_fails":44,"./_global":49,"./_has":50,"./_inherit-if-required":54,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_redefine":100,"./_string-trim":117,"./_to-primitive":126}],186:[function(require,module,exports){ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + +},{"./_export":42}],187:[function(require,module,exports){ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + +},{"./_export":42,"./_global":49}],188:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); + +},{"./_export":42,"./_is-integer":59}],189:[function(require,module,exports){ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + +},{"./_export":42}],190:[function(require,module,exports){ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + +},{"./_export":42,"./_is-integer":59}],191:[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":42}],192:[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":42}],193:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + +},{"./_export":42,"./_parse-float":94}],194:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + +},{"./_export":42,"./_parse-int":95}],195:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var 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; + var 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.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + 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":13,"./_export":42,"./_fails":44,"./_string-repeat":116,"./_to-integer":122}],196:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.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":13,"./_export":42,"./_fails":44}],197:[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":42,"./_object-assign":78}],198:[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":42,"./_object-create":79}],199:[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":38,"./_export":42,"./_object-dps":81}],200:[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":38,"./_export":42,"./_object-dp":80}],201:[function(require,module,exports){ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],202:[function(require,module,exports){ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + +},{"./_object-gopd":83,"./_object-sap":91,"./_to-iobject":123}],203:[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":84,"./_object-sap":91}],204:[function(require,module,exports){ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + +},{"./_object-gpo":87,"./_object-sap":91,"./_to-object":125}],205:[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":60,"./_object-sap":91}],206:[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":60,"./_object-sap":91}],207:[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":60,"./_object-sap":91}],208:[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":42,"./_same-value":102}],209:[function(require,module,exports){ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + +},{"./_object-keys":89,"./_object-sap":91,"./_to-object":125}],210:[function(require,module,exports){ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],211:[function(require,module,exports){ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + +},{"./_is-object":60,"./_meta":74,"./_object-sap":91}],212:[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":42,"./_set-proto":105}],213:[function(require,module,exports){ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + +},{"./_classof":26,"./_redefine":100,"./_wks":135}],214:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + +},{"./_export":42,"./_parse-float":94}],215:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + +},{"./_export":42,"./_parse-int":95}],216:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var 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 + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + 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); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + 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) { + if (domain && !exited) domain.exit(); + 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; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = 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 (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +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; + var 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); + } + }; + // eslint-disable-next-line no-unused-vars + 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); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$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); + var $$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) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$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; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var 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 (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + +},{"./_a-function":12,"./_an-instance":15,"./_classof":26,"./_core":32,"./_ctx":34,"./_export":42,"./_for-of":48,"./_global":49,"./_is-object":60,"./_iter-detect":65,"./_library":68,"./_microtask":76,"./_new-promise-capability":77,"./_perform":96,"./_promise-resolve":97,"./_redefine-all":99,"./_set-species":106,"./_set-to-string-tag":107,"./_species-constructor":110,"./_task":119,"./_user-agent":131,"./_wks":135}],217:[function(require,module,exports){ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + +},{"./_a-function":12,"./_an-object":16,"./_export":42,"./_fails":44,"./_global":49}],218:[function(require,module,exports){ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (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; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + +},{"./_a-function":12,"./_an-object":16,"./_bind":25,"./_export":42,"./_fails":44,"./_global":49,"./_is-object":60,"./_object-create":79}],219:[function(require,module,exports){ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + 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":16,"./_export":42,"./_fails":44,"./_object-dp":80,"./_to-primitive":126}],220:[function(require,module,exports){ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var 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":16,"./_export":42,"./_object-gopd":83}],221:[function(require,module,exports){ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var 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":16,"./_export":42,"./_iter-create":63}],222:[function(require,module,exports){ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + +},{"./_an-object":16,"./_export":42,"./_object-gopd":83}],223:[function(require,module,exports){ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + +},{"./_an-object":16,"./_export":42,"./_object-gpo":87}],224:[function(require,module,exports){ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var 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":16,"./_export":42,"./_has":50,"./_is-object":60,"./_object-gopd":83,"./_object-gpo":87}],225:[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":42}],226:[function(require,module,exports){ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + +},{"./_an-object":16,"./_export":42}],227:[function(require,module,exports){ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); + +},{"./_export":42,"./_own-keys":93}],228:[function(require,module,exports){ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $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":16,"./_export":42}],229:[function(require,module,exports){ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var 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":42,"./_set-proto":105}],230:[function(require,module,exports){ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var 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; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + +},{"./_an-object":16,"./_export":42,"./_has":50,"./_is-object":60,"./_object-dp":80,"./_object-gopd":83,"./_object-gpo":87,"./_property-desc":98}],231:[function(require,module,exports){ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var 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; + var piRE = isRegExp(p); + var 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":38,"./_fails":44,"./_flags":46,"./_global":49,"./_inherit-if-required":54,"./_is-regexp":61,"./_object-dp":80,"./_object-gopn":85,"./_redefine":100,"./_set-species":106,"./_wks":135}],232:[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":38,"./_flags":46,"./_object-dp":80}],233:[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); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); + +},{"./_fix-re-wks":45}],234:[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); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); + +},{"./_fix-re-wks":45}],235:[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); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); + +},{"./_fix-re-wks":45}],236:[function(require,module,exports){ +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) { + 'use strict'; + var isRegExp = require('./_is-regexp'); + var _split = $split; + var $push = [].push; + var $SPLIT = 'split'; + var LENGTH = 'length'; + var 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 + // eslint-disable-next-line no-loop-func + 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); + var fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); + +},{"./_fix-re-wks":45,"./_is-regexp":61}],237:[function(require,module,exports){ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $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":16,"./_descriptors":38,"./_fails":44,"./_flags":46,"./_redefine":100,"./es6.regexp.flags":232}],238:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 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(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + +},{"./_collection":31,"./_collection-strong":28,"./_validate-collection":132}],239:[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":114}],240:[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":114}],241:[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":114}],242:[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":114}],243:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $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":42,"./_string-at":112}],244:[function(require,module,exports){ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $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); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + +},{"./_export":42,"./_fails-is-regexp":43,"./_string-context":113,"./_to-length":124}],245:[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":114}],246:[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":114}],247:[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":114}],248:[function(require,module,exports){ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $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 = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(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":42,"./_to-absolute-index":120}],249:[function(require,module,exports){ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var 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":42,"./_fails-is-regexp":43,"./_string-context":113}],250:[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":114}],251:[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; + var index = this._i; + var 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":64,"./_string-at":112}],252:[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":114}],253:[function(require,module,exports){ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var 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); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + +},{"./_export":42,"./_to-iobject":123,"./_to-length":124}],254:[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":42,"./_string-repeat":116}],255:[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":114}],256:[function(require,module,exports){ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $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); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + +},{"./_export":42,"./_fails-is-regexp":43,"./_string-context":113,"./_to-length":124}],257:[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":114}],258:[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":114}],259:[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":114}],260:[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":117}],261:[function(require,module,exports){ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// 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; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, 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)); + var i = 0; + var l = keys.length; + var 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)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + 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)); + var result = []; + var i = 0; + var 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 IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $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); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$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(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return 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 || $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)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 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":16,"./_descriptors":38,"./_enum-keys":41,"./_export":42,"./_fails":44,"./_global":49,"./_has":50,"./_hide":51,"./_is-array":58,"./_is-object":60,"./_library":68,"./_meta":74,"./_object-create":79,"./_object-dp":80,"./_object-gopd":83,"./_object-gopn":85,"./_object-gopn-ext":84,"./_object-gops":86,"./_object-keys":89,"./_object-pie":90,"./_property-desc":98,"./_redefine":100,"./_set-to-string-tag":107,"./_shared":109,"./_to-iobject":123,"./_to-primitive":126,"./_uid":130,"./_wks":135,"./_wks-define":133,"./_wks-ext":134}],262:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var 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; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); + +},{"./_an-object":16,"./_export":42,"./_fails":44,"./_global":49,"./_is-object":60,"./_set-species":106,"./_species-constructor":110,"./_to-absolute-index":120,"./_to-length":124,"./_typed":129,"./_typed-buffer":128}],263:[function(require,module,exports){ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); + +},{"./_export":42,"./_typed":129,"./_typed-buffer":128}],264:[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":127}],265:[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":127}],266:[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":127}],267:[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":127}],268:[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":127}],269:[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":127}],270:[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":127}],271:[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":127}],272:[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":127}],273:[function(require,module,exports){ +'use strict'; +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var validate = require('./_validate-collection'); +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var tmp = {}; +var 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(validate(this, WEAK_MAP)).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(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var 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":21,"./_collection":31,"./_collection-weak":30,"./_fails":44,"./_is-object":60,"./_meta":74,"./_object-assign":78,"./_redefine":100,"./_validate-collection":132}],274:[function(require,module,exports){ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, 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(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + +},{"./_collection":31,"./_collection-weak":30,"./_validate-collection":132}],275:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); + +},{"./_a-function":12,"./_add-to-unscopables":14,"./_array-species-create":24,"./_export":42,"./_flatten-into-array":47,"./_to-length":124,"./_to-object":125}],276:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); + +},{"./_add-to-unscopables":14,"./_array-species-create":24,"./_export":42,"./_flatten-into-array":47,"./_to-integer":122,"./_to-length":124,"./_to-object":125}],277:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); + +},{"./_add-to-unscopables":14,"./_array-includes":20,"./_export":42}],278:[function(require,module,exports){ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + +},{"./_cof":27,"./_export":42,"./_global":49,"./_microtask":76}],279:[function(require,module,exports){ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + +},{"./_cof":27,"./_export":42}],280:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); + +},{"./_export":42,"./_global":49}],281:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); + +},{"./_set-collection-from":103}],282:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); + +},{"./_set-collection-of":104}],283:[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":29,"./_export":42}],284:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + +},{"./_export":42}],285:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + +},{"./_export":42}],286:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + +},{"./_export":42}],287:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + +},{"./_export":42,"./_math-fround":70,"./_math-scale":72}],288:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + +},{"./_export":42}],289:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + +},{"./_export":42}],290:[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; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + +},{"./_export":42}],291:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + +},{"./_export":42}],292:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + +},{"./_export":42}],293:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); + +},{"./_export":42,"./_math-scale":72}],294:[function(require,module,exports){ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + +},{"./_export":42}],295:[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; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + +},{"./_export":42}],296:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":12,"./_descriptors":38,"./_export":42,"./_object-dp":80,"./_object-forced-pam":82,"./_to-object":125}],297:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":12,"./_descriptors":38,"./_export":42,"./_object-dp":80,"./_object-forced-pam":82,"./_to-object":125}],298:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + +},{"./_export":42,"./_object-to-array":92}],299:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + +},{"./_create-property":33,"./_export":42,"./_object-gopd":83,"./_own-keys":93,"./_to-iobject":123}],300:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":38,"./_export":42,"./_object-forced-pam":82,"./_object-gopd":83,"./_object-gpo":87,"./_to-object":125,"./_to-primitive":126}],301:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":38,"./_export":42,"./_object-forced-pam":82,"./_object-gopd":83,"./_object-gpo":87,"./_to-object":125,"./_to-primitive":126}],302:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + +},{"./_export":42,"./_object-to-array":92}],303:[function(require,module,exports){ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); + +},{"./_a-function":12,"./_an-instance":15,"./_an-object":16,"./_core":32,"./_export":42,"./_for-of":48,"./_global":49,"./_hide":51,"./_microtask":76,"./_redefine-all":99,"./_set-species":106,"./_wks":135}],304:[function(require,module,exports){ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + +},{"./_core":32,"./_export":42,"./_global":49,"./_promise-resolve":97,"./_species-constructor":110}],305:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + +},{"./_export":42,"./_new-promise-capability":77,"./_perform":96}],306:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + +},{"./_an-object":16,"./_metadata":75}],307:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var 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":16,"./_metadata":75}],308:[function(require,module,exports){ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var 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":16,"./_array-from-iterable":19,"./_metadata":75,"./_object-gpo":87,"./es6.set":238}],309:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var 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":16,"./_metadata":75,"./_object-gpo":87}],310:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + +},{"./_an-object":16,"./_metadata":75}],311:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var 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":16,"./_metadata":75}],312:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":16,"./_metadata":75,"./_object-gpo":87}],313:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var 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":16,"./_metadata":75}],314:[function(require,module,exports){ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var 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":12,"./_an-object":16,"./_metadata":75}],315:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); + +},{"./_set-collection-from":103}],316:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); + +},{"./_set-collection-of":104}],317:[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":29,"./_export":42}],318:[function(require,module,exports){ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + +},{"./_export":42,"./_string-at":112}],319:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + +},{"./_defined":37,"./_export":42,"./_flags":46,"./_is-regexp":61,"./_iter-create":63,"./_to-length":124}],320:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + +},{"./_export":42,"./_string-pad":115,"./_user-agent":131}],321:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + +},{"./_export":42,"./_string-pad":115,"./_user-agent":131}],322:[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":117}],323:[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":117}],324:[function(require,module,exports){ +require('./_wks-define')('asyncIterator'); + +},{"./_wks-define":133}],325:[function(require,module,exports){ +require('./_wks-define')('observable'); + +},{"./_wks-define":133}],326:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); + +},{"./_export":42,"./_global":49}],327:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); + +},{"./_set-collection-from":103}],328:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); + +},{"./_set-collection-of":104}],329:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); + +},{"./_set-collection-from":103}],330:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); + +},{"./_set-collection-of":104}],331:[function(require,module,exports){ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + +},{"./_global":49,"./_hide":51,"./_iterators":67,"./_object-keys":89,"./_redefine":100,"./_wks":135,"./es6.array.iterator":148}],332:[function(require,module,exports){ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + +},{"./_export":42,"./_task":119}],333:[function(require,module,exports){ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + +},{"./_export":42,"./_global":49,"./_user-agent":131}],334:[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-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +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.array.flat-map'); +require('./modules/es7.array.flatten'); +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.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +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/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); + +},{"./modules/_core":32,"./modules/es6.array.copy-within":138,"./modules/es6.array.every":139,"./modules/es6.array.fill":140,"./modules/es6.array.filter":141,"./modules/es6.array.find":143,"./modules/es6.array.find-index":142,"./modules/es6.array.for-each":144,"./modules/es6.array.from":145,"./modules/es6.array.index-of":146,"./modules/es6.array.is-array":147,"./modules/es6.array.iterator":148,"./modules/es6.array.join":149,"./modules/es6.array.last-index-of":150,"./modules/es6.array.map":151,"./modules/es6.array.of":152,"./modules/es6.array.reduce":154,"./modules/es6.array.reduce-right":153,"./modules/es6.array.slice":155,"./modules/es6.array.some":156,"./modules/es6.array.sort":157,"./modules/es6.array.species":158,"./modules/es6.date.now":159,"./modules/es6.date.to-iso-string":160,"./modules/es6.date.to-json":161,"./modules/es6.date.to-primitive":162,"./modules/es6.date.to-string":163,"./modules/es6.function.bind":164,"./modules/es6.function.has-instance":165,"./modules/es6.function.name":166,"./modules/es6.map":167,"./modules/es6.math.acosh":168,"./modules/es6.math.asinh":169,"./modules/es6.math.atanh":170,"./modules/es6.math.cbrt":171,"./modules/es6.math.clz32":172,"./modules/es6.math.cosh":173,"./modules/es6.math.expm1":174,"./modules/es6.math.fround":175,"./modules/es6.math.hypot":176,"./modules/es6.math.imul":177,"./modules/es6.math.log10":178,"./modules/es6.math.log1p":179,"./modules/es6.math.log2":180,"./modules/es6.math.sign":181,"./modules/es6.math.sinh":182,"./modules/es6.math.tanh":183,"./modules/es6.math.trunc":184,"./modules/es6.number.constructor":185,"./modules/es6.number.epsilon":186,"./modules/es6.number.is-finite":187,"./modules/es6.number.is-integer":188,"./modules/es6.number.is-nan":189,"./modules/es6.number.is-safe-integer":190,"./modules/es6.number.max-safe-integer":191,"./modules/es6.number.min-safe-integer":192,"./modules/es6.number.parse-float":193,"./modules/es6.number.parse-int":194,"./modules/es6.number.to-fixed":195,"./modules/es6.number.to-precision":196,"./modules/es6.object.assign":197,"./modules/es6.object.create":198,"./modules/es6.object.define-properties":199,"./modules/es6.object.define-property":200,"./modules/es6.object.freeze":201,"./modules/es6.object.get-own-property-descriptor":202,"./modules/es6.object.get-own-property-names":203,"./modules/es6.object.get-prototype-of":204,"./modules/es6.object.is":208,"./modules/es6.object.is-extensible":205,"./modules/es6.object.is-frozen":206,"./modules/es6.object.is-sealed":207,"./modules/es6.object.keys":209,"./modules/es6.object.prevent-extensions":210,"./modules/es6.object.seal":211,"./modules/es6.object.set-prototype-of":212,"./modules/es6.object.to-string":213,"./modules/es6.parse-float":214,"./modules/es6.parse-int":215,"./modules/es6.promise":216,"./modules/es6.reflect.apply":217,"./modules/es6.reflect.construct":218,"./modules/es6.reflect.define-property":219,"./modules/es6.reflect.delete-property":220,"./modules/es6.reflect.enumerate":221,"./modules/es6.reflect.get":224,"./modules/es6.reflect.get-own-property-descriptor":222,"./modules/es6.reflect.get-prototype-of":223,"./modules/es6.reflect.has":225,"./modules/es6.reflect.is-extensible":226,"./modules/es6.reflect.own-keys":227,"./modules/es6.reflect.prevent-extensions":228,"./modules/es6.reflect.set":230,"./modules/es6.reflect.set-prototype-of":229,"./modules/es6.regexp.constructor":231,"./modules/es6.regexp.flags":232,"./modules/es6.regexp.match":233,"./modules/es6.regexp.replace":234,"./modules/es6.regexp.search":235,"./modules/es6.regexp.split":236,"./modules/es6.regexp.to-string":237,"./modules/es6.set":238,"./modules/es6.string.anchor":239,"./modules/es6.string.big":240,"./modules/es6.string.blink":241,"./modules/es6.string.bold":242,"./modules/es6.string.code-point-at":243,"./modules/es6.string.ends-with":244,"./modules/es6.string.fixed":245,"./modules/es6.string.fontcolor":246,"./modules/es6.string.fontsize":247,"./modules/es6.string.from-code-point":248,"./modules/es6.string.includes":249,"./modules/es6.string.italics":250,"./modules/es6.string.iterator":251,"./modules/es6.string.link":252,"./modules/es6.string.raw":253,"./modules/es6.string.repeat":254,"./modules/es6.string.small":255,"./modules/es6.string.starts-with":256,"./modules/es6.string.strike":257,"./modules/es6.string.sub":258,"./modules/es6.string.sup":259,"./modules/es6.string.trim":260,"./modules/es6.symbol":261,"./modules/es6.typed.array-buffer":262,"./modules/es6.typed.data-view":263,"./modules/es6.typed.float32-array":264,"./modules/es6.typed.float64-array":265,"./modules/es6.typed.int16-array":266,"./modules/es6.typed.int32-array":267,"./modules/es6.typed.int8-array":268,"./modules/es6.typed.uint16-array":269,"./modules/es6.typed.uint32-array":270,"./modules/es6.typed.uint8-array":271,"./modules/es6.typed.uint8-clamped-array":272,"./modules/es6.weak-map":273,"./modules/es6.weak-set":274,"./modules/es7.array.flat-map":275,"./modules/es7.array.flatten":276,"./modules/es7.array.includes":277,"./modules/es7.asap":278,"./modules/es7.error.is-error":279,"./modules/es7.global":280,"./modules/es7.map.from":281,"./modules/es7.map.of":282,"./modules/es7.map.to-json":283,"./modules/es7.math.clamp":284,"./modules/es7.math.deg-per-rad":285,"./modules/es7.math.degrees":286,"./modules/es7.math.fscale":287,"./modules/es7.math.iaddh":288,"./modules/es7.math.imulh":289,"./modules/es7.math.isubh":290,"./modules/es7.math.rad-per-deg":291,"./modules/es7.math.radians":292,"./modules/es7.math.scale":293,"./modules/es7.math.signbit":294,"./modules/es7.math.umulh":295,"./modules/es7.object.define-getter":296,"./modules/es7.object.define-setter":297,"./modules/es7.object.entries":298,"./modules/es7.object.get-own-property-descriptors":299,"./modules/es7.object.lookup-getter":300,"./modules/es7.object.lookup-setter":301,"./modules/es7.object.values":302,"./modules/es7.observable":303,"./modules/es7.promise.finally":304,"./modules/es7.promise.try":305,"./modules/es7.reflect.define-metadata":306,"./modules/es7.reflect.delete-metadata":307,"./modules/es7.reflect.get-metadata":309,"./modules/es7.reflect.get-metadata-keys":308,"./modules/es7.reflect.get-own-metadata":311,"./modules/es7.reflect.get-own-metadata-keys":310,"./modules/es7.reflect.has-metadata":312,"./modules/es7.reflect.has-own-metadata":313,"./modules/es7.reflect.metadata":314,"./modules/es7.set.from":315,"./modules/es7.set.of":316,"./modules/es7.set.to-json":317,"./modules/es7.string.at":318,"./modules/es7.string.match-all":319,"./modules/es7.string.pad-end":320,"./modules/es7.string.pad-start":321,"./modules/es7.string.trim-left":322,"./modules/es7.string.trim-right":323,"./modules/es7.symbol.async-iterator":324,"./modules/es7.symbol.observable":325,"./modules/es7.system.global":326,"./modules/es7.weak-map.from":327,"./modules/es7.weak-map.of":328,"./modules/es7.weak-set.from":329,"./modules/es7.weak-set.of":330,"./modules/web.dom.iterable":331,"./modules/web.immediate":332,"./modules/web.timers":333}],335:[function(require,module,exports){ +(function (global){ +module.exports = false; + +// Only Node.JS has a process variable that is of [[Class]] process +try { + module.exports = Object.prototype.toString.call(global.process) === '[object process]' +} catch(e) {} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],336:[function(require,module,exports){ +'use strict'; + +/* eslint-disable */ +/** + * used in the test-docs as web-worker + */ +require('babel-polyfill'); +var BroadcastChannel = require('../../'); + +// overwrite console.log +try { + var logBefore = console.log; + // console.log = function (str) { logBefore('worker: ' + str); } +} catch (err) {} +// does not work in IE11 + + +/** + * because shitware microsof-edge stucks the worker + * when initialisation is done, + * we have to set a interval here. + */ +setInterval(function () {}, 10 * 1000); + +var channel; +self.addEventListener('message', function (e) { + var data = e.data; + switch (data.cmd) { + case 'start': + console.log('Worker started'); + console.log(JSON.stringify(data.msg)); + + channel = new BroadcastChannel(data.msg.channelName, { + type: data.msg.methodType + }); + var messages = []; + channel.onmessage = function (msg) { + console.log('recieved message(' + msg.step + ') from ' + msg.from + ': ' + JSON.stringify(msg)); + if (!msg.answer) { + console.log('(' + msg.step + ') answer back'); + channel.postMessage({ + answer: true, + from: 'worker', + original: msg + }); + } + }; + + self.postMessage('WORKER STARTED: '); + break; + case 'stop': + self.postMessage('WORKER STOPPED: ' + data.msg + '. (buttons will no longer work)'); + channel.close(); + self.close(); // Terminates the worker. + break; + default: + self.postMessage('Unknown command: ' + data.msg); + }; +}, false); +},{"../../":1,"babel-polyfill":9}]},{},[336]); diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..b226c663 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,48 @@ +declare type MethodType = 'node' | 'idb' | 'native' | 'localstorage'; + + + +interface BroadcastChannelEventMap { + "message": MessageEvent; + "messageerror": MessageEvent; +} + +export type BroadcastChannelOptions = { + type?: MethodType, + webWorkerSupport?: boolean; + prepareDelay?: number; + node?: { + ttl?: number; + }; + idb?: { + ttl?: number; + fallbackInterval?: number; + }; +}; + +declare type EventType = 'message' | 'error' | 'internal'; + +declare type OnMessageHandler = ((this: BroadcastChannel, ev: T) => any) | null; + +/** + * api as defined in + * @link https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts + * @link https://github.com/Microsoft/TypeScript/blob/master/src/lib/webworker.generated.d.ts#L325 + */ +declare class BroadcastChannel { + constructor(name: string, opts?: BroadcastChannelOptions); + readonly name: string; + readonly options: BroadcastChannelOptions; + readonly type: MethodType; + + postMessage(msg: T): Promise; + close(): Promise; + + onmessage: OnMessageHandler; + + // not defined in the offical standard + addEventListener(type: EventType, OnMessageHandler): void; + removeEventListener(type: EventType, OnMessageHandler): void; +} + +export default BroadcastChannel; diff --git a/package.json b/package.json new file mode 100644 index 00000000..29598dbf --- /dev/null +++ b/package.json @@ -0,0 +1,117 @@ +{ + "name": "broadcast-channel", + "version": "1.1.0", + "description": "A BroadcastChannel implementation that works with new browsers, older browsers and Node.js", + "homepage": "https://github.com/pubkey/broadcast-channel#readme", + "keywords": [ + "broadcast-channel", + "broadcastchannel", + "broadcast", + "polyfill", + "localstorage", + "indexeddb", + "postMessage", + "crosstab", + "ipc" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/pubkey/broadcast-channel.git" + }, + "author": "pubkey", + "license": "ISC", + "bugs": { + "url": "https://github.com/pubkey/broadcast-channel/issues" + }, + "main": "./dist/lib/index.es5.js", + "jsnext:main": "./dist/es/index.js", + "module": "./dist/es/index.js", + "types": "index.d.ts", + "scripts": { + "test": "npm run test:node && npm run test:browser && npm run test:e2e", + "test:node": "npm run build && mocha ./test/index.test.js -b --timeout 6000 --exit", + "test:browser": "npm run build && karma start ./config/karma.conf.js --single-run", + "test:e2e": "concurrently \"npm run docs:serve\" \"testcafe all test/e2e.test.js\" --kill-others --success first", + "test:typings": "npm run build && mocha ./test/typings.test.js -b --timeout 12000 --exit", + "test:size": "npm run build && rimraf test_tmp/browserify.js && browserify --no-builtins dist/lib/browserify.index.js > test_tmp/browserify.js && uglifyjs --compress --mangle --output test_tmp/browserify.min.js -- test_tmp/browserify.js && echo \"Build-Size (minified+gzip):\" && gzip-size --raw test_tmp/browserify.min.js", + "lint": "eslint --ignore-path ./config/.eslintignore src test config scripts", + "clear": "rimraf -rf ./dist && rimraf -rf ./gen", + "build:es6": "rimraf -rf dist/es && cross-env NODE_ENV=es6 babel src --out-dir dist/es", + "build:es5": "cross-env NODE_ENV=es5 node node_modules/babel-cli/bin/babel.js src --out-dir dist/lib", + "build:test": "cross-env NODE_ENV=es5 node node_modules/babel-cli/bin/babel.js test --out-dir test_tmp", + "build:browser": "browserify test_tmp/scripts/index.js > docs/index.js", + "build:worker": "browserify test_tmp/scripts/worker.js > docs/worker.js", + "build:iframe": "browserify test_tmp/scripts/iframe.js > docs/iframe.js", + "build": "npm run clear && concurrently \"npm run build:es6\" \"npm run build:es5\" \"npm run build:test\" && concurrently \"npm run build:browser\" \"npm run build:worker\" \"npm run build:iframe\"", + "build:min": "uglifyjs --compress --mangle --output dist/lib/browserify.min.js -- dist/lib/browserify.index.js", + "docs:only": "http-server ./docs", + "docs:serve": "npm run build && npm run docs:only" + }, + "pre-commit": [ + "lint" + ], + "dependencies": { + "@types/core-js": "^2.5.0", + "babel-runtime": "6.26.0", + "custom-idle-queue": "2.0.1", + "detect-node": "2.0.3", + "js-sha3": "0.7.0", + "unload": "1.3.7" + }, + "devDependencies": { + "@babel/types": "^7.0.0-beta.51", + "assert": "1.4.1", + "async-test-util": "1.6.1", + "babel-cli": "6.26.0", + "babel-core": "6.26.3", + "babel-eslint": "8.2.5", + "babel-loader": "7.1.4", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-constants": "6.1.4", + "babel-plugin-transform-es3-member-expression-literals": "6.22.0", + "babel-plugin-transform-es3-property-literals": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-plugin-transform-regenerator": "6.26.0", + "babel-plugin-transform-runtime": "6.23.0", + "babel-polyfill": "6.26.0", + "babel-preset-es2015": "6.24.1", + "babel-preset-es2015-native-modules": "6.9.4", + "babel-preset-es2015-rollup": "3.0.0", + "babel-preset-es2016": "6.24.1", + "babel-preset-es2017": "6.24.1", + "babel-preset-latest": "6.24.1", + "browserify": "16.2.2", + "child-process-promise": "^2.2.1", + "clone": "2.1.1", + "concurrently": "3.6.0", + "convert-hrtime": "2.0.0", + "copyfiles": "2.0.0", + "cross-env": "5.2.0", + "eslint": "4.19.1", + "gzip-size-cli": "^2.1.0", + "http-server": "0.11.1", + "karma": "2.0.4", + "karma-babel-preprocessor": "7.0.0", + "karma-browserify": "5.3.0", + "karma-chrome-launcher": "2.2.0", + "karma-coverage": "1.1.2", + "karma-detect-browsers": "2.3.2", + "karma-edge-launcher": "0.4.2", + "karma-firefox-launcher": "1.1.0", + "karma-ie-launcher": "1.0.0", + "karma-mocha": "1.3.0", + "karma-opera-launcher": "1.0.0", + "karma-safari-launcher": "1.0.0", + "mocha": "5.2.0", + "pre-commit": "1.2.2", + "random-int": "1.0.0", + "random-token": "0.0.8", + "rimraf": "2.6.2", + "testcafe": "0.20.3", + "testcafe-hammerhead": "14.0.0", + "ts-node": "6.1.2", + "typescript": "2.9.2" + } +} diff --git a/perf.txt b/perf.txt new file mode 100644 index 00000000..ab8a2630 --- /dev/null +++ b/perf.txt @@ -0,0 +1,68 @@ +BEFORE: + +(clean application state), exmpty idb +- intervall-timeout set to zero +2220ms +2494ms +2235ms + +// series run without cleaning the state +2385 +4813 +6079 +7553 +9573 + + +AFTER: +(clear state) +1370 +1281 +1212 + +(non clear) +1312 +1314 +1362 +1448 +1450 +1397 + + + + + +=================================== +20.06.2018 +=================================== +IndexedDB + +BEFORE: +3610 +3380 +3489 + + +AFTER (with localstorage ping): +4183 +3962 +3821 + +=> sending localstorage-pings is slower + + + + +====== build-size +BEFORE: 37251 +AFTER: 4077 + + +====== build-size 2 +BEFORE: 4077 +AFTER: 3795 + + +====== build-size 3 +BEFORE: 3795 +AFTER: 3110 \ No newline at end of file diff --git a/src/browserify.index.js b/src/browserify.index.js new file mode 100644 index 00000000..2c7bb3df --- /dev/null +++ b/src/browserify.index.js @@ -0,0 +1,3 @@ +const BroadcastChannel = require('./index.es5.js'); + +window['BroadcastChannel2'] = BroadcastChannel; diff --git a/src/index.es5.js b/src/index.es5.js new file mode 100644 index 00000000..e94ea060 --- /dev/null +++ b/src/index.es5.js @@ -0,0 +1,12 @@ +/** + * because babel can only export on default-attribute, + * we use this for the non-module-build + * this ensures that users do not have to use + * var BroadcastChannel = require('broadcast-channel').default; + * but + * var BroadcastChannel = require('broadcast-channel'); + */ + +import BroadcastChannel from './index.js'; + +module.exports = BroadcastChannel; \ No newline at end of file diff --git a/src/index.js b/src/index.js new file mode 100644 index 00000000..6327f8d8 --- /dev/null +++ b/src/index.js @@ -0,0 +1,184 @@ +import { + isPromise +} from './util.js'; + +import { + chooseMethod +} from './method-chooser.js'; + +import { + fillOptionsWithDefaults +} from './options.js'; + + + +const BroadcastChannel = function (name, options) { + this.name = name; + this.options = fillOptionsWithDefaults(options); + this.method = chooseMethod(this.options); + + this._isListening = false; + + /** + * setting onmessage twice, + * will overwrite the first listener + */ + this._onMessageListener = null; + + this._addEventListeners = { + message: [], + internal: [] + }; + + this._preparePromise = null; + _prepareChannel(this); +}; + +BroadcastChannel.prototype = { + postMessage(msg) { + const msgObj = { + time: new Date().getTime(), + type: 'message', + data: msg + }; + + if (this.closed) { + throw new Error( + 'BroadcastChannel.postMessage(): ' + + 'Cannot post message after channel has closed' + ); + } + + const awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + return awaitPrepare.then(() => { + return this.method.postMessage( + this._state, + msgObj + ); + }); + }, + set onmessage(fn) { + const time = new Date().getTime() - 5; + const listenObj = { + time, + fn + }; + _removeListenerObject(this, 'message', this._onMessageListener); + if (fn && typeof fn === 'function') { + this._onMessageListener = listenObj; + _addListenerObject(this, 'message', listenObj); + } else { + this._onMessageListener = null; + } + }, + + addEventListener(type, fn) { + const time = new Date().getTime() - 5; + const listenObj = { + time, + fn + }; + _addListenerObject(this, type, listenObj); + }, + removeEventListener(type, fn) { + const obj = this._addEventListeners[type].find(obj => obj.fn === fn); + _removeListenerObject(this, type, obj); + }, + + close() { + this.closed = true; + const awaitPrepare = this._preparePromise ? this._preparePromise : Promise.resolve(); + + this._onMessageListener = null; + this._addEventListeners.message = []; + + return awaitPrepare.then(() => { + return this.method.close( + this._state + ); + }); + }, + get type() { + return this.method.type; + } +}; + +function _prepareChannel(channel) { + const maybePromise = channel.method.create(channel.name, channel.options); + if (isPromise(maybePromise)) { + channel._preparePromise = maybePromise; + maybePromise.then(s => { + // used in tests to simulate slow runtime + /*if (channel.options.prepareDelay) { + await new Promise(res => setTimeout(res, this.options.prepareDelay)); + }*/ + channel._state = s; + }); + } else { + channel._state = maybePromise; + } +} + + +function _hasMessageListeners(channel) { + if (channel._addEventListeners.message.length > 0) return true; + if (channel._addEventListeners.internal.length > 0) return true; + return false; +} + +function _addListenerObject(channel, type, obj) { + channel._addEventListeners[type].push(obj); + _startListening(channel); +} +function _removeListenerObject(channel, type, obj) { + channel._addEventListeners[type] = channel._addEventListeners[type].filter(o => o !== obj); + _stopListening(channel); +} + +function _startListening(channel) { + if (!channel._isListening && _hasMessageListeners(channel)) { + // someone is listening, start subscribing + + const listenerFn = msgObj => { + channel._addEventListeners[msgObj.type].forEach(obj => { + if (msgObj.time >= obj.time) { + obj.fn(msgObj.data); + }; + }); + }; + + const time = new Date().getTime() - 5; + if (channel._preparePromise) { + channel._preparePromise.then(() => { + channel._isListening = true; + channel.method.onMessage( + channel._state, + listenerFn, + time + ); + }); + } else { + channel._isListening = true; + channel.method.onMessage( + channel._state, + listenerFn, + time + ); + } + } +} + +function _stopListening(channel) { + if (channel._isListening && !_hasMessageListeners(channel)) { + // noone is listening, stop subscribing + channel._isListening = false; + const time = new Date().getTime() - 5; + channel.method.onMessage( + channel._state, + null, + time + ); + } +} + +export default BroadcastChannel; \ No newline at end of file diff --git a/src/method-chooser.js b/src/method-chooser.js new file mode 100644 index 00000000..7416969b --- /dev/null +++ b/src/method-chooser.js @@ -0,0 +1,45 @@ +const isNode = require('detect-node'); + +const NativeMethod = require('./methods/native.js'); +const IndexeDbMethod = require('./methods/indexed-db.js'); +const LocalstorageMethod = require('./methods/localstorage.js'); + +// order is important +let METHODS = [ + NativeMethod, // fastest + IndexeDbMethod, + LocalstorageMethod +]; + +const REQUIRE_FUN = require; + +/** + * The NodeMethod is loaded lazy + * so it will not get bundled in browser-builds + */ +if (isNode) { + const NodeMethod = REQUIRE_FUN('./methods/node.js'); + METHODS.push(NodeMethod); +} + + +export function chooseMethod(options) { + // directly chosen + if (options.type) { + const ret = METHODS.find(m => m.type === options.type); + if (!ret) throw new Error('method-type ' + options.type + ' not found'); + else return ret; + } + + let chooseMethods = METHODS; + if (!options.webWorkerSupport && !isNode) { + // prefer localstorage over idb when no webworker-support needed + chooseMethods = METHODS.filter(m => m.type !== 'idb'); + } + + const useMethod = chooseMethods.find(method => method.canBeUsed()); + if (!useMethod) + throw new Error('No useable methode found:' + JSON.stringify(METHODS.map(m => m.type))); + else + return useMethod; +} \ No newline at end of file diff --git a/src/methods/cookies.js b/src/methods/cookies.js new file mode 100644 index 00000000..f0cf25c8 --- /dev/null +++ b/src/methods/cookies.js @@ -0,0 +1,4 @@ +/** + * if you really need this method, + * implement it + */ \ No newline at end of file diff --git a/src/methods/indexed-db.js b/src/methods/indexed-db.js new file mode 100644 index 00000000..a123cb36 --- /dev/null +++ b/src/methods/indexed-db.js @@ -0,0 +1,263 @@ +/** + * this method uses indexeddb to store the messages + * There is currently no observerAPI for idb + * @link https://github.com/w3c/IndexedDB/issues/51 + */ + +const isNode = require('detect-node'); + +import { + sleep, + randomInt, + randomToken +} from '../util.js'; + +import { + fillOptionsWithDefaults +} from '../options'; + +const DB_PREFIX = 'pubkey.broadcast-channel-0-'; +const OBJECT_STORE_ID = 'messages'; + +export const type = 'idb'; + +export function getIdb() { + if (typeof indexedDB !== 'undefined') return indexedDB; + if (typeof mozIndexedDB !== 'undefined') return mozIndexedDB; + if (typeof webkitIndexedDB !== 'undefined') return webkitIndexedDB; + if (typeof msIndexedDB !== 'undefined') return msIndexedDB; + + return false; +} + +export function createDatabase(channelName) { + const IndexedDB = getIdb(); + + // create table + const dbName = DB_PREFIX + channelName; + const openRequest = IndexedDB.open(dbName, 1); + + openRequest.onupgradeneeded = ev => { + const db = ev.target.result; + db.createObjectStore(OBJECT_STORE_ID, { + keyPath: 'id', + autoIncrement: true + }); + }; + const dbPromise = new Promise((res, rej) => { + openRequest.onerror = ev => rej(ev); + openRequest.onsuccess = () => { + res(openRequest.result); + }; + }); + + return dbPromise; +} + +/** + * writes the new message to the database + * so other readers can find it + */ +export function writeMessage(db, readerUuid, messageJson) { + const time = new Date().getTime(); + const writeObject = { + uuid: readerUuid, + time, + data: messageJson + }; + + const transaction = db.transaction([OBJECT_STORE_ID], 'readwrite'); + + return new Promise((res, rej) => { + transaction.oncomplete = () => res(); + transaction.onerror = ev => rej(ev); + + const objectStore = transaction.objectStore(OBJECT_STORE_ID); + objectStore.add(writeObject); + }); +} + +export function getAllMessages(db) { + const objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + const ret = []; + return new Promise(res => { + objectStore.openCursor().onsuccess = ev => { + const cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor.continue(); + } else { + res(ret); + } + }; + }); +} + +export function getMessagesHigherThen(db, lastCursorId) { + const objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + const ret = []; + const keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity); + return new Promise(res => { + objectStore.openCursor(keyRangeValue).onsuccess = ev => { + const cursor = ev.target.result; + if (cursor) { + ret.push(cursor.value); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor.continue(); + } else { + res(ret); + } + }; + }); +} + +export function removeMessageById(db, id) { + const request = db.transaction([OBJECT_STORE_ID], 'readwrite') + .objectStore(OBJECT_STORE_ID) + .delete(id); + return new Promise(res => { + request.onsuccess = () => res(); + }); +} + +export function getOldMessages(db, ttl) { + const olderThen = new Date().getTime() - ttl; + const objectStore = db.transaction(OBJECT_STORE_ID).objectStore(OBJECT_STORE_ID); + const ret = []; + return new Promise(res => { + objectStore.openCursor().onsuccess = ev => { + const cursor = ev.target.result; + if (cursor) { + const msgObk = cursor.value; + if (msgObk.time < olderThen) { + ret.push(msgObk); + //alert("Name for SSN " + cursor.key + " is " + cursor.value.name); + cursor.continue(); + } else { + // no more old messages, + res(ret); + return; + } + } else { + res(ret); + } + }; + }); +} + +export function cleanOldMessages(db, ttl) { + return getOldMessages(db, ttl) + .then(tooOld => { + return Promise.all( + tooOld.map(msgObj => removeMessageById(db, msgObj.id)) + ); + }); +} + +export function create(channelName, options) { + options = fillOptionsWithDefaults(options); + + const uuid = randomToken(10); + + return createDatabase(channelName).then(db => { + const state = { + closed: false, + lastCursorId: 0, + channelName, + options, + uuid, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallback: null, + readQueuePromises: [], + db + }; + + /** + * if service-workers are used, + * we have no 'storage'-event if they post a message, + * therefore we also have to set an interval + */ + _readLoop(state); + + return state; + }); +} + +function _readLoop(state) { + if (state.closed) return; + + return readNewMessages(state) + .then(() => sleep(state.options.idb.fallbackInterval)) + .then(() => _readLoop(state)); +} + +/** + * reads all new messages from the database and emits them + */ +function readNewMessages(state) { + return getMessagesHigherThen(state.db, state.lastCursorId) + .then(newerMessages => { + const useMessages = newerMessages + .map(msgObj => { + if (msgObj.id > state.lastCursorId) { + state.lastCursorId = msgObj.id; + } + return msgObj; + }) + .filter(msgObj => msgObj.uuid !== state.uuid) // not send by own + .filter(msgObj => !state.emittedMessagesIds.has(msgObj.id)) // not already emitted + .filter(msgObj => msgObj.time >= state.messagesCallbackTime) // not older then onMessageCallback + .sort((msgObjA, msgObjB) => msgObjA.time - msgObjB.time); // sort by time + + + useMessages.forEach(msgObj => { + if (state.messagesCallback) { + state.emittedMessagesIds.add(msgObj.id); + setTimeout( + () => state.emittedMessagesIds.delete(msgObj.id), + state.options.idb.ttl * 2 + ); + + state.messagesCallback(msgObj.data); + } + }); + + return Promise.resolve(); + }); +} + +export function close(channelState) { + channelState.closed = true; + channelState.db.close(); +} + +export function postMessage(channelState, messageJson) { + return writeMessage( + channelState.db, + channelState.uuid, + messageJson + ).then(() => { + if (randomInt(0, 10) === 0) { + /* await (do not await) */ cleanOldMessages( + channelState.db, + channelState.options.idb.ttl + ); + } + }); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + readNewMessages(channelState); +} + +export function canBeUsed() { + if (isNode) return false; + const idb = getIdb(); + + if (!idb) return false; + return true; +}; diff --git a/src/methods/localstorage.js b/src/methods/localstorage.js new file mode 100644 index 00000000..cf73cf4c --- /dev/null +++ b/src/methods/localstorage.js @@ -0,0 +1,150 @@ +/** + * A localStorage-only method which uses localstorage and its 'storage'-event + * This does not work inside of webworkers because they have no access to locastorage + * This is basically implemented to support IE9 or your grandmothers toaster. + * @link https://caniuse.com/#feat=namevalue-storage + * @link https://caniuse.com/#feat=indexeddb + */ + +const isNode = require('detect-node'); + +import { + fillOptionsWithDefaults +} from '../options'; + +import { + sleep, + randomToken +} from '../util'; + +const KEY_PREFIX = 'pubkey.broadcastChannel-'; +export const type = 'localstorage'; + +/** + * copied from crosstab + * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32 + */ +export function getLocalStorage() { + let localStorage; + if (typeof window === 'undefined') return null; + try { + localStorage = window.localStorage; + localStorage = window['ie8-eventlistener/storage'] || window.localStorage; + } catch (e) { + // New versions of Firefox throw a Security exception + // if cookies are disabled. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153 + } + return localStorage; +} + +export function storageKey(channelName) { + return KEY_PREFIX + channelName; +} + + +/** +* writes the new message to the storage +* and fires the storage-event so other readers can find it +*/ +export function postMessage(channelState, messageJson) { + return new Promise(res => { + sleep().then(() => { + const key = storageKey(channelState.channelName); + const writeObj = { + token: randomToken(10), + time: new Date().getTime(), + data: messageJson, + uuid: channelState.uuid + }; + const value = JSON.stringify(writeObj); + localStorage.setItem(key, value); + + /** + * StorageEvent does not fire the 'storage' event + * in the window that changes the state of the local storage. + * So we fire it manually + */ + const ev = document.createEvent('Event'); + ev.initEvent('storage', true, true); + ev.key = key; + ev.newValue = value; + window.dispatchEvent(ev); + + res(); + }); + }); +} + +export function addStorageEventListener(channelName, fn) { + const key = storageKey(channelName); + const listener = ev => { + if (ev.key === key) { + fn(JSON.parse(ev.newValue)); + } + }; + window.addEventListener('storage', listener); + return listener; +} +export function removeStorageEventListener(listener) { + window.removeEventListener('storage', listener); +} + +export function create(channelName, options) { + options = fillOptionsWithDefaults(options); + if (!canBeUsed()) { + throw new Error('BroadcastChannel: localstorage cannot be used'); + } + + const startTime = new Date().getTime(); + const uuid = randomToken(10); + + // contains all messages that have been emitted before + const emittedMessagesIds = new Set(); + + const state = { + startTime, + channelName, + options, + uuid, + emittedMessagesIds + }; + + + state.listener = addStorageEventListener( + channelName, + (msgObj) => { + if (!state.messagesCallback) return; // no listener + if (msgObj.uuid === uuid) return; // own message + if (!msgObj.token || emittedMessagesIds.has(msgObj.token)) return; // already emitted + if (msgObj.time && msgObj.time < state.messagesCallbackTime) return; // too old + + emittedMessagesIds.add(msgObj.token); + setTimeout( + () => emittedMessagesIds.delete(msgObj.token), + options.localstorage.removeTimeout + ); + state.messagesCallback(msgObj.data); + } + ); + + + return state; +} + +export function close(channelState) { + removeStorageEventListener(channelState.listener); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +export function canBeUsed() { + if (isNode) return false; + const ls = getLocalStorage(); + + if (!ls) return false; + return true; +}; diff --git a/src/methods/native.js b/src/methods/native.js new file mode 100644 index 00000000..3151469c --- /dev/null +++ b/src/methods/native.js @@ -0,0 +1,42 @@ +const isNode = require('detect-node'); + +export const type = 'native'; + +export function create(channelName, options) { + if(!options) options = {}; + const state = { + channelName, + options, + messagesCallback: null, + bc: new BroadcastChannel(channelName), + subscriberFunctions: [] + }; + + state.bc.onmessage = msg => { + if (state.messagesCallback) { + state.messagesCallback(msg.data); + } + }; + + return state; +}; + +export function close(channelState) { + channelState.bc.close(); + channelState.subscriberFunctions = []; +} + +export function postMessage(channelState, messageJson) { + channelState.bc.postMessage(messageJson, false); +} + +export function onMessage(channelState, fn, time) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; +} + +export function canBeUsed() { + if (isNode) return false; + + if (typeof BroadcastChannel === 'function') return true; +}; diff --git a/src/methods/node.js b/src/methods/node.js new file mode 100644 index 00000000..2b3015ce --- /dev/null +++ b/src/methods/node.js @@ -0,0 +1,492 @@ +/** + * this method is used in nodejs-environments. + * The ipc is handled via sockets and file-writes to the tmp-folder + */ + +import * as util from 'util'; +import * as fs from 'fs'; +import * as os from 'os'; +import * as events from 'events'; +import * as net from 'net'; +import * as path from 'path'; +import { + sha3_224 +} from 'js-sha3'; + +import isNode from 'detect-node'; +import IdleQueue from 'custom-idle-queue'; +import unload from 'unload'; + +import { + fillOptionsWithDefaults +} from '../options'; + +import { + randomInt, + randomToken +} from '../util'; + +/** + * windows sucks, so we have handle windows-type of socket-paths + * @link https://gist.github.com/domenic/2790533#gistcomment-331356 + */ +export function cleanPipeName(str) { + if ( + process.platform === 'win32' && + !str.startsWith('\\\\.\\pipe\\') + ) { + str = str.replace(/^\//, ''); + str = str.replace(/\//g, '-'); + return '\\\\.\\pipe\\' + str; + } else { + return str; + } +}; + +const mkdir = util.promisify(fs.mkdir); +const writeFile = util.promisify(fs.writeFile); +const readFile = util.promisify(fs.readFile); +const unlink = util.promisify(fs.unlink); +const readdir = util.promisify(fs.readdir); + + +const TMP_FOLDER_NAME = 'pubkey.broadcast-channel'; + +export function getPaths(channelName) { + const folderPathBase = path.join( + os.tmpdir(), + TMP_FOLDER_NAME + ); + const channelPathBase = path.join( + os.tmpdir(), + TMP_FOLDER_NAME, + sha3_224(channelName) // use hash incase of strange characters + ); + const folderPathReaders = path.join( + channelPathBase, + 'readers' + ); + const folderPathMessages = path.join( + channelPathBase, + 'messages' + ); + + return { + base: folderPathBase, + channelBase: channelPathBase, + readers: folderPathReaders, + messages: folderPathMessages + }; +} + +export async function ensureFoldersExist(channelName) { + + const paths = getPaths(channelName); + + + await mkdir(paths.base).catch(() => null); + await mkdir(paths.channelBase).catch(() => null); + await Promise.all([ + await mkdir(paths.readers).catch(() => null), + await mkdir(paths.messages).catch(() => null) + ]); +}; + +export function socketPath(channelName, readerUuid) { + + const paths = getPaths(channelName); + const socketPath = path.join( + paths.readers, + readerUuid + '.s' + ); + return cleanPipeName(socketPath); +} + +export function socketInfoPath(channelName, readerUuid) { + const paths = getPaths(channelName); + const socketPath = path.join( + paths.readers, + readerUuid + '.json' + ); + return socketPath; +} + + +/** + * Because it is not possible to get all socket-files in a folder, + * when used under fucking windows, + * we have to set a normal file so other readers know our socket exists + */ +export async function createSocketInfoFile(channelName, readerUuid) { + await ensureFoldersExist(channelName); + const pathToFile = socketInfoPath(channelName, readerUuid); + await writeFile( + pathToFile, + JSON.stringify({ + time: new Date().getTime() + }) + ); + return pathToFile; +} + +/** + * creates the socket-file and subscribes to it + * @return {{emitter: EventEmitter, server: any}} + */ +export async function createSocketEventEmitter(channelName, readerUuid) { + const pathToSocket = socketPath(channelName, readerUuid); + + const emitter = new events.EventEmitter(); + const server = net + .createServer(stream => { + stream.on('end', function () { + // console.log('server: end'); + }); + + stream.on('data', function (msg) { + // console.log('server: got data:'); + // console.dir(msg.toString()); + emitter.emit('data', msg.toString()); + }); + }); + + await new Promise(res => { + server.listen(pathToSocket, () => { + res(); + }); + }); + server.on('connection', () => { + // console.log('server: Client connected.'); + }); + + return { + path: pathToSocket, + emitter, + server + }; +} + +export async function openClientConnection(channelName, readerUuid) { + const pathToSocket = socketPath(channelName, readerUuid); + const client = new net.Socket(); + await new Promise(res => { + client.connect( + pathToSocket, + res + ); + }); + return client; +} + + +/** + * writes the new message to the file-system + * so other readers can find it + */ +export async function writeMessage(channelName, readerUuid, messageJson) { + const time = new Date().getTime(); + const writeObject = { + uuid: readerUuid, + time, + data: messageJson + }; + + const token = randomToken(12); + const fileName = time + '_' + readerUuid + '_' + token + '.json'; + + const msgPath = path.join( + getPaths(channelName).messages, + fileName + ); + + await writeFile( + msgPath, + JSON.stringify(writeObject) + ); + + return { + time, + uuid: readerUuid, + token, + path: msgPath + }; +} + +/** + * returns the uuids of all readers + * @return {string[]} + */ +export async function getReadersUuids(channelName) { + const readersPath = getPaths(channelName).readers; + const files = await readdir(readersPath); + + return files + .map(file => file.split('.')) + .filter(split => split[1] === 'json') // do not scan .socket-files + .map(split => split[0]); +} + +export async function messagePath(channelName, time, token, writerUuid) { + const fileName = time + '_' + writerUuid + '_' + token + '.json'; + + const msgPath = path.join( + getPaths(channelName).messages, + fileName + ); + return msgPath; +} + +export async function getAllMessages(channelName) { + const messagesPath = getPaths(channelName).messages; + const files = await readdir(messagesPath); + return files.map(file => { + const fileName = file.split('.')[0]; + const split = fileName.split('_'); + + return { + path: path.join( + messagesPath, + file + ), + time: parseInt(split[0]), + senderUuid: split[1], + token: split[2] + }; + }); +} + +export function getSingleMessage(channelName, msgObj) { + const messagesPath = getPaths(channelName).messages; + + return { + path: path.join( + messagesPath, + msgObj.t + '_' + msgObj.u + '_' + msgObj.to + '.json' + ), + time: msgObj.t, + senderUuid: msgObj.u, + token: msgObj.to + }; +} + + +export async function readMessage(messageObj) { + const content = await readFile(messageObj.path, 'utf8'); + return JSON.parse(content); +} + +export async function cleanOldMessages(messageObjects, ttl) { + const olderThen = new Date().getTime() - ttl; + + await Promise.all( + messageObjects + .filter(obj => obj.time < olderThen) + .map(obj => unlink(obj.path).catch(() => null)) + ); +} + + + +export const type = 'node'; + +export async function create(channelName, options = {}) { + options = fillOptionsWithDefaults(options); + + await ensureFoldersExist(channelName); + const uuid = randomToken(10); + + const [ + otherReaderUuids, + socketEE, + infoFilePath + ] = await Promise.all([ + getReadersUuids(channelName), + createSocketEventEmitter(channelName, uuid), + createSocketInfoFile(channelName, uuid) + ]); + + const otherReaderClients = {}; + await Promise.all( + otherReaderUuids + .filter(readerUuid => readerUuid !== uuid) // not own + .map(async (readerUuid) => { + const client = await openClientConnection(channelName, readerUuid); + otherReaderClients[readerUuid] = client; + }) + ); + + // ensures we do not read messages in parrallel + const readQueue = new IdleQueue(1); + const writeQueue = new IdleQueue(1); + + const state = { + channelName, + options, + uuid, + socketEE, + infoFilePath, + // contains all messages that have been emitted before + emittedMessagesIds: new Set(), + messagesCallbackTime: null, + messagesCallback: null, + readQueue, + writeQueue, + otherReaderUuids, + otherReaderClients, + // ensure if process crashes, everything is cleaned up + removeUnload: unload.add(() => close(state)) + }; + + // when new message comes in, we read it and emit it + socketEE.emitter.on('data', data => { + const obj = JSON.parse(data); + if (obj.a === 'msg') { + handleMessagePing(state, obj.d); + return; + } + }); + + return state; +} + + +/** + * when the socket pings, so that we now new messages came, + * run this + */ +export async function handleMessagePing(state, msgObj = null) { + /** + * when there are no listener, we do nothing + */ + if (!state.messagesCallback) return; + + await state.readQueue.requestIdlePromise(); + await state.readQueue.wrapCall( + async () => { + + + let messages; + if (!msgObj) { + // get all + messages = await getAllMessages(state.channelName); + } else { + // get single message + messages = [ + getSingleMessage(state.channelName, msgObj) + ]; + } + + const useMessages = messages + .filter(msgObj => msgObj.senderUuid !== state.uuid) // not send by own + .filter(msgObj => !state.emittedMessagesIds.has(msgObj.token)) // not already emitted + .filter(msgObj => msgObj.time >= state.messagesCallbackTime) // not older then onMessageCallback + .sort((msgObjA, msgObjB) => msgObjA.time - msgObjB.time); // sort by time + + if (state.messagesCallback) { + for (const msgObj of useMessages) { + const content = await readMessage(msgObj); + state.emittedMessagesIds.add(msgObj.token); + setTimeout( + () => state.emittedMessagesIds.delete(msgObj.token), + state.options.node.ttl * 2 + ); + + if (state.messagesCallback) { + state.messagesCallback(content.data); + } + } + } + } + ); +} + +export async function refreshReaderClients(channelState) { + // ensure we have subscribed to all readers + const otherReaders = await getReadersUuids(channelState.channelName); + + // remove subscriptions to closed readers + Object.keys(channelState.otherReaderClients) + .filter(readerUuid => !otherReaders.includes(readerUuid)) + .forEach(readerUuid => { + channelState.otherReaderClients[readerUuid].close(); + delete channelState.otherReaderClients[readerUuid]; + }); + + await Promise.all( + otherReaders + .filter(readerUuid => readerUuid !== channelState.uuid) // not own + .filter(readerUuid => !channelState.otherReaderClients[readerUuid]) // not already has client + .map(async (readerUuid) => { + const client = await openClientConnection(channelState.channelName, readerUuid); + channelState.otherReaderClients[readerUuid] = client; + }) + ); +} + +export async function postMessage(channelState, messageJson) { + + // ensure we do this not in parallel + await channelState.writeQueue.requestIdlePromise(); + await channelState.writeQueue.wrapCall( + async () => { + await refreshReaderClients(channelState); + const msgObj = await writeMessage( + channelState.channelName, + channelState.uuid, + messageJson + ); + + // ping other readers + const pingObj = { + a: 'msg', + d: { + t: msgObj.time, + u: msgObj.uuid, + to: msgObj.token + } + }; + await Promise.all( + Object.values(channelState.otherReaderClients) + .map(client => client.write(JSON.stringify(pingObj))) + ); + + /** + * clean up old messages + * to not waste resources on cleaning up, + * only if random-int matches, we clean up old messages + */ + if (randomInt(0, 10) === 0) { + const messages = await getAllMessages(channelState.channelName); + await cleanOldMessages(messages, channelState.options.node.ttl); + } + + // emit to own eventEmitter + // channelState.socketEE.emitter.emit('data', JSON.parse(JSON.stringify(messageJson))); + } + ); +} + + +export function onMessage(channelState, fn, time = new Date().getTime()) { + channelState.messagesCallbackTime = time; + channelState.messagesCallback = fn; + handleMessagePing(channelState); +} + +export async function close(channelState) { + channelState.removeUnload(); + channelState.socketEE.server.close(); + channelState.socketEE.emitter.removeAllListeners(); + channelState.readQueue.clear(); + channelState.writeQueue.clear(); + + await unlink(channelState.infoFilePath); + + Object.values(channelState.otherReaderClients) + .forEach(client => client.destroy()); +} + + +export function canBeUsed() { + return isNode; +}; diff --git a/src/options.js b/src/options.js new file mode 100644 index 00000000..90db0009 --- /dev/null +++ b/src/options.js @@ -0,0 +1,24 @@ +export function fillOptionsWithDefaults(options) { + if(!options) options = {}; + options = JSON.parse(JSON.stringify(options)); + + // main + if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true; + + + // indexed-db + if (!options.idb) options.idb = {}; + // after this time the messages get deleted + if (!options.idb.ttl) options.idb.ttl = 1000 * 45; + if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 50; + + // localstorage + if (!options.localstorage) options.localstorage = {}; + if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60; + + // node + if (!options.node) options.node = {}; + if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes; + + return options; +} \ No newline at end of file diff --git a/src/util.js b/src/util.js new file mode 100644 index 00000000..0f92f55a --- /dev/null +++ b/src/util.js @@ -0,0 +1,33 @@ +/** + * returns true if the given object is a promise + */ +export function isPromise(obj) { + if (obj && + typeof obj.then === 'function') { + return true; + } else { + return false; + } +} + +export function sleep(time) { + if (!time) time = 0; + return new Promise(res => setTimeout(res, time)); +} + +export function randomInt(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); +} + +/** + * https://stackoverflow.com/a/1349426/3443137 + */ +export function randomToken(length) { + let text = ''; + const possible = 'abcdefghijklmnopqrstuvwxzy0123456789'; + + for (let i = 0; i < 5; i++) + text += possible.charAt(Math.floor(Math.random() * possible.length)); + + return text; +} \ No newline at end of file diff --git a/test/e2e.test.js b/test/e2e.test.js new file mode 100644 index 00000000..5dfcac6d --- /dev/null +++ b/test/e2e.test.js @@ -0,0 +1,33 @@ +import { + Selector +} from 'testcafe'; +import AsyncTestUtil from 'async-test-util'; + +const BASE_PAGE = 'http://127.0.0.1:8080/'; + +fixture `Example page` + .page `http://127.0.0.1:8080/`; + + +[ + 'idb', + 'native', + 'localstorage', + 'default' +].forEach(methodType => { + test.page(BASE_PAGE + '?methodType=' + methodType)('test with method: ' + methodType, async () => { + console.log('##### START TEST WITH ' + methodType); + const stateContainer = Selector('#state'); + + await AsyncTestUtil.waitUntil(async () => { + const value = await stateContainer.innerText; + // console.log(value); + + // const out = await t.getBrowserConsoleMessages(); + // console.log('out:'); + // console.log(JSON.stringify(out)); + + return value === 'SUCCESS'; + }); + }); +}); diff --git a/test/index.test.js b/test/index.test.js new file mode 100644 index 00000000..24f4d749 --- /dev/null +++ b/test/index.test.js @@ -0,0 +1,12 @@ +const isNode = require('detect-node'); + +if (!isNode) { + // if browsers + console.dir = obj => console.log(JSON.stringify(obj, null, 2)); +} + +require('./unit.test'); +require('./integration.test'); +require('./issues.test'); + +require('./performance.test'); diff --git a/test/integration.test.js b/test/integration.test.js new file mode 100644 index 00000000..9ee5a697 --- /dev/null +++ b/test/integration.test.js @@ -0,0 +1,371 @@ +const AsyncTestUtil = require('async-test-util'); +const assert = require('assert'); +const isNode = require('detect-node'); +const clone = require('clone'); +const BroadcastChannel = require('../'); + +/** + * we run this test once per method + */ +function runTest(channelType) { + const channelOptions = { + type: channelType + }; + + describe('integration.test.js', () => { + describe('.constructor()', () => { + it('asdf', () => { + console.log('Started: ' + channelType); + }); + it('should create a channel', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + channel.close(); + }); + }); + describe('.postMessage()', () => { + it('should post a message', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + await channel.postMessage('foobar'); + channel.close(); + }); + it('should throw if channel is already closed', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + channel.close(); + await AsyncTestUtil.assertThrows( + () => channel.postMessage('foobar'), + Error, + 'closed' + ); + }); + }); + describe('.onmessage', () => { + /** + * the window.BroadcastChannel + * does not emit postMessage to own subscribers, + * if you want to do that, you have to create another channel + */ + it('should NOT recieve the message on own', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + channel.onmessage = msg => emitted.push(msg); + await channel.postMessage({ + foo: 'bar' + }); + + await AsyncTestUtil.wait(100); + assert.equal(emitted.length, 0); + + channel.close(); + }); + it('should recieve the message on other channel', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + const otherChannel = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + otherChannel.onmessage = msg => emitted.push(msg); + await channel.postMessage({ + foo: 'bar' + }); + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.equal(emitted[0].foo, 'bar'); + channel.close(); + otherChannel.close(); + }); + it('should work with strange channelName', async () => { + const channelName = ' asdf / ' + AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + const otherChannel = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + otherChannel.onmessage = msg => emitted.push(msg); + await channel.postMessage({ + foo: 'bar' + }); + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.equal(emitted[0].foo, 'bar'); + channel.close(); + otherChannel.close(); + }); + it('should have the same message-data', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel1 = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + channel2.onmessage = msg => emitted.push(msg); + + const msgJson = { + foo: 'bar' + }; + await channel1.postMessage(msgJson); + + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.deepEqual(emitted[0], msgJson); + + channel1.close(); + channel2.close(); + }); + it('should work with big message-data', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel1 = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + channel2.onmessage = msg => emitted.push(msg); + + const msgJson = { + one: AsyncTestUtil.randomString(1000), + two: AsyncTestUtil.randomString(1000), + three: AsyncTestUtil.randomString(1000), + }; + await channel1.postMessage(msgJson); + + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.deepEqual(emitted[0], msgJson); + + channel1.close(); + channel2.close(); + }); + it('should not loose the message if _prepare() takes a while', async () => { + const channelName = AsyncTestUtil.randomString(12); + const slowerOptions = clone(channelOptions); + slowerOptions.prepareDelay = 300; + const channel1 = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, slowerOptions); + + const emitted = []; + channel2.onmessage = msg => emitted.push(msg); + + const msgJson = { + foo: 'bar' + }; + await channel1.postMessage(msgJson); + + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.deepEqual(emitted[0], msgJson); + + channel1.close(); + channel2.close(); + }); + it('should emit all events if subscribed directly after postMessage', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel1 = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, channelOptions); + + channel1.postMessage('foo1'); + channel1.postMessage('foo2'); + + const emitted = []; + channel2.onmessage = msg => emitted.push(msg); + + channel1.postMessage('foo3'); + + await AsyncTestUtil.waitUntil(() => emitted.length === 3); + assert.equal(emitted.length, 3); + + channel1.close(); + channel2.close(); + }); + it('should not emit messages, send before onmessage was set, when one tick was done', async () => { + const channelName = AsyncTestUtil.randomString(12); + + const channel1 = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, channelOptions); + + channel1.postMessage('foo1'); + channel1.postMessage('foo2'); + + + await AsyncTestUtil.wait(50); + + const emitted = []; + channel2.onmessage = msg => emitted.push(msg); + + const msgJson = { + foo: 'bar' + }; + channel1.postMessage(msgJson); + + await AsyncTestUtil.waitUntil(() => emitted.length >= 1); + assert.equal(emitted.length, 1); + assert.deepEqual(emitted[0], msgJson); + + channel1.close(); + channel2.close(); + }); + it('should not confuse messages between different channels', async () => { + const channel = new BroadcastChannel(AsyncTestUtil.randomString(12), channelOptions); + const otherChannel = new BroadcastChannel(AsyncTestUtil.randomString(12), channelOptions); + + const emitted = []; + otherChannel.onmessage = msg => emitted.push(msg); + await channel.postMessage({ + foo: 'bar' + }); + await AsyncTestUtil.wait(100); + assert.equal(emitted.length, 0); + + channel.close(); + otherChannel.close(); + }); + it('should not read messages created before the channel was created', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + + const msgJson = { + foo: 'bar' + }; + + await channel.postMessage(msgJson); + await AsyncTestUtil.wait(50); + + const otherChannel = new BroadcastChannel(channelName, channelOptions); + const emittedOther = []; + otherChannel.onmessage = msg => emittedOther.push(msg); + + await channel.postMessage(msgJson); + await channel.postMessage(msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length >= 2); + await AsyncTestUtil.wait(100); + + assert.equal(emittedOther.length, 2); + + channel.close(); + otherChannel.close(); + }); + it('should only run the last onmessage-callback', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + const channel2 = new BroadcastChannel(channelName, channelOptions); + + const emitted1 = []; + const emitted2 = []; + + channel2.onmessage = msg => { + emitted1.push(msg); + }; + channel2.onmessage = msg => { + emitted2.push(msg); + }; + + await channel.postMessage('foobar'); + + await AsyncTestUtil.waitUntil(() => emitted2.length >= 1); + await AsyncTestUtil.wait(100); + + assert.equal(emitted1.length, 0); + assert.equal(emitted2.length, 1); + + channel.close(); + channel2.close(); + }); + }); + describe('.addEventListener()', () => { + it('should emit events to all subscribers', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + const otherChannel = new BroadcastChannel(channelName, channelOptions); + + const emitted1 = []; + const emitted2 = []; + + otherChannel.addEventListener('message', msg => emitted1.push(msg)); + otherChannel.addEventListener('message', msg => emitted2.push(msg)); + + const msg = { + foo: 'bar' + }; + await channel.postMessage(msg); + + await AsyncTestUtil.waitUntil(() => emitted1.length === 1); + await AsyncTestUtil.waitUntil(() => emitted2.length === 1); + + assert.deepEqual(msg, emitted1[0]); + assert.deepEqual(msg, emitted2[0]); + + channel.close(); + otherChannel.close(); + }); + }); + describe('.removeEventListener()', () => { + it('should no longer emit the message', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channel = new BroadcastChannel(channelName, channelOptions); + const otherChannel = new BroadcastChannel(channelName, channelOptions); + + const emitted = []; + const fn = msg => emitted.push(msg); + otherChannel.addEventListener('message', fn); + + const msg = { + foo: 'bar' + }; + await channel.postMessage(msg); + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + + otherChannel.removeEventListener('message', fn); + + await channel.postMessage(msg); + await AsyncTestUtil.wait(100); + + assert.equal(emitted.length, 1); + + channel.close(); + otherChannel.close(); + }); + }); + describe('.type', () => { + it('should get a type', async () => { + const channel = new BroadcastChannel(AsyncTestUtil.randomString(12), channelOptions); + const type = channel.type; + assert.equal(typeof type, 'string'); + assert.notEqual(type, ''); + + channel.close(); + }); + }); + describe('other', () => { + it('should prefer localstorage if webWorkerSupport: false', async () => { + if (isNode) return; + // disable BroadcastChannel + const broadcastChannelBefore = window.BroadcastChannel; + Object.defineProperty(window, 'BroadcastChannel', { + enumerable: false, + configurable: false, + writable: true, + value: false + }); + + const options = { + webWorkerSupport: false + }; + const channel = new BroadcastChannel(AsyncTestUtil.randomString(12), options); + assert.equal(channel.type, 'localstorage'); + + window.BroadcastChannel = broadcastChannelBefore; + }); + it('', () => { + console.log('Finiished: ' + channelType); + }); + }); + }); +}; + +if (isNode) { + runTest('node'); +} else { + runTest('native'); + runTest('idb'); + runTest('localstorage'); +} diff --git a/test/issues.test.js b/test/issues.test.js new file mode 100644 index 00000000..4708bfb8 --- /dev/null +++ b/test/issues.test.js @@ -0,0 +1,4 @@ +// const BroadcastChannel = require('../dist/lib/index'); + +describe('issues.test.js', () => { +}); diff --git a/test/performance.test.js b/test/performance.test.js new file mode 100644 index 00000000..967dd13f --- /dev/null +++ b/test/performance.test.js @@ -0,0 +1,2 @@ +describe('performance.test.js', () => { +}); diff --git a/test/scripts/iframe.js b/test/scripts/iframe.js new file mode 100644 index 00000000..1fa502bf --- /dev/null +++ b/test/scripts/iframe.js @@ -0,0 +1,37 @@ +/* eslint-disable */ +/** + * used in docs/iframe.html + */ +require('babel-polyfill'); +import { + getParameterByName +} from './util.js'; + +var BroadcastChannel = require('../../'); + +const channelName = getParameterByName('channelName'); +const methodType = getParameterByName('methodType'); + +// overwrite console.log +const logBefore = console.log; +console.log = function (str) { logBefore('iframe: ' + str); } + +var channel = new BroadcastChannel(channelName, { + type: methodType +}); +var msgContainer = document.getElementById('messages'); +channel.onmessage = function (msg) { + console.log('recieved message(' + msg.step + ') from ' + msg.from + ': ' + JSON.stringify(msg)); + + var textnode = document.createTextNode(JSON.stringify(msg) + '
'); + msgContainer.appendChild(textnode); + + if (!msg.answer) { + console.log('answer back(' + msg.step + ')'); + channel.postMessage({ + answer: true, + from: 'iframe', + original: msg + }); + } +}; \ No newline at end of file diff --git a/test/scripts/index.js b/test/scripts/index.js new file mode 100644 index 00000000..537f7d44 --- /dev/null +++ b/test/scripts/index.js @@ -0,0 +1,132 @@ +/* eslint-disable */ +/** + * used in docs/index.html + */ +require('babel-polyfill'); +var BroadcastChannel = require('../../'); +import { + getParameterByName +} from './util.js'; + +var methodType = getParameterByName('methodType'); +if (!methodType || methodType === '' || methodType === 'default') methodType = undefined; + +// set select-input +var selectEl = document.getElementById('method-type-select'); +selectEl.onchange = function (ev) { + var newValue = selectEl.value; + var newUrl = location.origin + location.pathname + '?methodType=' + newValue; + location = newUrl; +}; +if (methodType) { + selectEl.value = methodType; +} + +var TEST_MESSAGES = 50; +var body = document.getElementById('body'); +var msgContainer = document.getElementById('messages'); +var rightContainer = document.getElementById('right'); +var messageCountContainer = document.getElementById('msg-count'); +var stateContainer = document.getElementById('state'); +const iframeEl = document.getElementById('test-iframe'); + +document.getElementById('user-agent').innerHTML = navigator.userAgent; + +var startTime; +const options = {}; +console.log('++++++'); +console.log(typeof BroadcastChannel); +var channel = new BroadcastChannel('foobar', { + type: methodType +}); +document.getElementById('method').innerHTML = channel.type; + +/** + * to measure the speed, we: + * 1. send message + * 2. wait until iframe and worker answers + * 3. repeat from 1. for TEST_MESSAGES times + */ +var messagesSend = 0; +var answerPool = {}; +let useWorker = false; + +function gotAllAnswers(answerPool) { + if (!answerPool.iframe) return false; + if (useWorker && !answerPool.worker) return false; + return true; +} + +channel.onmessage = function (msg) { + console.log('main: recieved msg' + JSON.stringify(msg)); + + answerPool[msg.from] = msg; + var textnode = document.createTextNode(JSON.stringify(msg) + '
'); + msgContainer.appendChild(textnode); + + if (gotAllAnswers(answerPool)) { + answerPool = {}; // reset + + if (messagesSend >= TEST_MESSAGES) { + // sucess + console.log('main: sucess'); + body.style.backgroundColor = 'green'; + stateContainer.innerHTML = 'SUCCESS' + const amountTime = new Date().getTime() - startTime; + document.getElementById('time-amount').innerHTML = amountTime + 'ms'; + } else { + // send next message + messagesSend++; + console.log('main: send next message (' + messagesSend + ') ===================='); + messageCountContainer.innerHTML = messagesSend; + channel.postMessage({ + from: 'main', + foo: 'bar', + step: messagesSend + }); + } + } +}; + +const run = async function () { + const rand = new Date().getTime(); + console.log('aaaa'); + + + + // load iframe + iframeEl.src = './iframe.html?channelName=' + channel.name + '&methodType=' + channel.type + '&t=' + rand; + await new Promise(res => iframeEl.onload = () => res()); + console.log('main: Iframe has loaded'); + + // spawn web-worker if possible + if (channel.type !== 'localstorage' && typeof window.Worker === 'function') { + useWorker = true; + const worker = new Worker('worker.js?t=' + rand); + worker.onerror = event => { + throw new Error('worker: ' + event.message + " (" + event.filename + ":" + event.lineno + ")"); + }; + await new Promise(res => { + worker.addEventListener('message', e => { + // run when message returned, so we know the worker has started + console.log('main: Worker has started'); + res(); + }, false); + worker.postMessage({ + 'cmd': 'start', + 'msg': { + channelName: channel.name, + methodType: channel.type + } + }); + }); + } + console.log('========== START SENDING MESSAGES ' + channel.type); + startTime = new Date().getTime(); + channel.postMessage({ + from: 'main', + step: 0 + }); + console.log('main: message send (0)'); +} +run(); \ No newline at end of file diff --git a/test/scripts/util.js b/test/scripts/util.js new file mode 100644 index 00000000..560d69b1 --- /dev/null +++ b/test/scripts/util.js @@ -0,0 +1,10 @@ +// https://stackoverflow.com/a/901144/3443137 +export function getParameterByName(name, url) { + if (!url) url = window.location.href; + name = name.replace(/[\[\]]/g, '\\$&'); + const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'); + const results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, ' ')); +} diff --git a/test/scripts/windows.sh b/test/scripts/windows.sh new file mode 100644 index 00000000..2c0833e9 --- /dev/null +++ b/test/scripts/windows.sh @@ -0,0 +1,11 @@ +# because windows sucks, we have to install some things localy in the test-vms +npm i -g rimraf +npm i -g cross-env +npm i -g concurrently +npm i -g babel-cli +npm i -g browserify +npm i -g testcafe +npm i -g karma +npm i -g http-server +npm i -g copyfiles +npm i -g mocha diff --git a/test/scripts/worker.js b/test/scripts/worker.js new file mode 100644 index 00000000..b9ad2472 --- /dev/null +++ b/test/scripts/worker.js @@ -0,0 +1,58 @@ +/* eslint-disable */ +/** + * used in the test-docs as web-worker + */ +require('babel-polyfill'); +var BroadcastChannel = require('../../'); + +// overwrite console.log +try{ + var logBefore = console.log; +// console.log = function (str) { logBefore('worker: ' + str); } +}catch(err){ + // does not work in IE11 +} + + +/** + * because shitware microsof-edge stucks the worker + * when initialisation is done, + * we have to set a interval here. + */ +setInterval(function () { }, 10 * 1000); + +var channel; +self.addEventListener('message', function (e) { + var data = e.data; + switch (data.cmd) { + case 'start': + console.log('Worker started'); + console.log(JSON.stringify(data.msg)); + + channel = new BroadcastChannel(data.msg.channelName, { + type: data.msg.methodType + }); + var messages = []; + channel.onmessage = function (msg) { + console.log('recieved message(' + msg.step + ') from ' + msg.from + ': ' + JSON.stringify(msg)); + if (!msg.answer) { + console.log('(' + msg.step + ') answer back'); + channel.postMessage({ + answer: true, + from: 'worker', + original: msg + }); + } + }; + + self.postMessage('WORKER STARTED: '); + break; + case 'stop': + self.postMessage('WORKER STOPPED: ' + data.msg + '. (buttons will no longer work)'); + channel.close(); + self.close(); // Terminates the worker. + break; + default: + self.postMessage('Unknown command: ' + data.msg); + }; +}, false); diff --git a/test/typings.test.js b/test/typings.test.js new file mode 100644 index 00000000..a75c9400 --- /dev/null +++ b/test/typings.test.js @@ -0,0 +1,122 @@ +/** + * checks if the typings are correct + * run via 'npm run test:typings' + */ +const assert = require('assert'); +const path = require('path'); +const AsyncTestUtil = require('async-test-util'); + +describe('typings.test.ts', () => { + const mainPath = path.join(__dirname, '../'); + const codeBase = ` + import BroadcastChannel from '${mainPath}'; + declare type Message = { + foo: string; + }; + `; + const transpileCode = async (code) => { + const spawn = require('child-process-promise').spawn; + const stdout = []; + const stderr = []; + const promise = spawn('ts-node', [ + '--no-cache', + '--compilerOptions', '{"target":"es6", "strict": true, "strictNullChecks": true}', + '--type-check', + '-p', codeBase + '\n' + code + ]); + const childProcess = promise.childProcess; + childProcess.stdout.on('data', data => stdout.push(data.toString())); + childProcess.stderr.on('data', data => stderr.push(data.toString())); + try { + await promise; + } catch (err) { + throw new Error(`could not run + # Error: ${err} + # Output: ${stdout} + # ErrOut: ${stderr} + `); + } + }; + describe('basic', () => { + it('should sucess on basic test', async () => { + await transpileCode('console.log("Hello, world!")'); + }); + it('should fail on broken code', async () => { + const brokenCode = ` + let x: string = 'foo'; + x = 1337; + `; + let thrown = false; + try { + await transpileCode(brokenCode); + } catch (err) { + thrown = true; + } + assert.ok(thrown); + }); + }); + describe('non-typed channel', () => { + it('should be ok to create post and recieve', async () => { + const code = ` + (async()=>{ + const channel = new BroadcastChannel('foobar'); + + const emitted: any[] = []; + channel.onmessage = msg => emitted.push(msg); + await channel.postMessage({foo: 'bar'}); + })(); + `; + await transpileCode(code); + }); + it('should not allow to set wrong onmessage', async () => { + const code = ` + (async()=>{ + const channel = new BroadcastChannel('foobar'); + + const emitted: any[] = []; + channel.onmessage = {}; + await channel.postMessage({foo: 'bar'}); + })(); + `; + await AsyncTestUtil.assertThrows( + () => transpileCode(code) + ); + }); + }); + describe('typed channel', () => { + it('should be ok to create and post', async () => { + const code = ` + (async()=>{ + const channel = new BroadcastChannel('foobar'); + await channel.postMessage({foo: 'bar'}); + })(); + `; + await transpileCode(code); + }); + it('should be ok to recieve', async () => { + const code = ` + (async()=>{ + const channel: BroadcastChannel = new BroadcastChannel('foobar'); + const emitted: Message[] = []; + channel.onmessage = msg => { + const f: string = msg.foo; + emitted.push(msg); + }; + })(); + `; + await transpileCode(code); + }); + it('should not allow to post wrong message', async () => { + const code = ` + (async()=>{ + const channel = new BroadcastChannel('foobar'); + await channel.postMessage({x: 42}); + })(); + `; + await AsyncTestUtil.assertThrows( + () => transpileCode(code) + ); + }); + + }); +}); \ No newline at end of file diff --git a/test/unit.test.js b/test/unit.test.js new file mode 100644 index 00000000..d53cbc00 --- /dev/null +++ b/test/unit.test.js @@ -0,0 +1,4 @@ +require('./unit/node.method.test.js'); +require('./unit/native.method.test.js'); +require('./unit/indexed-db.method.test.js'); +require('./unit/localstorage.method.test.js'); \ No newline at end of file diff --git a/test/unit/indexed-db.method.test.js b/test/unit/indexed-db.method.test.js new file mode 100644 index 00000000..7921d831 --- /dev/null +++ b/test/unit/indexed-db.method.test.js @@ -0,0 +1,272 @@ +const AsyncTestUtil = require('async-test-util'); +const assert = require('assert'); +const isNode = require('detect-node'); +const IndexedDbMethod = require('../../dist/lib/methods/indexed-db.js'); + +describe('unit/indexed-db.method.test.js', () => { + if (isNode) return; + + describe('.getIdb()', () => { + it('should get an object', () => { + const idb = IndexedDbMethod.getIdb(); + assert.ok(idb); + }); + }); + describe('.createDatabase()', () => { + it('should create a database', async () => { + const channelName = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + assert.ok(db); + }); + it('should be able to call twice', async () => { + const channelName = AsyncTestUtil.randomString(10); + const db1 = await IndexedDbMethod.createDatabase(channelName); + const db2 = await IndexedDbMethod.createDatabase(channelName); + assert.ok(db1); + assert.ok(db2); + }); + }); + describe('.writeMessage()', () => { + it('should write the message to the db', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + await IndexedDbMethod.writeMessage(db, readerUuid, { + foo: 'bar' + }); + }); + }); + describe('.getAllMessages()', () => { + it('should get the message', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + await IndexedDbMethod.writeMessage(db, readerUuid, { + foo: 'bar' + }); + + const messages = await IndexedDbMethod.getAllMessages(db); + assert.equal(messages.length, 1); + assert.equal(messages[0].data.foo, 'bar'); + }); + it('should get the messages', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + await IndexedDbMethod.writeMessage(db, readerUuid, { + foo: 'bar' + }); + await IndexedDbMethod.writeMessage(db, readerUuid, { + foo: 'bar2' + }); + + const messages = await IndexedDbMethod.getAllMessages(db); + assert.equal(messages.length, 2); + }); + }); + describe('.getOldMessages()', () => { + it('should only get too old messages', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + const msgJson = { + foo: 'old' + }; + + // write 10 messages + await Promise.all( + new Array(10).fill() + .map(() => IndexedDbMethod.writeMessage(db, readerUuid, msgJson)) + ); + await AsyncTestUtil.wait(500); + + // write 2 new messages + await Promise.all( + new Array(10).fill() + .map(() => IndexedDbMethod.writeMessage(db, readerUuid, msgJson)) + ); + + const tooOld = await IndexedDbMethod.getOldMessages(db, 200); + assert.equal(tooOld.length, 10); + tooOld.forEach(msg => { + assert.equal(msg.data.foo, 'old'); + }); + }); + }); + describe('.cleanOldMessages()', () => { + it('should clean up old messages', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + const msgJson = { + foo: 'bar' + }; + await IndexedDbMethod.writeMessage(db, readerUuid, msgJson); + + await AsyncTestUtil.wait(500); + + await IndexedDbMethod.cleanOldMessages(db, 200); + + IndexedDbMethod.getAllMessages(db); // call parallel + const messagesAfter = await IndexedDbMethod.getAllMessages(db); + assert.equal(messagesAfter.length, 0); + }); + }); + describe('.getMessagesHigherThen()', () => { + it('should only get messages with higher id', async () => { + const channelName = AsyncTestUtil.randomString(10); + const readerUuid = AsyncTestUtil.randomString(10); + const db = await IndexedDbMethod.createDatabase(channelName); + const msgJson = { + foo: 'bar' + }; + + // write 10 messages + await Promise.all( + new Array(10).fill() + .map(() => IndexedDbMethod.writeMessage(db, readerUuid, msgJson)) + ); + + // get last 5 messages + const lastFive = await IndexedDbMethod.getMessagesHigherThen(db, 5); + assert.equal(lastFive.length, 5); + assert.equal(lastFive[0].id, 6); + assert.equal(lastFive[4].id, 10); + }); + }); + describe('core-functions', () => { + describe('.create()', () => { + it('should create a channelState', async () => { + const channelName = AsyncTestUtil.randomString(10); + const channelState = await IndexedDbMethod.create(channelName); + assert.ok(channelState); + IndexedDbMethod.close(channelState); + }); + it('should be called twice', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelState1 = await IndexedDbMethod.create(channelName); + const channelState2 = await IndexedDbMethod.create(channelName); + assert.ok(channelState1); + assert.ok(channelState2); + + await IndexedDbMethod.close(channelState1); + await IndexedDbMethod.close(channelState2); + }); + }); + describe('.postMessage()', () => { + it('should not crash', async () => { + const channelName = AsyncTestUtil.randomString(10); + const channelState = await IndexedDbMethod.create(channelName); + assert.ok(channelState); + await IndexedDbMethod.postMessage(channelState, { + foo: 'bar' + }); + IndexedDbMethod.close(channelState); + }); + }); + describe('.canBeUsed()', () => { + it('should be true on browsers', async () => { + const ok = IndexedDbMethod.canBeUsed(); + assert.ok(ok); + }); + }); + describe('.onMessage()', () => { + it('should emit the message on other', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await IndexedDbMethod.create(channelName); + const channelStateOwn = await IndexedDbMethod.create(channelName); + + const emittedOther = []; + const msgJson = { + foo: 'bar' + }; + + IndexedDbMethod.onMessage(channelStateOther, msg => emittedOther.push(msg), new Date().getTime()); + await IndexedDbMethod.postMessage(channelStateOwn, msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length === 1); + assert.deepEqual(emittedOther[0], msgJson); + + await IndexedDbMethod.close(channelStateOther); + await IndexedDbMethod.close(channelStateOwn); + }); + /** + * localstorage-pings do not work in a web-workers, + * which means this should be detected and work over intervall + * @link https://stackoverflow.com/a/6179599/3443137 + */ + it('should also work if localstorage does not work', async () => { + const channelName = AsyncTestUtil.randomString(12); + + // disable localStorage + const localStorageBefore = window.localStorage; + assert.ok(localStorageBefore); + Object.defineProperty(window, 'localStorage', { + enumerable: false, + configurable: false, + writable: true, + value: false + }); + + + const emittedOther = []; + const channelStateOther = await IndexedDbMethod.create(channelName); + IndexedDbMethod.onMessage(channelStateOther, msg => emittedOther.push(msg), new Date().getTime()); + await AsyncTestUtil.wait(100); + + const channelStateOwn = await IndexedDbMethod.create(channelName); + const msgJson = { + foo: 'bar' + }; + await IndexedDbMethod.postMessage(channelStateOwn, msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length === 1); + assert.deepEqual(emittedOther[0], msgJson); + + await IndexedDbMethod.close(channelStateOther); + await IndexedDbMethod.close(channelStateOwn); + window.localStorage = localStorageBefore; + }); + }); + }); + describe('other', () => { + it('should have cleaned up the messages', async function() { + const channelOptions = { + idb: { + ttl: 500 + } + }; + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await IndexedDbMethod.create(channelName, channelOptions); + const channelStateOwn = await IndexedDbMethod.create(channelName, channelOptions); + const msgJson = { + foo: 'bar' + }; + + // send 100 messages + await Promise.all( + new Array(100).fill(0) + .map(() => IndexedDbMethod.postMessage(channelStateOwn, msgJson)) + ); + + // w8 until ttl has reached + await AsyncTestUtil.wait(channelOptions.idb.ttl); + + // send 100 messages again to trigger cleanup + for (let x = 0; x < 100; x++) { + await IndexedDbMethod.postMessage(channelStateOwn, msgJson); + } + + await AsyncTestUtil.wait(channelOptions.idb.ttl); + + // ensure only the last 100 messages are here + await AsyncTestUtil.waitUntil(async () => { + const messages = await IndexedDbMethod.getAllMessages(channelStateOwn.db); + return messages.length <= 100; + }); + + await IndexedDbMethod.close(channelStateOther); + await IndexedDbMethod.close(channelStateOwn); + }); + }); +}); diff --git a/test/unit/localstorage.method.test.js b/test/unit/localstorage.method.test.js new file mode 100644 index 00000000..bf821e6e --- /dev/null +++ b/test/unit/localstorage.method.test.js @@ -0,0 +1,94 @@ +const AsyncTestUtil = require('async-test-util'); +const assert = require('assert'); +const isNode = require('detect-node'); +const LocalstorageMethod = require('../../dist/lib/methods/localstorage.js'); + +describe('unit/localstorage.method.test.js', () => { + if (isNode) return; + describe('.getLocalStorage()', () => { + it('should always get a object', () => { + const ls = LocalstorageMethod.getLocalStorage(); + assert.ok(ls); + assert.equal(typeof ls.setItem, 'function'); + }); + }); + describe('.postMessage()', () => { + it('should set the message', async () => { + const channelState = { + channelName: AsyncTestUtil.randomString(10), + uuid: AsyncTestUtil.randomString(10) + }; + const json = { foo: 'bar' }; + await LocalstorageMethod.postMessage( + channelState, + json + ); + const ls = LocalstorageMethod.getLocalStorage(); + const key = LocalstorageMethod.storageKey(channelState.channelName); + const value = JSON.parse(ls.getItem(key)); + console.dir(value); + assert.equal(value.data.foo, 'bar'); + }); + it('should fire an event', async () => { + const channelState = { + channelName: AsyncTestUtil.randomString(10), + uuid: AsyncTestUtil.randomString(10) + }; + const json = { foo: 'bar' }; + + const emitted = []; + const listener = LocalstorageMethod.addStorageEventListener( + channelState.channelName, + ev => { + emitted.push(ev); + } + ); + + LocalstorageMethod.postMessage( + channelState, + json + ); + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.equal(emitted[0].data.foo, 'bar'); + + LocalstorageMethod.removeStorageEventListener(listener); + }); + }); + describe('.create()', () => { + it('create an instance', async () => { + const channelName = AsyncTestUtil.randomString(10); + const state = LocalstorageMethod.create(channelName); + assert.ok(state.uuid); + LocalstorageMethod.close(state); + }); + }); + describe('.onMessage()', () => { + it('should emit to the other channel', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelState1 = await LocalstorageMethod.create(channelName); + const channelState2 = await LocalstorageMethod.create(channelName); + + const emitted = []; + LocalstorageMethod.onMessage( + channelState2, + msg => { + emitted.push(msg); + console.log('was emitted'); + }, + new Date().getTime() + ); + const json = { + foo: 'bar' + }; + LocalstorageMethod.postMessage(channelState1, json); + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + + assert.deepEqual(emitted[0], json); + + LocalstorageMethod.close(channelState1); + LocalstorageMethod.close(channelState2); + }); + }); +}); \ No newline at end of file diff --git a/test/unit/native.method.test.js b/test/unit/native.method.test.js new file mode 100644 index 00000000..be5f650c --- /dev/null +++ b/test/unit/native.method.test.js @@ -0,0 +1,10 @@ +// const AsyncTestUtil = require('async-test-util'); +// const assert = require('assert'); +const isNode = require('detect-node'); + +describe('unit/native.method.test.js', () => { + /** + * do not run in node-tests + */ + if (isNode) return; +}); diff --git a/test/unit/node.method.test.js b/test/unit/node.method.test.js new file mode 100644 index 00000000..15ec4e83 --- /dev/null +++ b/test/unit/node.method.test.js @@ -0,0 +1,445 @@ +const AsyncTestUtil = require('async-test-util'); +const assert = require('assert'); +const isNode = require('detect-node'); + +const util = require('../../dist/lib/util.js'); + +describe('unit/node.method.test.js', () => { + /** + * do not run in browser-tests + */ + if (!isNode) return; + const NodeMethod = require('../../dist/lib/methods/node.js'); + + it('init', () => { + process.setMaxListeners(0); + }); + describe('.getPaths()', () => { + it('should get the correct paths', () => { + const channelName = AsyncTestUtil.randomString(12); + const paths = NodeMethod.getPaths(channelName); + assert.ok(paths.messages); + assert.ok(!paths.messages.includes(channelName)); + }); + }); + describe('.ensureFoldersExist()', () => { + it('.ensureFoldersExist()', async () => { + const channelName = AsyncTestUtil.randomString(12); + await NodeMethod.ensureFoldersExist(channelName); + + const paths = NodeMethod.getPaths(channelName); + const exists = require('fs').existsSync(paths.messages); + assert.ok(exists); + }); + it('should not crash when called twice', async () => { + const channelName = AsyncTestUtil.randomString(12); + await NodeMethod.ensureFoldersExist(channelName); + await NodeMethod.ensureFoldersExist(channelName); + }); + }); + describe('.createSocketInfoFile()', () => { + it('should create the file', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(12); + const path = await NodeMethod.createSocketInfoFile(channelName, readerUuid); + + assert.ok(path.endsWith(readerUuid + '.json')); + + const exists = require('fs').existsSync(path); + assert.ok(exists); + }); + }); + describe('.createSocketEventEmitter()', () => { + it('should create the socket and subscribe', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + const socket = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + assert.ok(socket); + }); + it('should be able to connect to the socket and send data', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + const socket = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + + const emitted = []; + socket.emitter.on('data', msg => emitted.push(msg)); + + const net = require('net'); + + const client = new net.Socket(); + await new Promise(res => { + client.connect( + NodeMethod.cleanPipeName(socket.path), + () => { + res(); + } + ); + }); + + client.write('foobar'); + + await AsyncTestUtil.waitUntil(() => emitted.length, 1); + assert.equal(emitted[0], 'foobar'); + + client.destroy(); + socket.server.close(); + }); + }); + describe('.writeMessage()', () => { + it('should write the message', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + const messageJson = { + foo: 'bar' + }; + + const msgObj = await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + + const exists = require('fs').existsSync(msgObj.path); + assert.ok(exists); + + const content = require(msgObj.path); + assert.equal(content.uuid, readerUuid); + assert.deepEqual(content.data, messageJson); + }); + }); + describe('.getReadersUuids()', () => { + it('should get all uuids', async () => { + const channelName = AsyncTestUtil.randomString(12); + await NodeMethod.ensureFoldersExist(channelName); + + const sockets = await Promise.all( + new Array(5).fill(0) + .map(() => AsyncTestUtil.randomString(6)) + .map(async (readerUuid) => { + await NodeMethod.createSocketInfoFile(channelName, readerUuid); + const s = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + return s; + }) + ); + + const uuids = await NodeMethod.getReadersUuids(channelName); + assert.equal(uuids.length, 5); + + sockets.map(socket => socket.server.close()); + }); + }); + describe('.openClientConnection()', () => { + it('should open a connection and send data', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + + const socket = await NodeMethod.createSocketEventEmitter(channelName, readerUuid); + const client = await NodeMethod.openClientConnection(channelName, readerUuid); + + const emitted = []; + socket.emitter.on('data', d => emitted.push(d)); + + client.write('foo bar'); + + await AsyncTestUtil.waitUntil(() => emitted.length === 1); + assert.equal(emitted[0], 'foo bar'); + + socket.server.close(); + client.destroy(); + }); + }); + describe('.getAllMessages()', () => { + it('should get all messages', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + + const messageJson = { + foo: 'bar' + }; + await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + + const messages = await NodeMethod.getAllMessages(channelName); + assert.equal(messages.length, 2); + assert.ok(messages[0].path); + assert.ok(messages[0].time); + assert.ok(messages[0].senderUuid); + assert.ok(messages[0].token); + }); + }); + describe('.readMessage()', () => { + it('should get the content', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + + const messageJson = { + foo: 'bar' + }; + await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + const messages = await NodeMethod.getAllMessages(channelName); + + const content = await NodeMethod.readMessage(messages[0]); + assert.deepEqual(content.data, messageJson); + }); + }); + describe('.cleanOldMessages()', () => { + it('should clean up the old messages', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readerUuid = AsyncTestUtil.randomString(6); + await NodeMethod.ensureFoldersExist(channelName); + const messageJson = { + foo: 'bar' + }; + + // write 5 messages + await Promise.all( + new Array(5).fill(0) + .map(() => NodeMethod.writeMessage(channelName, readerUuid, messageJson)) + ); + + // w8 until they time out + await AsyncTestUtil.wait(500); + + // write a new one + await NodeMethod.writeMessage(channelName, readerUuid, messageJson); + + const messages = await NodeMethod.getAllMessages(channelName); + await NodeMethod.cleanOldMessages(messages, 100); + + const messages2 = await NodeMethod.getAllMessages(channelName); + assert.equal(messages2.length, 1); + }); + }); + describe('core-functions', () => { + describe('.create()', () => { + it('should open a channel', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelState = await NodeMethod.create(channelName); + assert.ok(channelState); + await NodeMethod.close(channelState); + }); + it('should have connected to other readers', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelState1 = await NodeMethod.create(channelName); + const channelState2 = await NodeMethod.create(channelName); + assert.ok(channelState1); + assert.ok(channelState2); + + await NodeMethod.close(channelState1); + await NodeMethod.close(channelState2); + }); + }); + describe('.close()', () => { + it('should have cleaned up all', async () => { + const readdir = require('util').promisify(require('fs').readdir); + + const channelName = AsyncTestUtil.randomString(12); + const channelState = await NodeMethod.create(channelName); + await NodeMethod.close(channelState); + await AsyncTestUtil.wait(200); + + const paths = NodeMethod.getPaths(channelName); + const files = await readdir(paths.readers); + assert.equal(files.length, 0); + }); + }); + describe('.postMessage()', () => { + it('should get a ping on other side', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await NodeMethod.create(channelName); + const channelStateOwn = await NodeMethod.create(channelName); + const emittedOther = []; + channelStateOther.socketEE.emitter.on('data', d => emittedOther.push(d)); + + await NodeMethod.postMessage(channelStateOwn, 'foo bar'); + await AsyncTestUtil.waitUntil(() => emittedOther.length === 1); + + assert.equal(JSON.parse(emittedOther[0]).a, 'msg'); + assert.equal(typeof JSON.parse(emittedOther[0]).d.t, 'number'); + + await NodeMethod.close(channelStateOther); + await NodeMethod.close(channelStateOwn); + }); + it('should send the message', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await NodeMethod.create(channelName); + const channelStateOwn = await NodeMethod.create(channelName); + await AsyncTestUtil.wait(100); + + const emittedOther = []; + NodeMethod.onMessage(channelStateOther, msg => emittedOther.push(msg), new Date().getTime()); + + const msgJson = { + foo: 'bar2' + }; + await NodeMethod.postMessage(channelStateOwn, msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length === 1); + + assert.deepEqual(emittedOther[0], msgJson); + + await NodeMethod.close(channelStateOther); + await NodeMethod.close(channelStateOwn); + }); + }); + describe('.onMessage()', () => { + it('should emit the message on other', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await NodeMethod.create(channelName); + const channelStateOwn = await NodeMethod.create(channelName); + + const emittedOther = []; + const emittedOwn = []; + const msgJson = { + foo: 'bar' + }; + + NodeMethod.onMessage(channelStateOther, msg => emittedOther.push(msg), new Date().getTime()); + NodeMethod.onMessage(channelStateOwn, msg => emittedOwn.push(msg), new Date().getTime()); + + await NodeMethod.postMessage(channelStateOwn, msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length === 1); + assert.deepEqual(emittedOther[0], msgJson); + assert.equal(emittedOwn.length, 0); + + await NodeMethod.close(channelStateOther); + await NodeMethod.close(channelStateOwn); + }); + it('should have sorted the messages by time', async () => { + const channelName = AsyncTestUtil.randomString(12); + const channelStateOwn = await NodeMethod.create(channelName); + const channelStateOther = await NodeMethod.create(channelName); + + const emitted = []; + NodeMethod.onMessage(channelStateOther, msg => emitted.push(msg), new Date().getTime()); + + NodeMethod.postMessage(channelStateOwn, { + foo: 0 + }); + NodeMethod.postMessage(channelStateOwn, { + foo: 1 + }); + + await AsyncTestUtil.waitUntil(() => emitted.length === 2); + + assert.equal(emitted[0].foo, 0); + assert.equal(emitted[1].foo, 1); + + await NodeMethod.close(channelStateOwn); + await NodeMethod.close(channelStateOther); + }); + }); + }); + describe('other', () => { + it('should have cleaned up the messages', async function () { + this.timeout(1000 * 20); // slow on windows + const channelOptions = { + node: { + ttl: 500 + } + }; + const channelName = AsyncTestUtil.randomString(12); + const channelStateOther = await NodeMethod.create(channelName, channelOptions); + const channelStateOwn = await NodeMethod.create(channelName, channelOptions); + const msgJson = { + foo: 'bar' + }; + + // send 100 messages + await Promise.all( + new Array(100).fill(0) + .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) + ); + + // w8 until ttl has reached + await AsyncTestUtil.wait(channelOptions.node.ttl); + + // send 100 messages again to trigger cleanup + await Promise.all( + new Array(100).fill(0) + .map(() => NodeMethod.postMessage(channelStateOwn, msgJson)) + ); + + // ensure only the last 100 messages are here + const messages = await NodeMethod.getAllMessages(channelName); + assert.ok(messages.length <= 100); + + + await NodeMethod.close(channelStateOther); + await NodeMethod.close(channelStateOwn); + }); + it('should not read messages created before the channel was created', async () => { + const channelOptions = { + node: { + ttl: 5000 + } + }; + const channelName = AsyncTestUtil.randomString(12); + const channelStateOwn = await NodeMethod.create(channelName, channelOptions); + const msgJson = { + foo: 'bar' + }; + + + await NodeMethod.postMessage(channelStateOwn, msgJson); + + const emittedOther = []; + const channelStateOther = await NodeMethod.create(channelName, channelOptions); + NodeMethod.onMessage(channelStateOther, msg => emittedOther.push(msg), new Date().getTime()); + + await NodeMethod.postMessage(channelStateOwn, msgJson); + await NodeMethod.postMessage(channelStateOwn, msgJson); + + await AsyncTestUtil.waitUntil(() => emittedOther.length >= 2); + await AsyncTestUtil.wait(100); + + assert.equal(emittedOther.length, 2); + + await NodeMethod.close(channelStateOther); + await NodeMethod.close(channelStateOwn); + }); + it('should work with many readers', async () => { + const channelName = AsyncTestUtil.randomString(12); + const readers = await Promise.all( + new Array(50).fill(0) + .map(async () => { + const channelState = await NodeMethod.create(channelName); + const emitted = []; + NodeMethod.onMessage(channelState, msg => emitted.push(msg), new Date().getTime()); + return { + channelState, + emitted + }; + }) + ); + + const senderState = await NodeMethod.create(channelName); + + // send 100 messages + await Promise.all( + new Array(100).fill(0) + .map(() => NodeMethod.postMessage(senderState, { + foo: 'bar' + })) + ); + + await AsyncTestUtil.waitUntil(() => { + let ok = true; + readers.forEach(reader => { + if (reader.emitted.length !== 100) + ok = false; + }); + + return ok; + }); + + await Promise.all( + readers.map(reader => NodeMethod.close(reader.channelState)) + ); + NodeMethod.close(senderState); + }); + }); +});