diff --git a/.babelrc b/.babelrc index 1341d502..fe77f11e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,29 +1,33 @@ { - "presets": ["es2015"], + "presets": ["@babel/preset-env"], "plugins": [ - "transform-es2015-destructuring", - "transform-object-rest-spread", - "transform-async-to-generator", - ["module-resolver", { - "root": ["./src"], - "alias": { - "./utils": "utils", - "./cleaners": "cleaners", - "./resource": "resource", - "./extractors": "extractors", - "./test-helpers.js": "test-helpers", - "./mercury.js": "mercury" + "@babel/plugin-transform-destructuring", + "@babel/plugin-proposal-object-rest-spread", + "@babel/plugin-transform-async-to-generator", + [ + "module-resolver", + { + "root": ["./src"], + "alias": { + "./utils": "utils", + "./cleaners": "cleaners", + "./resource": "resource", + "./extractors": "extractors", + "./test-helpers.js": "test-helpers", + "./mercury.js": "mercury" + } } - }] + ] ], "env": { "development": { "plugins": [ - "transform-export-extensions", + ["@babel/plugin-proposal-export-default-from"], + ["@babel/plugin-proposal-export-namespace-from"], [ - "transform-runtime", + "@babel/plugin-transform-runtime", { - "polyfill": true, + "corejs": 2, "regenerator": true } ] diff --git a/.circleci/config.yml b/.circleci/config.yml index e2f86e51..bc131076 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,6 @@ jobs: - checkout - run: "yarn install" # For some reason phantomjs-prebuild is failing w/yarn, but npm installing works - - run: "npm install phantomjs-prebuilt" - run: "yarn add karma-cli --dev" - run: "yarn test:web --maxWorkers=4" - run: "yarn build:web --maxWorkers=4" diff --git a/.eslintrc b/.eslintrc index 4d8cf104..d39f2f02 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,17 +1,15 @@ { "parser": "babel-eslint", "extends": ["airbnb", "prettier"], - "plugins": [ - "babel" - ], + "plugins": ["babel"], "globals": { - "describe", - "it", - "fit", - "jasmine", - "beforeEach", - "beforeAll", - "afterAll", + "describe": true, + "it": true, + "fit": true, + "jasmine": true, + "beforeEach": true, + "beforeAll": true, + "afterAll": true }, "rules": { "no-param-reassign": 0, @@ -23,18 +21,14 @@ "no-confusing-arrow": 0, "camelcase": 0, "no-multiple-empty-lines": [ - "error", {"max": 1, "maxEOF": 0, "maxBOF": 0} + "error", + { "max": 1, "maxEOF": 0, "maxBOF": 0 } ], - }, - "options": { - "no-multiple-empty-lines": { - "max": 1, - "maxEOF": 0, - }, + "import/no-unresolved": false }, "settings": { "import/resolver": { "babel-module": {} } - }, + } } diff --git a/dist/mercury.js b/dist/mercury.js index 58aeedaa..4554b056 100644 --- a/dist/mercury.js +++ b/dist/mercury.js @@ -1,33 +1,65 @@ 'use strict'; -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } +function _interopDefault(ex) { + return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; +} -var _regeneratorRuntime = _interopDefault(require('babel-runtime/regenerator')); -var _extends = _interopDefault(require('babel-runtime/helpers/extends')); -var _asyncToGenerator = _interopDefault(require('babel-runtime/helpers/asyncToGenerator')); +var _regeneratorRuntime = _interopDefault( + require('@babel/runtime-corejs2/regenerator') +); +var _objectSpread = _interopDefault( + require('@babel/runtime-corejs2/helpers/objectSpread') +); +var _asyncToGenerator = _interopDefault( + require('@babel/runtime-corejs2/helpers/asyncToGenerator') +); var URL = _interopDefault(require('url')); var cheerio = _interopDefault(require('cheerio')); var iconv = _interopDefault(require('iconv-lite')); -var _slicedToArray = _interopDefault(require('babel-runtime/helpers/slicedToArray')); -var _Promise = _interopDefault(require('babel-runtime/core-js/promise')); +var _parseInt = _interopDefault( + require('@babel/runtime-corejs2/core-js/parse-int') +); +var _slicedToArray = _interopDefault( + require('@babel/runtime-corejs2/helpers/slicedToArray') +); +var _Promise = _interopDefault( + require('@babel/runtime-corejs2/core-js/promise') +); var request = _interopDefault(require('request')); -var _Reflect$ownKeys = _interopDefault(require('babel-runtime/core-js/reflect/own-keys')); -var _toConsumableArray = _interopDefault(require('babel-runtime/helpers/toConsumableArray')); -var _defineProperty = _interopDefault(require('babel-runtime/helpers/defineProperty')); -var _typeof = _interopDefault(require('babel-runtime/helpers/typeof')); -var _getIterator = _interopDefault(require('babel-runtime/core-js/get-iterator')); -var _Object$keys = _interopDefault(require('babel-runtime/core-js/object/keys')); +var _Reflect$ownKeys = _interopDefault( + require('@babel/runtime-corejs2/core-js/reflect/own-keys') +); +var _toConsumableArray = _interopDefault( + require('@babel/runtime-corejs2/helpers/toConsumableArray') +); +var _defineProperty = _interopDefault( + require('@babel/runtime-corejs2/helpers/defineProperty') +); +var _parseFloat = _interopDefault( + require('@babel/runtime-corejs2/core-js/parse-float') +); +var _typeof = _interopDefault(require('@babel/runtime-corejs2/helpers/typeof')); +var _getIterator = _interopDefault( + require('@babel/runtime-corejs2/core-js/get-iterator') +); +var _Object$keys = _interopDefault( + require('@babel/runtime-corejs2/core-js/object/keys') +); var stringDirection = _interopDefault(require('string-direction')); var validUrl = _interopDefault(require('valid-url')); var moment = _interopDefault(require('moment-timezone')); var parseFormat = _interopDefault(require('moment-parseformat')); var wuzzy = _interopDefault(require('wuzzy')); var difflib = _interopDefault(require('difflib')); -var _Array$from = _interopDefault(require('babel-runtime/core-js/array/from')); +var _Array$from = _interopDefault( + require('@babel/runtime-corejs2/core-js/array/from') +); var ellipsize = _interopDefault(require('ellipsize')); +var _Array$isArray = _interopDefault( + require('@babel/runtime-corejs2/core-js/array/is-array') +); var NORMALIZE_RE = /\s{2,}/g; - function normalizeSpaces(text) { return text.replace(NORMALIZE_RE, ' ').trim(); } @@ -38,9 +70,10 @@ function normalizeSpaces(text) { // string to be cleaned. // Only used for date_published currently. function extractFromUrl(url, regexList) { - var matchRe = regexList.find(function (re) { + var matchRe = regexList.find(function(re) { return re.test(url); }); + if (matchRe) { return matchRe.exec(url)[1]; } @@ -64,13 +97,13 @@ function extractFromUrl(url, regexList) { // Does not match: // pg=102 // page:2 -var PAGE_IN_HREF_RE = new RegExp('(page|paging|(p(a|g|ag)?(e|enum|ewanted|ing|ination)))?(=|/)([0-9]{1,3})', 'i'); - +var PAGE_IN_HREF_RE = new RegExp( + '(page|paging|(p(a|g|ag)?(e|enum|ewanted|ing|ination)))?(=|/)([0-9]{1,3})', + 'i' +); var HAS_ALPHA_RE = /[a-z]/i; - var IS_ALPHA_RE = /^[a-z]+$/i; var IS_DIGIT_RE = /^[0-9]+$/i; - var ENCODING_RE = /charset=([\w-]+)\b/; var DEFAULT_ENCODING = 'utf-8'; @@ -78,10 +111,9 @@ function pageNumFromUrl(url) { var matches = url.match(PAGE_IN_HREF_RE); if (!matches) return null; - var pageNum = parseInt(matches[6], 10); - - // Return pageNum < 100, otherwise + var pageNum = _parseInt(matches[6], 10); // Return pageNum < 100, otherwise // return null + return pageNum < 100 ? pageNum : null; } @@ -90,78 +122,73 @@ function removeAnchor(url) { } function isGoodSegment(segment, index, firstSegmentHasLetters) { - var goodSegment = true; - - // If this is purely a number, and it's the first or second + var goodSegment = true; // If this is purely a number, and it's the first or second // url_segment, it's probably a page number. Remove it. + if (index < 2 && IS_DIGIT_RE.test(segment) && segment.length < 3) { goodSegment = true; - } - - // If this is the first url_segment and it's just "index", + } // If this is the first url_segment and it's just "index", // remove it + if (index === 0 && segment.toLowerCase() === 'index') { goodSegment = false; - } - - // If our first or second url_segment is smaller than 3 characters, + } // If our first or second url_segment is smaller than 3 characters, // and the first url_segment had no alphas, remove it. + if (index < 2 && segment.length < 3 && !firstSegmentHasLetters) { goodSegment = false; } return goodSegment; -} - -// Take a URL, and return the article base of said URL. That is, no +} // Take a URL, and return the article base of said URL. That is, no // pagination data exists in it. Useful for comparing to other links // that might have pagination data within them. + function articleBaseUrl(url, parsed) { var parsedUrl = parsed || URL.parse(url); var protocol = parsedUrl.protocol, - host = parsedUrl.host, - path = parsedUrl.path; - - + host = parsedUrl.host, + path = parsedUrl.path; var firstSegmentHasLetters = false; - var cleanedSegments = path.split('/').reverse().reduce(function (acc, rawSegment, index) { - var segment = rawSegment; - - // Split off and save anything that looks like a file type. - if (segment.includes('.')) { - var _segment$split = segment.split('.'), + var cleanedSegments = path + .split('/') + .reverse() + .reduce(function(acc, rawSegment, index) { + var segment = rawSegment; // Split off and save anything that looks like a file type. + + if (segment.includes('.')) { + var _segment$split = segment.split('.'), _segment$split2 = _slicedToArray(_segment$split, 2), possibleSegment = _segment$split2[0], fileExt = _segment$split2[1]; - if (IS_ALPHA_RE.test(fileExt)) { - segment = possibleSegment; + if (IS_ALPHA_RE.test(fileExt)) { + segment = possibleSegment; + } + } // If our first or second segment has anything looking like a page + // number, remove it. + + if (PAGE_IN_HREF_RE.test(segment) && index < 2) { + segment = segment.replace(PAGE_IN_HREF_RE, ''); + } // If we're on the first segment, check to see if we have any + // characters in it. The first segment is actually the last bit of + // the URL, and this will be helpful to determine if we're on a URL + // segment that looks like "/2/" for example. + + if (index === 0) { + firstSegmentHasLetters = HAS_ALPHA_RE.test(segment); + } // If it's not marked for deletion, push it to cleaned_segments. + + if (isGoodSegment(segment, index, firstSegmentHasLetters)) { + acc.push(segment); } - } - - // If our first or second segment has anything looking like a page - // number, remove it. - if (PAGE_IN_HREF_RE.test(segment) && index < 2) { - segment = segment.replace(PAGE_IN_HREF_RE, ''); - } - - // If we're on the first segment, check to see if we have any - // characters in it. The first segment is actually the last bit of - // the URL, and this will be helpful to determine if we're on a URL - // segment that looks like "/2/" for example. - if (index === 0) { - firstSegmentHasLetters = HAS_ALPHA_RE.test(segment); - } - - // If it's not marked for deletion, push it to cleaned_segments. - if (isGoodSegment(segment, index, firstSegmentHasLetters)) { - acc.push(segment); - } - - return acc; - }, []); - return protocol + '//' + host + cleanedSegments.reverse().join('/'); + return acc; + }, []); + return '' + .concat(protocol, '//') + .concat(host) + .concat(cleanedSegments.reverse().join('/')); } // Given a string, return True if it appears to have an ending sentence @@ -172,58 +199,75 @@ function hasSentenceEnd(text) { } function excerptContent(content) { - var words = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; - - return content.trim().split(/\s+/).slice(0, words).join(' '); + var words = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; + return content + .trim() + .split(/\s+/) + .slice(0, words) + .join(' '); } -// check a string for encoding; this is // used in our fetchResource function to // ensure correctly encoded responses + function getEncoding(str) { var encoding = DEFAULT_ENCODING; + if (ENCODING_RE.test(str)) { var testEncode = ENCODING_RE.exec(str)[1]; + if (iconv.encodingExists(testEncode)) { encoding = testEncode; } } + return encoding; } -var _marked = [range].map(_regeneratorRuntime.mark); +var _marked = + /*#__PURE__*/ + _regeneratorRuntime.mark(range); function range() { - var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; - var end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - return _regeneratorRuntime.wrap(function range$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!(start <= end)) { - _context.next = 5; - break; - } + var start, + end, + _args = arguments; + return _regeneratorRuntime.wrap( + function range$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + start = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1; + end = _args.length > 1 && _args[1] !== undefined ? _args[1] : 1; - _context.next = 3; - return start += 1; + case 2: + if (!(start <= end)) { + _context.next = 7; + break; + } - case 3: - _context.next = 0; - break; + _context.next = 5; + return (start += 1); + + case 5: + _context.next = 2; + break; - case 5: - case "end": - return _context.stop(); + case 7: + case 'end': + return _context.stop(); + } } - } - }, _marked[0], this); + }, + _marked, + this + ); } // extremely simple url validation as a first step function validateUrl(_ref) { var hostname = _ref.hostname; - // If this isn't a valid url, return an error message return !!hostname; } @@ -231,50 +275,50 @@ function validateUrl(_ref) { var Errors = { badUrl: { error: true, - messages: 'The url parameter passed does not look like a valid URL. Please check your data and try again.' - } + messages: + 'The url parameter passed does not look like a valid URL. Please check your data and try again.', + }, }; -// Browser does not like us setting user agent -var REQUEST_HEADERS = cheerio.browser ? {} : { - 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' -}; +var REQUEST_HEADERS = cheerio.browser + ? {} + : { + 'User-Agent': + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', + }; // The number of milliseconds to attempt to fetch a resource before timing out. -// The number of milliseconds to attempt to fetch a resource before timing out. -var FETCH_TIMEOUT = 10000; +var FETCH_TIMEOUT = 10000; // Content types that we do not extract content from -// Content types that we do not extract content from var BAD_CONTENT_TYPES = ['audio/mpeg', 'image/gif', 'image/jpeg', 'image/jpg']; - -var BAD_CONTENT_TYPES_RE = new RegExp('^(' + BAD_CONTENT_TYPES.join('|') + ')$', 'i'); - -// Use this setting as the maximum size an article can be +var BAD_CONTENT_TYPES_RE = new RegExp( + '^('.concat(BAD_CONTENT_TYPES.join('|'), ')$'), + 'i' +); // Use this setting as the maximum size an article can be // for us to attempt parsing. Defaults to 5 MB. -var MAX_CONTENT_LENGTH = 5242880; -// Turn the global proxy on or off -// Proxying is not currently enabled in Python source -// so not implementing logic in port. +var MAX_CONTENT_LENGTH = 5242880; // Turn the global proxy on or off function get(options) { - return new _Promise(function (resolve, reject) { - request(options, function (err, response, body) { + return new _Promise(function(resolve, reject) { + request(options, function(err, response, body) { if (err) { reject(err); } else { - resolve({ body: body, response: response }); + resolve({ + body: body, + response: response, + }); } }); }); -} - -// Evaluate a response to ensure it's something we should be keeping. +} // Evaluate a response to ensure it's something we should be keeping. // This does not validate in the sense of a response being 200 level or // not. Validation here means that we haven't found reason to bail from // further processing of this url. function validateResponse(response) { - var parseNon2xx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var parseNon2xx = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; // Check if we got a valid status code // This isn't great, but I'm requiring a statusMessage to be set @@ -282,114 +326,128 @@ function validateResponse(response) { // statusMessage only not set in nock response, in which case // I check statusCode, which is currently only 200 for OK responses // in tests - if (response.statusMessage && response.statusMessage !== 'OK' || response.statusCode !== 200) { + if ( + (response.statusMessage && response.statusMessage !== 'OK') || + response.statusCode !== 200 + ) { if (!response.statusCode) { - throw new Error('Unable to fetch content. Original exception was ' + response.error); + throw new Error( + 'Unable to fetch content. Original exception was '.concat( + response.error + ) + ); } else if (!parseNon2xx) { - throw new Error('Resource returned a response status code of ' + response.statusCode + ' and resource was instructed to reject non-2xx level status codes.'); + throw new Error( + 'Resource returned a response status code of '.concat( + response.statusCode, + ' and resource was instructed to reject non-2xx level status codes.' + ) + ); } } var _response$headers = response.headers, - contentType = _response$headers['content-type'], - contentLength = _response$headers['content-length']; - - // Check that the content is not in BAD_CONTENT_TYPES + contentType = _response$headers['content-type'], + contentLength = _response$headers['content-length']; // Check that the content is not in BAD_CONTENT_TYPES if (BAD_CONTENT_TYPES_RE.test(contentType)) { - throw new Error('Content-type for this resource was ' + contentType + ' and is not allowed.'); - } + throw new Error( + 'Content-type for this resource was '.concat( + contentType, + ' and is not allowed.' + ) + ); + } // Check that the content length is below maximum - // Check that the content length is below maximum if (contentLength > MAX_CONTENT_LENGTH) { - throw new Error('Content for this resource was too large. Maximum content length is ' + MAX_CONTENT_LENGTH + '.'); + throw new Error( + 'Content for this resource was too large. Maximum content length is '.concat( + MAX_CONTENT_LENGTH, + '.' + ) + ); } return true; -} - -// Grabs the last two pieces of the URL and joins them back together -// This is to get the 'livejournal.com' from 'erotictrains.livejournal.com' - - -// Set our response attribute to the result of fetching our URL. +} // Grabs the last two pieces of the URL and joins them back together // TODO: This should gracefully handle timeouts and raise the // proper exceptions on the many failure cases of HTTP. // TODO: Ensure we are not fetching something enormous. Always return // unicode content for HTML, with charset conversion. -var fetchResource$1 = (function () { - var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(url, parsedUrl) { - var options, _ref3, response, body; - - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - parsedUrl = parsedUrl || URL.parse(encodeURI(url)); - - options = { - url: parsedUrl.href, - headers: _extends({}, REQUEST_HEADERS), - timeout: FETCH_TIMEOUT, - // Accept cookies - jar: true, - // Set to null so the response returns as binary and body as buffer - // https://github.com/request/request#requestoptions-callback - encoding: null, - // Accept and decode gzip - gzip: true, - // Follow any redirect - followAllRedirects: true - }; - _context.next = 4; - return get(options); - - case 4: - _ref3 = _context.sent; - response = _ref3.response; - body = _ref3.body; - _context.prev = 7; - - validateResponse(response); - return _context.abrupt('return', { - body: body, - response: response - }); - - case 12: - _context.prev = 12; - _context.t0 = _context['catch'](7); - return _context.abrupt('return', Errors.badUrl); - - case 15: - case 'end': - return _context.stop(); - } - } - }, _callee, this, [[7, 12]]); - })); - - function fetchResource(_x2, _x3) { - return _ref2.apply(this, arguments); - } +function fetchResource(_x, _x2) { + return _fetchResource.apply(this, arguments); +} - return fetchResource; -})(); +function _fetchResource() { + _fetchResource = _asyncToGenerator( + /*#__PURE__*/ + _regeneratorRuntime.mark(function _callee(url, parsedUrl) { + var options, _ref2, response, body; + + return _regeneratorRuntime.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + parsedUrl = parsedUrl || URL.parse(encodeURI(url)); + options = { + url: parsedUrl.href, + headers: _objectSpread({}, REQUEST_HEADERS), + timeout: FETCH_TIMEOUT, + // Accept cookies + jar: true, + // Set to null so the response returns as binary and body as buffer + // https://github.com/request/request#requestoptions-callback + encoding: null, + // Accept and decode gzip + gzip: true, + // Follow any redirect + followAllRedirects: true, + }; + _context.next = 4; + return get(options); + + case 4: + _ref2 = _context.sent; + response = _ref2.response; + body = _ref2.body; + _context.prev = 7; + validateResponse(response); + return _context.abrupt('return', { + body: body, + response: response, + }); + + case 12: + _context.prev = 12; + _context.t0 = _context['catch'](7); + return _context.abrupt('return', Errors.badUrl); + + case 15: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this, + [[7, 12]] + ); + }) + ); + return _fetchResource.apply(this, arguments); +} function convertMetaProp($, from, to) { - $('meta[' + from + ']').each(function (_, node) { + $('meta['.concat(from, ']')).each(function(_, node) { var $node = $(node); - var value = $node.attr(from); $node.attr(to, value); $node.removeAttr(from); }); - return $; -} - -// For ease of use in extracting from meta tags, +} // For ease of use in extracting from meta tags, // replace the "content" attribute on meta tags with the // "value" attribute. // @@ -403,54 +461,102 @@ function normalizeMetaTags($) { } // Spacer images to be removed -var SPACER_RE = new RegExp('transparent|spacer|blank', 'i'); - -// The class we will use to mark elements we want to keep +var SPACER_RE = new RegExp('transparent|spacer|blank', 'i'); // The class we will use to mark elements we want to keep // but would normally remove -var KEEP_CLASS = 'mercury-parser-keep'; - -var KEEP_SELECTORS = ['iframe[src^="https://www.youtube.com"]', 'iframe[src^="https://www.youtube-nocookie.com"]', 'iframe[src^="http://www.youtube.com"]', 'iframe[src^="https://player.vimeo"]', 'iframe[src^="http://player.vimeo"]']; - -// A list of tags to strip from the output if we encounter them. -var STRIP_OUTPUT_TAGS = ['title', 'script', 'noscript', 'link', 'style', 'hr', 'embed', 'iframe', 'object']; - -// cleanAttributes -var REMOVE_ATTRS = ['style', 'align']; -var REMOVE_ATTR_SELECTORS = REMOVE_ATTRS.map(function (selector) { - return '[' + selector + ']'; -}); -var REMOVE_ATTR_LIST = REMOVE_ATTRS.join(','); -var WHITELIST_ATTRS = ['src', 'srcset', 'href', 'class', 'id', 'alt', 'xlink:href', 'width', 'height']; - -var WHITELIST_ATTRS_RE = new RegExp('^(' + WHITELIST_ATTRS.join('|') + ')$', 'i'); -// removeEmpty -var REMOVE_EMPTY_TAGS = ['p']; -var REMOVE_EMPTY_SELECTORS = REMOVE_EMPTY_TAGS.map(function (tag) { - return tag + ':empty'; -}).join(','); - -// cleanTags -var CLEAN_CONDITIONALLY_TAGS = ['ul', 'ol', 'table', 'div', 'button', 'form'].join(','); +var KEEP_CLASS = 'mercury-parser-keep'; +var KEEP_SELECTORS = [ + 'iframe[src^="https://www.youtube.com"]', + 'iframe[src^="https://www.youtube-nocookie.com"]', + 'iframe[src^="http://www.youtube.com"]', + 'iframe[src^="https://player.vimeo"]', + 'iframe[src^="http://player.vimeo"]', +]; // A list of tags to strip from the output if we encounter them. + +var STRIP_OUTPUT_TAGS = [ + 'title', + 'script', + 'noscript', + 'link', + 'style', + 'hr', + 'embed', + 'iframe', + 'object', +]; // cleanAttributes +var WHITELIST_ATTRS = [ + 'src', + 'srcset', + 'href', + 'class', + 'id', + 'alt', + 'xlink:href', + 'width', + 'height', +]; +var WHITELIST_ATTRS_RE = new RegExp( + '^('.concat(WHITELIST_ATTRS.join('|'), ')$'), + 'i' +); // removeEmpty + +var CLEAN_CONDITIONALLY_TAGS = [ + 'ul', + 'ol', + 'table', + 'div', + 'button', + 'form', +].join(','); // cleanHeaders -// cleanHeaders var HEADER_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6']; -var HEADER_TAG_LIST = HEADER_TAGS.join(','); - -// // CONTENT FETCHING CONSTANTS //// - +var HEADER_TAG_LIST = HEADER_TAGS.join(','); // // CONTENT FETCHING CONSTANTS //// // A list of strings that can be considered unlikely candidates when // extracting content from a resource. These strings are joined together // and then tested for existence using re:test, so may contain simple, // non-pipe style regular expression queries if necessary. -var UNLIKELY_CANDIDATES_BLACKLIST = ['ad-break', 'adbox', 'advert', 'addthis', 'agegate', 'aux', 'blogger-labels', 'combx', 'comment', 'conversation', 'disqus', 'entry-unrelated', 'extra', 'foot', -// 'form', // This is too generic, has too many false positives -'header', 'hidden', 'loader', 'login', // Note: This can hit 'blogindex'. -'menu', 'meta', 'nav', 'outbrain', 'pager', 'pagination', 'predicta', // readwriteweb inline ad box -'presence_control_external', // lifehacker.com container full of false positives -'popup', 'printfriendly', 'related', 'remove', 'remark', 'rss', 'share', 'shoutbox', 'sidebar', 'sociable', 'sponsor', 'taboola', 'tools']; - -// A list of strings that can be considered LIKELY candidates when + +var UNLIKELY_CANDIDATES_BLACKLIST = [ + 'ad-break', + 'adbox', + 'advert', + 'addthis', + 'agegate', + 'aux', + 'blogger-labels', + 'combx', + 'comment', + 'conversation', + 'disqus', + 'entry-unrelated', + 'extra', + 'foot', // 'form', // This is too generic, has too many false positives + 'header', + 'hidden', + 'loader', + 'login', // Note: This can hit 'blogindex'. + 'menu', + 'meta', + 'nav', + 'outbrain', + 'pager', + 'pagination', + 'predicta', // readwriteweb inline ad box + 'presence_control_external', // lifehacker.com container full of false positives + 'popup', + 'printfriendly', + 'related', + 'remove', + 'remark', + 'rss', + 'share', + 'shoutbox', + 'sidebar', + 'sociable', + 'sponsor', + 'taboola', + 'tools', +]; // A list of strings that can be considered LIKELY candidates when // extracting content from a resource. Essentially, the inverse of the // blacklist above - if something matches both blacklist and whitelist, // it is kept. This is useful, for example, if something has a className @@ -461,100 +567,192 @@ var UNLIKELY_CANDIDATES_BLACKLIST = ['ad-break', 'adbox', 'advert', 'addthis', ' // These strings are joined together and then tested for existence using // re:test, so may contain simple, non-pipe style regular expression queries // if necessary. -var UNLIKELY_CANDIDATES_WHITELIST = ['and', 'article', 'body', 'blogindex', 'column', 'content', 'entry-content-asset', 'format', // misuse of form -'hfeed', 'hentry', 'hatom', 'main', 'page', 'posts', 'shadow']; -// A list of tags which, if found inside, should cause a
to NOT +var UNLIKELY_CANDIDATES_WHITELIST = [ + 'and', + 'article', + 'body', + 'blogindex', + 'column', + 'content', + 'entry-content-asset', + 'format', // misuse of form + 'hfeed', + 'hentry', + 'hatom', + 'main', + 'page', + 'posts', + 'shadow', +]; // A list of tags which, if found inside, should cause a
to NOT // be turned into a paragraph tag. Shallow div tags without these elements // should be turned into

tags. -var DIV_TO_P_BLOCK_TAGS = ['a', 'blockquote', 'dl', 'div', 'img', 'p', 'pre', 'table'].join(','); - -// A list of tags that should be ignored when trying to find the top candidate -// for a document. - - - - -// A list of selectors that specify, very clearly, either hNews or other -// very content-specific style content, like Blogger templates. -// More examples here: http://microformats.org/wiki/blog-post-formats - - - - -// A list of strings that denote a positive scoring for this content as being +var DIV_TO_P_BLOCK_TAGS = [ + 'a', + 'blockquote', + 'dl', + 'div', + 'img', + 'p', + 'pre', + 'table', +].join(','); // A list of tags that should be ignored when trying to find the top candidate // an article container. Checked against className and id. // // TODO: Perhaps have these scale based on their odds of being quality? -var POSITIVE_SCORE_HINTS = ['article', 'articlecontent', 'instapaper_body', 'blog', 'body', 'content', 'entry-content-asset', 'entry', 'hentry', 'main', 'Normal', 'page', 'pagination', 'permalink', 'post', 'story', 'text', '[-_]copy', // usatoday -'\\Bcopy']; - -// The above list, joined into a matching regular expression -var POSITIVE_SCORE_RE = new RegExp(POSITIVE_SCORE_HINTS.join('|'), 'i'); - -// Readability publisher-specific guidelines - -// A list of strings that denote a negative scoring for this content as being +var POSITIVE_SCORE_HINTS = [ + 'article', + 'articlecontent', + 'instapaper_body', + 'blog', + 'body', + 'content', + 'entry-content-asset', + 'entry', + 'hentry', + 'main', + 'Normal', + 'page', + 'pagination', + 'permalink', + 'post', + 'story', + 'text', + '[-_]copy', // usatoday + '\\Bcopy', +]; // The above list, joined into a matching regular expression + +var POSITIVE_SCORE_RE = new RegExp(POSITIVE_SCORE_HINTS.join('|'), 'i'); // Readability publisher-specific guidelines // an article container. Checked against className and id. // // TODO: Perhaps have these scale based on their odds of being quality? -var NEGATIVE_SCORE_HINTS = ['adbox', 'advert', 'author', 'bio', 'bookmark', 'bottom', 'byline', 'clear', 'com-', 'combx', 'comment', 'comment\\B', 'contact', 'copy', 'credit', 'crumb', 'date', 'deck', 'excerpt', 'featured', // tnr.com has a featured_content which throws us off -'foot', 'footer', 'footnote', 'graf', 'head', 'info', 'infotext', // newscientist.com copyright -'instapaper_ignore', 'jump', 'linebreak', 'link', 'masthead', 'media', 'meta', 'modal', 'outbrain', // slate.com junk -'promo', 'pr_', // autoblog - press release -'related', 'respond', 'roundcontent', // lifehacker restricted content warning -'scroll', 'secondary', 'share', 'shopping', 'shoutbox', 'side', 'sidebar', 'sponsor', 'stamp', 'sub', 'summary', 'tags', 'tools', 'widget']; -// The above list, joined into a matching regular expression -var NEGATIVE_SCORE_RE = new RegExp(NEGATIVE_SCORE_HINTS.join('|'), 'i'); - -// XPath to try to determine if a page is wordpress. Not always successful. -var IS_WP_SELECTOR = 'meta[name=generator][value^=WordPress]'; - -// Match a digit. Pretty clear. - - -// A list of words that, if found in link text or URLs, likely mean that -// this link is not a next page link. - - - -// Match any phrase that looks like it could be page, or paging, or pagination -var PAGE_RE = new RegExp('pag(e|ing|inat)', 'i'); - -// Match any link text/classname/id that looks like it could mean the next -// page. Things like: next, continue, >, >>, » but not >|, »| as those can -// mean last page. -// export const NEXT_LINK_TEXT_RE = new RegExp('(next|weiter|continue|>([^\|]|$)|»([^\|]|$))', 'i'); - -// Match any link text/classname/id that looks like it is an end link: things -// like "first", "last", "end", etc. - - -// Match any link text/classname/id that looks like it means the previous -// page. - - -// Match 2 or more consecutive
tags - - -// Match 1 BR tag. - - -// A list of all of the block level tags known in HTML5 and below. Taken from +var NEGATIVE_SCORE_HINTS = [ + 'adbox', + 'advert', + 'author', + 'bio', + 'bookmark', + 'bottom', + 'byline', + 'clear', + 'com-', + 'combx', + 'comment', + 'comment\\B', + 'contact', + 'copy', + 'credit', + 'crumb', + 'date', + 'deck', + 'excerpt', + 'featured', // tnr.com has a featured_content which throws us off + 'foot', + 'footer', + 'footnote', + 'graf', + 'head', + 'info', + 'infotext', // newscientist.com copyright + 'instapaper_ignore', + 'jump', + 'linebreak', + 'link', + 'masthead', + 'media', + 'meta', + 'modal', + 'outbrain', // slate.com junk + 'promo', + 'pr_', // autoblog - press release + 'related', + 'respond', + 'roundcontent', // lifehacker restricted content warning + 'scroll', + 'secondary', + 'share', + 'shopping', + 'shoutbox', + 'side', + 'sidebar', + 'sponsor', + 'stamp', + 'sub', + 'summary', + 'tags', + 'tools', + 'widget', +]; // The above list, joined into a matching regular expression + +var NEGATIVE_SCORE_RE = new RegExp(NEGATIVE_SCORE_HINTS.join('|'), 'i'); // XPath to try to determine if a page is wordpress. Not always successful. + +var IS_WP_SELECTOR = 'meta[name=generator][value^=WordPress]'; // Match a digit. Pretty clear. + +var PAGE_RE = new RegExp('pag(e|ing|inat)', 'i'); // Match any link text/classname/id that looks like it could mean the next // http://bit.ly/qneNIT -var BLOCK_LEVEL_TAGS = ['article', 'aside', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'col', 'colgroup', 'dd', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'li', 'map', 'object', 'ol', 'output', 'p', 'pre', 'progress', 'section', 'table', 'tbody', 'textarea', 'tfoot', 'th', 'thead', 'tr', 'ul', 'video']; -var BLOCK_LEVEL_TAGS_RE = new RegExp('^(' + BLOCK_LEVEL_TAGS.join('|') + ')$', 'i'); -// The removal is implemented as a blacklist and whitelist, this test finds +var BLOCK_LEVEL_TAGS = [ + 'article', + 'aside', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'col', + 'colgroup', + 'dd', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'header', + 'hgroup', + 'hr', + 'li', + 'map', + 'object', + 'ol', + 'output', + 'p', + 'pre', + 'progress', + 'section', + 'table', + 'tbody', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'tr', + 'ul', + 'video', +]; +var BLOCK_LEVEL_TAGS_RE = new RegExp( + '^('.concat(BLOCK_LEVEL_TAGS.join('|'), ')$'), + 'i' +); // The removal is implemented as a blacklist and whitelist, this test finds // blacklisted elements that aren't whitelisted. We do this all in one // expression-both because it's only one pass, and because this skips the // serialization for whitelisted nodes. + var candidatesBlacklist = UNLIKELY_CANDIDATES_BLACKLIST.join('|'); var CANDIDATES_BLACKLIST = new RegExp(candidatesBlacklist, 'i'); - var candidatesWhitelist = UNLIKELY_CANDIDATES_WHITELIST.join('|'); var CANDIDATES_WHITELIST = new RegExp(candidatesWhitelist, 'i'); @@ -568,27 +766,28 @@ function stripUnlikelyCandidates($) { // // :param $: a cheerio object to strip nodes from // :return $: the cleaned cheerio object - $('*').not('a').each(function (index, node) { - var $node = $(node); - var classes = $node.attr('class'); - var id = $node.attr('id'); - if (!id && !classes) return; - - var classAndId = (classes || '') + ' ' + (id || ''); - if (CANDIDATES_WHITELIST.test(classAndId)) { - return; - } else if (CANDIDATES_BLACKLIST.test(classAndId)) { - $node.remove(); - } - }); + $('*') + .not('a') + .each(function(index, node) { + var $node = $(node); + var classes = $node.attr('class'); + var id = $node.attr('id'); + if (!id && !classes) return; + var classAndId = ''.concat(classes || '', ' ').concat(id || ''); + + if (CANDIDATES_WHITELIST.test(classAndId)) { + return; + } + if (CANDIDATES_BLACKLIST.test(classAndId)) { + $node.remove(); + } + }); return $; } -// ## NOTES: // Another good candidate for refactoring/optimizing. // Very imperative code, I don't love it. - AP - // Given cheerio object, convert consecutive
tags into //

tags instead. // @@ -596,7 +795,7 @@ function stripUnlikelyCandidates($) { function brsToPs$$1($) { var collapsing = false; - $('br').each(function (index, element) { + $('br').each(function(index, element) { var $element = $(element); var nextElement = $element.next().get(0); @@ -604,16 +803,14 @@ function brsToPs$$1($) { collapsing = true; $element.remove(); } else if (collapsing) { - collapsing = false; - // $(element).replaceWith('

') + collapsing = false; // $(element).replaceWith('

') + paragraphize(element, $, true); } }); - return $; } -// Given a node, turn it into a P if it is not already a P, and // make sure it conforms to the constraints of a P tag (I.E. does // not contain any other block tags.) // @@ -625,18 +822,21 @@ function brsToPs$$1($) { // :param br: Whether or not the passed node is a br function paragraphize(node, $) { - var br = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - + var br = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var $node = $(node); if (br) { var sibling = node.nextSibling; - var p = $('

'); - - // while the next node is text or not a block level element + var p = $('

'); // while the next node is text or not a block level element // append it to a new p node - while (sibling && !(sibling.tagName && BLOCK_LEVEL_TAGS_RE.test(sibling.tagName))) { - var nextSibling = sibling.nextSibling; + + while ( + sibling && + !(sibling.tagName && BLOCK_LEVEL_TAGS_RE.test(sibling.tagName)) + ) { + var _sibling = sibling, + nextSibling = _sibling.nextSibling; $(sibling).appendTo(p); sibling = nextSibling; } @@ -650,7 +850,7 @@ function paragraphize(node, $) { } function convertDivs($) { - $('div').each(function (index, div) { + $('div').each(function(index, div) { var $div = $(div); var convertable = $div.children(DIV_TO_P_BLOCK_TAGS).length === 0; @@ -658,23 +858,20 @@ function convertDivs($) { convertNodeTo$$1($div, $, 'p'); } }); - return $; } function convertSpans($) { - $('span').each(function (index, span) { + $('span').each(function(index, span) { var $span = $(span); var convertable = $span.parents('p, div').length === 0; + if (convertable) { convertNodeTo$$1($span, $, 'p'); } }); - return $; -} - -// Loop through the provided doc, and convert any p-like elements to +} // Loop through the provided doc, and convert any p-like elements to // actual paragraph tags. // // Things fitting this criteria: @@ -690,44 +887,55 @@ function convertToParagraphs$$1($) { $ = brsToPs$$1($); $ = convertDivs($); $ = convertSpans($); - return $; } function convertNodeTo$$1($node, $) { - var tag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'p'; - + var tag = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'p'; var node = $node.get(0); + if (!node) { return $; } - var attrs = getAttrs(node) || {}; - // console.log(attrs) - var attribString = _Reflect$ownKeys(attrs).map(function (key) { - return key + '=' + attrs[key]; - }).join(' '); - var html = void 0; + var attrs = getAttrs(node) || {}; // console.log(attrs) + + var attribString = _Reflect$ownKeys(attrs) + .map(function(key) { + return ''.concat(key, '=').concat(attrs[key]); + }) + .join(' '); + + var html; if ($.browser) { // In the browser, the contents of noscript tags aren't rendered, therefore // transforms on the noscript tag (commonly used for lazy-loading) don't work // as expected. This test case handles that - html = node.tagName.toLowerCase() === 'noscript' ? $node.text() : $node.html(); + html = + node.tagName.toLowerCase() === 'noscript' ? $node.text() : $node.html(); } else { html = $node.contents(); } - $node.replaceWith('<' + tag + ' ' + attribString + '>' + html + ''); + + $node.replaceWith( + '<' + .concat(tag, ' ') + .concat(attribString, '>') + .concat(html, '') + ); return $; } function cleanForHeight($img, $) { - var height = parseInt($img.attr('height'), 10); - var width = parseInt($img.attr('width'), 10) || 20; + var height = _parseInt($img.attr('height'), 10); - // Remove images that explicitly have very small heights or + var width = _parseInt($img.attr('width'), 10) || 20; // Remove images that explicitly have very small heights or // widths, because they are most likely shims or icons, // which aren't very useful for reading. + if ((height || 20) < 10 || width < 10) { $img.remove(); } else if (height) { @@ -738,10 +946,9 @@ function cleanForHeight($img, $) { } return $; -} - -// Cleans out images where the source string matches transparent/spacer/etc +} // Cleans out images where the source string matches transparent/spacer/etc // TODO This seems very aggressive - AP + function removeSpacers($img, $) { if (SPACER_RE.test($img.attr('src'))) { $img.remove(); @@ -751,18 +958,17 @@ function removeSpacers($img, $) { } function cleanImages($article, $) { - $article.find('img').each(function (index, img) { + $article.find('img').each(function(index, img) { var $img = $(img); - cleanForHeight($img, $); removeSpacers($img, $); }); - return $; } function markToKeep(article, $, url) { - var tags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var tags = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; if (tags.length === 0) { tags = KEEP_SELECTORS; @@ -770,43 +976,45 @@ function markToKeep(article, $, url) { if (url) { var _URL$parse = URL.parse(url), - protocol = _URL$parse.protocol, - hostname = _URL$parse.hostname; + protocol = _URL$parse.protocol, + hostname = _URL$parse.hostname; - tags = [].concat(_toConsumableArray(tags), ['iframe[src^="' + protocol + '//' + hostname + '"]']); + tags = [].concat(_toConsumableArray(tags), [ + 'iframe[src^="'.concat(protocol, '//').concat(hostname, '"]'), + ]); } $(tags.join(','), article).addClass(KEEP_CLASS); - return $; } function stripJunkTags(article, $) { - var tags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var tags = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; if (tags.length === 0) { tags = STRIP_OUTPUT_TAGS; - } - - // Remove matching elements, but ignore + } // Remove matching elements, but ignore // any element with a class of mercury-parser-keep - $(tags.join(','), article).not('.' + KEEP_CLASS).remove(); + $(tags.join(','), article) + .not('.'.concat(KEEP_CLASS)) + .remove(); return $; } -// H1 tags are typically the article title, which should be extracted // by the title extractor instead. If there's less than 3 of them (<3), // strip them. Otherwise, turn 'em into H2s. + function cleanHOnes$$1(article, $) { var $hOnes = $('h1', article); if ($hOnes.length < 3) { - $hOnes.each(function (index, node) { + $hOnes.each(function(index, node) { return $(node).remove(); }); } else { - $hOnes.each(function (index, node) { + $hOnes.each(function(index, node) { convertNodeTo$$1($(node), $, 'h2'); }); } @@ -815,148 +1023,178 @@ function cleanHOnes$$1(article, $) { } function removeAllButWhitelist($article, $) { - $article.find('*').each(function (index, node) { + $article.find('*').each(function(index, node) { var attrs = getAttrs(node); + setAttrs( + node, + _Reflect$ownKeys(attrs).reduce(function(acc, attr) { + if (WHITELIST_ATTRS_RE.test(attr)) { + return _objectSpread({}, acc, _defineProperty({}, attr, attrs[attr])); + } - setAttrs(node, _Reflect$ownKeys(attrs).reduce(function (acc, attr) { - if (WHITELIST_ATTRS_RE.test(attr)) { - return _extends({}, acc, _defineProperty({}, attr, attrs[attr])); - } - - return acc; - }, {})); - }); - - // Remove the mercury-parser-keep class from result - $('.' + KEEP_CLASS, $article).removeClass(KEEP_CLASS); + return acc; + }, {}) + ); + }); // Remove the mercury-parser-keep class from result + $('.'.concat(KEEP_CLASS), $article).removeClass(KEEP_CLASS); return $article; -} - -// function removeAttrs(article, $) { +} // function removeAttrs(article, $) { // REMOVE_ATTRS.forEach((attr) => { // $(`[${attr}]`, article).removeAttr(attr); // }); // } - // Remove attributes like style or align + function cleanAttributes$$1($article, $) { // Grabbing the parent because at this point // $article will be wrapped in a div which will // have a score set on it. - return removeAllButWhitelist($article.parent().length ? $article.parent() : $article, $); + return removeAllButWhitelist( + $article.parent().length ? $article.parent() : $article, + $ + ); } function removeEmpty($article, $) { - $article.find('p').each(function (index, p) { + $article.find('p').each(function(index, p) { var $p = $(p); - if ($p.find('iframe, img').length === 0 && $p.text().trim() === '') $p.remove(); + if ($p.find('iframe, img').length === 0 && $p.text().trim() === '') + $p.remove(); }); - return $; } // // CONTENT FETCHING CONSTANTS //// - -// A list of strings that can be considered unlikely candidates when -// extracting content from a resource. These strings are joined together -// and then tested for existence using re:test, so may contain simple, -// non-pipe style regular expression queries if necessary. -var UNLIKELY_CANDIDATES_BLACKLIST$1 = ['ad-break', 'adbox', 'advert', 'addthis', 'agegate', 'aux', 'blogger-labels', 'combx', 'comment', 'conversation', 'disqus', 'entry-unrelated', 'extra', 'foot', 'form', 'header', 'hidden', 'loader', 'login', // Note: This can hit 'blogindex'. -'menu', 'meta', 'nav', 'pager', 'pagination', 'predicta', // readwriteweb inline ad box -'presence_control_external', // lifehacker.com container full of false positives -'popup', 'printfriendly', 'related', 'remove', 'remark', 'rss', 'share', 'shoutbox', 'sidebar', 'sociable', 'sponsor', 'tools']; - -// A list of strings that can be considered LIKELY candidates when -// extracting content from a resource. Essentially, the inverse of the -// blacklist above - if something matches both blacklist and whitelist, -// it is kept. This is useful, for example, if something has a className -// of "rss-content entry-content". It matched 'rss', so it would normally -// be removed, however, it's also the entry content, so it should be left -// alone. -// -// These strings are joined together and then tested for existence using -// re:test, so may contain simple, non-pipe style regular expression queries -// if necessary. -var UNLIKELY_CANDIDATES_WHITELIST$1 = ['and', 'article', 'body', 'blogindex', 'column', 'content', 'entry-content-asset', 'format', // misuse of form -'hfeed', 'hentry', 'hatom', 'main', 'page', 'posts', 'shadow']; - -// A list of tags which, if found inside, should cause a
to NOT -// be turned into a paragraph tag. Shallow div tags without these elements -// should be turned into

tags. -var DIV_TO_P_BLOCK_TAGS$1 = ['a', 'blockquote', 'dl', 'div', 'img', 'p', 'pre', 'table'].join(','); - -// A list of tags that should be ignored when trying to find the top candidate // for a document. -var NON_TOP_CANDIDATE_TAGS$1 = ['br', 'b', 'i', 'label', 'hr', 'area', 'base', 'basefont', 'input', 'img', 'link', 'meta']; -var NON_TOP_CANDIDATE_TAGS_RE$1 = new RegExp('^(' + NON_TOP_CANDIDATE_TAGS$1.join('|') + ')$', 'i'); - -// A list of selectors that specify, very clearly, either hNews or other +var NON_TOP_CANDIDATE_TAGS$1 = [ + 'br', + 'b', + 'i', + 'label', + 'hr', + 'area', + 'base', + 'basefont', + 'input', + 'img', + 'link', + 'meta', +]; +var NON_TOP_CANDIDATE_TAGS_RE$1 = new RegExp( + '^('.concat(NON_TOP_CANDIDATE_TAGS$1.join('|'), ')$'), + 'i' +); // A list of selectors that specify, very clearly, either hNews or other // very content-specific style content, like Blogger templates. // More examples here: http://microformats.org/wiki/blog-post-formats -var HNEWS_CONTENT_SELECTORS$1 = [['.hentry', '.entry-content'], ['entry', '.entry-content'], ['.entry', '.entry_content'], ['.post', '.postbody'], ['.post', '.post_body'], ['.post', '.post-body']]; +var HNEWS_CONTENT_SELECTORS$1 = [ + ['.hentry', '.entry-content'], + ['entry', '.entry-content'], + ['.entry', '.entry_content'], + ['.post', '.postbody'], + ['.post', '.post_body'], + ['.post', '.post-body'], +]; var PHOTO_HINTS$1 = ['figure', 'photo', 'image', 'caption']; -var PHOTO_HINTS_RE$1 = new RegExp(PHOTO_HINTS$1.join('|'), 'i'); - -// A list of strings that denote a positive scoring for this content as being +var PHOTO_HINTS_RE$1 = new RegExp(PHOTO_HINTS$1.join('|'), 'i'); // A list of strings that denote a positive scoring for this content as being // an article container. Checked against className and id. // // TODO: Perhaps have these scale based on their odds of being quality? -var POSITIVE_SCORE_HINTS$1 = ['article', 'articlecontent', 'instapaper_body', 'blog', 'body', 'content', 'entry-content-asset', 'entry', 'hentry', 'main', 'Normal', 'page', 'pagination', 'permalink', 'post', 'story', 'text', '[-_]copy', // usatoday -'\\Bcopy']; -// The above list, joined into a matching regular expression -var POSITIVE_SCORE_RE$1 = new RegExp(POSITIVE_SCORE_HINTS$1.join('|'), 'i'); - -// Readability publisher-specific guidelines -var READABILITY_ASSET$1 = new RegExp('entry-content-asset', 'i'); - -// A list of strings that denote a negative scoring for this content as being +var POSITIVE_SCORE_HINTS$1 = [ + 'article', + 'articlecontent', + 'instapaper_body', + 'blog', + 'body', + 'content', + 'entry-content-asset', + 'entry', + 'hentry', + 'main', + 'Normal', + 'page', + 'pagination', + 'permalink', + 'post', + 'story', + 'text', + '[-_]copy', // usatoday + '\\Bcopy', +]; // The above list, joined into a matching regular expression + +var POSITIVE_SCORE_RE$1 = new RegExp(POSITIVE_SCORE_HINTS$1.join('|'), 'i'); // Readability publisher-specific guidelines + +var READABILITY_ASSET$1 = new RegExp('entry-content-asset', 'i'); // A list of strings that denote a negative scoring for this content as being // an article container. Checked against className and id. // // TODO: Perhaps have these scale based on their odds of being quality? -var NEGATIVE_SCORE_HINTS$1 = ['adbox', 'advert', 'author', 'bio', 'bookmark', 'bottom', 'byline', 'clear', 'com-', 'combx', 'comment', 'comment\\B', 'contact', 'copy', 'credit', 'crumb', 'date', 'deck', 'excerpt', 'featured', // tnr.com has a featured_content which throws us off -'foot', 'footer', 'footnote', 'graf', 'head', 'info', 'infotext', // newscientist.com copyright -'instapaper_ignore', 'jump', 'linebreak', 'link', 'masthead', 'media', 'meta', 'modal', 'outbrain', // slate.com junk -'promo', 'pr_', // autoblog - press release -'related', 'respond', 'roundcontent', // lifehacker restricted content warning -'scroll', 'secondary', 'share', 'shopping', 'shoutbox', 'side', 'sidebar', 'sponsor', 'stamp', 'sub', 'summary', 'tags', 'tools', 'widget']; -// The above list, joined into a matching regular expression -var NEGATIVE_SCORE_RE$1 = new RegExp(NEGATIVE_SCORE_HINTS$1.join('|'), 'i'); - -// Match a digit. Pretty clear. - - -// Match 2 or more consecutive
tags - - -// Match 1 BR tag. - - -// A list of all of the block level tags known in HTML5 and below. Taken from -// http://bit.ly/qneNIT - - - -// The removal is implemented as a blacklist and whitelist, this test finds -// blacklisted elements that aren't whitelisted. We do this all in one -// expression-both because it's only one pass, and because this skips the -// serialization for whitelisted nodes. -var candidatesBlacklist$1 = UNLIKELY_CANDIDATES_BLACKLIST$1.join('|'); - - -var candidatesWhitelist$1 = UNLIKELY_CANDIDATES_WHITELIST$1.join('|'); - - - +var NEGATIVE_SCORE_HINTS$1 = [ + 'adbox', + 'advert', + 'author', + 'bio', + 'bookmark', + 'bottom', + 'byline', + 'clear', + 'com-', + 'combx', + 'comment', + 'comment\\B', + 'contact', + 'copy', + 'credit', + 'crumb', + 'date', + 'deck', + 'excerpt', + 'featured', // tnr.com has a featured_content which throws us off + 'foot', + 'footer', + 'footnote', + 'graf', + 'head', + 'info', + 'infotext', // newscientist.com copyright + 'instapaper_ignore', + 'jump', + 'linebreak', + 'link', + 'masthead', + 'media', + 'meta', + 'modal', + 'outbrain', // slate.com junk + 'promo', + 'pr_', // autoblog - press release + 'related', + 'respond', + 'roundcontent', // lifehacker restricted content warning + 'scroll', + 'secondary', + 'share', + 'shopping', + 'shoutbox', + 'side', + 'sidebar', + 'sponsor', + 'stamp', + 'sub', + 'summary', + 'tags', + 'tools', + 'widget', +]; // The above list, joined into a matching regular expression + +var NEGATIVE_SCORE_RE$1 = new RegExp(NEGATIVE_SCORE_HINTS$1.join('|'), 'i'); // Match a digit. Pretty clear. var PARAGRAPH_SCORE_TAGS$1 = new RegExp('^(p|li|span|pre)$', 'i'); var CHILD_CONTENT_TAGS$1 = new RegExp('^(td|blockquote|ol|ul|dl)$', 'i'); var BAD_TAGS$1 = new RegExp('^(address|form)$', 'i'); -// Get the score of a node based on its className and id. function getWeight(node) { var classes = node.attr('class'); var id = node.attr('id'); @@ -967,6 +1205,7 @@ function getWeight(node) { if (POSITIVE_SCORE_RE$1.test(id)) { score += 25; } + if (NEGATIVE_SCORE_RE$1.test(id)) { score -= 25; } @@ -979,22 +1218,21 @@ function getWeight(node) { if (POSITIVE_SCORE_RE$1.test(classes)) { score += 25; } + if (NEGATIVE_SCORE_RE$1.test(classes)) { score -= 25; } - } - - // even if score has been set by id, add score for + } // even if score has been set by id, add score for // possible photo matches // "try to keep photos if we can" + if (PHOTO_HINTS_RE$1.test(classes)) { score += 10; - } - - // add 25 if class matches entry-content-asset, + } // add 25 if class matches entry-content-asset, // a class apparently instructed for use in the // Readability publisher guidelines // https://www.readability.com/developers/guidelines + if (READABILITY_ASSET$1.test(classes)) { score += 25; } @@ -1007,7 +1245,7 @@ function getWeight(node) { // the node's score attribute // returns null if no score set function getScore($node) { - return parseFloat($node.attr('score')) || null; + return _parseFloat($node.attr('score')) || null; } // return 1 for every comma in text @@ -1016,20 +1254,18 @@ function scoreCommas(text) { } var idkRe = new RegExp('^(p|pre)$', 'i'); - function scoreLength(textLength) { - var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'p'; - + var tagName = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'p'; var chunks = textLength / 50; if (chunks > 0) { - var lengthBonus = void 0; - - // No idea why p or pre are being tamped down here + var lengthBonus; // No idea why p or pre are being tamped down here // but just following the source for now // Not even sure why tagName is included here, // since this is only being called from the context // of scoreParagraph + if (idkRe.test(tagName)) { lengthBonus = chunks - 2; } else { @@ -1042,29 +1278,25 @@ function scoreLength(textLength) { return 0; } -// Score a paragraph using various methods. Things like number of // commas, etc. Higher is better. + function scoreParagraph$$1(node) { var score = 1; var text = node.text().trim(); - var textLength = text.length; + var textLength = text.length; // If this paragraph is less than 25 characters, don't count it. - // If this paragraph is less than 25 characters, don't count it. if (textLength < 25) { return 0; - } - - // Add points for any commas within this paragraph - score += scoreCommas(text); + } // Add points for any commas within this paragraph - // For every 50 characters in this paragraph, add another point. Up + score += scoreCommas(text); // For every 50 characters in this paragraph, add another point. Up // to 3 points. - score += scoreLength(textLength); - // Articles can end with short paragraphs when people are being clever + score += scoreLength(textLength); // Articles can end with short paragraphs when people are being clever // but they can also end with short paragraphs setting up lists of junk // that we strip. This negative tweaks junk setup paragraphs just below // the cutoff threshold. + if (text.slice(-1) === ':') { score -= 1; } @@ -1088,9 +1320,9 @@ function addScore$$1($node, $, amount) { return $node; } -// Adds 1/4 of a child's score to its parent function addToParent$$1(node, $, score) { var parent = node.parent(); + if (parent) { addScore$$1(parent, $, score * 0.25); } @@ -1098,12 +1330,12 @@ function addToParent$$1(node, $, score) { return node; } -// gets and returns the score if it exists // if not, initializes a score based on // the node's tag type -function getOrInitScore$$1($node, $) { - var weightNodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; +function getOrInitScore$$1($node, $) { + var weightNodes = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; var score = getScore($node); if (score) { @@ -1117,30 +1349,34 @@ function getOrInitScore$$1($node, $) { } addToParent$$1($node, $, score); - return score; } -// Score an individual node. Has some smarts for paragraphs, otherwise // just scores based on tag. + function scoreNode$$1($node) { var _$node$get = $node.get(0), - tagName = _$node$get.tagName; - - // TODO: Consider ordering by most likely. + tagName = _$node$get.tagName; // TODO: Consider ordering by most likely. // E.g., if divs are a more common tag on a page, // Could save doing that regex test on every node – AP - if (PARAGRAPH_SCORE_TAGS$1.test(tagName)) { return scoreParagraph$$1($node); - } else if (tagName.toLowerCase() === 'div') { + } + + if (tagName.toLowerCase() === 'div') { return 5; - } else if (CHILD_CONTENT_TAGS$1.test(tagName)) { + } + + if (CHILD_CONTENT_TAGS$1.test(tagName)) { return 3; - } else if (BAD_TAGS$1.test(tagName)) { + } + + if (BAD_TAGS$1.test(tagName)) { return -3; - } else if (tagName.toLowerCase() === 'th') { + } + + if (tagName.toLowerCase() === 'th') { return -5; } @@ -1150,7 +1386,7 @@ function scoreNode$$1($node) { function convertSpans$1($node, $) { if ($node.get(0)) { var _$node$get = $node.get(0), - tagName = _$node$get.tagName; + tagName = _$node$get.tagName; if (tagName === 'span') { // convert spans to divs @@ -1167,59 +1403,59 @@ function addScoreTo($node, $, score) { } function scorePs($, weightNodes) { - $('p, pre').not('[score]').each(function (index, node) { - // The raw score for this paragraph, before we add any parent/child - // scores. - var $node = $(node); - $node = setScore($node, $, getOrInitScore$$1($node, $, weightNodes)); - - var $parent = $node.parent(); - var rawScore = scoreNode$$1($node); - - addScoreTo($parent, $, rawScore, weightNodes); - if ($parent) { - // Add half of the individual content score to the - // grandparent - addScoreTo($parent.parent(), $, rawScore / 2, weightNodes); - } - }); - + $('p, pre') + .not('[score]') + .each(function(index, node) { + // The raw score for this paragraph, before we add any parent/child + // scores. + var $node = $(node); + $node = setScore($node, $, getOrInitScore$$1($node, $, weightNodes)); + var $parent = $node.parent(); + var rawScore = scoreNode$$1($node); + addScoreTo($parent, $, rawScore, weightNodes); + + if ($parent) { + // Add half of the individual content score to the + // grandparent + addScoreTo($parent.parent(), $, rawScore / 2, weightNodes); + } + }); return $; -} - -// score content. Parents get the full value of their children's +} // score content. Parents get the full value of their children's // content score, grandparents half -function scoreContent$$1($) { - var weightNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; +function scoreContent$$1($) { + var weightNodes = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // First, look for special hNews based selectors and give them a big // boost, if they exist - HNEWS_CONTENT_SELECTORS$1.forEach(function (_ref) { + HNEWS_CONTENT_SELECTORS$1.forEach(function(_ref) { var _ref2 = _slicedToArray(_ref, 2), - parentSelector = _ref2[0], - childSelector = _ref2[1]; + parentSelector = _ref2[0], + childSelector = _ref2[1]; - $(parentSelector + ' ' + childSelector).each(function (index, node) { + $(''.concat(parentSelector, ' ').concat(childSelector)).each(function( + index, + node + ) { addScore$$1($(node).parent(parentSelector), $, 80); }); - }); - - // Doubling this again + }); // Doubling this again // Previous solution caused a bug // in which parents weren't retaining // scores. This is not ideal, and // should be fixed. + scorePs($, weightNodes); scorePs($, weightNodes); - return $; } -// Now that we have a top_candidate, look through the siblings of // it to see if any of them are decently scored. If they are, they // may be split parts of the content (Like two divs, a preamble and // a body.) Example: // http://articles.latimes.com/2009/oct/14/business/fi-bigtvs14 + function mergeSiblings($candidate, topScore, $) { if (!$candidate.parent().length) { return $candidate; @@ -1227,74 +1463,87 @@ function mergeSiblings($candidate, topScore, $) { var siblingScoreThreshold = Math.max(10, topScore * 0.25); var wrappingDiv = $('

'); + $candidate + .parent() + .children() + .each(function(index, sibling) { + var $sibling = $(sibling); // Ignore tags like BR, HR, etc - $candidate.parent().children().each(function (index, sibling) { - var $sibling = $(sibling); - // Ignore tags like BR, HR, etc - if (NON_TOP_CANDIDATE_TAGS_RE$1.test(sibling.tagName)) { - return null; - } + if (NON_TOP_CANDIDATE_TAGS_RE$1.test(sibling.tagName)) { + return null; + } - var siblingScore = getScore($sibling); - if (siblingScore) { - if ($sibling.get(0) === $candidate.get(0)) { - wrappingDiv.append($sibling); - } else { - var contentBonus = 0; - var density = linkDensity($sibling); + var siblingScore = getScore($sibling); - // If sibling has a very low link density, - // give it a small bonus - if (density < 0.05) { - contentBonus += 20; - } + if (siblingScore) { + if ($sibling.get(0) === $candidate.get(0)) { + wrappingDiv.append($sibling); + } else { + var contentBonus = 0; + var density = linkDensity($sibling); // If sibling has a very low link density, + // give it a small bonus + + if (density < 0.05) { + contentBonus += 20; + } // If sibling has a high link density, + // give it a penalty + + if (density >= 0.5) { + contentBonus -= 20; + } // If sibling node has the same class as + // candidate, give it a bonus + + if ($sibling.attr('class') === $candidate.attr('class')) { + contentBonus += topScore * 0.2; + } - // If sibling has a high link density, - // give it a penalty - if (density >= 0.5) { - contentBonus -= 20; - } + var newScore = siblingScore + contentBonus; - // If sibling node has the same class as - // candidate, give it a bonus - if ($sibling.attr('class') === $candidate.attr('class')) { - contentBonus += topScore * 0.2; - } + if (newScore >= siblingScoreThreshold) { + return wrappingDiv.append($sibling); + } - var newScore = siblingScore + contentBonus; + if (sibling.tagName === 'p') { + var siblingContent = $sibling.text(); + var siblingContentLength = textLength(siblingContent); - if (newScore >= siblingScoreThreshold) { - return wrappingDiv.append($sibling); - } else if (sibling.tagName === 'p') { - var siblingContent = $sibling.text(); - var siblingContentLength = textLength(siblingContent); + if (siblingContentLength > 80 && density < 0.25) { + return wrappingDiv.append($sibling); + } - if (siblingContentLength > 80 && density < 0.25) { - return wrappingDiv.append($sibling); - } else if (siblingContentLength <= 80 && density === 0 && hasSentenceEnd(siblingContent)) { - return wrappingDiv.append($sibling); + if ( + siblingContentLength <= 80 && + density === 0 && + hasSentenceEnd(siblingContent) + ) { + return wrappingDiv.append($sibling); + } } } } - } - return null; - }); + return null; + }); - if (wrappingDiv.children().length === 1 && wrappingDiv.children().first().get(0) === $candidate.get(0)) { + if ( + wrappingDiv.children().length === 1 && + wrappingDiv + .children() + .first() + .get(0) === $candidate.get(0) + ) { return $candidate; } return wrappingDiv; } -// After we've calculated scores, loop through all of the possible // candidate nodes we found and find the one with the highest score. + function findTopCandidate$$1($) { - var $candidate = void 0; + var $candidate; var topScore = 0; - - $('[score]').each(function (index, node) { + $('[score]').each(function(index, node) { // Ignore tags like BR, HR, etc if (NON_TOP_CANDIDATE_TAGS_RE$1.test(node.tagName)) { return; @@ -1307,16 +1556,14 @@ function findTopCandidate$$1($) { topScore = score; $candidate = $node; } - }); - - // If we don't have a candidate, return the body + }); // If we don't have a candidate, return the body // or whatever the first element is + if (!$candidate) { return $('body') || $('*').first(); } $candidate = mergeSiblings($candidate, topScore, $); - return $candidate; } @@ -1335,45 +1582,46 @@ function removeUnlessContent($node, $, weight) { if (scoreCommas(content) < 10) { var pCount = $('p', $node).length; - var inputCount = $('input', $node).length; + var inputCount = $('input', $node).length; // Looks like a form, too many inputs. - // Looks like a form, too many inputs. if (inputCount > pCount / 3) { $node.remove(); return; } var contentLength = content.length; - var imgCount = $('img', $node).length; - - // Content is too short, and there are no images, so + var imgCount = $('img', $node).length; // Content is too short, and there are no images, so // this is probably junk content. + if (contentLength < 25 && imgCount === 0) { $node.remove(); return; } - var density = linkDensity($node); - - // Too high of link density, is probably a menu or + var density = linkDensity($node); // Too high of link density, is probably a menu or // something similar. // console.log(weight, density, contentLength) + if (weight < 25 && density > 0.2 && contentLength > 75) { $node.remove(); return; - } - - // Too high of a link density, despite the score being + } // Too high of a link density, despite the score being // high. + if (weight >= 25 && density > 0.5) { // Don't remove the node if it's a list and the // previous sibling starts with a colon though. That // means it's probably content. var tagName = $node.get(0).tagName.toLowerCase(); var nodeIsList = tagName === 'ol' || tagName === 'ul'; + if (nodeIsList) { var previousNode = $node.prev(); - if (previousNode && normalizeSpaces(previousNode.text()).slice(-1) === ':') { + + if ( + previousNode && + normalizeSpaces(previousNode.text()).slice(-1) === ':' + ) { return; } } @@ -1382,36 +1630,36 @@ function removeUnlessContent($node, $, weight) { return; } - var scriptCount = $('script', $node).length; + var scriptCount = $('script', $node).length; // Too many script tags, not enough content. - // Too many script tags, not enough content. if (scriptCount > 0 && contentLength < 150) { $node.remove(); - return; } } -} - -// Given an article, clean it of some superfluous content specified by +} // Given an article, clean it of some superfluous content specified by // tags. Things like forms, ads, etc. // // Tags is an array of tag name's to search through. (like div, form, // etc) // // Return this same doc. + function cleanTags$$1($article, $) { - $(CLEAN_CONDITIONALLY_TAGS, $article).each(function (index, node) { - var $node = $(node); - // If marked to keep, skip it - if ($node.hasClass(KEEP_CLASS) || $node.find('.' + KEEP_CLASS).length > 0) return; + $(CLEAN_CONDITIONALLY_TAGS, $article).each(function(index, node) { + var $node = $(node); // If marked to keep, skip it + if ( + $node.hasClass(KEEP_CLASS) || + $node.find('.'.concat(KEEP_CLASS)).length > 0 + ) + return; var weight = getScore($node); + if (!weight) { weight = getOrInitScore$$1($node, $); setScore($node, $, weight); - } + } // drop node if its weight is < 0 - // drop node if its weight is < 0 if (weight < 0) { $node.remove(); } else { @@ -1419,54 +1667,49 @@ function cleanTags$$1($article, $) { removeUnlessContent($node, $, weight); } }); - return $; } function cleanHeaders($article, $) { - var title = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - - $(HEADER_TAG_LIST, $article).each(function (index, header) { - var $header = $(header); - // Remove any headers that appear before all other p tags in the + var title = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + $(HEADER_TAG_LIST, $article).each(function(index, header) { + var $header = $(header); // Remove any headers that appear before all other p tags in the // document. This probably means that it was part of the title, a // subtitle or something else extraneous like a datestamp or byline, // all of which should be handled by other metadata handling. + if ($($header, $article).prevAll('p').length === 0) { return $header.remove(); - } + } // Remove any headers that match the title exactly. - // Remove any headers that match the title exactly. if (normalizeSpaces($(header).text()) === title) { return $header.remove(); - } - - // If this header has a negative weight, it's probably junk. + } // If this header has a negative weight, it's probably junk. // Get rid of it. + if (getWeight($(header)) < 0) { return $header.remove(); } return $header; }); - return $; } -// Rewrite the tag name to div if it's a top level node like body or // html to avoid later complications with multiple body tags. + function rewriteTopLevel$$1(article, $) { // I'm not using context here because // it's problematic when converting the // top-level/root node - AP $ = convertNodeTo$$1($('html'), $, 'div'); $ = convertNodeTo$$1($('body'), $, 'div'); - return $; } function absolutize($, rootUrl, attr, $content) { - $('[' + attr + ']', $content).each(function (_, node) { + $('['.concat(attr, ']'), $content).each(function(_, node) { var attrs = getAttrs(node); var url = attrs[attr]; @@ -1478,43 +1721,42 @@ function absolutize($, rootUrl, attr, $content) { } function makeLinksAbsolute$$1($content, $, url) { - ['href', 'src'].forEach(function (attr) { + ['href', 'src'].forEach(function(attr) { return absolutize($, url, attr, $content); }); - return $content; } function textLength(text) { return text.trim().replace(/\s+/g, ' ').length; -} - -// Determines what percentage of the text +} // Determines what percentage of the text // in a node is link text // Takes a node, returns a float + function linkDensity($node) { var totalTextLength = textLength($node.text()); - var linkText = $node.find('a').text(); var linkLength = textLength(linkText); if (totalTextLength > 0) { return linkLength / totalTextLength; - } else if (totalTextLength === 0 && linkLength > 0) { + } + + if (totalTextLength === 0 && linkLength > 0) { return 1; } return 0; } -// Given a node type to search for, and a list of meta tag names to // search for, find a meta tag associated. -function extractFromMeta$$1($, metaNames, cachedNames) { - var cleanTags$$1 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var foundNames = metaNames.filter(function (name) { +function extractFromMeta$$1($, metaNames, cachedNames) { + var cleanTags = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var foundNames = metaNames.filter(function(name) { return cachedNames.indexOf(name) !== -1; - }); + }); // eslint-disable-next-line no-restricted-syntax var _iteratorNormalCompletion = true; var _didIteratorError = false; @@ -1523,54 +1765,57 @@ function extractFromMeta$$1($, metaNames, cachedNames) { try { var _loop = function _loop() { var name = _step.value; - var type = 'name'; var value = 'value'; - - var nodes = $('meta[' + type + '="' + name + '"]'); - - // Get the unique value of every matching node, in case there + var nodes = $('meta['.concat(type, '="').concat(name, '"]')); // Get the unique value of every matching node, in case there // are two meta tags with the same name and value. // Remove empty values. - var values = nodes.map(function (index, node) { - return $(node).attr(value); - }).toArray().filter(function (text) { - return text !== ''; - }); - // If we have more than one value for the same name, we have a + var values = nodes + .map(function(index, node) { + return $(node).attr(value); + }) + .toArray() + .filter(function(text) { + return text !== ''; + }); // If we have more than one value for the same name, we have a // conflict and can't trust any of them. Skip this name. If we have // zero, that means our meta tags had no values. Skip this name // also. + if (values.length === 1) { - var metaValue = void 0; - // Meta values that contain HTML should be stripped, as they + var metaValue; // Meta values that contain HTML should be stripped, as they // weren't subject to cleaning previously. - if (cleanTags$$1) { + + if (cleanTags) { metaValue = stripTags(values[0], $); } else { - metaValue = values[0]; + var _values = _slicedToArray(values, 1); + + metaValue = _values[0]; } return { - v: metaValue + v: metaValue, }; } }; - for (var _iterator = _getIterator(foundNames), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for ( + var _iterator = _getIterator(foundNames), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { var _ret = _loop(); - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } - - // If nothing is found, return null + if (_typeof(_ret) === 'object') return _ret.v; + } // If nothing is found, return null } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { @@ -1588,38 +1833,43 @@ function isGoodNode($node, maxChildren) { // element. Skip it. if ($node.children().length > maxChildren) { return false; - } - // If it looks to be within a comment, skip it. + } // If it looks to be within a comment, skip it. + if (withinComment$$1($node)) { return false; } return true; -} - -// Given a a list of selectors find content that may +} // Given a a list of selectors find content that may // be extractable from the document. This is for flat // meta-information, like author, title, date published, etc. + function extractFromSelectors$$1($, selectors) { - var maxChildren = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; - var textOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var maxChildren = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var textOnly = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + // eslint-disable-next-line no-restricted-syntax var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { - for (var _iterator = _getIterator(selectors), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for ( + var _iterator = _getIterator(selectors), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { var selector = _step.value; - - var nodes = $(selector); - - // If we didn't get exactly one of this selector, this may be + var nodes = $(selector); // If we didn't get exactly one of this selector, this may be // a list of articles or comments. Skip it. + if (nodes.length === 1) { var $node = $(nodes[0]); if (isGoodNode($node, maxChildren)) { var content = void 0; + if (textOnly) { content = $node.text(); } else { @@ -1637,7 +1887,7 @@ function extractFromSelectors$$1($, selectors) { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { @@ -1654,28 +1904,25 @@ function extractFromSelectors$$1($, selectors) { function stripTags(text, $) { // Wrapping text in html element prevents errors when text // has no html - var cleanText = $('' + text + '').text(); + var cleanText = $(''.concat(text, '')).text(); return cleanText === '' ? text : cleanText; } function withinComment$$1($node) { var parents = $node.parents().toArray(); - var commentParent = parents.find(function (parent) { + var commentParent = parents.find(function(parent) { var attrs = getAttrs(parent); var nodeClass = attrs.class, - id = attrs.id; - - var classAndId = nodeClass + ' ' + id; + id = attrs.id; + var classAndId = ''.concat(nodeClass, ' ').concat(id); return classAndId.includes('comment'); }); - return commentParent !== undefined; } // Given a node, determine if it's article-like enough to return // param: node (a cheerio node) // return: boolean - function nodeIsSufficient($node) { return $node.text().trim().length >= 100; } @@ -1686,18 +1933,16 @@ function isWordpress($) { function getAttrs(node) { var attribs = node.attribs, - attributes = node.attributes; - + attributes = node.attributes; if (!attribs && attributes) { - var attrs = _Reflect$ownKeys(attributes).reduce(function (acc, index) { + var attrs = _Reflect$ownKeys(attributes).reduce(function(acc, index) { var attr = attributes[index]; - if (!attr.name || !attr.value) return acc; - acc[attr.name] = attr.value; return acc; }, {}); + return attrs; } @@ -1722,7 +1967,7 @@ function setAttrs(node, attrs) { node.removeAttribute(node.attributes[0].name); } - _Reflect$ownKeys(attrs).forEach(function (key) { + _Reflect$ownKeys(attrs).forEach(function(key) { node.setAttribute(key, attrs[key]); }); } @@ -1734,19 +1979,18 @@ function setAttrs(node, attrs) { var IS_LINK = new RegExp('https?://', 'i'); var IS_IMAGE = new RegExp('.(png|gif|jpe?g)', 'i'); - var TAGS_TO_REMOVE = ['script', 'style', 'form'].join(','); -// Convert all instances of images with potentially // lazy loaded images into normal images. // Many sites will have img tags with no source, or an image tag with a src // attribute that a is a placeholer. We need to be able to properly fill in // the src attribute so the images are no longer lazy loaded. + function convertLazyLoadedImages($) { - $('img').each(function (_, img) { + $('img').each(function(_, img) { var attrs = getAttrs(img); - _Reflect$ownKeys(attrs).forEach(function (attr) { + _Reflect$ownKeys(attrs).forEach(function(attr) { var value = attrs[attr]; if (attr !== 'src' && IS_LINK.test(value) && IS_IMAGE.test(value)) { @@ -1754,7 +1998,6 @@ function convertLazyLoadedImages($) { } }); }); - return $; } @@ -1763,20 +2006,21 @@ function isComment(index, node) { } function cleanComments($) { - $.root().find('*').contents().filter(isComment).remove(); - + $.root() + .find('*') + .contents() + .filter(isComment) + .remove(); return $; } function clean($) { $(TAGS_TO_REMOVE).remove(); - $ = cleanComments($); return $; } var Resource = { - // Create a Resource. // // :param url: The URL for the document we should retrieve. @@ -1786,73 +2030,80 @@ var Resource = { create: function create(url, preparedResponse, parsedUrl) { var _this = this; - return _asyncToGenerator(_regeneratorRuntime.mark(function _callee() { - var result, validResponse; - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - result = void 0; - - if (!preparedResponse) { - _context.next = 6; - break; - } - - validResponse = { - statusMessage: 'OK', - statusCode: 200, - headers: { - 'content-type': 'text/html', - 'content-length': 500 - } - }; - - - result = { body: preparedResponse, response: validResponse }; - _context.next = 9; - break; - - case 6: - _context.next = 8; - return fetchResource$1(url, parsedUrl); - - case 8: - result = _context.sent; - - case 9: - if (!result.error) { - _context.next = 12; - break; + return _asyncToGenerator( + /*#__PURE__*/ + _regeneratorRuntime.mark(function _callee() { + var result, validResponse; + return _regeneratorRuntime.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + if (!preparedResponse) { + _context.next = 5; + break; + } + + validResponse = { + statusMessage: 'OK', + statusCode: 200, + headers: { + 'content-type': 'text/html', + 'content-length': 500, + }, + }; + result = { + body: preparedResponse, + response: validResponse, + }; + _context.next = 8; + break; + + case 5: + _context.next = 7; + return fetchResource(url, parsedUrl); + + case 7: + result = _context.sent; + + case 8: + if (!result.error) { + _context.next = 11; + break; + } + + result.failed = true; + return _context.abrupt('return', result); + + case 11: + return _context.abrupt('return', _this.generateDoc(result)); + + case 12: + case 'end': + return _context.stop(); } - - result.failed = true; - return _context.abrupt('return', result); - - case 12: - return _context.abrupt('return', _this.generateDoc(result)); - - case 13: - case 'end': - return _context.stop(); - } - } - }, _callee, _this); - }))(); + } + }, + _callee, + this + ); + }) + )(); }, generateDoc: function generateDoc(_ref) { var content = _ref.body, - response = _ref.response; - var contentType = response.headers['content-type']; - - // TODO: Implement is_text function from + response = _ref.response; + var contentType = response.headers['content-type']; // TODO: Implement is_text function from // https://github.com/ReadabilityHoldings/readability/blob/8dc89613241d04741ebd42fa9fa7df1b1d746303/readability/utils/text.py#L57 if (!contentType.includes('html') && !contentType.includes('text')) { throw new Error('Content does not appear to be text.'); } - var $ = this.encodeDoc({ content: content, contentType: contentType }); + var $ = this.encodeDoc({ + content: content, + contentType: contentType, + }); if ($.root().children().length === 0) { throw new Error('No children, likely a bad parse.'); @@ -1861,40 +2112,43 @@ var Resource = { $ = normalizeMetaTags($); $ = convertLazyLoadedImages($); $ = clean($); - return $; }, encodeDoc: function encodeDoc(_ref2) { var content = _ref2.content, - contentType = _ref2.contentType; - + contentType = _ref2.contentType; var encoding = getEncoding(contentType); var decodedContent = iconv.decode(content, encoding); - var $ = cheerio.load(decodedContent); + var $ = cheerio.load(decodedContent); // after first cheerio.load, check to see if encoding matches - // after first cheerio.load, check to see if encoding matches var metaContentType = $('meta[http-equiv=content-type]').attr('content'); - var properEncoding = getEncoding(metaContentType); + var properEncoding = getEncoding(metaContentType); // if encodings in the header/body dont match, use the one in the body - // if encodings in the header/body dont match, use the one in the body if (properEncoding !== encoding) { decodedContent = iconv.decode(content, properEncoding); $ = cheerio.load(decodedContent); } return $; - } + }, }; var merge = function merge(extractor, domains) { - return domains.reduce(function (acc, domain) { + return domains.reduce(function(acc, domain) { acc[domain] = extractor; return acc; }, {}); }; function mergeSupportedDomains(extractor) { - return extractor.supportedDomains ? merge(extractor, [extractor.domain].concat(_toConsumableArray(extractor.supportedDomains))) : merge(extractor, [extractor.domain]); + return extractor.supportedDomains + ? merge( + extractor, + [extractor.domain].concat( + _toConsumableArray(extractor.supportedDomains) + ) + ) + : merge(extractor, [extractor.domain]); } var BloggerExtractor = { @@ -1904,27 +2158,22 @@ var BloggerExtractor = { // initially in the page, but it's all there // in noscript selectors: ['.post-content noscript'], - // Selectors to remove from the extracted content clean: [], - // Convert the noscript tag to a div transforms: { - noscript: 'div' - } + noscript: 'div', + }, }, - author: { - selectors: ['.post-author-name'] + selectors: ['.post-author-name'], }, - title: { - selectors: ['.post h2.title'] + selectors: ['.post h2.title'], }, - date_published: { - selectors: ['span.publishdate'] - } + selectors: ['span.publishdate'], + }, }; var NYMagExtractor = { @@ -1932,10 +2181,8 @@ var NYMagExtractor = { content: { // Order by most likely. Extractor will stop on first occurrence selectors: ['div.article-content', 'section.body', 'article.article'], - // Selectors to remove from the extracted content clean: ['.ad', '.single-related-story'], - // Object of tranformations to make on matched elements // Each key is the selector, each value is the tag to // transform to. @@ -1945,76 +2192,75 @@ var NYMagExtractor = { transforms: { // Convert h1s to h2s h1: 'h2', - // Convert lazy-loaded noscript images to figures noscript: function noscript($node, $) { var $children = $.browser ? $($node.text()) : $node.children(); - if ($children.length === 1 && $children.get(0) !== undefined && $children.get(0).tagName.toLowerCase() === 'img') { + + if ( + $children.length === 1 && + $children.get(0) !== undefined && + $children.get(0).tagName.toLowerCase() === 'img' + ) { return 'figure'; } return null; - } - } + }, + }, }, - title: { - selectors: ['h1.lede-feature-title', 'h1.headline-primary', 'h1'] + selectors: ['h1.lede-feature-title', 'h1.headline-primary', 'h1'], }, - author: { - selectors: ['.by-authors', '.lede-feature-author'] + selectors: ['.by-authors', '.lede-feature-author'], }, - dek: { - selectors: ['.lede-feature-teaser'] + selectors: ['.lede-feature-teaser'], }, - date_published: { - selectors: [['time.article-timestamp[datetime]', 'datetime'], 'time.article-timestamp'] - } + selectors: [ + ['time.article-timestamp[datetime]', 'datetime'], + 'time.article-timestamp', + ], + }, }; var WikipediaExtractor = { domain: 'wikipedia.org', content: { selectors: ['#mw-content-text'], - defaultCleaner: false, - // transform top infobox to an image with caption transforms: { '.infobox img': function infoboxImg($node) { - var $parent = $node.parents('.infobox'); - // Only prepend the first image in .infobox + var $parent = $node.parents('.infobox'); // Only prepend the first image in .infobox + if ($parent.children('img').length === 0) { $parent.prepend($node); } }, '.infobox caption': 'figcaption', - '.infobox': 'figure' + '.infobox': 'figure', }, - // Selectors to remove from the extracted content - clean: ['.mw-editsection', 'figure tr, figure td, figure tbody', '#toc', '.navbox'] - + clean: [ + '.mw-editsection', + 'figure tr, figure td, figure tbody', + '#toc', + '.navbox', + ], }, - author: 'Wikipedia Contributors', - title: { - selectors: ['h2.title'] + selectors: ['h2.title'], }, - date_published: { - selectors: ['#footer-info-lastmod'] - } - + selectors: ['#footer-info-lastmod'], + }, }; var TwitterExtractor = { domain: 'twitter.com', - content: { transforms: { // We're transforming essentially the whole page here. @@ -2027,47 +2273,35 @@ var TwitterExtractor = { $tweetContainer.append(tweets); $node.replaceWith($tweetContainer); }, - // Twitter wraps @ with s, which // renders as a strikethrough - s: 'span' + s: 'span', }, - selectors: ['.permalink[role=main]'], - defaultCleaner: false, - - clean: ['.stream-item-footer', 'button', '.tweet-details-fixer'] + clean: ['.stream-item-footer', 'button', '.tweet-details-fixer'], }, - author: { - selectors: ['.tweet.permalink-tweet .username'] + selectors: ['.tweet.permalink-tweet .username'], }, - date_published: { - selectors: [['.permalink-tweet ._timestamp[data-time-ms]', 'data-time-ms']] - } - + selectors: [['.permalink-tweet ._timestamp[data-time-ms]', 'data-time-ms']], + }, }; var NYTimesExtractor = { domain: 'www.nytimes.com', - title: { - selectors: ['h1.g-headline', 'h1[itemprop="headline"]', 'h1.headline'] + selectors: ['h1.g-headline', 'h1[itemprop="headline"]', 'h1.headline'], }, - author: { - selectors: [['meta[name="author"]', 'value'], '.g-byline', '.byline'] + selectors: [['meta[name="author"]', 'value'], '.g-byline', '.byline'], }, - content: { selectors: ['div.g-blocks', 'article#story'], - transforms: { 'img.g-lazy': function imgGLazy($node) { - var src = $node.attr('src'); - // const widths = $node.attr('data-widths') + var src = $node.attr('src'); // const widths = $node.attr('data-widths') // .slice(1) // .slice(0, -1) // .split(','); @@ -2076,29 +2310,36 @@ var NYTimesExtractor = { // } else { // width = '900'; // } - var width = 640; + var width = 640; src = src.replace('{{size}}', width); $node.attr('src', src); - } + }, }, - - clean: ['.ad', 'header#story-header', '.story-body-1 .lede.video', '.visually-hidden', '#newsletter-promo', '.promo', '.comments-button', '.hidden', '.comments', '.supplemental', '.nocontent', '.story-footer-links'] + clean: [ + '.ad', + 'header#story-header', + '.story-body-1 .lede.video', + '.visually-hidden', + '#newsletter-promo', + '.promo', + '.comments-button', + '.hidden', + '.comments', + '.supplemental', + '.nocontent', + '.story-footer-links', + ], }, - date_published: { - selectors: [['meta[name="article:published"]', 'value']] + selectors: [['meta[name="article:published"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: null, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2106,35 +2347,30 @@ var NYTimesExtractor = { var TheAtlanticExtractor = { domain: 'www.theatlantic.com', title: { - selectors: ['h1.hed'] + selectors: ['h1.hed'], }, - author: { - selectors: ['article#article .article-cover-extra .metadata .byline a'] + selectors: ['article#article .article-cover-extra .metadata .byline a'], }, - content: { - selectors: [['.article-cover figure.lead-img', '.article-body'], '.article-body'], - + selectors: [ + ['.article-cover figure.lead-img', '.article-body'], + '.article-body', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.partner-box', '.callout'] + clean: ['.partner-box', '.callout'], }, - date_published: { - selectors: [['time[itemProp="datePublished"]', 'datetime']] + selectors: [['time[itemProp="datePublished"]', 'datetime']], }, - lead_image_url: null, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2143,43 +2379,36 @@ var TheAtlanticExtractor = { var NewYorkerExtractor = { domain: 'www.newyorker.com', title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - author: { - selectors: ['.contributors'] + selectors: ['.contributors'], }, - content: { selectors: ['div#articleBody', 'div.articleBody'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value'], ['time[itemProp="datePublished"]', 'content']], - - timezone: 'America/New_York' + selectors: [ + ['meta[name="article:published_time"]', 'value'], + ['time[itemProp="datePublished"]', 'content'], + ], + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: ['.dek', 'h2.dek'] + selectors: ['.dek', 'h2.dek'], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2188,41 +2417,32 @@ var NewYorkerExtractor = { var WiredExtractor = { domain: 'www.wired.com', title: { - selectors: ['h1.post-title'] + selectors: ['h1.post-title'], }, - author: { - selectors: ['a[rel="author"]'] + selectors: ['a[rel="author"]'], }, - content: { selectors: ['article.content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.visually-hidden', 'figcaption img.photo'] + clean: ['.visually-hidden', 'figcaption img.photo'], }, - date_published: { - selectors: [['meta[itemprop="datePublished"]', 'value']] + selectors: [['meta[itemprop="datePublished"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2231,41 +2451,32 @@ var WiredExtractor = { var MSNExtractor = { domain: 'www.msn.com', title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: ['span.authorname-txt'] + selectors: ['span.authorname-txt'], }, - content: { selectors: ['div.richtext'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['span.caption'] + clean: ['span.caption'], }, - date_published: { - selectors: ['span.time'] + selectors: ['span.time'], }, - lead_image_url: { - selectors: [] + selectors: [], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2274,45 +2485,37 @@ var MSNExtractor = { var YahooExtractor = { domain: 'www.yahoo.com', title: { - selectors: ['header.canvas-header'] + selectors: ['header.canvas-header'], }, - author: { - selectors: ['span.provider-name'] + selectors: ['span.provider-name'], }, - content: { selectors: [ - // enter content selectors - '.content-canvas'], - + // enter content selectors + '.content-canvas', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.figure-caption'] + clean: ['.figure-caption'], }, - date_published: { - selectors: [['time.date[datetime]', 'datetime']] + selectors: [['time.date[datetime]', 'datetime']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { selectors: [ // enter dek selectors - ] + ], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2321,55 +2524,54 @@ var YahooExtractor = { var BuzzfeedExtractor = { domain: 'www.buzzfeed.com', title: { - selectors: ['h1[id="post-title"]'] + selectors: ['h1[id="post-title"]'], }, - author: { - selectors: ['a[data-action="user/username"]', 'byline__author'] + selectors: ['a[data-action="user/username"]', 'byline__author'], }, - content: { - selectors: [['.longform_custom_header_media', '#buzz_sub_buzz'], '#buzz_sub_buzz'], - + selectors: [ + ['.longform_custom_header_media', '#buzz_sub_buzz'], + '#buzz_sub_buzz', + ], defaultCleaner: false, - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { h2: 'b', - - 'div.longform_custom_header_media': function divLongform_custom_header_media($node) { + 'div.longform_custom_header_media': function divLongform_custom_header_media( + $node + ) { if ($node.has('img') && $node.has('.longform_header_image_source')) { return 'figure'; } return null; }, - - 'figure.longform_custom_header_media .longform_header_image_source': 'figcaption' + 'figure.longform_custom_header_media .longform_header_image_source': + 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.instapaper_ignore', '.suplist_list_hide .buzz_superlist_item .buzz_superlist_number_inline', '.share-box', '.print'] + clean: [ + '.instapaper_ignore', + '.suplist_list_hide .buzz_superlist_item .buzz_superlist_number_inline', + '.share-box', + '.print', + ], }, - date_published: { - selectors: ['.buzz-datetime'] + selectors: ['.buzz-datetime'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2378,41 +2580,32 @@ var BuzzfeedExtractor = { var WikiaExtractor = { domain: 'fandom.wikia.com', title: { - selectors: ['h1.entry-title'] + selectors: ['h1.entry-title'], }, - author: { - selectors: ['.author vcard', '.fn'] + selectors: ['.author vcard', '.fn'], }, - content: { selectors: ['.grid-content', '.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2421,35 +2614,30 @@ var WikiaExtractor = { var LittleThingsExtractor = { domain: 'www.littlethings.com', title: { - selectors: ['h1.post-title'] + selectors: ['h1.post-title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - content: { selectors: [ - // enter content selectors - '.mainContentIntro', '.content-wrapper'], - + // enter content selectors + '.mainContentIntro', + '.content-wrapper', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; // Rename CustomExtractor @@ -2459,104 +2647,99 @@ var PoliticoExtractor = { domain: 'www.politico.com', title: { selectors: [ - // enter title selectors - ['meta[name="og:title"]', 'value']] + // enter title selectors + ['meta[name="og:title"]', 'value'], + ], }, - author: { - selectors: ['.story-main-content .byline .vcard'] + selectors: ['.story-main-content .byline .vcard'], }, - content: { selectors: [ - // enter content selectors - '.story-main-content', '.content-group', '.story-core', '.story-text'], - + // enter content selectors + '.story-main-content', + '.content-group', + '.story-core', + '.story-text', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: [], - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['figcaption'] + clean: ['figcaption'], }, - date_published: { - selectors: [['.story-main-content .timestamp time[datetime]', 'datetime']] + selectors: [['.story-main-content .timestamp time[datetime]', 'datetime']], }, - lead_image_url: { selectors: [ - // enter lead_image_url selectors - ['meta[name="og:image"]', 'value']] + // enter lead_image_url selectors + ['meta[name="og:image"]', 'value'], + ], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: null, - - excerpt: null + excerpt: null, }; var DeadspinExtractor = { domain: 'deadspin.com', - - supportedDomains: ['jezebel.com', 'lifehacker.com', 'kotaku.com', 'gizmodo.com', 'jalopnik.com', 'kinja.com'], - + supportedDomains: [ + 'jezebel.com', + 'lifehacker.com', + 'kotaku.com', + 'gizmodo.com', + 'jalopnik.com', + 'kinja.com', + ], title: { - selectors: ['h1.headline'] + selectors: ['h1.headline'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - content: { selectors: ['.post-content', '.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - 'iframe.lazyload[data-recommend-id^="youtube://"]': function iframeLazyloadDataRecommendIdYoutube($node) { + 'iframe.lazyload[data-recommend-id^="youtube://"]': function iframeLazyloadDataRecommendIdYoutube( + $node + ) { var youtubeId = $node.attr('id').split('youtube-')[1]; - $node.attr('src', 'https://www.youtube.com/embed/' + youtubeId); - } + $node.attr('src', 'https://www.youtube.com/embed/'.concat(youtubeId)); + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.magnifier', '.lightbox'] + clean: ['.magnifier', '.lightbox'], }, - date_published: { - selectors: [['time.updated[datetime]', 'datetime']] + selectors: [['time.updated[datetime]', 'datetime']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - next_page_url: { selectors: [ // enter selectors - ] + ], }, - excerpt: { selectors: [ // enter selectors - ] - } + ], + }, }; // Rename CustomExtractor @@ -2565,49 +2748,40 @@ var DeadspinExtractor = { var BroadwayWorldExtractor = { domain: 'www.broadwayworld.com', title: { - selectors: ['h1.article-title'] + selectors: ['h1.article-title'], }, - author: { - selectors: ['span[itemprop=author]'] + selectors: ['span[itemprop=author]'], }, - content: { selectors: ['div[itemprop=articlebody]'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - date_published: { - selectors: [['meta[itemprop=datePublished]', 'value']] + selectors: [['meta[itemprop=datePublished]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: { selectors: [ // enter selectors - ] + ], }, - excerpt: { selectors: [ // enter selectors - ] - } + ], + }, }; // Rename CustomExtractor @@ -2616,75 +2790,67 @@ var BroadwayWorldExtractor = { var ApartmentTherapyExtractor = { domain: 'www.apartmenttherapy.com', title: { - selectors: ['h1.headline'] + selectors: ['h1.headline'], }, - author: { - selectors: ['.PostByline__name'] + selectors: ['.PostByline__name'], }, - content: { selectors: ['div.post__content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - 'div[data-render-react-id="images/LazyPicture"]': function divDataRenderReactIdImagesLazyPicture($node, $) { + 'div[data-render-react-id="images/LazyPicture"]': function divDataRenderReactIdImagesLazyPicture( + $node, + $ + ) { var data = JSON.parse($node.attr('data-props')); var src = data.sources[0].src; - var $img = $('').attr('src', src); $node.replaceWith($img); - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - date_published: { - selectors: [['.PostByline__timestamp[datetime]', 'datetime']] + selectors: [['.PostByline__timestamp[datetime]', 'datetime']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { - selectors: [] + selectors: [], }, - next_page_url: { selectors: [ // enter selectors - ] + ], }, - excerpt: { selectors: [ // enter selectors - ] - } + ], + }, }; var MediumExtractor = { domain: 'medium.com', - supportedDomains: ['trackchanges.postlight.com'], - title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - content: { - selectors: [['.section-content'], '.section-content', 'article > div > section'], - + selectors: [ + ['.section-content'], + '.section-content', + 'article > div > section', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -2695,127 +2861,102 @@ var MediumExtractor = { if (ytRe.test(thumb)) { var _thumb$match = thumb.match(ytRe), - _thumb$match2 = _slicedToArray(_thumb$match, 2), - _ = _thumb$match2[0], - youtubeId = _thumb$match2[1]; // eslint-disable-line + _thumb$match2 = _slicedToArray(_thumb$match, 2), + _ = _thumb$match2[0], + youtubeId = _thumb$match2[1]; // eslint-disable-line - - $node.attr('src', 'https://www.youtube.com/embed/' + youtubeId); + $node.attr('src', 'https://www.youtube.com/embed/'.concat(youtubeId)); var $parent = $node.parents('figure'); var $caption = $parent.find('figcaption'); $parent.empty().append([$node, $caption]); } }, - // rewrite figures to pull out image and caption, remove rest figure: function figure($node) { // ignore if figure has an iframe if ($node.find('iframe').length > 0) return; - var $img = $node.find('img').slice(-1)[0]; var $caption = $node.find('figcaption'); $node.empty().append([$img, $caption]); - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] + clean: [], }, - date_published: { - selectors: [['time[datetime]', 'datetime']] + selectors: [['time[datetime]', 'datetime']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - next_page_url: { selectors: [ // enter selectors - ] + ], }, - excerpt: { selectors: [ // enter selectors - ] - } + ], + }, }; var WwwTmzComExtractor = { domain: 'www.tmz.com', - title: { - selectors: ['.post-title-breadcrumb', 'h1', '.headline'] + selectors: ['.post-title-breadcrumb', 'h1', '.headline'], }, - author: 'TMZ STAFF', - date_published: { selectors: ['.article-posted-date'], - - timezone: 'America/Los_Angeles' + timezone: 'America/Los_Angeles', }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-content', '.all-post-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.lightbox-link'] - } + clean: ['.lightbox-link'], + }, }; var WwwWashingtonpostComExtractor = { domain: 'www.washingtonpost.com', - title: { - selectors: ['h1', '#topper-headline-wrapper'] + selectors: ['h1', '#topper-headline-wrapper'], }, - author: { - selectors: ['.pb-byline'] + selectors: ['.pb-byline'], }, - date_published: { - selectors: [['.pb-timestamp[itemprop="datePublished"]', 'content']] + selectors: [['.pb-timestamp[itemprop="datePublished"]', 'content']], }, - dek: { - selectors: [] + selectors: [], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -2827,44 +2968,38 @@ var WwwWashingtonpostComExtractor = { $node.remove(); return null; }, - '.pb-caption': 'figcaption' + '.pb-caption': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.interstitial-link', '.newsletter-inline-unit'] - } + clean: ['.interstitial-link', '.newsletter-inline-unit'], + }, }; var WwwHuffingtonpostComExtractor = { domain: 'www.huffingtonpost.com', - title: { - selectors: ['h1.headline__title'] + selectors: ['h1.headline__title'], }, - author: { - selectors: ['span.author-card__details__name'] + selectors: ['span.author-card__details__name'], }, - date_published: { - selectors: [['meta[name="article:modified_time"]', 'value'], ['meta[name="article:published_time"]', 'value']] + selectors: [ + ['meta[name="article:modified_time"]', 'value'], + ['meta[name="article:published_time"]', 'value'], + ], }, - dek: { - selectors: ['h2.headline__subtitle'] + selectors: ['h2.headline__subtitle'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.entry__body'], - defaultCleaner: false, - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -2873,1565 +3008,1329 @@ var WwwHuffingtonpostComExtractor = { // $node.replaceWith($figure); // }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.pull-quote', '.tag-cloud', '.embed-asset', '.below-entry', '.entry-corrections', '#suggested-story'] - } + clean: [ + '.pull-quote', + '.tag-cloud', + '.embed-asset', + '.below-entry', + '.entry-corrections', + '#suggested-story', + ], + }, }; var NewrepublicComExtractor = { domain: 'newrepublic.com', - title: { - selectors: ['h1.article-headline', '.minutes-primary h1.minute-title'] + selectors: ['h1.article-headline', '.minutes-primary h1.minute-title'], }, - author: { - selectors: ['div.author-list', '.minutes-primary h3.minute-byline'] + selectors: ['div.author-list', '.minutes-primary h3.minute-byline'], }, - date_published: { selectors: [['meta[name="article:published_time"]', 'value']], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: ['h2.article-subhead'] + selectors: ['h2.article-subhead'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['.article-cover', 'div.content-body'], ['.minute-image', '.minutes-primary div.content-body']], - + selectors: [ + ['.article-cover', 'div.content-body'], + ['.minute-image', '.minutes-primary div.content-body'], + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['aside'] - } + clean: ['aside'], + }, }; var MoneyCnnComExtractor = { domain: 'money.cnn.com', - title: { - selectors: ['.article-title'] + selectors: ['.article-title'], }, - author: { - selectors: ['.byline a'] + selectors: ['.byline a'], }, - date_published: { selectors: [['meta[name="date"]', 'value']], - - timezone: 'GMT' + timezone: 'GMT', }, - dek: { - selectors: ['#storytext h2'] + selectors: ['#storytext h2'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['#storytext'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.inStoryHeading'] - } + clean: ['.inStoryHeading'], + }, }; var WwwThevergeComExtractor = { domain: 'www.theverge.com', - supportedDomains: ['www.polygon.com'], - title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['h2.p-dek'] + selectors: ['h2.p-dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [ - // feature template multi-match - ['.c-entry-hero .e-image', '.c-entry-intro', '.c-entry-content'], - // regular post multi-match - ['.e-image--hero', '.c-entry-content'], - // feature template fallback - '.l-wrapper .l-feature', - // regular post fallback - 'div.c-entry-content'], - + // feature template multi-match + ['.c-entry-hero .e-image', '.c-entry-intro', '.c-entry-content'], // regular post multi-match + ['.e-image--hero', '.c-entry-content'], // feature template fallback + '.l-wrapper .l-feature', // regular post fallback + 'div.c-entry-content', + ], // Transform lazy-loaded images transforms: { noscript: function noscript($node) { var $children = $node.children(); + if ($children.length === 1 && $children.get(0).tagName === 'img') { return 'span'; } return null; - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.aside', 'img.c-dynamic-image'] - } + clean: ['.aside', 'img.c-dynamic-image'], + }, }; var WwwCnnComExtractor = { domain: 'www.cnn.com', - title: { - selectors: ['h1.pg-headline', 'h1'] + selectors: ['h1.pg-headline', 'h1'], }, - author: { - selectors: ['.metadata__byline__author'] + selectors: ['.metadata__byline__author'], }, - date_published: { - selectors: [['meta[name="pubdate"]', 'value']] + selectors: [['meta[name="pubdate"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [ - // a more specific selector to grab the lead image and the body - ['.media__video--thumbnail', '.zn-body-text'], - // a fallback for the above - '.zn-body-text', 'div[itemprop="articleBody"]'], - + // a more specific selector to grab the lead image and the body + ['.media__video--thumbnail', '.zn-body-text'], // a fallback for the above + '.zn-body-text', + 'div[itemprop="articleBody"]', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - '.zn-body__paragraph, .el__leafmedia--sourced-paragraph': function znBody__paragraphEl__leafmediaSourcedParagraph($node) { + '.zn-body__paragraph, .el__leafmedia--sourced-paragraph': function znBody__paragraphEl__leafmediaSourcedParagraph( + $node + ) { var $text = $node.html(); + if ($text) { return 'p'; } return null; }, - // this transform cleans the short, all-link sections linking // to related content but not marked as such in any way. '.zn-body__paragraph': function znBody__paragraph($node) { if ($node.has('a')) { - if ($node.text().trim() === $node.find('a').text().trim()) { + if ( + $node.text().trim() === + $node + .find('a') + .text() + .trim() + ) { $node.remove(); } } }, - - '.media__video--thumbnail': 'figure' - + '.media__video--thumbnail': 'figure', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwAolComExtractor = { domain: 'www.aol.com', - title: { - selectors: ['h1.p-article__title'] + selectors: ['h1.p-article__title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { selectors: ['.p-article__byline__date'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwYoutubeComExtractor = { domain: 'www.youtube.com', - title: { - selectors: ['.watch-title', 'h1.watch-title-container'] + selectors: ['.watch-title', 'h1.watch-title-container'], }, - author: { - selectors: ['.yt-user-info'] + selectors: ['.yt-user-info'], }, - date_published: { selectors: [['meta[itemProp="datePublished"]', 'value']], - - timezone: 'GMT' + timezone: 'GMT', }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { defaultCleaner: false, - selectors: [['#player-api', '#eow-description']], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '#player-api': function playerApi($node, $) { var videoId = $('meta[itemProp="videoId"]').attr('value'); - $node.html('\n '); - } + $node.html( + '\n ' + ) + ); + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwTheguardianComExtractor = { domain: 'www.theguardian.com', - title: { - selectors: ['.content__headline'] + selectors: ['.content__headline'], }, - author: { - selectors: ['p.byline'] + selectors: ['p.byline'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['.content__standfirst'] + selectors: ['.content__standfirst'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.content__article-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.hide-on-mobile', '.inline-icon'] - } + clean: ['.hide-on-mobile', '.inline-icon'], + }, }; var WwwSbnationComExtractor = { domain: 'www.sbnation.com', - title: { - selectors: ['h1.c-page-title'] + selectors: ['h1.c-page-title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['h2.c-entry-summary.p-dek'] + selectors: ['h2.c-entry-summary.p-dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.c-entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwBloombergComExtractor = { domain: 'www.bloomberg.com', - title: { selectors: [ - // normal articles - '.lede-headline', - - // /graphics/ template - 'h1.article-title', - - // /news/ template - 'h1.lede-text-only__hed'] + // normal articles + '.lede-headline', // /graphics/ template + 'h1.article-title', // /news/ template + 'h1.lede-text-only__hed', + ], }, - author: { - selectors: [['meta[name="parsely-author"]', 'value'], '.byline-details__link', - - // /graphics/ template - '.bydek', - - // /news/ template - '.author'] + selectors: [ + ['meta[name="parsely-author"]', 'value'], + '.byline-details__link', // /graphics/ template + '.bydek', // /news/ template + '.author', + ], }, - date_published: { - selectors: [['time.published-at', 'datetime'], ['time[datetime]', 'datetime'], ['meta[name="date"]', 'value'], ['meta[name="parsely-pub-date"]', 'value']] + selectors: [ + ['time.published-at', 'datetime'], + ['time[datetime]', 'datetime'], + ['meta[name="date"]', 'value'], + ['meta[name="parsely-pub-date"]', 'value'], + ], }, - dek: { - selectors: [] + selectors: [], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: ['.article-body__content', - - // /graphics/ template - ['section.copy-block'], - - // /news/ template - '.body-copy'], - + selectors: [ + '.article-body__content', // /graphics/ template + ['section.copy-block'], // /news/ template + '.body-copy', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.inline-newsletter', '.page-ad'] - } + clean: ['.inline-newsletter', '.page-ad'], + }, }; var WwwBustleComExtractor = { domain: 'www.bustle.com', - title: { - selectors: ['h1.post-page__title'] + selectors: ['h1.post-page__title'], }, - author: { - selectors: ['div.content-meta__author'] + selectors: ['div.content-meta__author'], }, - date_published: { - selectors: [['time.content-meta__published-date[datetime]', 'datetime']] + selectors: [['time.content-meta__published-date[datetime]', 'datetime']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.post-page__body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwNprOrgExtractor = { domain: 'www.npr.org', - title: { - selectors: ['h1', '.storytitle'] + selectors: ['h1', '.storytitle'], }, - author: { - selectors: ['p.byline__name.byline__name--block'] + selectors: ['p.byline__name.byline__name--block'], }, - date_published: { - selectors: [['.dateblock time[datetime]', 'datetime'], ['meta[name="date"]', 'value']] + selectors: [ + ['.dateblock time[datetime]', 'datetime'], + ['meta[name="date"]', 'value'], + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value'], ['meta[name="twitter:image:src"]', 'value']] + selectors: [ + ['meta[name="og:image"]', 'value'], + ['meta[name="twitter:image:src"]', 'value'], + ], }, - content: { selectors: ['.storytext'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.bucketwrap.image': 'figure', - '.bucketwrap.image .credit-caption': 'figcaption' + '.bucketwrap.image .credit-caption': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['div.enlarge_measure'] - } + clean: ['div.enlarge_measure'], + }, }; var WwwRecodeNetExtractor = { domain: 'www.recode.net', - title: { - selectors: ['h1.c-page-title'] + selectors: ['h1.c-page-title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['h2.c-entry-summary.p-dek'] + selectors: ['h2.c-entry-summary.p-dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['figure.e-image--hero', '.c-entry-content'], '.c-entry-content'], - + selectors: [ + ['figure.e-image--hero', '.c-entry-content'], + '.c-entry-content', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var QzComExtractor = { domain: 'qz.com', - title: { - selectors: ['header.item-header.content-width-responsive'] + selectors: ['header.item-header.content-width-responsive'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: ['.timestamp'] + selectors: ['.timestamp'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['figure.featured-image', '.item-body'], '.item-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.article-aside', '.progressive-image-thumbnail'] - } + clean: ['.article-aside', '.progressive-image-thumbnail'], + }, }; var WwwDmagazineComExtractor = { domain: 'www.dmagazine.com', - title: { - selectors: ['h1.story__title'] + selectors: ['h1.story__title'], }, - author: { - selectors: ['.story__info .story__info__item:first-child'] + selectors: ['.story__info .story__info__item:first-child'], }, - date_published: { selectors: [ - // enter selectors - '.story__info'], - - timezone: 'America/Chicago' + // enter selectors + '.story__info', + ], + timezone: 'America/Chicago', }, - dek: { - selectors: ['.story__subhead'] + selectors: ['.story__subhead'], }, - lead_image_url: { - selectors: [['article figure a:first-child', 'href']] + selectors: [['article figure a:first-child', 'href']], }, - content: { selectors: ['.story__content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwReutersComExtractor = { domain: 'www.reuters.com', - title: { - selectors: ['h1.article-headline'] + selectors: ['h1.article-headline'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - date_published: { - selectors: [['meta[name="og:article:published_time"]', 'value']] + selectors: [['meta[name="og:article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['#article-text'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - '.article-subtitle': 'h4' + '.article-subtitle': 'h4', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['#article-byline .author'] - } + clean: ['#article-byline .author'], + }, }; var MashableComExtractor = { domain: 'mashable.com', - title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - author: { - selectors: ['span.author_name a'] + selectors: ['span.author_name a'], }, - date_published: { - selectors: [['meta[name="og:article:published_time"]', 'value']] + selectors: [['meta[name="og:article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['section.article-content.blueprint'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - '.image-credit': 'figcaption' + '.image-credit': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwChicagotribuneComExtractor = { domain: 'www.chicagotribune.com', - title: { - selectors: ['h1.trb_ar_hl_t'] + selectors: ['h1.trb_ar_hl_t'], }, - author: { - selectors: ['span.trb_ar_by_nm_au'] + selectors: ['span.trb_ar_by_nm_au'], }, - date_published: { - selectors: [['meta[itemprop="datePublished"]', 'value']] + selectors: [['meta[itemprop="datePublished"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.trb_ar_page'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwVoxComExtractor = { domain: 'www.vox.com', - title: { - selectors: ['h1.c-page-title'] + selectors: ['h1.c-page-title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['.p-dek'] + selectors: ['.p-dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['figure.e-image--hero', '.c-entry-content'], '.c-entry-content'], - + selectors: [ + ['figure.e-image--hero', '.c-entry-content'], + '.c-entry-content', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - 'figure .e-image__image noscript': function figureEImage__imageNoscript($node) { + 'figure .e-image__image noscript': function figureEImage__imageNoscript( + $node + ) { var imgHtml = $node.html(); - $node.parents('.e-image__image').find('.c-dynamic-image').replaceWith(imgHtml); + $node + .parents('.e-image__image') + .find('.c-dynamic-image') + .replaceWith(imgHtml); }, - - 'figure .e-image__meta': 'figcaption' + 'figure .e-image__meta': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var NewsNationalgeographicComExtractor = { domain: 'news.nationalgeographic.com', - title: { - selectors: ['h1', 'h1.main-title'] + selectors: ['h1', 'h1.main-title'], }, - author: { - selectors: ['.byline-component__contributors b span'] + selectors: ['.byline-component__contributors b span'], }, - date_published: { selectors: [['meta[name="article:published_time"]', 'value']], format: 'ddd MMM DD HH:mm:ss zz YYYY', - timezone: 'EST' + timezone: 'EST', }, - dek: { - selectors: ['.article__deck'] + selectors: ['.article__deck'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.parsys.content', '.__image-lead__'], '.content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.parsys.content': function parsysContent($node, $) { - var $imgSrc = $node.find('.image.parbase.section').find('.picturefill').first().data('platform-src'); + var $imgSrc = $node + .find('.image.parbase.section') + .find('.picturefill') + .first() + .data('platform-src'); + if ($imgSrc) { - $node.prepend($('')); + $node.prepend( + $('')) + ); } - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.pull-quote.pull-quote--large'] - } + clean: ['.pull-quote.pull-quote--large'], + }, }; var WwwNationalgeographicComExtractor = { domain: 'www.nationalgeographic.com', - title: { - selectors: ['h1', 'h1.main-title'] + selectors: ['h1', 'h1.main-title'], }, - author: { - selectors: ['.byline-component__contributors b span'] + selectors: ['.byline-component__contributors b span'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['.article__deck'] + selectors: ['.article__deck'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.parsys.content', '.__image-lead__'], '.content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.parsys.content': function parsysContent($node, $) { var $imageParent = $node.children().first(); + if ($imageParent.hasClass('imageGroup')) { - var $dataAttrContainer = $imageParent.find('.media--medium__container').children().first(); + var $dataAttrContainer = $imageParent + .find('.media--medium__container') + .children() + .first(); var imgPath1 = $dataAttrContainer.data('platform-image1-path'); var imgPath2 = $dataAttrContainer.data('platform-image2-path'); + if (imgPath2 && imgPath1) { - $node.prepend($('
\n \n \n
')); + $node.prepend( + $( + '
\n \n \n
') + ) + ); } } else { - var $imgSrc = $node.find('.image.parbase.section').find('.picturefill').first().data('platform-src'); + var $imgSrc = $node + .find('.image.parbase.section') + .find('.picturefill') + .first() + .data('platform-src'); + if ($imgSrc) { - $node.prepend($('')); + $node.prepend( + $('')) + ); } } - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.pull-quote.pull-quote--small'] - } + clean: ['.pull-quote.pull-quote--small'], + }, }; var WwwLatimesComExtractor = { domain: 'www.latimes.com', - title: { - selectors: ['.trb_ar_hl'] + selectors: ['.trb_ar_hl'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[itemprop="datePublished"]', 'value']] + selectors: [['meta[itemprop="datePublished"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.trb_ar_main'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.trb_ar_la': function trb_ar_la($node) { var $figure = $node.find('figure'); $node.replaceWith($figure); - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.trb_ar_by', '.trb_ar_cr'] - } + clean: ['.trb_ar_by', '.trb_ar_cr'], + }, }; var PagesixComExtractor = { domain: 'pagesix.com', - supportedDomains: ['nypost.com'], - title: { - selectors: ['h1 a'] + selectors: ['h1 a'], }, - author: { - selectors: ['.byline'] + selectors: ['.byline'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: [['meta[name="description"]', 'value']] + selectors: [['meta[name="description"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['#featured-image-wrapper', '.entry-content'], '.entry-content'], - + selectors: [ + ['#featured-image-wrapper', '.entry-content'], + '.entry-content', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '#featured-image-wrapper': 'figure', - '.wp-caption-text': 'figcaption' + '.wp-caption-text': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.modal-trigger'] - } + clean: ['.modal-trigger'], + }, }; var ThefederalistpapersOrgExtractor = { domain: 'thefederalistpapers.org', - title: { - selectors: ['h1.entry-title'] + selectors: ['h1.entry-title'], }, - author: { - selectors: ['main span.entry-author-name'] + selectors: ['main span.entry-author-name'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [['p[style]']] - } + clean: [['p[style]']], + }, }; var WwwCbssportsComExtractor = { domain: 'www.cbssports.com', - title: { - selectors: ['.article-headline'] + selectors: ['.article-headline'], }, - author: { - selectors: ['.author-name'] + selectors: ['.author-name'], }, - date_published: { selectors: [['.date-original-reading-time time', 'datetime']], - timezone: 'UTC' + timezone: 'UTC', }, - dek: { - selectors: ['.article-subline'] + selectors: ['.article-subline'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwMsnbcComExtractor = { domain: 'www.msnbc.com', - title: { - selectors: ['h1', 'h1.is-title-pane'] + selectors: ['h1', 'h1.is-title-pane'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - date_published: { - selectors: [['meta[name="DC.date.issued"]', 'value']] + selectors: [['meta[name="DC.date.issued"]', 'value']], }, - dek: { - selectors: [['meta[name="description"]', 'value']] + selectors: [['meta[name="description"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.pane-node-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.pane-node-body': function paneNodeBody($node, $) { - var _WwwMsnbcComExtractor = _slicedToArray(WwwMsnbcComExtractor.lead_image_url.selectors[0], 2), - selector = _WwwMsnbcComExtractor[0], - attr = _WwwMsnbcComExtractor[1]; + var _WwwMsnbcComExtractor = _slicedToArray( + WwwMsnbcComExtractor.lead_image_url.selectors[0], + 2 + ), + selector = _WwwMsnbcComExtractor[0], + attr = _WwwMsnbcComExtractor[1]; var src = $(selector).attr(attr); + if (src) { - $node.prepend(''); + $node.prepend('')); } - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwThepoliticalinsiderComExtractor = { domain: 'www.thepoliticalinsider.com', - title: { - selectors: [['meta[name="sailthru.title"]', 'value']] + selectors: [['meta[name="sailthru.title"]', 'value']], }, - author: { - selectors: [['meta[name="sailthru.author"]', 'value']] + selectors: [['meta[name="sailthru.author"]', 'value']], }, - date_published: { selectors: [['meta[name="sailthru.date"]', 'value']], - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div#article-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwMentalflossComExtractor = { domain: 'www.mentalfloss.com', - title: { - selectors: ['h1.title', '.title-group', '.inner'] + selectors: ['h1.title', '.title-group', '.inner'], }, - author: { - selectors: ['.field-name-field-enhanced-authors'] + selectors: ['.field-name-field-enhanced-authors'], }, - date_published: { selectors: ['.date-display-single'], - timezone: 'America/New_York' + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.field.field-name-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var AbcnewsGoComExtractor = { domain: 'abcnews.go.com', - title: { - selectors: ['.article-header h1'] + selectors: ['.article-header h1'], }, - author: { selectors: ['.authors'], - clean: ['.author-overlay', '.by-text'] + clean: ['.author-overlay', '.by-text'], }, - date_published: { selectors: ['.timestamp'], - timezone: 'America/New_York' - + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-copy'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwNydailynewsComExtractor = { domain: 'www.nydailynews.com', - title: { - selectors: ['h1#ra-headline'] + selectors: ['h1#ra-headline'], }, - author: { - selectors: [['meta[name="parsely-author"]', 'value']] + selectors: [['meta[name="parsely-author"]', 'value']], }, - date_published: { - selectors: [['meta[name="sailthru.date"]', 'value']] + selectors: [['meta[name="sailthru.date"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['article#ra-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['dl#ra-tags', '.ra-related', 'a.ra-editor', 'dl#ra-share-bottom'] - } + clean: ['dl#ra-tags', '.ra-related', 'a.ra-editor', 'dl#ra-share-bottom'], + }, }; var WwwCnbcComExtractor = { domain: 'www.cnbc.com', - title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div#article_body.content', 'div.story'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwPopsugarComExtractor = { domain: 'www.popsugar.com', - title: { - selectors: ['h2.post-title', 'title-text'] + selectors: ['h2.post-title', 'title-text'], }, - author: { - selectors: [['meta[name="article:author"]', 'value']] + selectors: [['meta[name="article:author"]', 'value']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['#content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.share-copy-title', '.post-tags', '.reactions'] - } + clean: ['.share-copy-title', '.post-tags', '.reactions'], + }, }; var ObserverComExtractor = { domain: 'observer.com', - title: { - selectors: ['h1.entry-title'] + selectors: ['h1.entry-title'], }, - author: { - selectors: ['.author', '.vcard'] + selectors: ['.author', '.vcard'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['h2.dek'] + selectors: ['h2.dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var PeopleComExtractor = { domain: 'people.com', - title: { - selectors: [['meta[name="og:title"]', 'value']] + selectors: [['meta[name="og:title"]', 'value']], }, - author: { - selectors: ['a.author.url.fn'] + selectors: ['a.author.url.fn'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.article-body__inner'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwUsmagazineComExtractor = { domain: 'www.usmagazine.com', - title: { - selectors: ['header h1'] + selectors: ['header h1'], }, - author: { - selectors: ['a.article-byline.tracked-offpage'] + selectors: ['a.article-byline.tracked-offpage'], }, - date_published: { timezone: 'America/New_York', - - selectors: ['time.article-published-date'] + selectors: ['time.article-published-date'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.article-body-inner'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.module-related'] - } + clean: ['.module-related'], + }, }; var WwwRollingstoneComExtractor = { domain: 'www.rollingstone.com', - title: { - selectors: ['h1.content-title'] + selectors: ['h1.content-title'], }, - author: { - selectors: ['a.content-author.tracked-offpage'] + selectors: ['a.content-author.tracked-offpage'], }, - date_published: { selectors: ['time.content-published-date'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: ['.content-description'] + selectors: ['.content-description'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.lead-container', '.article-content'], '.article-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.module-related'] - } + clean: ['.module-related'], + }, }; var twofortysevensportsComExtractor = { domain: '247sports.com', - title: { - selectors: ['title', 'article header h1'] + selectors: ['title', 'article header h1'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - date_published: { - selectors: [['time[data-published]', 'data-published']] + selectors: [['time[data-published]', 'data-published']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['section.body.article'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var UproxxComExtractor = { domain: 'uproxx.com', - title: { - selectors: ['div.post-top h1'] + selectors: ['div.post-top h1'], }, - author: { - selectors: ['.post-top .authorname'] + selectors: ['.post-top .authorname'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.post-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { 'div.image': 'figure', - 'div.image .wp-media-credit': 'figcaption' + 'div.image .wp-media-credit': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwEonlineComExtractor = { domain: 'www.eonline.com', - title: { - selectors: ['h1.article__title'] + selectors: ['h1.article__title'], }, - author: { - selectors: ['.entry-meta__author a'] + selectors: ['.entry-meta__author a'], }, - date_published: { - selectors: [['meta[itemprop="datePublished"]', 'value']] + selectors: [['meta[itemprop="datePublished"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['.post-content section, .post-content div.post-content__image']], - + selectors: [ + ['.post-content section, .post-content div.post-content__image'], + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { 'div.post-content__image': 'figure', - 'div.post-content__image .image__credits': 'figcaption' + 'div.post-content__image .image__credits': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwMiamiheraldComExtractor = { domain: 'www.miamiherald.com', - title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - date_published: { selectors: ['p.published-date'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.dateline-storybody'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwRefinery29ComExtractor = { domain: 'www.refinery29.com', - title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - author: { - selectors: ['.contributor'] + selectors: ['.contributor'], }, - date_published: { selectors: [['meta[name="sailthru.date"]', 'value']], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['.full-width-opener', '.article-content'], '.article-content', '.body'], - + selectors: [ + ['.full-width-opener', '.article-content'], + '.article-content', + '.body', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -4439,212 +4338,170 @@ var WwwRefinery29ComExtractor = { var imgHtml = $node.html(); $node.parents('.loading').replaceWith(imgHtml); }, - '.section-image': 'figure', - '.section-image .content-caption': 'figcaption', - - '.section-text': 'p' + '.section-text': 'p', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.story-share'] - } + clean: ['.story-share'], + }, }; var WwwMacrumorsComExtractor = { domain: 'www.macrumors.com', - title: { - selectors: ['h1', 'h1.title'] + selectors: ['h1', 'h1.title'], }, - author: { - selectors: ['.author-url'] + selectors: ['.author-url'], }, - date_published: { selectors: ['.article .byline'], - // Wednesday January 18, 2017 11:44 am PST format: 'dddd MMMM D, YYYY h:mm A zz', - - timezone: 'America/Los_Angeles' + timezone: 'America/Los_Angeles', }, - dek: { - selectors: [['meta[name="description"]', 'value']] + selectors: [['meta[name="description"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwAndroidcentralComExtractor = { domain: 'www.androidcentral.com', - title: { - selectors: ['h1', 'h1.main-title'] + selectors: ['h1', 'h1.main-title'], }, - author: { - selectors: ['.meta-by'] + selectors: ['.meta-by'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: [['meta[name="og:description"]', 'value']] + selectors: [['meta[name="og:description"]', 'value']], }, - lead_image_url: { - selectors: [['.image-large', 'src']] + selectors: [['.image-large', 'src']], }, - content: { selectors: ['.article-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.intro', 'blockquote'] - } + clean: ['.intro', 'blockquote'], + }, }; var WwwSiComExtractor = { domain: 'www.si.com', - title: { - selectors: ['h1', 'h1.headline'] + selectors: ['h1', 'h1.headline'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { selectors: ['.timestamp'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: ['.quick-hit ul'] + selectors: ['.quick-hit ul'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['p', '.marquee_large_2x', '.component.image']], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - noscript: function noscript($node) { var $children = $node.children(); + if ($children.length === 1 && $children.get(0).tagName === 'img') { return 'figure'; } return null; - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [['.inline-thumb', '.primary-message', '.description', '.instructions']] - } + clean: [ + ['.inline-thumb', '.primary-message', '.description', '.instructions'], + ], + }, }; var WwwRawstoryComExtractor = { domain: 'www.rawstory.com', - title: { - selectors: ['.blog-title'] + selectors: ['.blog-title'], }, - author: { - selectors: ['.blog-author a:first-of-type'] + selectors: ['.blog-author a:first-of-type'], }, - date_published: { selectors: ['.blog-author a:last-of-type'], - - timezone: 'EST' + timezone: 'EST', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.blog-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwCnetComExtractor = { domain: 'www.cnet.com', - title: { - selectors: [['meta[name="og:title"]', 'value']] + selectors: [['meta[name="og:title"]', 'value']], }, - author: { - selectors: ['a.author'] + selectors: ['a.author'], }, - date_published: { selectors: ['time'], - - timezone: 'America/Los_Angeles' + timezone: 'America/Los_Angeles', }, - dek: { - selectors: ['.article-dek'] + selectors: ['.article-dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['img.__image-lead__', '.article-main-body'], '.article-main-body'], - + selectors: [ + ['img.__image-lead__', '.article-main-body'], + '.article-main-body', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -4654,813 +4511,661 @@ var WwwCnetComExtractor = { $img.attr('height', '100%'); $img.addClass('__image-lead__'); $node.remove('.imgContainer').prepend($img); - } + }, }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwCinemablendComExtractor = { domain: 'www.cinemablend.com', - title: { - selectors: ['.story_title'] + selectors: ['.story_title'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - date_published: { selectors: [['meta[name="article:published_time"]', 'value']], - - timezone: 'EST' + timezone: 'EST', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div#wrap_left_content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwTodayComExtractor = { domain: 'www.today.com', - title: { - selectors: ['h1.entry-headline'] + selectors: ['h1.entry-headline'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="DC.date.issued"]', 'value']] + selectors: [['meta[name="DC.date.issued"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-container'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.label-comment'] - } + clean: ['.label-comment'], + }, }; var WwwHowtogeekComExtractor = { domain: 'www.howtogeek.com', - title: { - selectors: ['title'] + selectors: ['title'], }, - author: { - selectors: ['#authorinfobox a'] + selectors: ['#authorinfobox a'], }, - date_published: { selectors: ['#authorinfobox + div li'], - timezone: 'GMT' + timezone: 'GMT', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.thecontent'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwAlComExtractor = { domain: 'www.al.com', - title: { - selectors: [['meta[name="title"]', 'value']] + selectors: [['meta[name="title"]', 'value']], }, - author: { - selectors: [['meta[name="article_author"]', 'value']] + selectors: [['meta[name="article_author"]', 'value']], }, - date_published: { selectors: [['meta[name="article_date_original"]', 'value']], - timezone: 'EST' + timezone: 'EST', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwThepennyhoarderComExtractor = { domain: 'www.thepennyhoarder.com', - title: { - selectors: [['meta[name="dcterms.title"]', 'value']] + selectors: [['meta[name="dcterms.title"]', 'value']], }, - author: { - selectors: [['link[rel="author"]', 'title']] + selectors: [['link[rel="author"]', 'title']], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.post-img', '.post-text'], '.post-text'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwWesternjournalismComExtractor = { domain: 'www.westernjournalism.com', - title: { - selectors: ['title', 'h1.entry-title'] + selectors: ['title', 'h1.entry-title'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { - selectors: [['meta[name="DC.date.issued"]', 'value']] + selectors: [['meta[name="DC.date.issued"]', 'value']], }, - dek: { - selectors: ['.subtitle'] + selectors: ['.subtitle'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.article-sharing.top + div'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.ad-notice-small'] - } + clean: ['.ad-notice-small'], + }, }; var FusionNetExtractor = { domain: 'fusion.net', - title: { - selectors: ['.post-title', '.single-title', '.headline'] + selectors: ['.post-title', '.single-title', '.headline'], }, - author: { - selectors: ['.show-for-medium .byline'] + selectors: ['.show-for-medium .byline'], }, - date_published: { - selectors: [['time.local-time', 'datetime']] + selectors: [['time.local-time', 'datetime']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { - selectors: [['.post-featured-media', '.article-content'], '.article-content'], - + selectors: [ + ['.post-featured-media', '.article-content'], + '.article-content', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { - '.fusion-youtube-oembed': 'figure' + '.fusion-youtube-oembed': 'figure', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwAmericanowComExtractor = { domain: 'www.americanow.com', - title: { - selectors: ['.title', ['meta[name="title"]', 'value']] + selectors: ['.title', ['meta[name="title"]', 'value']], }, - author: { - selectors: ['.byline'] + selectors: ['.byline'], }, - date_published: { - selectors: [['meta[name="publish_date"]', 'value']] + selectors: [['meta[name="publish_date"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.article-content', '.image', '.body'], '.body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.article-video-wrapper', '.show-for-small-only'] - } + clean: ['.article-video-wrapper', '.show-for-small-only'], + }, }; var ScienceflyComExtractor = { domain: 'sciencefly.com', - title: { - selectors: ['.entry-title', '.cb-entry-title', '.cb-single-title'] + selectors: ['.entry-title', '.cb-entry-title', '.cb-single-title'], }, - author: { - selectors: ['div.cb-author', 'div.cb-author-title'] + selectors: ['div.cb-author', 'div.cb-author-title'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['div.theiaPostSlider_slides img', 'src']] + selectors: [['div.theiaPostSlider_slides img', 'src']], }, - content: { selectors: ['div.theiaPostSlider_slides'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var HellogigglesComExtractor = { domain: 'hellogiggles.com', - title: { - selectors: ['.title'] + selectors: ['.title'], }, - author: { - selectors: ['.author-link'] + selectors: ['.author-link'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var ThoughtcatalogComExtractor = { domain: 'thoughtcatalog.com', - title: { - selectors: ['h1.title', ['meta[name="og:title"]', 'value']] + selectors: ['h1.title', ['meta[name="og:title"]', 'value']], }, - author: { - selectors: ['div.col-xs-12.article_header div.writer-container.writer-container-inline.writer-no-avatar h4.writer-name', 'h1.writer-name'] + selectors: [ + 'div.col-xs-12.article_header div.writer-container.writer-container-inline.writer-no-avatar h4.writer-name', + 'h1.writer-name', + ], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry.post'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.tc_mark'] - } + clean: ['.tc_mark'], + }, }; var WwwNjComExtractor = { domain: 'www.nj.com', - title: { - selectors: [['meta[name="title"]', 'value']] + selectors: [['meta[name="title"]', 'value']], }, - author: { - selectors: [['meta[name="article_author"]', 'value']] + selectors: [['meta[name="article_author"]', 'value']], }, - date_published: { selectors: [['meta[name="article_date_original"]', 'value']], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwInquisitrComExtractor = { domain: 'www.inquisitr.com', - title: { - selectors: ['h1.entry-title.story--header--title'] + selectors: ['h1.entry-title.story--header--title'], }, - author: { - selectors: ['div.story--header--author'] + selectors: ['div.story--header--author'], }, - date_published: { - selectors: [['meta[name="datePublished"]', 'value']] + selectors: [['meta[name="datePublished"]', 'value']], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['article.story', '.entry-content.'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.post-category', '.story--header--socials', '.story--header--content'] - } + clean: [ + '.post-category', + '.story--header--socials', + '.story--header--content', + ], + }, }; var WwwNbcnewsComExtractor = { domain: 'www.nbcnews.com', - title: { - selectors: ['div.article-hed h1'] + selectors: ['div.article-hed h1'], }, - author: { - selectors: ['span.byline_author'] + selectors: ['span.byline_author'], }, - date_published: { - selectors: [['.flag_article-wrapper time.timestamp_article[datetime]', 'datetime'], '.flag_article-wrapper time'], - - timezone: 'America/New_York' + selectors: [ + ['.flag_article-wrapper time.timestamp_article[datetime]', 'datetime'], + '.flag_article-wrapper time', + ], + timezone: 'America/New_York', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['div.article-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var FortuneComExtractor = { domain: 'fortune.com', - title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: [['meta[name="author"]', 'value']] + selectors: [['meta[name="author"]', 'value']], }, - date_published: { selectors: ['.MblGHNMJ'], - - timezone: 'UTC' + timezone: 'UTC', }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['picture', 'article.row'], 'article.row'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var WwwLinkedinComExtractor = { domain: 'www.linkedin.com', - title: { - selectors: ['.article-title', 'h1'] + selectors: ['.article-title', 'h1'], }, - author: { - selectors: [['meta[name="article:author"]', 'value'], '.entity-name a[rel=author]'] + selectors: [ + ['meta[name="article:author"]', 'value'], + '.entity-name a[rel=author]', + ], }, - date_published: { selectors: [['time[itemprop="datePublished"]', 'datetime']], - - timezone: 'America/Los_Angeles' + timezone: 'America/Los_Angeles', }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['header figure', '.prose'], '.prose'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.entity-image'] - } + clean: ['.entity-image'], + }, }; var ObamawhitehouseArchivesGovExtractor = { domain: 'obamawhitehouse.archives.gov', - supportedDomains: ['whitehouse.gov'], - title: { - selectors: ['h1', '.pane-node-title'] + selectors: ['h1', '.pane-node-title'], }, - author: { - selectors: ['.blog-author-link', '.node-person-name-link'] + selectors: ['.blog-author-link', '.node-person-name-link'], }, - date_published: { - selectors: [['meta[name="article:published_time"]', 'value']] + selectors: [['meta[name="article:published_time"]', 'value']], }, - dek: { - selectors: ['.field-name-field-forall-summary'] + selectors: ['.field-name-field-forall-summary'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { defaultCleaner: false, - selectors: ['div#content-start', '.pane-node-field-forall-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.pane-node-title', '.pane-custom.pane-1'] - } + clean: ['.pane-node-title', '.pane-custom.pane-1'], + }, }; var WwwOpposingviewsComExtractor = { domain: 'www.opposingviews.com', - title: { - selectors: ['h1.title'] + selectors: ['h1.title'], }, - author: { - selectors: ['div.date span span a'] + selectors: ['div.date span span a'], }, - date_published: { - selectors: [['meta[name="publish_date"]', 'value']] + selectors: [['meta[name="publish_date"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.show-for-small-only'] - } + clean: ['.show-for-small-only'], + }, }; var WwwProspectmagazineCoUkExtractor = { domain: 'www.prospectmagazine.co.uk', - title: { - selectors: ['.page-title'] + selectors: ['.page-title'], }, - author: { - selectors: ['.aside_author .title'] + selectors: ['.aside_author .title'], }, - date_published: { selectors: ['.post-info'], - - timezone: 'Europe/London' + timezone: 'Europe/London', }, - dek: { - selectors: ['.page-subtitle'] + selectors: ['.page-subtitle'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [ - // ['article.type-post div.post_content p'], - 'article .post_content'], - + // ['article.type-post div.post_content p'], + 'article .post_content', + ], // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; var ForwardComExtractor = { domain: 'forward.com', - title: { - selectors: [['meta[name="og:title"]', 'value']] + selectors: [['meta[name="og:title"]', 'value']], }, - author: { - selectors: ['.author-name', ['meta[name="sailthru.author"]', 'value']] + selectors: ['.author-name', ['meta[name="sailthru.author"]', 'value']], }, - date_published: { - selectors: [['meta[name="date"]', 'value']] + selectors: [['meta[name="date"]', 'value']], }, - dek: { selectors: [ // enter selectors - ] + ], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.post-item-media-wrap', '.post-item p']], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.donate-box', '.message', '.subtitle'] - } + clean: ['.donate-box', '.message', '.subtitle'], + }, }; var WwwQdailyComExtractor = { domain: 'www.qdaily.com', - title: { - selectors: ['h2', 'h2.title'] + selectors: ['h2', 'h2.title'], }, - author: { - selectors: ['.name'] + selectors: ['.name'], }, - date_published: { - selectors: [['.date.smart-date', 'data-origindate']] + selectors: [['.date.smart-date', 'data-origindate']], }, - dek: { - selectors: ['.excerpt'] + selectors: ['.excerpt'], }, - lead_image_url: { - selectors: [['.article-detail-hd img', 'src']] + selectors: [['.article-detail-hd img', 'src']], }, - content: { selectors: ['.detail'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.lazyload', '.lazylad', '.lazylood'] - } + clean: ['.lazyload', '.lazylad', '.lazylood'], + }, }; var GothamistComExtractor = { domain: 'gothamist.com', - - supportedDomains: ['chicagoist.com', 'laist.com', 'sfist.com', 'shanghaiist.com', 'dcist.com'], - + supportedDomains: [ + 'chicagoist.com', + 'laist.com', + 'sfist.com', + 'shanghaiist.com', + 'dcist.com', + ], title: { - selectors: ['h1', '.entry-header h1'] + selectors: ['h1', '.entry-header h1'], }, - author: { - selectors: ['.author'] + selectors: ['.author'], }, - date_published: { selectors: ['abbr', 'abbr.published'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: [null] + selectors: [null], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.entry-body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { @@ -5469,294 +5174,276 @@ var GothamistComExtractor = { 'div.image-left': 'figure', '.image-left i': 'figcaption', 'div.image-right': 'figure', - '.image-right i': 'figcaption' + '.image-right i': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.image-none br', '.image-left br', '.image-right br', '.galleryEase'] - } + clean: [ + '.image-none br', + '.image-left br', + '.image-right br', + '.galleryEase', + ], + }, }; var WwwFoolComExtractor = { domain: 'www.fool.com', - title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: ['.author-inline .author-name'] + selectors: ['.author-inline .author-name'], }, - date_published: { - selectors: [['meta[name="date"]', 'value']] + selectors: [['meta[name="date"]', 'value']], }, - dek: { - selectors: ['header h2'] + selectors: ['header h2'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.article-content'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: { '.caption img': function captionImg($node) { var src = $node.attr('src'); - $node.parent().replaceWith('
'); + $node + .parent() + .replaceWith('
')); }, - '.caption': 'figcaption' + '.caption': 'figcaption', }, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['#pitch'] - } + clean: ['#pitch'], + }, }; var WwwSlateComExtractor = { domain: 'www.slate.com', - title: { - selectors: ['.hed', 'h1'] + selectors: ['.hed', 'h1'], }, - author: { - selectors: ['a[rel=author]'] + selectors: ['a[rel=author]'], }, - date_published: { selectors: ['.pub-date'], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: ['.dek'] + selectors: ['.dek'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: ['.body'], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: ['.about-the-author', '.pullquote', '.newsletter-signup-component', '.top-comment'] - } + clean: [ + '.about-the-author', + '.pullquote', + '.newsletter-signup-component', + '.top-comment', + ], + }, }; var IciRadioCanadaCaExtractor = { domain: 'ici.radio-canada.ca', - title: { - selectors: ['h1'] + selectors: ['h1'], }, - author: { - selectors: [['meta[name="dc.creator"]', 'value']] + selectors: [['meta[name="dc.creator"]', 'value']], }, - date_published: { selectors: [['meta[name="dc.date.created"]', 'value']], - - timezone: 'America/New_York' + timezone: 'America/New_York', }, - dek: { - selectors: ['.bunker-component.lead'] + selectors: ['.bunker-component.lead'], }, - lead_image_url: { - selectors: [['meta[name="og:image"]', 'value']] + selectors: [['meta[name="og:image"]', 'value']], }, - content: { selectors: [['.main-multimedia-item', '.news-story-content']], - // Is there anything in the content you selected that needs transformed // before it's consumable content? E.g., unusual lazy loaded images transforms: {}, - // Is there anything that is in the result that shouldn't be? // The clean selectors will remove anything that matches from // the result - clean: [] - } + clean: [], + }, }; - - -var CustomExtractors = Object.freeze({ - BloggerExtractor: BloggerExtractor, - NYMagExtractor: NYMagExtractor, - WikipediaExtractor: WikipediaExtractor, - TwitterExtractor: TwitterExtractor, - NYTimesExtractor: NYTimesExtractor, - TheAtlanticExtractor: TheAtlanticExtractor, - NewYorkerExtractor: NewYorkerExtractor, - WiredExtractor: WiredExtractor, - MSNExtractor: MSNExtractor, - YahooExtractor: YahooExtractor, - BuzzfeedExtractor: BuzzfeedExtractor, - WikiaExtractor: WikiaExtractor, - LittleThingsExtractor: LittleThingsExtractor, - PoliticoExtractor: PoliticoExtractor, - DeadspinExtractor: DeadspinExtractor, - BroadwayWorldExtractor: BroadwayWorldExtractor, - ApartmentTherapyExtractor: ApartmentTherapyExtractor, - MediumExtractor: MediumExtractor, - WwwTmzComExtractor: WwwTmzComExtractor, - WwwWashingtonpostComExtractor: WwwWashingtonpostComExtractor, - WwwHuffingtonpostComExtractor: WwwHuffingtonpostComExtractor, - NewrepublicComExtractor: NewrepublicComExtractor, - MoneyCnnComExtractor: MoneyCnnComExtractor, - WwwThevergeComExtractor: WwwThevergeComExtractor, - WwwCnnComExtractor: WwwCnnComExtractor, - WwwAolComExtractor: WwwAolComExtractor, - WwwYoutubeComExtractor: WwwYoutubeComExtractor, - WwwTheguardianComExtractor: WwwTheguardianComExtractor, - WwwSbnationComExtractor: WwwSbnationComExtractor, - WwwBloombergComExtractor: WwwBloombergComExtractor, - WwwBustleComExtractor: WwwBustleComExtractor, - WwwNprOrgExtractor: WwwNprOrgExtractor, - WwwRecodeNetExtractor: WwwRecodeNetExtractor, - QzComExtractor: QzComExtractor, - WwwDmagazineComExtractor: WwwDmagazineComExtractor, - WwwReutersComExtractor: WwwReutersComExtractor, - MashableComExtractor: MashableComExtractor, - WwwChicagotribuneComExtractor: WwwChicagotribuneComExtractor, - WwwVoxComExtractor: WwwVoxComExtractor, - NewsNationalgeographicComExtractor: NewsNationalgeographicComExtractor, - WwwNationalgeographicComExtractor: WwwNationalgeographicComExtractor, - WwwLatimesComExtractor: WwwLatimesComExtractor, - PagesixComExtractor: PagesixComExtractor, - ThefederalistpapersOrgExtractor: ThefederalistpapersOrgExtractor, - WwwCbssportsComExtractor: WwwCbssportsComExtractor, - WwwMsnbcComExtractor: WwwMsnbcComExtractor, - WwwThepoliticalinsiderComExtractor: WwwThepoliticalinsiderComExtractor, - WwwMentalflossComExtractor: WwwMentalflossComExtractor, - AbcnewsGoComExtractor: AbcnewsGoComExtractor, - WwwNydailynewsComExtractor: WwwNydailynewsComExtractor, - WwwCnbcComExtractor: WwwCnbcComExtractor, - WwwPopsugarComExtractor: WwwPopsugarComExtractor, - ObserverComExtractor: ObserverComExtractor, - PeopleComExtractor: PeopleComExtractor, - WwwUsmagazineComExtractor: WwwUsmagazineComExtractor, - WwwRollingstoneComExtractor: WwwRollingstoneComExtractor, - twofortysevensportsComExtractor: twofortysevensportsComExtractor, - UproxxComExtractor: UproxxComExtractor, - WwwEonlineComExtractor: WwwEonlineComExtractor, - WwwMiamiheraldComExtractor: WwwMiamiheraldComExtractor, - WwwRefinery29ComExtractor: WwwRefinery29ComExtractor, - WwwMacrumorsComExtractor: WwwMacrumorsComExtractor, - WwwAndroidcentralComExtractor: WwwAndroidcentralComExtractor, - WwwSiComExtractor: WwwSiComExtractor, - WwwRawstoryComExtractor: WwwRawstoryComExtractor, - WwwCnetComExtractor: WwwCnetComExtractor, - WwwCinemablendComExtractor: WwwCinemablendComExtractor, - WwwTodayComExtractor: WwwTodayComExtractor, - WwwHowtogeekComExtractor: WwwHowtogeekComExtractor, - WwwAlComExtractor: WwwAlComExtractor, - WwwThepennyhoarderComExtractor: WwwThepennyhoarderComExtractor, - WwwWesternjournalismComExtractor: WwwWesternjournalismComExtractor, - FusionNetExtractor: FusionNetExtractor, - WwwAmericanowComExtractor: WwwAmericanowComExtractor, - ScienceflyComExtractor: ScienceflyComExtractor, - HellogigglesComExtractor: HellogigglesComExtractor, - ThoughtcatalogComExtractor: ThoughtcatalogComExtractor, - WwwNjComExtractor: WwwNjComExtractor, - WwwInquisitrComExtractor: WwwInquisitrComExtractor, - WwwNbcnewsComExtractor: WwwNbcnewsComExtractor, - FortuneComExtractor: FortuneComExtractor, - WwwLinkedinComExtractor: WwwLinkedinComExtractor, - ObamawhitehouseArchivesGovExtractor: ObamawhitehouseArchivesGovExtractor, - WwwOpposingviewsComExtractor: WwwOpposingviewsComExtractor, - WwwProspectmagazineCoUkExtractor: WwwProspectmagazineCoUkExtractor, - ForwardComExtractor: ForwardComExtractor, - WwwQdailyComExtractor: WwwQdailyComExtractor, - GothamistComExtractor: GothamistComExtractor, - WwwFoolComExtractor: WwwFoolComExtractor, - WwwSlateComExtractor: WwwSlateComExtractor, - IciRadioCanadaCaExtractor: IciRadioCanadaCaExtractor +var CustomExtractors = /*#__PURE__*/ Object.freeze({ + BloggerExtractor: BloggerExtractor, + NYMagExtractor: NYMagExtractor, + WikipediaExtractor: WikipediaExtractor, + TwitterExtractor: TwitterExtractor, + NYTimesExtractor: NYTimesExtractor, + TheAtlanticExtractor: TheAtlanticExtractor, + NewYorkerExtractor: NewYorkerExtractor, + WiredExtractor: WiredExtractor, + MSNExtractor: MSNExtractor, + YahooExtractor: YahooExtractor, + BuzzfeedExtractor: BuzzfeedExtractor, + WikiaExtractor: WikiaExtractor, + LittleThingsExtractor: LittleThingsExtractor, + PoliticoExtractor: PoliticoExtractor, + DeadspinExtractor: DeadspinExtractor, + BroadwayWorldExtractor: BroadwayWorldExtractor, + ApartmentTherapyExtractor: ApartmentTherapyExtractor, + MediumExtractor: MediumExtractor, + WwwTmzComExtractor: WwwTmzComExtractor, + WwwWashingtonpostComExtractor: WwwWashingtonpostComExtractor, + WwwHuffingtonpostComExtractor: WwwHuffingtonpostComExtractor, + NewrepublicComExtractor: NewrepublicComExtractor, + MoneyCnnComExtractor: MoneyCnnComExtractor, + WwwThevergeComExtractor: WwwThevergeComExtractor, + WwwCnnComExtractor: WwwCnnComExtractor, + WwwAolComExtractor: WwwAolComExtractor, + WwwYoutubeComExtractor: WwwYoutubeComExtractor, + WwwTheguardianComExtractor: WwwTheguardianComExtractor, + WwwSbnationComExtractor: WwwSbnationComExtractor, + WwwBloombergComExtractor: WwwBloombergComExtractor, + WwwBustleComExtractor: WwwBustleComExtractor, + WwwNprOrgExtractor: WwwNprOrgExtractor, + WwwRecodeNetExtractor: WwwRecodeNetExtractor, + QzComExtractor: QzComExtractor, + WwwDmagazineComExtractor: WwwDmagazineComExtractor, + WwwReutersComExtractor: WwwReutersComExtractor, + MashableComExtractor: MashableComExtractor, + WwwChicagotribuneComExtractor: WwwChicagotribuneComExtractor, + WwwVoxComExtractor: WwwVoxComExtractor, + NewsNationalgeographicComExtractor: NewsNationalgeographicComExtractor, + WwwNationalgeographicComExtractor: WwwNationalgeographicComExtractor, + WwwLatimesComExtractor: WwwLatimesComExtractor, + PagesixComExtractor: PagesixComExtractor, + ThefederalistpapersOrgExtractor: ThefederalistpapersOrgExtractor, + WwwCbssportsComExtractor: WwwCbssportsComExtractor, + WwwMsnbcComExtractor: WwwMsnbcComExtractor, + WwwThepoliticalinsiderComExtractor: WwwThepoliticalinsiderComExtractor, + WwwMentalflossComExtractor: WwwMentalflossComExtractor, + AbcnewsGoComExtractor: AbcnewsGoComExtractor, + WwwNydailynewsComExtractor: WwwNydailynewsComExtractor, + WwwCnbcComExtractor: WwwCnbcComExtractor, + WwwPopsugarComExtractor: WwwPopsugarComExtractor, + ObserverComExtractor: ObserverComExtractor, + PeopleComExtractor: PeopleComExtractor, + WwwUsmagazineComExtractor: WwwUsmagazineComExtractor, + WwwRollingstoneComExtractor: WwwRollingstoneComExtractor, + twofortysevensportsComExtractor: twofortysevensportsComExtractor, + UproxxComExtractor: UproxxComExtractor, + WwwEonlineComExtractor: WwwEonlineComExtractor, + WwwMiamiheraldComExtractor: WwwMiamiheraldComExtractor, + WwwRefinery29ComExtractor: WwwRefinery29ComExtractor, + WwwMacrumorsComExtractor: WwwMacrumorsComExtractor, + WwwAndroidcentralComExtractor: WwwAndroidcentralComExtractor, + WwwSiComExtractor: WwwSiComExtractor, + WwwRawstoryComExtractor: WwwRawstoryComExtractor, + WwwCnetComExtractor: WwwCnetComExtractor, + WwwCinemablendComExtractor: WwwCinemablendComExtractor, + WwwTodayComExtractor: WwwTodayComExtractor, + WwwHowtogeekComExtractor: WwwHowtogeekComExtractor, + WwwAlComExtractor: WwwAlComExtractor, + WwwThepennyhoarderComExtractor: WwwThepennyhoarderComExtractor, + WwwWesternjournalismComExtractor: WwwWesternjournalismComExtractor, + FusionNetExtractor: FusionNetExtractor, + WwwAmericanowComExtractor: WwwAmericanowComExtractor, + ScienceflyComExtractor: ScienceflyComExtractor, + HellogigglesComExtractor: HellogigglesComExtractor, + ThoughtcatalogComExtractor: ThoughtcatalogComExtractor, + WwwNjComExtractor: WwwNjComExtractor, + WwwInquisitrComExtractor: WwwInquisitrComExtractor, + WwwNbcnewsComExtractor: WwwNbcnewsComExtractor, + FortuneComExtractor: FortuneComExtractor, + WwwLinkedinComExtractor: WwwLinkedinComExtractor, + ObamawhitehouseArchivesGovExtractor: ObamawhitehouseArchivesGovExtractor, + WwwOpposingviewsComExtractor: WwwOpposingviewsComExtractor, + WwwProspectmagazineCoUkExtractor: WwwProspectmagazineCoUkExtractor, + ForwardComExtractor: ForwardComExtractor, + WwwQdailyComExtractor: WwwQdailyComExtractor, + GothamistComExtractor: GothamistComExtractor, + WwwFoolComExtractor: WwwFoolComExtractor, + WwwSlateComExtractor: WwwSlateComExtractor, + IciRadioCanadaCaExtractor: IciRadioCanadaCaExtractor, }); -var Extractors = _Object$keys(CustomExtractors).reduce(function (acc, key) { +var Extractors = _Object$keys(CustomExtractors).reduce(function(acc, key) { var extractor = CustomExtractors[key]; - return _extends({}, acc, mergeSupportedDomains(extractor)); + return _objectSpread({}, acc, mergeSupportedDomains(extractor)); }, {}); // CLEAN AUTHOR CONSTANTS -var CLEAN_AUTHOR_RE = /^\s*(posted |written )?by\s*:?\s*(.*)/i; -// author = re.sub(r'^\s*(posted |written )?by\s*:?\s*(.*)(?i)', - +var CLEAN_AUTHOR_RE = /^\s*(posted |written )?by\s*:?\s*(.*)/i; // author = re.sub(r'^\s*(posted |written )?by\s*:?\s*(.*)(?i)', // CLEAN DEK CONSTANTS -var TEXT_LINK_RE = new RegExp('http(s)?://', 'i'); -// An ordered list of meta tag names that denote likely article deks. -// From most distinct to least distinct. -// -// NOTE: There are currently no meta tags that seem to provide the right -// content consistenty enough. Two options were: -// - og:description -// - dc.description -// However, these tags often have SEO-specific junk in them that's not -// header-worthy like a dek is. Excerpt material at best. - - -// An ordered list of Selectors to find likely article deks. From -// most explicit to least explicit. -// -// Should be more restrictive than not, as a failed dek can be pretty -// detrimental to the aesthetics of an article. +var TEXT_LINK_RE = new RegExp('http(s)?://', 'i'); // An ordered list of meta tag names that denote likely article deks. -// CLEAN DATE PUBLISHED CONSTANTS var MS_DATE_STRING = /^\d{13}$/i; var SEC_DATE_STRING = /^\d{10}$/i; var CLEAN_DATE_STRING_RE = /^\s*published\s*:?\s*(.*)/i; var TIME_MERIDIAN_SPACE_RE = /(.*\d)(am|pm)(.*)/i; var TIME_MERIDIAN_DOTS_RE = /\.m\./i; -var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; +var months = [ + 'jan', + 'feb', + 'mar', + 'apr', + 'may', + 'jun', + 'jul', + 'aug', + 'sep', + 'oct', + 'nov', + 'dec', +]; var allMonths = months.join('|'); var timestamp1 = '[0-9]{1,2}:[0-9]{2,2}( ?[ap].?m.?)?'; var timestamp2 = '[0-9]{1,2}[/-][0-9]{1,2}[/-][0-9]{2,4}'; var timestamp3 = '-[0-9]{3,4}$'; -var SPLIT_DATE_STRING = new RegExp('(' + timestamp1 + ')|(' + timestamp2 + ')|(' + timestamp3 + ')|([0-9]{1,4})|(' + allMonths + ')', 'ig'); - -// 2016-11-22T08:57-500 +var SPLIT_DATE_STRING = new RegExp( + '(' + .concat(timestamp1, ')|(') + .concat(timestamp2, ')|(') + .concat(timestamp3, ')|([0-9]{1,4})|(') + .concat(allMonths, ')'), + 'ig' +); // 2016-11-22T08:57-500 // Check if datetime string has an offset at the end -var TIME_WITH_OFFSET_RE = /-\d{3,4}$/; -// CLEAN TITLE CONSTANTS +var TIME_WITH_OFFSET_RE = /-\d{3,4}$/; // CLEAN TITLE CONSTANTS // A regular expression that will match separating characters on a // title, that usually denote breadcrumbs or something similar. -var TITLE_SPLITTERS_RE = /(: | - | \| )/g; +var TITLE_SPLITTERS_RE = /(: | - | \| )/g; var DOMAIN_ENDINGS_RE = new RegExp('.com$|.net$|.org$|.co.uk$', 'g'); -// Take an author string (like 'By David Smith ') and clean it to // just the name(s): 'David Smith'. + function cleanAuthor(author) { return normalizeSpaces(author.replace(CLEAN_AUTHOR_RE, '$2').trim()); } function clean$1(leadImageUrl) { leadImageUrl = leadImageUrl.trim(); + if (validUrl.isWebUri(leadImageUrl)) { return leadImageUrl; } @@ -5764,53 +5451,51 @@ function clean$1(leadImageUrl) { return null; } -// Take a dek HTML fragment, and return the cleaned version of it. // Return None if the dek wasn't good enough. + function cleanDek(dek, _ref) { var $ = _ref.$, - excerpt = _ref.excerpt; - + excerpt = _ref.excerpt; // Sanity check that we didn't get too short or long of a dek. - if (dek.length > 1000 || dek.length < 5) return null; + if (dek.length > 1000 || dek.length < 5) return null; // Check that dek isn't the same as excerpt - // Check that dek isn't the same as excerpt - if (excerpt && excerptContent(excerpt, 10) === excerptContent(dek, 10)) return null; - - var dekText = stripTags(dek, $); - - // Plain text links shouldn't exist in the dek. If we have some, it's + if (excerpt && excerptContent(excerpt, 10) === excerptContent(dek, 10)) + return null; + var dekText = stripTags(dek, $); // Plain text links shouldn't exist in the dek. If we have some, it's // not a good dek - bail. - if (TEXT_LINK_RE.test(dekText)) return null; + if (TEXT_LINK_RE.test(dekText)) return null; return normalizeSpaces(dekText.trim()); } -// Is there a compelling reason to use moment here? -// Mostly only being used for the isValid() method, -// but could just check for 'Invalid Date' string. - function cleanDateString(dateString) { - return (dateString.match(SPLIT_DATE_STRING) || []).join(' ').replace(TIME_MERIDIAN_DOTS_RE, 'm').replace(TIME_MERIDIAN_SPACE_RE, '$1 $2 $3').replace(CLEAN_DATE_STRING_RE, '$1').trim(); + return (dateString.match(SPLIT_DATE_STRING) || []) + .join(' ') + .replace(TIME_MERIDIAN_DOTS_RE, 'm') + .replace(TIME_MERIDIAN_SPACE_RE, '$1 $2 $3') + .replace(CLEAN_DATE_STRING_RE, '$1') + .trim(); } - function createDate(dateString, timezone, format) { if (TIME_WITH_OFFSET_RE.test(dateString)) { return moment(new Date(dateString)); } - return timezone ? moment.tz(dateString, format || parseFormat(dateString), timezone) : moment(dateString, format || parseFormat(dateString)); -} - -// Take a date published string, and hopefully return a date out of + return timezone + ? moment.tz(dateString, format || parseFormat(dateString), timezone) + : moment(dateString, format || parseFormat(dateString)); +} // Take a date published string, and hopefully return a date out of // it. Return none if we fail. + function cleanDatePublished(dateString) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - timezone = _ref.timezone, - format = _ref.format; + var _ref = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + timezone = _ref.timezone, + format = _ref.format; // If string is in milliseconds or seconds, convert to int and return if (MS_DATE_STRING.test(dateString) || SEC_DATE_STRING.test(dateString)) { - return new Date(parseInt(dateString, 10)).toISOString(); + return new Date(_parseInt(dateString, 10)).toISOString(); } var date = createDate(dateString, timezone, format); @@ -5823,83 +5508,72 @@ function cleanDatePublished(dateString) { return date.isValid() ? date.toISOString() : null; } -// Clean our article content, returning a new, cleaned node. function extractCleanNode(article, _ref) { var $ = _ref.$, - _ref$cleanConditional = _ref.cleanConditionally, - cleanConditionally = _ref$cleanConditional === undefined ? true : _ref$cleanConditional, - _ref$title = _ref.title, - title = _ref$title === undefined ? '' : _ref$title, - _ref$url = _ref.url, - url = _ref$url === undefined ? '' : _ref$url, - _ref$defaultCleaner = _ref.defaultCleaner, - defaultCleaner = _ref$defaultCleaner === undefined ? true : _ref$defaultCleaner; - + _ref$cleanConditional = _ref.cleanConditionally, + cleanConditionally = + _ref$cleanConditional === void 0 ? true : _ref$cleanConditional, + _ref$title = _ref.title, + title = _ref$title === void 0 ? '' : _ref$title, + _ref$url = _ref.url, + url = _ref$url === void 0 ? '' : _ref$url, + _ref$defaultCleaner = _ref.defaultCleaner, + defaultCleaner = + _ref$defaultCleaner === void 0 ? true : _ref$defaultCleaner; // Rewrite the tag name to div if it's a top level node like body or // html to avoid later complications with multiple body tags. - rewriteTopLevel$$1(article, $); - - // Drop small images and spacer images + rewriteTopLevel$$1(article, $); // Drop small images and spacer images // Only do this is defaultCleaner is set to true; // this can sometimes be too aggressive. - if (defaultCleaner) cleanImages(article, $); - // Make links absolute - makeLinksAbsolute$$1(article, $, url); + if (defaultCleaner) cleanImages(article, $); // Make links absolute - // Mark elements to keep that would normally be removed. + makeLinksAbsolute$$1(article, $, url); // Mark elements to keep that would normally be removed. // E.g., stripJunkTags will remove iframes, so we're going to mark // YouTube/Vimeo videos as elements we want to keep. - markToKeep(article, $, url); - // Drop certain tags like , etc + markToKeep(article, $, url); // Drop certain tags like <title>, etc // This is -mostly- for cleanliness, not security. - stripJunkTags(article, $); - // H1 tags are typically the article title, which should be extracted + stripJunkTags(article, $); // H1 tags are typically the article title, which should be extracted // by the title extractor instead. If there's less than 3 of them (<3), // strip them. Otherwise, turn 'em into H2s. - cleanHOnes$$1(article, $); - // Clean headers - cleanHeaders(article, $, title); + cleanHOnes$$1(article, $); // Clean headers - // We used to clean UL's and OL's here, but it was leading to + cleanHeaders(article, $, title); // We used to clean UL's and OL's here, but it was leading to // too many in-article lists being removed. Consider a better // way to detect menus particularly and remove them. // Also optionally running, since it can be overly aggressive. - if (defaultCleaner) cleanTags$$1(article, $, cleanConditionally); - // Remove empty paragraph nodes - removeEmpty(article, $); + if (defaultCleaner) cleanTags$$1(article, $, cleanConditionally); // Remove empty paragraph nodes - // Remove unnecessary attributes - cleanAttributes$$1(article, $); + removeEmpty(article, $); // Remove unnecessary attributes + cleanAttributes$$1(article, $); return article; } function cleanTitle$$1(title, _ref) { var url = _ref.url, - $ = _ref.$; + $ = _ref.$; // If title has |, :, or - in it, see if // we can clean it up. if (TITLE_SPLITTERS_RE.test(title)) { title = resolveSplitTitle(title, url); - } - - // Final sanity check that we didn't get a crazy title. + } // Final sanity check that we didn't get a crazy title. // if (title.length > 150 || title.length < 15) { + if (title.length > 150) { // If we did, return h1 from the document if it exists var h1 = $('h1'); + if (h1.length === 1) { title = h1.text(); } - } + } // strip any html tags in the title text - // strip any html tags in the title text return normalizeSpaces(stripTags(title, $).trim()); } @@ -5908,53 +5582,45 @@ function extractBreadcrumbTitle(splitTitle, text) { // The Best Gadgets on Earth : Bits : Blogs : NYTimes.com // NYTimes - Blogs - Bits - The Best Gadgets on Earth if (splitTitle.length >= 6) { - var _ret = function () { - // Look to see if we can find a breadcrumb splitter that happens - // more than once. If we can, we'll be able to better pull out - // the title. - var termCounts = splitTitle.reduce(function (acc, titleText) { - acc[titleText] = acc[titleText] ? acc[titleText] + 1 : 1; - return acc; - }, {}); - - var _Reflect$ownKeys$redu = _Reflect$ownKeys(termCounts).reduce(function (acc, key) { - if (acc[1] < termCounts[key]) { - return [key, termCounts[key]]; - } - - return acc; - }, [0, 0]), - _Reflect$ownKeys$redu2 = _slicedToArray(_Reflect$ownKeys$redu, 2), - maxTerm = _Reflect$ownKeys$redu2[0], - termCount = _Reflect$ownKeys$redu2[1]; - - // We found a splitter that was used more than once, so it - // is probably the breadcrumber. Split our title on that instead. - // Note: max_term should be <= 4 characters, so that " >> " - // will match, but nothing longer than that. - + // Look to see if we can find a breadcrumb splitter that happens + // more than once. If we can, we'll be able to better pull out + // the title. + var termCounts = splitTitle.reduce(function(acc, titleText) { + acc[titleText] = acc[titleText] ? acc[titleText] + 1 : 1; + return acc; + }, {}); - if (termCount >= 2 && maxTerm.length <= 4) { - splitTitle = text.split(maxTerm); - } + var _Reflect$ownKeys$redu = _Reflect$ownKeys(termCounts).reduce( + function(acc, key) { + if (acc[1] < termCounts[key]) { + return [key, termCounts[key]]; + } - var splitEnds = [splitTitle[0], splitTitle.slice(-1)]; - var longestEnd = splitEnds.reduce(function (acc, end) { - return acc.length > end.length ? acc : end; - }, ''); + return acc; + }, + [0, 0] + ), + _Reflect$ownKeys$redu2 = _slicedToArray(_Reflect$ownKeys$redu, 2), + maxTerm = _Reflect$ownKeys$redu2[0], + termCount = _Reflect$ownKeys$redu2[1]; // We found a splitter that was used more than once, so it + // is probably the breadcrumber. Split our title on that instead. + // Note: max_term should be <= 4 characters, so that " >> " + // will match, but nothing longer than that. + + if (termCount >= 2 && maxTerm.length <= 4) { + splitTitle = text.split(maxTerm); + } - if (longestEnd.length > 10) { - return { - v: longestEnd - }; - } + var splitEnds = [splitTitle[0], splitTitle.slice(-1)]; + var longestEnd = splitEnds.reduce(function(acc, end) { + return acc.length > end.length ? acc : end; + }, ''); - return { - v: text - }; - }(); + if (longestEnd.length > 10) { + return longestEnd; + } - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + return text; } return null; @@ -5968,10 +5634,9 @@ function cleanDomainFromTitle(splitTitle, url) { // Strip out the big TLDs - it just makes the matching a bit more // accurate. Not the end of the world if it doesn't strip right. var _URL$parse = URL.parse(url), - host = _URL$parse.host; + host = _URL$parse.host; var nakedDomain = host.replace(DOMAIN_ENDINGS_RE, ''); - var startSlug = splitTitle[0].toLowerCase().replace(' ', ''); var startSlugRatio = wuzzy.levenshtein(startSlug, nakedDomain); @@ -5979,7 +5644,10 @@ function cleanDomainFromTitle(splitTitle, url) { return splitTitle.slice(2).join(''); } - var endSlug = splitTitle.slice(-1)[0].toLowerCase().replace(' ', ''); + var endSlug = splitTitle + .slice(-1)[0] + .toLowerCase() + .replace(' ', ''); var endSlugRatio = wuzzy.levenshtein(endSlug, nakedDomain); if (endSlugRatio > 0.4 && endSlug.length >= 5) { @@ -5987,28 +5655,26 @@ function cleanDomainFromTitle(splitTitle, url) { } return null; -} - -// Given a title with separators in it (colons, dashes, etc), +} // Given a title with separators in it (colons, dashes, etc), // resolve whether any of the segments should be removed. -function resolveSplitTitle(title) { - var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; +function resolveSplitTitle(title) { + var url = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; // Splits while preserving splitters, like: // ['The New New York', ' - ', 'The Washington Post'] var splitTitle = title.split(TITLE_SPLITTERS_RE); + if (splitTitle.length === 1) { return title; } var newTitle = extractBreadcrumbTitle(splitTitle, title); if (newTitle) return newTitle; - newTitle = cleanDomainFromTitle(splitTitle, url); - if (newTitle) return newTitle; - - // Fuzzy ratio didn't find anything, so this title is probably legit. + if (newTitle) return newTitle; // Fuzzy ratio didn't find anything, so this title is probably legit. // Just return it all. + return title; } @@ -6018,10 +5684,9 @@ var Cleaners = { dek: cleanDek, date_published: cleanDatePublished, content: extractCleanNode, - title: cleanTitle$$1 + title: cleanTitle$$1, }; -// Using a variety of scoring techniques, extract the content most // likely to be article text. // // If strip_unlikely_candidates is True, remove any elements that @@ -6032,12 +5697,12 @@ var Cleaners = { // worthiness of nodes. // // Returns a cheerio object $ + function extractBestNode($, opts) { // clone the node so we can get back to our // initial parsed state if needed // TODO Do I need this? – AP // let $root = $.root().clone() - if (opts.stripUnlikelyCandidates) { $ = stripUnlikelyCandidates($); } @@ -6045,7 +5710,6 @@ function extractBestNode($, opts) { $ = convertToParagraphs$$1($); $ = scoreContent$$1($, opts.weightNodes); var $topCandidate = findTopCandidate$$1($); - return $topCandidate; } @@ -6053,9 +5717,8 @@ var GenericContentExtractor = { defaultOpts: { stripUnlikelyCandidates: true, weightNodes: true, - cleanConditionally: true + cleanConditionally: true, }, - // Extract the content for this resource - initially, pass in our // most restrictive opts which will return the highest quality // content. On each failure, retry with slightly more lax opts. @@ -6077,37 +5740,39 @@ var GenericContentExtractor = { // superfluous content. Things like forms, ads, etc. extract: function extract(_ref, opts) { var $ = _ref.$, - html = _ref.html, - title = _ref.title, - url = _ref.url; - - opts = _extends({}, this.defaultOpts, opts); - - $ = $ || cheerio.load(html); - - // Cascade through our extraction-specific opts in an ordered fashion, + html = _ref.html, + title = _ref.title, + url = _ref.url; + opts = _objectSpread({}, this.defaultOpts, opts); + $ = $ || cheerio.load(html); // Cascade through our extraction-specific opts in an ordered fashion, // turning them off as we try to extract content. + var node = this.getContentNode($, title, url, opts); if (nodeIsSufficient(node)) { return this.cleanAndReturnNode(node, $); - } - - // We didn't succeed on first pass, one by one disable our + } // We didn't succeed on first pass, one by one disable our // extraction opts and try again. + // eslint-disable-next-line no-restricted-syntax + var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { - for (var _iterator = _getIterator(_Reflect$ownKeys(opts).filter(function (k) { - return opts[k] === true; - })), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for ( + var _iterator = _getIterator( + _Reflect$ownKeys(opts).filter(function(k) { + return opts[k] === true; + }) + ), + _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { var key = _step.value; - opts[key] = false; $ = cheerio.load(html); - node = this.getContentNode($, title, url, opts); if (nodeIsSufficient(node)) { @@ -6119,7 +5784,7 @@ var GenericContentExtractor = { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { @@ -6131,19 +5796,15 @@ var GenericContentExtractor = { return this.cleanAndReturnNode(node, $); }, - - // Get node given current options getContentNode: function getContentNode($, title, url, opts) { return extractCleanNode(extractBestNode($, opts), { $: $, cleanConditionally: opts.cleanConditionally, title: title, - url: url + url: url, }); }, - - // Once we got here, either we're at our last-resort node, or // we broke early. Make sure we at least have -something- before we // move forward. @@ -6152,68 +5813,101 @@ var GenericContentExtractor = { return null; } - return normalizeSpaces($.html(node)); - - // if return_type == "html": + return normalizeSpaces($.html(node)); // if return_type == "html": // return normalize_spaces(node_to_html(node)) // else: // return node - } + }, }; // TODO: It would be great if we could merge the meta and selector lists into // a list of objects, because we could then rank them better. For example, // .hentry .entry-title is far better suited than <meta title>. - // An ordered list of meta tag names that denote likely article titles. All // attributes should be lowercase for faster case-insensitive matching. From // most distinct to least distinct. -var STRONG_TITLE_META_TAGS = ['tweetmeme-title', 'dc.title', 'rbtitle', 'headline', 'title']; - -// og:title is weak because it typically contains context that we don't like, +var STRONG_TITLE_META_TAGS = [ + 'tweetmeme-title', + 'dc.title', + 'rbtitle', + 'headline', + 'title', +]; // og:title is weak because it typically contains context that we don't like, // for example the source site's name. Gotta get that brand into facebook! -var WEAK_TITLE_META_TAGS = ['og:title']; -// An ordered list of XPath Selectors to find likely article titles. From +var WEAK_TITLE_META_TAGS = ['og:title']; // An ordered list of XPath Selectors to find likely article titles. From // most explicit to least explicit. // // Note - this does not use classes like CSS. This checks to see if the string // exists in the className, which is not as accurate as .className (which // splits on spaces/endlines), but for our purposes it's close enough. The // speed tradeoff is worth the accuracy hit. -var STRONG_TITLE_SELECTORS = ['.hentry .entry-title', 'h1#articleHeader', 'h1.articleHeader', 'h1.article', '.instapaper_title', '#meebo-title']; -var WEAK_TITLE_SELECTORS = ['article h1', '#entry-title', '.entry-title', '#entryTitle', '#entrytitle', '.entryTitle', '.entrytitle', '#articleTitle', '.articleTitle', 'post post-title', 'h1.title', 'h2.article', 'h1', 'html head title', 'title']; +var STRONG_TITLE_SELECTORS = [ + '.hentry .entry-title', + 'h1#articleHeader', + 'h1.articleHeader', + 'h1.article', + '.instapaper_title', + '#meebo-title', +]; +var WEAK_TITLE_SELECTORS = [ + 'article h1', + '#entry-title', + '.entry-title', + '#entryTitle', + '#entrytitle', + '.entryTitle', + '.entrytitle', + '#articleTitle', + '.articleTitle', + 'post post-title', + 'h1.title', + 'h2.article', + 'h1', + 'html head title', + 'title', +]; var GenericTitleExtractor = { extract: function extract(_ref) { var $ = _ref.$, - url = _ref.url, - metaCache = _ref.metaCache; - + url = _ref.url, + metaCache = _ref.metaCache; // First, check to see if we have a matching meta tag that we can make // use of that is strongly associated with the headline. - var title = void 0; - + var title; title = extractFromMeta$$1($, STRONG_TITLE_META_TAGS, metaCache); - if (title) return cleanTitle$$1(title, { url: url, $: $ }); - - // Second, look through our content selectors for the most likely + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Second, look through our content selectors for the most likely // article title that is strongly associated with the headline. + title = extractFromSelectors$$1($, STRONG_TITLE_SELECTORS); - if (title) return cleanTitle$$1(title, { url: url, $: $ }); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Third, check for weaker meta tags that may match. - // Third, check for weaker meta tags that may match. title = extractFromMeta$$1($, WEAK_TITLE_META_TAGS, metaCache); - if (title) return cleanTitle$$1(title, { url: url, $: $ }); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Last, look for weaker selector tags that may match. - // Last, look for weaker selector tags that may match. title = extractFromSelectors$$1($, WEAK_TITLE_SELECTORS); - if (title) return cleanTitle$$1(title, { url: url, $: $ }); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // If no matches, return an empty string - // If no matches, return an empty string return ''; - } + }, }; // An ordered list of meta tag names that denote likely article authors. All @@ -6222,62 +5916,95 @@ var GenericTitleExtractor = { // // Note: "author" is too often the -developer- of the page, so it is not // added here. -var AUTHOR_META_TAGS = ['byl', 'clmst', 'dc.author', 'dcsext.author', 'dc.creator', 'rbauthors', 'authors']; - -var AUTHOR_MAX_LENGTH = 300; - -// An ordered list of XPath Selectors to find likely article authors. From +var AUTHOR_META_TAGS = [ + 'byl', + 'clmst', + 'dc.author', + 'dcsext.author', + 'dc.creator', + 'rbauthors', + 'authors', +]; +var AUTHOR_MAX_LENGTH = 300; // An ordered list of XPath Selectors to find likely article authors. From // most explicit to least explicit. // // Note - this does not use classes like CSS. This checks to see if the string // exists in the className, which is not as accurate as .className (which // splits on spaces/endlines), but for our purposes it's close enough. The // speed tradeoff is worth the accuracy hit. -var AUTHOR_SELECTORS = ['.entry .entry-author', '.author.vcard .fn', '.author .vcard .fn', '.byline.vcard .fn', '.byline .vcard .fn', '.byline .by .author', '.byline .by', '.byline .author', '.post-author.vcard', '.post-author .vcard', 'a[rel=author]', '#by_author', '.by_author', '#entryAuthor', '.entryAuthor', '.byline a[href*=author]', '#author .authorname', '.author .authorname', '#author', '.author', '.articleauthor', '.ArticleAuthor', '.byline']; -// An ordered list of Selectors to find likely article authors, with +var AUTHOR_SELECTORS = [ + '.entry .entry-author', + '.author.vcard .fn', + '.author .vcard .fn', + '.byline.vcard .fn', + '.byline .vcard .fn', + '.byline .by .author', + '.byline .by', + '.byline .author', + '.post-author.vcard', + '.post-author .vcard', + 'a[rel=author]', + '#by_author', + '.by_author', + '#entryAuthor', + '.entryAuthor', + '.byline a[href*=author]', + '#author .authorname', + '.author .authorname', + '#author', + '.author', + '.articleauthor', + '.ArticleAuthor', + '.byline', +]; // An ordered list of Selectors to find likely article authors, with // regular expression for content. + var bylineRe = /^[\n\s]*By/i; var BYLINE_SELECTORS_RE = [['#byline', bylineRe], ['.byline', bylineRe]]; var GenericAuthorExtractor = { extract: function extract(_ref) { var $ = _ref.$, - metaCache = _ref.metaCache; - - var author = void 0; - - // First, check to see if we have a matching + metaCache = _ref.metaCache; + var author; // First, check to see if we have a matching // meta tag that we can make use of. + author = extractFromMeta$$1($, AUTHOR_META_TAGS, metaCache); + if (author && author.length < AUTHOR_MAX_LENGTH) { return cleanAuthor(author); - } + } // Second, look through our selectors looking for potential authors. - // Second, look through our selectors looking for potential authors. author = extractFromSelectors$$1($, AUTHOR_SELECTORS, 2); + if (author && author.length < AUTHOR_MAX_LENGTH) { return cleanAuthor(author); - } - - // Last, use our looser regular-expression based selectors for + } // Last, use our looser regular-expression based selectors for // potential authors. + // eslint-disable-next-line no-restricted-syntax + var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { - for (var _iterator = _getIterator(BYLINE_SELECTORS_RE), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for ( + var _iterator = _getIterator(BYLINE_SELECTORS_RE), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { var _ref4 = _step.value; var _ref3 = _slicedToArray(_ref4, 2); var selector = _ref3[0]; var regex = _ref3[1]; - var node = $(selector); + if (node.length === 1) { var text = node.text(); + if (regex.test(text)) { return cleanAuthor(text); } @@ -6288,7 +6015,7 @@ var GenericAuthorExtractor = { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { @@ -6299,58 +6026,91 @@ var GenericAuthorExtractor = { } return null; - } + }, }; // An ordered list of meta tag names that denote // likely date published dates. All attributes // should be lowercase for faster case-insensitive matching. // From most distinct to least distinct. -var DATE_PUBLISHED_META_TAGS = ['article:published_time', 'displaydate', 'dc.date', 'dc.date.issued', 'rbpubdate', 'publish_date', 'pub_date', 'pagedate', 'pubdate', 'revision_date', 'doc_date', 'date_created', 'content_create_date', 'lastmodified', 'created', 'date']; - -// An ordered list of XPath Selectors to find +var DATE_PUBLISHED_META_TAGS = [ + 'article:published_time', + 'displaydate', + 'dc.date', + 'dc.date.issued', + 'rbpubdate', + 'publish_date', + 'pub_date', + 'pagedate', + 'pubdate', + 'revision_date', + 'doc_date', + 'date_created', + 'content_create_date', + 'lastmodified', + 'created', + 'date', +]; // An ordered list of XPath Selectors to find // likely date published dates. From most explicit // to least explicit. -var DATE_PUBLISHED_SELECTORS = ['.hentry .dtstamp.published', '.hentry .published', '.hentry .dtstamp.updated', '.hentry .updated', '.single .published', '.meta .published', '.meta .postDate', '.entry-date', '.byline .date', '.postmetadata .date', '.article_datetime', '.date-header', '.story-date', '.dateStamp', '#story .datetime', '.dateline', '.pubdate']; -// An ordered list of compiled regular expressions to find likely date +var DATE_PUBLISHED_SELECTORS = [ + '.hentry .dtstamp.published', + '.hentry .published', + '.hentry .dtstamp.updated', + '.hentry .updated', + '.single .published', + '.meta .published', + '.meta .postDate', + '.entry-date', + '.byline .date', + '.postmetadata .date', + '.article_datetime', + '.date-header', + '.story-date', + '.dateStamp', + '#story .datetime', + '.dateline', + '.pubdate', +]; // An ordered list of compiled regular expressions to find likely date // published dates from the URL. These should always have the first // reference be a date string that is parseable by dateutil.parser.parse + var abbrevMonthsStr = '(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)'; var DATE_PUBLISHED_URL_RES = [ -// /2012/01/27/ but not /2012/01/293 -new RegExp('/(20\\d{2}/\\d{2}/\\d{2})/', 'i'), -// 20120127 or 20120127T but not 2012012733 or 8201201733 -// /[^0-9](20\d{2}[01]\d[0-3]\d)([^0-9]|$)/i, -// 2012-01-27 -new RegExp('(20\\d{2}-[01]\\d-[0-3]\\d)', 'i'), -// /2012/jan/27/ -new RegExp('/(20\\d{2}/' + abbrevMonthsStr + '/[0-3]\\d)/', 'i')]; + // /2012/01/27/ but not /2012/01/293 + new RegExp('/(20\\d{2}/\\d{2}/\\d{2})/', 'i'), // 20120127 or 20120127T but not 2012012733 or 8201201733 + // /[^0-9](20\d{2}[01]\d[0-3]\d)([^0-9]|$)/i, + // 2012-01-27 + new RegExp('(20\\d{2}-[01]\\d-[0-3]\\d)', 'i'), // /2012/jan/27/ + new RegExp('/(20\\d{2}/'.concat(abbrevMonthsStr, '/[0-3]\\d)/'), 'i'), +]; var GenericDatePublishedExtractor = { extract: function extract(_ref) { var $ = _ref.$, - url = _ref.url, - metaCache = _ref.metaCache; - - var datePublished = void 0; - // First, check to see if we have a matching meta tag + url = _ref.url, + metaCache = _ref.metaCache; + var datePublished; // First, check to see if we have a matching meta tag // that we can make use of. // Don't try cleaning tags from this string - datePublished = extractFromMeta$$1($, DATE_PUBLISHED_META_TAGS, metaCache, false); - if (datePublished) return cleanDatePublished(datePublished); - // Second, look through our selectors looking for potential + datePublished = extractFromMeta$$1( + $, + DATE_PUBLISHED_META_TAGS, + metaCache, + false + ); + if (datePublished) return cleanDatePublished(datePublished); // Second, look through our selectors looking for potential // date_published's. + datePublished = extractFromSelectors$$1($, DATE_PUBLISHED_SELECTORS); - if (datePublished) return cleanDatePublished(datePublished); + if (datePublished) return cleanDatePublished(datePublished); // Lastly, look to see if a dately string exists in the URL - // Lastly, look to see if a dately string exists in the URL datePublished = extractFromUrl(url, DATE_PUBLISHED_URL_RES); if (datePublished) return cleanDatePublished(datePublished); - return null; - } + }, }; // import { @@ -6358,14 +6118,11 @@ var GenericDatePublishedExtractor = { // DEK_SELECTORS, // DEK_URL_RES, // } from './constants'; - // import { cleanDek } from 'cleaners'; - // import { // extractFromMeta, // extractFromSelectors, // } from 'utils/dom'; - // Currently there is only one selector for // deks. We should simply return null here // until we have a more robust generic option. @@ -6374,12 +6131,8 @@ var GenericDekExtractor = { // extract({ $, content, metaCache }) { extract: function extract() { return null; - } + }, }; - - - -// def extract_dek(self): // # First, check to see if we have a matching meta tag that we can make // # use of. // dek = self.extract_from_meta('dek', constants.DEK_META_TAGS) @@ -6409,23 +6162,58 @@ var GenericDekExtractor = { // All attributes should be lowercase for faster case-insensitive matching. // From most distinct to least distinct. var LEAD_IMAGE_URL_META_TAGS = ['og:image', 'twitter:image', 'image_src']; - var LEAD_IMAGE_URL_SELECTORS = ['link[rel=image_src]']; - -var POSITIVE_LEAD_IMAGE_URL_HINTS = ['upload', 'wp-content', 'large', 'photo', 'wp-image']; -var POSITIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp(POSITIVE_LEAD_IMAGE_URL_HINTS.join('|'), 'i'); - -var NEGATIVE_LEAD_IMAGE_URL_HINTS = ['spacer', 'sprite', 'blank', 'throbber', 'gradient', 'tile', 'bg', 'background', 'icon', 'social', 'header', 'hdr', 'advert', 'spinner', 'loader', 'loading', 'default', 'rating', 'share', 'facebook', 'twitter', 'theme', 'promo', 'ads', 'wp-includes']; -var NEGATIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp(NEGATIVE_LEAD_IMAGE_URL_HINTS.join('|'), 'i'); - +var POSITIVE_LEAD_IMAGE_URL_HINTS = [ + 'upload', + 'wp-content', + 'large', + 'photo', + 'wp-image', +]; +var POSITIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp( + POSITIVE_LEAD_IMAGE_URL_HINTS.join('|'), + 'i' +); +var NEGATIVE_LEAD_IMAGE_URL_HINTS = [ + 'spacer', + 'sprite', + 'blank', + 'throbber', + 'gradient', + 'tile', + 'bg', + 'background', + 'icon', + 'social', + 'header', + 'hdr', + 'advert', + 'spinner', + 'loader', + 'loading', + 'default', + 'rating', + 'share', + 'facebook', + 'twitter', + 'theme', + 'promo', + 'ads', + 'wp-includes', +]; +var NEGATIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp( + NEGATIVE_LEAD_IMAGE_URL_HINTS.join('|'), + 'i' +); var GIF_RE = /\.gif(\?.*)?$/i; var JPG_RE = /\.jpe?g(\?.*)?$/i; function getSig($node) { - return ($node.attr('class') || '') + ' ' + ($node.attr('id') || ''); -} + return '' + .concat($node.attr('class') || '', ' ') + .concat($node.attr('id') || ''); +} // Scores image urls based on a variety of heuristics. -// Scores image urls based on a variety of heuristics. function scoreImageUrl(url) { url = url.trim(); var score = 0; @@ -6436,34 +6224,29 @@ function scoreImageUrl(url) { if (NEGATIVE_LEAD_IMAGE_URL_HINTS_RE.test(url)) { score -= 20; - } - - // TODO: We might want to consider removing this as + } // TODO: We might want to consider removing this as // gifs are much more common/popular than they once were + if (GIF_RE.test(url)) { score -= 10; } if (JPG_RE.test(url)) { score += 10; - } - - // PNGs are neutral. + } // PNGs are neutral. return score; -} +} // Alt attribute usually means non-presentational image. -// Alt attribute usually means non-presentational image. function scoreAttr($img) { if ($img.attr('alt')) { return 5; } return 0; -} - -// Look through our parent and grandparent for figure-like +} // Look through our parent and grandparent for figure-like // container elements, give a bonus if we find them + function scoreByParents($img) { var score = 0; var $figParent = $img.parents('figure').first(); @@ -6473,22 +6256,21 @@ function scoreByParents($img) { } var $parent = $img.parent(); - var $gParent = void 0; + var $gParent; + if ($parent.length === 1) { $gParent = $parent.parent(); } - [$parent, $gParent].forEach(function ($node) { + [$parent, $gParent].forEach(function($node) { if (PHOTO_HINTS_RE$1.test(getSig($node))) { score += 15; } }); - return score; -} - -// Look at our immediate sibling and see if it looks like it's a +} // Look at our immediate sibling and see if it looks like it's a // caption. Bonus if so. + function scoreBySibling($img) { var score = 0; var $sibling = $img.next(); @@ -6504,26 +6286,26 @@ function scoreBySibling($img) { return score; } - function scoreByDimensions($img) { var score = 0; - var width = parseFloat($img.attr('width')); - var height = parseFloat($img.attr('height')); - var src = $img.attr('src'); + var width = _parseFloat($img.attr('width')); + + var height = _parseFloat($img.attr('height')); + + var src = $img.attr('src'); // Penalty for skinny images - // Penalty for skinny images if (width && width <= 50) { score -= 50; - } + } // Penalty for short images - // Penalty for short images if (height && height <= 50) { score -= 50; } if (width && height && !src.includes('sprite')) { var area = width * height; + if (area < 5000) { // Smaller than 50 x 100 score -= 100; @@ -6534,12 +6316,10 @@ function scoreByDimensions($img) { return score; } - function scoreByPosition($imgs, index) { return $imgs.length / 2 - index; } -// Given a resource, try to find the lead image URL from within // it. Like content and next page extraction, uses a scoring system // to determine what the most likely image may be. Short circuits // on really probable things like og:image meta tags. @@ -6547,90 +6327,99 @@ function scoreByPosition($imgs, index) { // Potential signals to still take advantage of: // * domain // * weird aspect ratio + var GenericLeadImageUrlExtractor = { extract: function extract(_ref) { var $ = _ref.$, - content = _ref.content, - metaCache = _ref.metaCache, - html = _ref.html; + content = _ref.content, + metaCache = _ref.metaCache, + html = _ref.html; + var cleanUrl; - var cleanUrl = void 0; if (!$.browser && $('head').length === 0) { - $('*').first().prepend(html); - } - - // Check to see if we have a matching meta tag that we can make use of. + $('*') + .first() + .prepend(html); + } // Check to see if we have a matching meta tag that we can make use of. // Moving this higher because common practice is now to use large // images on things like Open Graph or Twitter cards. // images usually have for things like Open Graph. - var imageUrl = extractFromMeta$$1($, LEAD_IMAGE_URL_META_TAGS, metaCache, false); + + var imageUrl = extractFromMeta$$1( + $, + LEAD_IMAGE_URL_META_TAGS, + metaCache, + false + ); if (imageUrl) { cleanUrl = clean$1(imageUrl); - if (cleanUrl) return cleanUrl; - } - - // Next, try to find the "best" image via the content. + } // Next, try to find the "best" image via the content. // We'd rather not have to fetch each image and check dimensions, // so try to do some analysis and determine them instead. + var $content = $(content); var imgs = $('img', $content).toArray(); var imgScores = {}; - - imgs.forEach(function (img, index) { + imgs.forEach(function(img, index) { var $img = $(img); var src = $img.attr('src'); - if (!src) return; - var score = scoreImageUrl(src); score += scoreAttr($img); score += scoreByParents($img); score += scoreBySibling($img); score += scoreByDimensions($img); score += scoreByPosition(imgs, index); - imgScores[src] = score; }); - var _Reflect$ownKeys$redu = _Reflect$ownKeys(imgScores).reduce(function (acc, key) { - return imgScores[key] > acc[1] ? [key, imgScores[key]] : acc; - }, [null, 0]), - _Reflect$ownKeys$redu2 = _slicedToArray(_Reflect$ownKeys$redu, 2), - topUrl = _Reflect$ownKeys$redu2[0], - topScore = _Reflect$ownKeys$redu2[1]; + var _Reflect$ownKeys$redu = _Reflect$ownKeys(imgScores).reduce( + function(acc, key) { + return imgScores[key] > acc[1] ? [key, imgScores[key]] : acc; + }, + [null, 0] + ), + _Reflect$ownKeys$redu2 = _slicedToArray(_Reflect$ownKeys$redu, 2), + topUrl = _Reflect$ownKeys$redu2[0], + topScore = _Reflect$ownKeys$redu2[1]; if (topScore > 0) { cleanUrl = clean$1(topUrl); - if (cleanUrl) return cleanUrl; - } - - // If nothing else worked, check to see if there are any really + } // If nothing else worked, check to see if there are any really // probable nodes in the doc, like <link rel="image_src" />. + // eslint-disable-next-line no-restricted-syntax + var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { - for (var _iterator = _getIterator(LEAD_IMAGE_URL_SELECTORS), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + for ( + var _iterator = _getIterator(LEAD_IMAGE_URL_SELECTORS), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { var selector = _step.value; - var $node = $(selector).first(); var src = $node.attr('src'); + if (src) { cleanUrl = clean$1(src); if (cleanUrl) return cleanUrl; } var href = $node.attr('href'); + if (href) { cleanUrl = clean$1(href); if (cleanUrl) return cleanUrl; } var value = $node.attr('value'); + if (value) { cleanUrl = clean$1(value); if (cleanUrl) return cleanUrl; @@ -6641,7 +6430,7 @@ var GenericLeadImageUrlExtractor = { _iteratorError = err; } finally { try { - if (!_iteratorNormalCompletion && _iterator.return) { + if (!_iteratorNormalCompletion && _iterator.return != null) { _iterator.return(); } } finally { @@ -6652,12 +6441,8 @@ var GenericLeadImageUrlExtractor = { } return null; - } + }, }; - - - -// def extract(self): // """ // # First, try to find the "best" image via the content. // # We'd rather not have to fetch each image and check dimensions, @@ -6819,13 +6604,17 @@ function scoreSimilarity(score, articleUrl, href) { // sliding scale, subtract points from this link based on // similarity. if (score > 0) { - var similarity = new difflib.SequenceMatcher(null, articleUrl, href).ratio(); - // Subtract .1 from diff_percent when calculating modifier, + var similarity = new difflib.SequenceMatcher( + null, + articleUrl, + href + ).ratio(); // Subtract .1 from diff_percent when calculating modifier, // which means that if it's less than 10% different, we give a // bonus instead. Ex: // 3% different = +17.5 points // 10% different = 0 points // 20% different = -25 points + var diffPercent = 1.0 - similarity; var diffModifier = -(250 * (diffPercent - 0.2)); return score + diffModifier; @@ -6842,19 +6631,18 @@ function scoreLinkText(linkText, pageNum) { var score = 0; if (IS_DIGIT_RE.test(linkText.trim())) { - var linkTextAsNum = parseInt(linkText, 10); - // If it's the first page, we already got it on the first call. + var linkTextAsNum = _parseInt(linkText, 10); // If it's the first page, we already got it on the first call. // Give it a negative score. Otherwise, up to page 10, give a // small bonus. + if (linkTextAsNum < 2) { score = -30; } else { score = Math.max(0, 10 - linkTextAsNum); - } - - // If it appears that the current page number is greater than + } // If it appears that the current page number is greater than // this links page number, it's a very bad sign. Give it a big // penalty. + if (pageNum && pageNum >= linkTextAsNum) { score -= 50; } @@ -6874,27 +6662,42 @@ function scorePageInLink(pageNum, isWp) { return 0; } -var DIGIT_RE$2 = /\d/; - -// A list of words that, if found in link text or URLs, likely mean that +var DIGIT_RE$2 = /\d/; // A list of words that, if found in link text or URLs, likely mean that // this link is not a next page link. -var EXTRANEOUS_LINK_HINTS$1 = ['print', 'archive', 'comment', 'discuss', 'e-mail', 'email', 'share', 'reply', 'all', 'login', 'sign', 'single', 'adx', 'entry-unrelated']; -var EXTRANEOUS_LINK_HINTS_RE$1 = new RegExp(EXTRANEOUS_LINK_HINTS$1.join('|'), 'i'); -// Match any link text/classname/id that looks like it could mean the next +var EXTRANEOUS_LINK_HINTS$1 = [ + 'print', + 'archive', + 'comment', + 'discuss', + 'e-mail', + 'email', + 'share', + 'reply', + 'all', + 'login', + 'sign', + 'single', + 'adx', + 'entry-unrelated', +]; +var EXTRANEOUS_LINK_HINTS_RE$1 = new RegExp( + EXTRANEOUS_LINK_HINTS$1.join('|'), + 'i' +); // Match any link text/classname/id that looks like it could mean the next // page. Things like: next, continue, >, >>, » but not >|, »| as those can // mean last page. -var NEXT_LINK_TEXT_RE$1 = new RegExp('(next|weiter|continue|>([^|]|$)|»([^|]|$))', 'i'); -// Match any link text/classname/id that looks like it is an end link: things +var NEXT_LINK_TEXT_RE$1 = new RegExp( + '(next|weiter|continue|>([^|]|$)|»([^|]|$))', + 'i' +); // Match any link text/classname/id that looks like it is an end link: things // like "first", "last", "end", etc. -var CAP_LINK_TEXT_RE$1 = new RegExp('(first|last|end)', 'i'); -// Match any link text/classname/id that looks like it means the previous +var CAP_LINK_TEXT_RE$1 = new RegExp('(first|last|end)', 'i'); // Match any link text/classname/id that looks like it means the previous // page. -var PREV_LINK_TEXT_RE$1 = new RegExp('(prev|earl|old|new|<|«)', 'i'); -// Match any phrase that looks like it could be page, or paging, or pagination +var PREV_LINK_TEXT_RE$1 = new RegExp('(prev|earl|old|new|<|«)', 'i'); // Match any phrase that looks like it could be page, or paging, or pagination function scoreExtraneousLinks(href) { // If the URL itself contains extraneous values, give a penalty. @@ -6905,8 +6708,10 @@ function scoreExtraneousLinks(href) { return 0; } -function makeSig$1($link) { - return ($link.attr('class') || '') + ' ' + ($link.attr('id') || ''); +function makeSig($link) { + return '' + .concat($link.attr('class') || '', ' ') + .concat($link.attr('id') || ''); } function scoreByParents$1($link) { @@ -6918,24 +6723,26 @@ function scoreByParents$1($link) { var negativeMatch = false; var score = 0; - _Array$from(range(0, 4)).forEach(function () { + _Array$from(range(0, 4)).forEach(function() { if ($parent.length === 0) { return; } - var parentData = makeSig$1($parent, ' '); - - // If we have 'page' or 'paging' in our data, that's a good + var parentData = makeSig($parent, ' '); // If we have 'page' or 'paging' in our data, that's a good // sign. Add a bonus. + if (!positiveMatch && PAGE_RE.test(parentData)) { positiveMatch = true; score += 25; - } - - // If we have 'comment' or something in our data, and + } // If we have 'comment' or something in our data, and // we don't have something like 'content' as well, that's // a bad sign. Give a penalty. - if (!negativeMatch && NEGATIVE_SCORE_RE.test(parentData) && EXTRANEOUS_LINK_HINTS_RE$1.test(parentData)) { + + if ( + !negativeMatch && + NEGATIVE_SCORE_RE.test(parentData) && + EXTRANEOUS_LINK_HINTS_RE$1.test(parentData) + ) { if (!POSITIVE_SCORE_RE.test(parentData)) { negativeMatch = true; score -= 25; @@ -6958,16 +6765,24 @@ function scorePrevLink(linkData) { return 0; } -function shouldScore(href, articleUrl, baseUrl, parsedUrl, linkText, previousUrls) { +function shouldScore( + href, + articleUrl, + baseUrl, + parsedUrl, + linkText, + previousUrls +) { // skip if we've already fetched this url - if (previousUrls.find(function (url) { - return href === url; - }) !== undefined) { + if ( + previousUrls.find(function(url) { + return href === url; + }) !== undefined + ) { return false; - } - - // If we've already parsed this URL, or the URL matches the base + } // If we've already parsed this URL, or the URL matches the base // URL, or is empty, skip it. + if (!href || href === articleUrl || href === baseUrl) { return false; } @@ -6975,29 +6790,24 @@ function shouldScore(href, articleUrl, baseUrl, parsedUrl, linkText, previousUrl var hostname = parsedUrl.hostname; var _URL$parse = URL.parse(href), - linkHost = _URL$parse.hostname; - - // Domain mismatch. - + linkHost = _URL$parse.hostname; // Domain mismatch. if (linkHost !== hostname) { return false; - } - - // If href doesn't contain a digit after removing the base URL, + } // If href doesn't contain a digit after removing the base URL, // it's certainly not the next page. + var fragment = href.replace(baseUrl, ''); + if (!DIGIT_RE$2.test(fragment)) { return false; - } - - // This link has extraneous content (like "comment") in its link + } // This link has extraneous content (like "comment") in its link // text, so we skip it. + if (EXTRANEOUS_LINK_HINTS_RE$1.test(linkText)) { return false; - } + } // Next page link text is never long, skip if it is too long. - // Next page link text is never long, skip if it is too long. if (linkText.length > 25) { return false; } @@ -7042,65 +6852,66 @@ function scoreCapLinks(linkData) { } function makeBaseRegex(baseUrl) { - return new RegExp('^' + baseUrl, 'i'); + return new RegExp('^'.concat(baseUrl), 'i'); } -function makeSig($link, linkText) { - return (linkText || $link.text()) + ' ' + ($link.attr('class') || '') + ' ' + ($link.attr('id') || ''); +function makeSig$1($link, linkText) { + return '' + .concat(linkText || $link.text(), ' ') + .concat($link.attr('class') || '', ' ') + .concat($link.attr('id') || ''); } function scoreLinks(_ref) { var links = _ref.links, - articleUrl = _ref.articleUrl, - baseUrl = _ref.baseUrl, - parsedUrl = _ref.parsedUrl, - $ = _ref.$, - _ref$previousUrls = _ref.previousUrls, - previousUrls = _ref$previousUrls === undefined ? [] : _ref$previousUrls; - + articleUrl = _ref.articleUrl, + baseUrl = _ref.baseUrl, + parsedUrl = _ref.parsedUrl, + $ = _ref.$, + _ref$previousUrls = _ref.previousUrls, + previousUrls = _ref$previousUrls === void 0 ? [] : _ref$previousUrls; parsedUrl = parsedUrl || URL.parse(articleUrl); var baseRegex = makeBaseRegex(baseUrl); - var isWp = isWordpress($); - - // Loop through all links, looking for hints that they may be next-page + var isWp = isWordpress($); // Loop through all links, looking for hints that they may be next-page // links. Things like having "page" in their textContent, className or // id, or being a child of a node with a page-y className or id. // // After we do that, assign each page a score, and pick the one that // looks most like the next page link, as long as its score is strong // enough to have decent confidence. - var scoredPages = links.reduce(function (possiblePages, link) { + + var scoredPages = links.reduce(function(possiblePages, link) { // Remove any anchor data since we don't do a good job // standardizing URLs (it's hard), we're going to do // some checking with and without a trailing slash - var attrs = getAttrs(link); + var attrs = getAttrs(link); // if href is undefined, return - // if href is undefined, return if (!attrs.href) return possiblePages; - var href = removeAnchor(attrs.href); var $link = $(link); var linkText = $link.text(); - if (!shouldScore(href, articleUrl, baseUrl, parsedUrl, linkText, previousUrls)) { + if ( + !shouldScore(href, articleUrl, baseUrl, parsedUrl, linkText, previousUrls) + ) { return possiblePages; - } + } // ## PASSED THE FIRST-PASS TESTS. Start scoring. ## - // ## PASSED THE FIRST-PASS TESTS. Start scoring. ## if (!possiblePages[href]) { possiblePages[href] = { score: 0, linkText: linkText, - href: href + href: href, }; } else { - possiblePages[href].linkText = possiblePages[href].linkText + '|' + linkText; + possiblePages[href].linkText = '' + .concat(possiblePages[href].linkText, '|') + .concat(linkText); } var possiblePage = possiblePages[href]; - var linkData = makeSig($link, linkText); + var linkData = makeSig$1($link, linkText); var pageNum = pageNumFromUrl(href); - var score = scoreBaseUrl(href, baseRegex); score += scoreNextLinkText(linkData); score += scoreCapLinks(linkData); @@ -7110,59 +6921,54 @@ function scoreLinks(_ref) { score += scorePageInLink(pageNum, isWp); score += scoreLinkText(linkText, pageNum); score += scoreSimilarity(score, articleUrl, href); - possiblePage.score = score; - return possiblePages; }, {}); - return _Reflect$ownKeys(scoredPages).length === 0 ? null : scoredPages; } -// Looks for and returns next page url // for multi-page articles + var GenericNextPageUrlExtractor = { extract: function extract(_ref) { var $ = _ref.$, - url = _ref.url, - parsedUrl = _ref.parsedUrl, - _ref$previousUrls = _ref.previousUrls, - previousUrls = _ref$previousUrls === undefined ? [] : _ref$previousUrls; - + url = _ref.url, + parsedUrl = _ref.parsedUrl, + _ref$previousUrls = _ref.previousUrls, + previousUrls = _ref$previousUrls === void 0 ? [] : _ref$previousUrls; parsedUrl = parsedUrl || URL.parse(url); - var articleUrl = removeAnchor(url); var baseUrl = articleBaseUrl(url, parsedUrl); - var links = $('a[href]').toArray(); - var scoredLinks = scoreLinks({ links: links, articleUrl: articleUrl, baseUrl: baseUrl, parsedUrl: parsedUrl, $: $, - previousUrls: previousUrls - }); - - // If no links were scored, return null - if (!scoredLinks) return null; + previousUrls: previousUrls, + }); // If no links were scored, return null - // now that we've scored all possible pages, + if (!scoredLinks) return null; // now that we've scored all possible pages, // find the biggest one. - var topPage = _Reflect$ownKeys(scoredLinks).reduce(function (acc, link) { - var scoredLink = scoredLinks[link]; - return scoredLink.score > acc.score ? scoredLink : acc; - }, { score: -100 }); - // If the score is less than 50, we're not confident enough to use it, + var topPage = _Reflect$ownKeys(scoredLinks).reduce( + function(acc, link) { + var scoredLink = scoredLinks[link]; + return scoredLink.score > acc.score ? scoredLink : acc; + }, + { + score: -100, + } + ); // If the score is less than 50, we're not confident enough to use it, // so we fail. + if (topPage.score >= 50) { return topPage.href; } return null; - } + }, }; var CANONICAL_META_SELECTORS = ['og:url']; @@ -7170,76 +6976,76 @@ var CANONICAL_META_SELECTORS = ['og:url']; function parseDomain(url) { var parsedUrl = URL.parse(url); var hostname = parsedUrl.hostname; - return hostname; } function result(url) { return { url: url, - domain: parseDomain(url) + domain: parseDomain(url), }; } var GenericUrlExtractor = { extract: function extract(_ref) { var $ = _ref.$, - url = _ref.url, - metaCache = _ref.metaCache; - + url = _ref.url, + metaCache = _ref.metaCache; var $canonical = $('link[rel=canonical]'); + if ($canonical.length !== 0) { var href = $canonical.attr('href'); + if (href) { return result(href); } } var metaUrl = extractFromMeta$$1($, CANONICAL_META_SELECTORS, metaCache); + if (metaUrl) { return result(metaUrl); } return result(url); - } + }, }; var EXCERPT_META_SELECTORS = ['og:description', 'twitter:description']; function clean$2(content, $) { - var maxLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; - + var maxLength = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; content = content.replace(/[\s\n]+/g, ' ').trim(); - return ellipsize(content, maxLength, { ellipse: '…' }); + return ellipsize(content, maxLength, { + ellipse: '…', + }); } - var GenericExcerptExtractor = { extract: function extract(_ref) { var $ = _ref.$, - content = _ref.content, - metaCache = _ref.metaCache; - + content = _ref.content, + metaCache = _ref.metaCache; var excerpt = extractFromMeta$$1($, EXCERPT_META_SELECTORS, metaCache); + if (excerpt) { return clean$2(stripTags(excerpt, $)); - } - // Fall back to excerpting from the extracted content + } // Fall back to excerpting from the extracted content + var maxLength = 200; var shortContent = content.slice(0, maxLength * 5); return clean$2($(shortContent).text(), $, maxLength); - } + }, }; var GenericWordCountExtractor = { extract: function extract(_ref) { var content = _ref.content; - var $ = cheerio.load(content); var $content = $('div').first(); - var text = normalizeSpaces($content.text()); return text.split(/\s/).length; - } + }, }; var GenericExtractor = { @@ -7259,11 +7065,9 @@ var GenericExtractor = { var title = _ref.title; return stringDirection.getDirection(title); }, - extract: function extract(options) { var html = options.html, - $ = options.$; - + $ = options.$; if (html && !$) { var loaded = cheerio.load(html); @@ -7273,17 +7077,39 @@ var GenericExtractor = { var title = this.title(options); var date_published = this.date_published(options); var author = this.author(options); - var content = this.content(_extends({}, options, { title: title })); - var lead_image_url = this.lead_image_url(_extends({}, options, { content: content })); - var dek = this.dek(_extends({}, options, { content: content })); + var content = this.content( + _objectSpread({}, options, { + title: title, + }) + ); + var lead_image_url = this.lead_image_url( + _objectSpread({}, options, { + content: content, + }) + ); + var dek = this.dek( + _objectSpread({}, options, { + content: content, + }) + ); var next_page_url = this.next_page_url(options); - var excerpt = this.excerpt(_extends({}, options, { content: content })); - var word_count = this.word_count(_extends({}, options, { content: content })); - var direction = this.direction({ title: title }); + var excerpt = this.excerpt( + _objectSpread({}, options, { + content: content, + }) + ); + var word_count = this.word_count( + _objectSpread({}, options, { + content: content, + }) + ); + var direction = this.direction({ + title: title, + }); - var _url_and_domain = this.url_and_domain(options), - url = _url_and_domain.url, - domain = _url_and_domain.domain; + var _this$url_and_domain = this.url_and_domain(options), + url = _this$url_and_domain.url, + domain = _this$url_and_domain.domain; return { title: title, @@ -7297,18 +7123,17 @@ var GenericExtractor = { domain: domain, excerpt: excerpt, word_count: word_count, - direction: direction + direction: direction, }; - } + }, }; var Detectors = { 'meta[name="al:ios:app_name"][value="Medium"]': MediumExtractor, - 'meta[name="generator"][value="blogger"]': BloggerExtractor + 'meta[name="generator"][value="blogger"]': BloggerExtractor, }; - function detectByHtml($) { - var selector = _Reflect$ownKeys(Detectors).find(function (s) { + var selector = _Reflect$ownKeys(Detectors).find(function(s) { return $(s).length > 0; }); @@ -7318,44 +7143,43 @@ function detectByHtml($) { function getExtractor(url, parsedUrl, $) { parsedUrl = parsedUrl || URL.parse(url); var _parsedUrl = parsedUrl, - hostname = _parsedUrl.hostname; - - var baseDomain = hostname.split('.').slice(-2).join('.'); - - return Extractors[hostname] || Extractors[baseDomain] || detectByHtml($) || GenericExtractor; + hostname = _parsedUrl.hostname; + var baseDomain = hostname + .split('.') + .slice(-2) + .join('.'); + return ( + Extractors[hostname] || + Extractors[baseDomain] || + detectByHtml($) || + GenericExtractor + ); } -// Remove elements by an array of selectors function cleanBySelectors($content, $, _ref) { var clean = _ref.clean; - if (!clean) return $content; - $(clean.join(','), $content).remove(); - return $content; -} +} // Transform matching elements -// Transform matching elements function transformElements($content, $, _ref2) { var transforms = _ref2.transforms; - if (!transforms) return $content; - _Reflect$ownKeys(transforms).forEach(function (key) { + _Reflect$ownKeys(transforms).forEach(function(key) { var $matches = $(key, $content); - var value = transforms[key]; + var value = transforms[key]; // If value is a string, convert directly - // If value is a string, convert directly if (typeof value === 'string') { - $matches.each(function (index, node) { + $matches.each(function(index, node) { convertNodeTo$$1($(node), $, transforms[key]); }); } else if (typeof value === 'function') { // If value is function, apply function to node - $matches.each(function (index, node) { - var result = value($(node), $); - // If function returns a string, convert node to that value + $matches.each(function(index, node) { + var result = value($(node), $); // If function returns a string, convert node to that value + if (typeof result === 'string') { convertNodeTo$$1($(node), $, result); } @@ -7367,109 +7191,110 @@ function transformElements($content, $, _ref2) { } function findMatchingSelector($, selectors, extractHtml) { - return selectors.find(function (selector) { - if (Array.isArray(selector)) { + return selectors.find(function(selector) { + if (_Array$isArray(selector)) { if (extractHtml) { - return selector.reduce(function (acc, s) { + return selector.reduce(function(acc, s) { return acc && $(s).length > 0; }, true); } var _selector = _slicedToArray(selector, 2), - s = _selector[0], - attr = _selector[1]; - - return $(s).length === 1 && $(s).attr(attr) && $(s).attr(attr).trim() !== ''; + s = _selector[0], + attr = _selector[1]; + + return ( + $(s).length === 1 && + $(s).attr(attr) && + $(s) + .attr(attr) + .trim() !== '' + ); } - return $(selector).length === 1 && $(selector).text().trim() !== ''; + return ( + $(selector).length === 1 && + $(selector) + .text() + .trim() !== '' + ); }); } function select(opts) { var $ = opts.$, - type = opts.type, - extractionOpts = opts.extractionOpts, - _opts$extractHtml = opts.extractHtml, - extractHtml = _opts$extractHtml === undefined ? false : _opts$extractHtml; - // Skip if there's not extraction for this type - - if (!extractionOpts) return null; + type = opts.type, + extractionOpts = opts.extractionOpts, + _opts$extractHtml = opts.extractHtml, + extractHtml = _opts$extractHtml === void 0 ? false : _opts$extractHtml; // Skip if there's not extraction for this type - // If a string is hardcoded for a type (e.g., Wikipedia + if (!extractionOpts) return null; // If a string is hardcoded for a type (e.g., Wikipedia // contributors), return the string - if (typeof extractionOpts === 'string') return extractionOpts; + if (typeof extractionOpts === 'string') return extractionOpts; var selectors = extractionOpts.selectors, - _extractionOpts$defau = extractionOpts.defaultCleaner, - defaultCleaner = _extractionOpts$defau === undefined ? true : _extractionOpts$defau; - - + _extractionOpts$defau = extractionOpts.defaultCleaner, + defaultCleaner = + _extractionOpts$defau === void 0 ? true : _extractionOpts$defau; var matchingSelector = findMatchingSelector($, selectors, extractHtml); - - if (!matchingSelector) return null; - - // Declaring result; will contain either + if (!matchingSelector) return null; // Declaring result; will contain either // text or html, which will be cleaned // by the appropriate cleaner type - // If the selector type requests html as its return type // transform and clean the element with provided selectors - var $content = void 0; + + var $content; + if (extractHtml) { // If matching selector is an array, we're considering this a // multi-match selection, which allows the parser to choose several // selectors to include in the result. Note that all selectors in the // array must match in order for this selector to trigger - if (Array.isArray(matchingSelector)) { - (function () { - $content = $(matchingSelector.join(',')); - var $wrapper = $('<div></div>'); - $content.each(function (index, element) { - $wrapper.append(element); - }); - - $content = $wrapper; - })(); + if (_Array$isArray(matchingSelector)) { + $content = $(matchingSelector.join(',')); + var $wrapper = $('<div></div>'); + $content.each(function(index, element) { + $wrapper.append(element); + }); + $content = $wrapper; } else { $content = $(matchingSelector); - } + } // Wrap in div so transformation can take place on root element - // Wrap in div so transformation can take place on root element $content.wrap($('<div></div>')); $content = $content.parent(); - $content = transformElements($content, $, extractionOpts); $content = cleanBySelectors($content, $, extractionOpts); - - $content = Cleaners[type]($content, _extends({}, opts, { defaultCleaner: defaultCleaner })); - + $content = Cleaners[type]( + $content, + _objectSpread({}, opts, { + defaultCleaner: defaultCleaner, + }) + ); return $.html($content); } - var result = void 0; - - // if selector is an array (e.g., ['img', 'src']), + var result; // if selector is an array (e.g., ['img', 'src']), // extract the attr - if (Array.isArray(matchingSelector)) { + + if (_Array$isArray(matchingSelector)) { var _matchingSelector = _slicedToArray(matchingSelector, 2), - selector = _matchingSelector[0], - attr = _matchingSelector[1]; + selector = _matchingSelector[0], + attr = _matchingSelector[1]; - result = $(selector).attr(attr).trim(); + result = $(selector) + .attr(attr) + .trim(); } else { var $node = $(matchingSelector); - $node = cleanBySelectors($node, $, extractionOpts); $node = transformElements($node, $, extractionOpts); - result = $node.text().trim(); - } - - // Allow custom extractor to skip default cleaner + } // Allow custom extractor to skip default cleaner // for this type; defaults to true + if (defaultCleaner) { - return Cleaners[type](result, _extends({}, opts, extractionOpts)); + return Cleaners[type](result, _objectSpread({}, opts, extractionOpts)); } return result; @@ -7477,62 +7302,123 @@ function select(opts) { function extractResult(opts) { var type = opts.type, - extractor = opts.extractor, - _opts$fallback = opts.fallback, - fallback = _opts$fallback === undefined ? true : _opts$fallback; - + extractor = opts.extractor, + _opts$fallback = opts.fallback, + fallback = _opts$fallback === void 0 ? true : _opts$fallback; + var result = select( + _objectSpread({}, opts, { + extractionOpts: extractor[type], + }) + ); // If custom parser succeeds, return the result - var result = select(_extends({}, opts, { extractionOpts: extractor[type] })); - - // If custom parser succeeds, return the result if (result) { return result; - } - - // If nothing matches the selector, and fallback is enabled, + } // If nothing matches the selector, and fallback is enabled, // run the Generic extraction - if (fallback) return GenericExtractor[type](opts); + if (fallback) return GenericExtractor[type](opts); return null; } var RootExtractor = { extract: function extract() { - var extractor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GenericExtractor; - var opts = arguments[1]; + var extractor = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : GenericExtractor; + var opts = arguments.length > 1 ? arguments[1] : undefined; var _opts = opts, - contentOnly = _opts.contentOnly, - extractedTitle = _opts.extractedTitle; - // This is the generic extractor. Run its extract method + contentOnly = _opts.contentOnly, + extractedTitle = _opts.extractedTitle; // This is the generic extractor. Run its extract method if (extractor.domain === '*') return extractor.extract(opts); - - opts = _extends({}, opts, { - extractor: extractor + opts = _objectSpread({}, opts, { + extractor: extractor, }); if (contentOnly) { - var _content = extractResult(_extends({}, opts, { type: 'content', extractHtml: true, title: extractedTitle - })); + var _content = extractResult( + _objectSpread({}, opts, { + type: 'content', + extractHtml: true, + title: extractedTitle, + }) + ); + return { - content: _content + content: _content, }; } - var title = extractResult(_extends({}, opts, { type: 'title' })); - var date_published = extractResult(_extends({}, opts, { type: 'date_published' })); - var author = extractResult(_extends({}, opts, { type: 'author' })); - var next_page_url = extractResult(_extends({}, opts, { type: 'next_page_url' })); - var content = extractResult(_extends({}, opts, { type: 'content', extractHtml: true, title: title - })); - var lead_image_url = extractResult(_extends({}, opts, { type: 'lead_image_url', content: content })); - var excerpt = extractResult(_extends({}, opts, { type: 'excerpt', content: content })); - var dek = extractResult(_extends({}, opts, { type: 'dek', content: content, excerpt: excerpt })); - var word_count = extractResult(_extends({}, opts, { type: 'word_count', content: content })); - var direction = extractResult(_extends({}, opts, { type: 'direction', title: title })); - - var _ref3 = extractResult(_extends({}, opts, { type: 'url_and_domain' })) || { url: null, domain: null }, - url = _ref3.url, - domain = _ref3.domain; + + var title = extractResult( + _objectSpread({}, opts, { + type: 'title', + }) + ); + var date_published = extractResult( + _objectSpread({}, opts, { + type: 'date_published', + }) + ); + var author = extractResult( + _objectSpread({}, opts, { + type: 'author', + }) + ); + var next_page_url = extractResult( + _objectSpread({}, opts, { + type: 'next_page_url', + }) + ); + var content = extractResult( + _objectSpread({}, opts, { + type: 'content', + extractHtml: true, + title: title, + }) + ); + var lead_image_url = extractResult( + _objectSpread({}, opts, { + type: 'lead_image_url', + content: content, + }) + ); + var excerpt = extractResult( + _objectSpread({}, opts, { + type: 'excerpt', + content: content, + }) + ); + var dek = extractResult( + _objectSpread({}, opts, { + type: 'dek', + content: content, + excerpt: excerpt, + }) + ); + var word_count = extractResult( + _objectSpread({}, opts, { + type: 'word_count', + content: content, + }) + ); + var direction = extractResult( + _objectSpread({}, opts, { + type: 'direction', + title: title, + }) + ); + + var _ref3 = extractResult( + _objectSpread({}, opts, { + type: 'url_and_domain', + }) + ) || { + url: null, + domain: null, + }, + url = _ref3.url, + domain = _ref3.domain; return { title: title, @@ -7546,235 +7432,257 @@ var RootExtractor = { domain: domain, excerpt: excerpt, word_count: word_count, - direction: direction + direction: direction, }; - } + }, }; -var collectAllPages = (function () { - var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref2) { - var next_page_url = _ref2.next_page_url, - html = _ref2.html, - $ = _ref2.$, - metaCache = _ref2.metaCache, - result = _ref2.result, - Extractor = _ref2.Extractor, - title = _ref2.title, - url = _ref2.url; - var pages, previousUrls, extractorOpts, nextPageResult, word_count; - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - // At this point, we've fetched just the first page - pages = 1; - previousUrls = [removeAnchor(url)]; - - // If we've gone over 26 pages, something has - // likely gone wrong. - - case 2: - if (!(next_page_url && pages < 26)) { - _context.next = 15; - break; - } - - pages += 1; - _context.next = 6; - return Resource.create(next_page_url); - - case 6: - $ = _context.sent; - - html = $.html(); - - extractorOpts = { - url: next_page_url, - html: html, - $: $, - metaCache: metaCache, - contentOnly: true, - extractedTitle: title, - previousUrls: previousUrls - }; - nextPageResult = RootExtractor.extract(Extractor, extractorOpts); - - - previousUrls.push(next_page_url); - result = _extends({}, result, { - content: result.content + '<hr><h4>Page ' + pages + '</h4>' + nextPageResult.content - }); +function collectAllPages(_x) { + return _collectAllPages.apply(this, arguments); +} - next_page_url = nextPageResult.next_page_url; - _context.next = 2; - break; +function _collectAllPages() { + _collectAllPages = _asyncToGenerator( + /*#__PURE__*/ + _regeneratorRuntime.mark(function _callee(_ref) { + var next_page_url, + html, + $, + metaCache, + result, + Extractor, + title, + url, + pages, + previousUrls, + extractorOpts, + nextPageResult, + word_count; + return _regeneratorRuntime.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + (next_page_url = _ref.next_page_url), + (html = _ref.html), + ($ = _ref.$), + (metaCache = _ref.metaCache), + (result = _ref.result), + (Extractor = _ref.Extractor), + (title = _ref.title), + (url = _ref.url); + // At this point, we've fetched just the first page + pages = 1; + previousUrls = [removeAnchor(url)]; // If we've gone over 26 pages, something has + // likely gone wrong. + + case 3: + if (!(next_page_url && pages < 26)) { + _context.next = 16; + break; + } - case 15: - word_count = GenericExtractor.word_count({ content: '<div>' + result.content + '</div>' }); - return _context.abrupt('return', _extends({}, result, { - total_pages: pages, - pages_rendered: pages, - word_count: word_count - })); + pages += 1; // eslint-disable-next-line no-await-in-loop - case 17: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); + _context.next = 7; + return Resource.create(next_page_url); - function collectAllPages(_x) { - return _ref.apply(this, arguments); - } + case 7: + $ = _context.sent; + html = $.html(); + extractorOpts = { + url: next_page_url, + html: html, + $: $, + metaCache: metaCache, + contentOnly: true, + extractedTitle: title, + previousUrls: previousUrls, + }; + nextPageResult = RootExtractor.extract( + Extractor, + extractorOpts + ); + previousUrls.push(next_page_url); + result = _objectSpread({}, result, { + content: '' + .concat(result.content, '<hr><h4>Page ') + .concat(pages, '</h4>') + .concat(nextPageResult.content), + }); // eslint-disable-next-line prefer-destructuring + + next_page_url = nextPageResult.next_page_url; + _context.next = 3; + break; - return collectAllPages; -})(); + case 16: + word_count = GenericExtractor.word_count({ + content: '<div>'.concat(result.content, '</div>'), + }); + return _context.abrupt( + 'return', + _objectSpread({}, result, { + total_pages: pages, + pages_rendered: pages, + word_count: word_count, + }) + ); + + case 18: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this + ); + }) + ); + return _collectAllPages.apply(this, arguments); +} var Mercury = { parse: function parse(url, html) { - var _this = this; - - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - return _asyncToGenerator(_regeneratorRuntime.mark(function _callee() { - var _opts$fetchAllPages, fetchAllPages, _opts$fallback, fallback, parsedUrl, $, Extractor, metaCache, result, _result, title, next_page_url; - - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _opts$fetchAllPages = opts.fetchAllPages, fetchAllPages = _opts$fetchAllPages === undefined ? true : _opts$fetchAllPages, _opts$fallback = opts.fallback, fallback = _opts$fallback === undefined ? true : _opts$fallback; - - // if no url was passed and this is the browser version, - // set url to window.location.href and load the html - // from the current page - - if (!url && cheerio.browser) { - url = window.location.href; // eslint-disable-line no-undef - html = html || cheerio.html(); - } - - parsedUrl = URL.parse(url); - - if (validateUrl(parsedUrl)) { - _context.next = 5; - break; - } - - return _context.abrupt('return', Errors.badUrl); - - case 5: - _context.next = 7; - return Resource.create(url, html, parsedUrl); - - case 7: - $ = _context.sent; - Extractor = getExtractor(url, parsedUrl, $); - // console.log(`Using extractor for ${Extractor.domain}`); - - // If we found an error creating the resource, return that error - - if (!$.failed) { - _context.next = 11; - break; - } - - return _context.abrupt('return', $); - - case 11: - - // if html still has not been set (i.e., url passed to Mercury.parse), - // set html from the response of Resource.create - if (!html) { - html = $.html(); - } - - // Cached value of every meta name in our document. - // Used when extracting title/author/date_published/dek - metaCache = $('meta').map(function (_, node) { - return $(node).attr('name'); - }).toArray(); - result = RootExtractor.extract(Extractor, { - url: url, - html: html, - $: $, - metaCache: metaCache, - parsedUrl: parsedUrl, - fallback: fallback - }); - _result = result, title = _result.title, next_page_url = _result.next_page_url; - - // Fetch more pages if next_page_url found - - if (!(fetchAllPages && next_page_url)) { - _context.next = 21; - break; + var opts = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return _asyncToGenerator( + /*#__PURE__*/ + _regeneratorRuntime.mark(function _callee() { + var _opts$fetchAllPages, + fetchAllPages, + _opts$fallback, + fallback, + parsedUrl, + $, + Extractor, + metaCache, + result, + _result, + title, + next_page_url; + + return _regeneratorRuntime.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + (_opts$fetchAllPages = opts.fetchAllPages), + (fetchAllPages = + _opts$fetchAllPages === void 0 + ? true + : _opts$fetchAllPages), + (_opts$fallback = opts.fallback), + (fallback = + _opts$fallback === void 0 ? true : _opts$fallback); // if no url was passed and this is the browser version, + // set url to window.location.href and load the html + // from the current page + + if (!url && cheerio.browser) { + url = window.location.href; // eslint-disable-line no-undef + + html = html || cheerio.html(); + } + + parsedUrl = URL.parse(url); + + if (validateUrl(parsedUrl)) { + _context.next = 5; + break; + } + + return _context.abrupt('return', Errors.badUrl); + + case 5: + _context.next = 7; + return Resource.create(url, html, parsedUrl); + + case 7: + $ = _context.sent; + Extractor = getExtractor(url, parsedUrl, $); // console.log(`Using extractor for ${Extractor.domain}`); + // If we found an error creating the resource, return that error + + if (!$.failed) { + _context.next = 11; + break; + } + + return _context.abrupt('return', $); + + case 11: + // if html still has not been set (i.e., url passed to Mercury.parse), + // set html from the response of Resource.create + if (!html) { + html = $.html(); + } // Cached value of every meta name in our document. + // Used when extracting title/author/date_published/dek + + metaCache = $('meta') + .map(function(_, node) { + return $(node).attr('name'); + }) + .toArray(); + result = RootExtractor.extract(Extractor, { + url: url, + html: html, + $: $, + metaCache: metaCache, + parsedUrl: parsedUrl, + fallback: fallback, + }); + (_result = result), + (title = _result.title), + (next_page_url = _result.next_page_url); // Fetch more pages if next_page_url found + + if (!(fetchAllPages && next_page_url)) { + _context.next = 21; + break; + } + + _context.next = 18; + return collectAllPages({ + Extractor: Extractor, + next_page_url: next_page_url, + html: html, + $: $, + metaCache: metaCache, + result: result, + title: title, + url: url, + }); + + case 18: + result = _context.sent; + _context.next = 22; + break; + + case 21: + result = _objectSpread({}, result, { + total_pages: 1, + rendered_pages: 1, + }); + + case 22: + return _context.abrupt('return', result); + + case 23: + case 'end': + return _context.stop(); } - - _context.next = 18; - return collectAllPages({ - Extractor: Extractor, - next_page_url: next_page_url, - html: html, - $: $, - metaCache: metaCache, - result: result, - title: title, - url: url - }); - - case 18: - result = _context.sent; - _context.next = 22; - break; - - case 21: - result = _extends({}, result, { - total_pages: 1, - rendered_pages: 1 - }); - - case 22: - return _context.abrupt('return', result); - - case 23: - case 'end': - return _context.stop(); - } - } - }, _callee, _this); - }))(); + } + }, + _callee, + this + ); + }) + )(); }, - - browser: !!cheerio.browser, - // A convenience method for getting a resource // to work with, e.g., for custom extractor generator fetchResource: function fetchResource(url) { - var _this2 = this; - - return _asyncToGenerator(_regeneratorRuntime.mark(function _callee2() { - return _regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return Resource.create(url); - - case 2: - return _context2.abrupt('return', _context2.sent); - - case 3: - case 'end': - return _context2.stop(); - } - } - }, _callee2, _this2); - }))(); - } + return Resource.create(url); + }, }; module.exports = Mercury; -//# sourceMappingURL=mercury.js.map diff --git a/dist/mercury.web.js b/dist/mercury.web.js index 0bc14b2e..e547d933 100644 --- a/dist/mercury.web.js +++ b/dist/mercury.web.js @@ -1,11 +1,35851 @@ -var Mercury=function(){"use strict";function e(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(e){return e&&e.__esModule?e.default:e}function n(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if($t===setTimeout)return setTimeout(e,0);if(($t===r||!$t)&&setTimeout)return $t=setTimeout,setTimeout(e,0);try{return $t(e,0)}catch(t){try{return $t.call(null,e,0)}catch(t){return $t.call(this,e,0)}}}function o(e){if(Vt===clearTimeout)return clearTimeout(e);if((Vt===a||!Vt)&&clearTimeout)return Vt=clearTimeout,clearTimeout(e);try{return Vt(e)}catch(t){try{return Vt.call(null,e)}catch(t){return Vt.call(this,e)}}}function s(){Jt&&Kt&&(Jt=!1,Kt.length?Xt=Kt.concat(Xt):Zt=-1,Xt.length&&u())}function u(){if(!Jt){var e=i(s);Jt=!0;for(var t=Xt.length;t;){for(Kt=Xt,Xt=[];++Zt<t;)Kt&&Kt[Zt].run();Zt=-1,t=Xt.length}Kt=null,Jt=!1,o(e)}}function c(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Xt.push(new l(e,t)),1!==Xt.length||Jt||i(u)}function l(e,t){this.fun=e,this.array=t}function f(){}function d(e){throw new Error("process.binding is not supported")}function h(){return"/"}function p(e){throw new Error("process.chdir is not supported")}function m(){return 0}function g(e){var t=.001*vn.call(gn),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],r-=e[1],r<0&&(n--,r+=1e9)),[n,r]}function v(){var e=new Date,t=e-yn;return t/1e3}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function _(e,t,n){if(e&&_s.isObject(e)&&e instanceof b)return e;var r=new b;return r.parse(e,t,n),r}function w(e){return _s.isString(e)&&(e=_(e)),e instanceof b?e.format():b.prototype.format.call(e)}function A(e,t){return _(e,!1,!0).resolve(t)}function x(e,t){return e?_(e,!1,!0).resolveObject(t):t}function M(e){return e.replace(Ks," ").trim()}function k(e,t){var n=t.find(function(t){return t.test(e)});return n?n.exec(e)[1]:null}function T(e){var t=e.match(Xs);if(!t)return null;var n=parseInt(t[6],10);return n<100?n:null}function S(e){return e.split("#")[0].replace(/\/$/,"")}function E(e,t,n){var r=!0;return t<2&&Qs.test(e)&&e.length<3&&(r=!0),0===t&&"index"===e.toLowerCase()&&(r=!1),t<2&&e.length<3&&!n&&(r=!1),r}function C(e,t){var n=t||Bs.parse(e),r=n.protocol,a=n.host,i=n.path,o=!1,s=i.split("/").reverse().reduce(function(e,t,n){var r=t;if(r.includes(".")){var a=r.split("."),i=mu(a,2),s=i[0],u=i[1];Zs.test(u)&&(r=s)}return Xs.test(r)&&n<2&&(r=r.replace(Xs,"")),0===n&&(o=Js.test(r)),E(r,n,o)&&e.push(r),e},[]);return r+"//"+a+s.reverse().join("/")}function O(e){return gu.test(e)}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return e.trim().split(/\s+/).slice(0,t).join(" ")}function j(e){var t=tu;if(eu.test(e)){var n=eu.exec(e)[1];Vs.encodingExists(n)&&(t=n)}return t}function P(e,t){var n,r=W(e);return t&&bu.test(r)?z(e):null!==(n=r.match(_u))?{method:n[1],url:n[2],version:{major:parseInt(n[3],10),minor:parseInt(n[4],10)},headers:z(e)}:null!==(n=r.match(wu))?{version:{major:parseInt(n[1],10),minor:parseInt(n[2],10)},statusCode:parseInt(n[3],10),statusMessage:n[4],headers:z(e)}:z(e)}function z(e){var t,n,r,a={},i=yu(e),o=i();for(bu.test(o)&&(o=i());o;)" "!==o[0]&&"\t"!==o[0]?(n&&L(n,r,a),t=o.indexOf(":"),n=o.substr(0,t),r=o.substr(t+1).trim(),o=i()):(r+=" "+o.trim(),o=i());return n&&L(n,r,a),a}function N(e){return e&&e._header&&(e=e._header),e&&"function"==typeof e.toString?e.toString().trim():""}function W(e){return e.slice(0,e.indexOf("\r\n"))}function L(e,t,n){switch(e=e.toLowerCase()){case"set-cookie":void 0!==n[e]?n[e].push(t):n[e]=[t];break;case"content-type":case"content-length":case"user-agent":case"referer":case"host":case"authorization":case"proxy-authorization":case"if-modified-since":case"if-unmodified-since":case"from":case"location":case"max-forwards":case"retry-after":case"etag":case"last-modified":case"server":case"age":case"expires":void 0===n[e]&&(n[e]=t);break;default:"string"==typeof n[e]?n[e]+=", "+t:n[e]=t}}function R(e,t){if("function"!=typeof t)throw new Error("Bad callback given: "+t);if(!e)throw new Error("No options given");var n=e.onResponse;if(e="string"==typeof e?{uri:e}:JSON.parse(JSON.stringify(e)),e.onResponse=n,e.verbose&&(R.log=B()),e.url&&(e.uri=e.url,delete e.url),!e.uri&&""!==e.uri)throw new Error("options.uri is a required argument");if("string"!=typeof e.uri)throw new Error("options.uri must be a string");for(var r=["proxy","_redirectsFollowed","maxRedirects","followRedirect"],a=0;a<r.length;a++)if(e[r[a]])throw new Error("options."+r[a]+" is not supported");if(e.callback=t,e.method=e.method||"GET",e.headers=e.headers||{},e.body=e.body||null,e.timeout=e.timeout||R.DEFAULT_TIMEOUT,e.headers.host)throw new Error("Options.headers.host is not supported");e.json&&(e.headers.accept=e.headers.accept||"application/json","GET"!==e.method&&(e.headers["content-type"]="application/json"),"boolean"!=typeof e.json?e.body=JSON.stringify(e.json):"string"!=typeof e.body&&(e.body=JSON.stringify(e.body)));var i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")};if(e.qs){var o="string"==typeof e.qs?e.qs:i(e.qs);e.uri.indexOf("?")!==-1?e.uri=e.uri+"&"+o:e.uri=e.uri+"?"+o}var s=function(e){var t={};t.boundry="-------------------------------"+Math.floor(1e9*Math.random());var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push("--"+t.boundry+'\nContent-Disposition: form-data; name="'+r+'"\n\n'+e[r]+"\n");return n.push("--"+t.boundry+"--"),t.body=n.join(""),t.length=t.body.length,t.type="multipart/form-data; boundary="+t.boundry,t};if(e.form){if("string"==typeof e.form)throw"form name unsupported";if("POST"===e.method){var u=(e.encoding||"application/x-www-form-urlencoded").toLowerCase();switch(e.headers["content-type"]=u,u){case"application/x-www-form-urlencoded":e.body=i(e.form).replace(/%20/g,"+");break;case"multipart/form-data":var c=s(e.form);e.body=c.body,e.headers["content-type"]=c.type;break;default:throw new Error("unsupported encoding:"+u)}}}return e.onResponse=e.onResponse||Y,e.onResponse===!0&&(e.onResponse=t,e.callback=Y),!e.headers.authorization&&e.auth&&(e.headers.authorization="Basic "+I(e.auth.username+":"+e.auth.password)),q(e)}function q(e){function t(){s=!0;var t=new Error("ETIMEDOUT");return t.code="ETIMEDOUT",t.duration=e.timeout,R.log.error("Timeout",{id:o._id,milliseconds:e.timeout}),e.callback(t,o)}function n(t){if(s)return R.log.debug("Ignoring timed out state change",{state:o.readyState,id:o.id});if(R.log.debug("State change",{state:o.readyState,id:o.id,timed_out:s}),o.readyState===Mu.OPENED){R.log.debug("Request started",{id:o.id});for(var n in e.headers)o.setRequestHeader(n,e.headers[n])}else o.readyState===Mu.HEADERS_RECEIVED?r():o.readyState===Mu.LOADING?(r(),a()):o.readyState===Mu.DONE&&(r(),a(),i())}function r(){if(!f.response){if(f.response=!0,R.log.debug("Got response",{id:o.id,status:o.status}),clearTimeout(o.timeoutTimer),o.statusCode=o.status,u&&0==o.statusCode){var t=new Error("CORS request rejected: "+e.uri);return t.cors="rejected",f.loading=!0,f.end=!0,e.callback(t,o)}e.onResponse(null,o)}}function a(){f.loading||(f.loading=!0,R.log.debug("Response body loading",{id:o.id}))}function i(){if(!f.end){if(f.end=!0,R.log.debug("Request done",{id:o.id}),o.body=o.responseText,o.headers=xu(o.getAllResponseHeaders()),e.json)try{o.body=JSON.parse(o.responseText)}catch(t){return e.callback(t,o)}e.callback(null,o,o.body)}}var o=new Mu,s=!1,u=F(e.uri),c="withCredentials"in o;if(Tu+=1,o.seq_id=Tu,o.id=Tu+": "+e.method+" "+e.uri,o._id=o.id,u&&!c){var l=new Error("Browser does not support cross-origin request: "+e.uri);return l.cors="unsupported",e.callback(l,o)}o.timeoutTimer=setTimeout(t,e.timeout);var f={response:!1,loading:!1,end:!1};return o.onreadystatechange=n,o.open(e.method,e.uri,!0),u&&(o.withCredentials=!!e.withCredentials),o.send(e.body),o}function Y(){}function B(){var e,t,n={},r=["trace","debug","info","warn","error"];for(t=0;t<r.length;t++)e=r[t],n[e]=Y,"undefined"!=typeof console&&console&&console[e]&&(n[e]=H(console,e));return n}function H(e,t){function n(n,r){return"object"==typeof r&&(n+=" "+JSON.stringify(r)),e[t].call(e,n)}return n}function F(e){var t,n=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/;try{t=location.href}catch(e){t=document.createElement("a"),t.href="",t=t.href}var r=n.exec(t.toLowerCase())||[],a=n.exec(e.toLowerCase()),i=!(!a||a[1]==r[1]&&a[2]==r[2]&&(a[3]||("http:"===a[1]?80:443))==(r[3]||("http:"===r[1]?80:443)));return i}function I(e){var t,n,r,a,i,o,s,u,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,f=0,d="",h=[];if(!e)return e;do t=e.charCodeAt(l++),n=e.charCodeAt(l++),r=e.charCodeAt(l++),u=t<<16|n<<8|r,a=u>>18&63,i=u>>12&63,o=u>>6&63,s=63&u,h[f++]=c.charAt(a)+c.charAt(i)+c.charAt(o)+c.charAt(s);while(l<e.length);switch(d=h.join(""),e.length%3){case 1:d=d.slice(0,-2)+"==";break;case 2:d=d.slice(0,-1)+"="}return d}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return kn.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(e<=t)){n.next=5;break}return n.next=3,e+=1;case 3:n.next=0;break;case 5:case"end":return n.stop()}},Cu[0],this)}function G(e){var t=e.hostname;return!!t}function $(e){return new ds(function(t,n){Eu(e,function(e,r,a){e?n(e):t({body:a,response:r})})})}function V(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.statusMessage&&"OK"!==e.statusMessage||200!==e.statusCode){if(!e.statusCode)throw new Error("Unable to fetch content. Original exception was "+e.error);if(!t)throw new Error("Resource returned a response status code of "+e.statusCode+" and resource was instructed to reject non-2xx level status codes.")}var n=e.headers,r=n["content-type"],a=n["content-length"];if(zu.test(r))throw new Error("Content-type for this resource was "+r+" and is not allowed.");if(a>Nu)throw new Error("Content for this resource was too large. Maximum content length is "+Nu+".");return!0}function K(e,t,n){return e("meta["+t+"]").each(function(r,a){var i=e(a),o=i.attr(t);i.attr(n,o),i.removeAttr(t)}),e}function X(e){return e=K(e,"content","value"),e=K(e,"property","name")}function J(e){return e("*").not("a").each(function(t,n){var r=e(n),a=r.attr("class"),i=r.attr("id");if(i||a){var o=(a||"")+" "+(i||"");wc.test(o)||bc.test(o)&&r.remove()}}),e}function Z(e){var t=!1;return e("br").each(function(n,r){var a=e(r),i=a.next().get(0);i&&"br"===i.tagName.toLowerCase()?(t=!0,a.remove()):t&&(t=!1,Q(r,e,!0))}),e}function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t(e);if(n){for(var a=e.nextSibling,i=t("<p></p>");a&&(!a.tagName||!vc.test(a.tagName));){var o=a.nextSibling;t(a).appendTo(i),a=o}return r.replaceWith(i),r.remove(),t}return t}function ee(e){return e("div").each(function(t,n){var r=e(n),a=0===r.children(cc).length;a&&re(r,e,"p")}),e}function te(e){return e("span").each(function(t,n){var r=e(n),a=0===r.parents("p, div").length;a&&re(r,e,"p")}),e}function ne(e){return e=Z(e),e=ee(e),e=te(e)}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"p",r=e.get(0);if(!r)return t;var a=Ie(r)||{},i=Ku(a).map(function(e){return e+"="+a[e]}).join(" "),o=void 0;return o=t.browser?"noscript"===r.tagName.toLowerCase()?e.text():e.html():e.contents(),e.replaceWith("<"+n+" "+i+">"+o+"</"+n+">"),t}function ae(e,t){var n=parseInt(e.attr("height"),10),r=parseInt(e.attr("width"),10)||20;return(n||20)<10||r<10?e.remove():n&&e.removeAttr("height"),t}function ie(e,t){return Xu.test(e.attr("src"))&&e.remove(),t}function oe(e,t){return e.find("img").each(function(e,n){var r=t(n);ae(r,t),ie(r,t)}),t}function se(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(0===r.length&&(r=Zu),n){var a=Bs.parse(n),i=a.protocol,o=a.hostname;r=[].concat(Lc(r),['iframe[src^="'+i+"//"+o+'"]'])}return t(r.join(","),e).addClass(Ju),t}function ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return 0===n.length&&(n=Qu),t(n.join(","),e).not("."+Ju).remove(),t}function ce(e,t){var n=t("h1",e);return n.length<3?n.each(function(e,n){return t(n).remove()}):n.each(function(e,n){re(t(n),t,"h2")}),t}function le(e,t){return e.find("*").each(function(e,t){var n=Ie(t);Ge(t,Ku(n).reduce(function(e,t){return nc.test(t)?da({},e,Fc({},t,n[t])):e},{}))}),t("."+Ju,e).removeClass(Ju),e}function fe(e,t){return le(e.parent().length?e.parent():e,t)}function de(e,t){return e.find("p").each(function(e,n){var r=t(n);0===r.find("iframe, img").length&&""===r.text().trim()&&r.remove()}),t}function he(e){var t=e.attr("class"),n=e.attr("id"),r=0;return n&&(Zc.test(n)&&(r+=25),tl.test(n)&&(r-=25)),t&&(0===r&&(Zc.test(t)&&(r+=25),tl.test(t)&&(r-=25)),Xc.test(t)&&(r+=10),Qc.test(t)&&(r+=25)),r}function pe(e){return parseFloat(e.attr("score"))||null}function me(e){return(e.match(/,/g)||[]).length}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"p",n=e/50;if(n>0){var r=void 0;return r=il.test(t)?n-2:n-1.25,Math.min(Math.max(r,0),3)}return 0}function ve(e){var t=1,n=e.text().trim(),r=n.length;return r<25?0:(t+=me(n),t+=ge(r),":"===n.slice(-1)&&(t-=1),t)}function ye(e,t,n){return e.attr("score",n),e}function be(e,t,n){try{var r=we(e,t)+n;ye(e,t,r)}catch(e){}return e}function _e(e,t,n){var r=e.parent();return r&&be(r,t,.25*n),e}function we(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=pe(e);return r?r:(r=Ae(e),n&&(r+=he(e)),_e(e,t,r),r)}function Ae(e){var t=e.get(0),n=t.tagName;return nl.test(n)?ve(e):"div"===n.toLowerCase()?5:rl.test(n)?3:al.test(n)?-3:"th"===n.toLowerCase()?-5:0}function xe(e,t){if(e.get(0)){var n=e.get(0),r=n.tagName;"span"===r&&re(e,t,"div")}}function Me(e,t,n){e&&(xe(e,t),be(e,t,n))}function ke(e,t){return e("p, pre").not("[score]").each(function(n,r){var a=e(r);a=ye(a,e,we(a,e,t));var i=a.parent(),o=Ae(a);Me(i,e,o,t),i&&Me(i.parent(),e,o/2,t)}),e}function Te(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Vc.forEach(function(t){var n=mu(t,2),r=n[0],a=n[1];e(r+" "+a).each(function(t,n){be(e(n).parent(r),e,80)})}),ke(e,t),ke(e,t),e}function Se(e,t,n){if(!e.parent().length)return e;var r=Math.max(10,.25*t),a=n("<div></div>");return e.parent().children().each(function(i,o){var s=n(o);if($c.test(o.tagName))return null;var u=pe(s);if(u)if(s.get(0)===e.get(0))a.append(s);else{var c=0,l=We(s);l<.05&&(c+=20),l>=.5&&(c-=20),s.attr("class")===e.attr("class")&&(c+=.2*t);var f=u+c;if(f>=r)return a.append(s);if("p"===o.tagName){var d=s.text(),h=Ne(d);if(h>80&&l<.25)return a.append(s);if(h<=80&&0===l&&O(d))return a.append(s)}}return null}),1===a.children().length&&a.children().first().get(0)===e.get(0)?e:a}function Ee(e){var t=void 0,n=0;return e("[score]").each(function(r,a){if(!$c.test(a.tagName)){var i=e(a),o=pe(i);o>n&&(n=o,t=i)}}),t?t=Se(t,n,e):e("body")||e("*").first()}function Ce(e,t,n){if(!e.hasClass("entry-content-asset")){var r=M(e.text());if(me(r)<10){var a=t("p",e).length,i=t("input",e).length;if(i>a/3)return void e.remove();var o=r.length,s=t("img",e).length;if(o<25&&0===s)return void e.remove();var u=We(e);if(n<25&&u>.2&&o>75)return void e.remove();if(n>=25&&u>.5){var c=e.get(0).tagName.toLowerCase(),l="ol"===c||"ul"===c;if(l){var f=e.prev();if(f&&":"===M(f.text()).slice(-1))return}return void e.remove()}var d=t("script",e).length;if(d>0&&o<150)return void e.remove()}}}function Oe(e,t){return t(ac,e).each(function(e,n){var r=t(n);if(!(r.hasClass(Ju)||r.find("."+Ju).length>0)){var a=pe(r);a||(a=we(r,t),ye(r,t,a)),a<0?r.remove():Ce(r,t,a)}}),t}function De(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t(oc,e).each(function(r,a){var i=t(a);return 0===t(i,e).prevAll("p").length?i.remove():M(t(a).text())===n?i.remove():he(t(a))<0?i.remove():i}),t}function je(e,t){return t=re(t("html"),t,"div"),t=re(t("body"),t,"div")}function Pe(e,t,n,r){e("["+n+"]",r).each(function(e,r){var a=Ie(r),i=a[n];if(i){var o=Bs.resolve(t,i);Ue(r,n,o)}})}function ze(e,t,n){return["href","src"].forEach(function(r){return Pe(t,n,r,e)}),e}function Ne(e){return e.trim().replace(/\s+/g," ").length}function We(e){var t=Ne(e.text()),n=e.find("a").text(),r=Ne(n);return t>0?r/t:0===t&&r>0?1:0}function Le(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=t.filter(function(e){return n.indexOf(e)!==-1}),i=!0,o=!1,s=void 0;try{for(var u,c=function(){var t=u.value,n="name",a="value",i=e("meta["+n+'="'+t+'"]'),o=i.map(function(t,n){return e(n).attr(a)}).toArray().filter(function(e){return""!==e});if(1===o.length){var s=void 0;return s=r?Ye(o[0],e):o[0],{v:s}}},l=hu(a);!(i=(u=l.next()).done);i=!0){var f=c();if("object"===("undefined"==typeof f?"undefined":Gf(f)))return f.v}}catch(e){o=!0,s=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw s}}return null}function Re(e,t){return!(e.children().length>t)&&!Be(e)}function qe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!0,i=!1,o=void 0;try{for(var s,u=hu(t);!(a=(s=u.next()).done);a=!0){var c=s.value,l=e(c);if(1===l.length){var f=e(l[0]);if(Re(f,n)){var d=void 0;if(d=r?f.text():f.html())return d}}}}catch(e){i=!0,o=e}finally{try{!a&&u.return&&u.return()}finally{if(i)throw o}}return null}function Ye(e,t){var n=t("<span>"+e+"</span>").text();return""===n?e:n}function Be(e){var t=e.parents().toArray(),n=t.find(function(e){var t=Ie(e),n=t.class,r=t.id,a=n+" "+r;return a.includes("comment")});return void 0!==n}function He(e){return e.text().trim().length>=100}function Fe(e){return e(pc).length>0}function Ie(e){var t=e.attribs,n=e.attributes;if(!t&&n){var r=Ku(n).reduce(function(e,t){var r=n[t];return r.name&&r.value?(e[r.name]=r.value,e):e},{});return r}return t}function Ue(e,t,n){return e.attribs?e.attribs[t]=n:e.attributes&&e.setAttribute(t,n),e}function Ge(e,t){if(e.attribs)e.attribs=t;else if(e.attributes){for(;e.attributes.length>0;)e.removeAttribute(e.attributes[0].name);Ku(t).forEach(function(n){e.setAttribute(n,t[n])})}return e}function $e(e){return e("img").each(function(t,n){var r=Ie(n);Ku(r).forEach(function(t){var a=r[t];"src"!==t&&$f.test(a)&&Vf.test(a)&&e(n).attr("src",a)})}),e}function Ve(e,t){return"comment"===t.type}function Ke(e){return e.root().find("*").contents().filter(Ve).remove(),e}function Xe(e){return e(Kf).remove(),e=Ke(e)}function Je(e){return e.supportedDomains?od(e,[e.domain].concat(Lc(e.supportedDomains))):od(e,[e.domain])}function Ze(e){return M(e.replace($h,"$2").trim())}function Qe(e){return e=e.trim(),cp.isWebUri(e)?e:null}function et(e,t){var n=t.$,r=t.excerpt;if(e.length>1e3||e.length<5)return null;if(r&&D(r,10)===D(e,10))return null;var a=Ye(e,n);return Vh.test(a)?null:M(a.trim())}function tt(e,t){var n=e;if(t=t||{},t.preferredOrder=t.preferredOrder||lm,n=n.replace(um,"x"),n=n.replace(cm,"X"),n=n.replace(sm,"[$1]"),n=n.replace(Ap,"dddd"),n=n.replace(xp,"ddd"),n=n.replace(Mp,"dd"),n=n.replace(Sp,"Do"),n=n.replace(kp,"MMMM"),n=n.replace(Tp,"MMM"),n=n.replace(Ep,nt.bind(null,t)),n=n.replace(Cp,"Z"),n=n.replace(Yp,"HH:mm:ss.SSS"),n=n.replace(Bp,"HH:mm:ss.SS"),n=n.replace(Hp,"HH:mm:ss.S"),n=n.replace(zp,"hh:mm:ss$1"),n=n.replace(Lp,"h:mm:ss$1"),n=n.replace(Np,"hh:mm$1"),n=n.replace(Rp,"h:mm$1"),n=n.replace(Wp,"hh$1"),n=n.replace(qp,"h$1"),n=n.replace(Fp,"HH:mm:ss"),n=n.replace(Gp,"H:mm:ss.SSS"),n=n.replace($p,"H:mm:ss.SS"),n=n.replace(Vp,"H:mm:ss.S"),n=n.replace(Up,"H:mm:ss"),n=n.replace(Ip,"HH:mm"),n=n.replace(Kp,"H:mm"),Pp.test(e)?n+="A":jp.test(e)&&(n+="a"),n=n.replace(Xp,"YYYY"),n=n.replace(em,"D/M"),n=n.replace(tm,"D/MM"),n=n.replace(nm,"DD/M"),n=n.replace(rm,"DD/MM"),n=n.replace(am,"M/YY"),n=n.replace(im,"MM/YY"),n.match(om)){var r=/0\d.\d{2}|\d{2}.\d{2}/,a=/\d{1}.\d{2}/;n=n.replace(r,"H.mm"),n=n.replace(a,"h.mm")}return n=n.replace(Jp,"DD"),n=n.replace(Zp,"D"),n=n.replace(Qp,"YY"),n.length<1&&(n=void 0),n}function nt(e,t,n,r,a,i){var o,s=1===Math.min(n.length,a.length,i.length),u=4===Math.max(n.length,a.length,i.length),c="string"==typeof e.preferredOrder?e.preferredOrder:e.preferredOrder[r];return n=parseInt(n,10),a=parseInt(a,10),i=parseInt(i,10),o=[n,a,i],c=c.toUpperCase(),n>31?(o[0]=u?"YYYY":"YY",o[1]=s?"M":"MM",o[2]=s?"D":"DD",o.join(r)):a>12?(o[0]=s?"M":"MM",o[1]=s?"D":"DD",o[2]=u?"YYYY":"YY",o.join(r)):i>31?(o[2]=u?"YYYY":"YY","M"===c[0]&&n<13?(o[0]=s?"M":"MM",o[1]=s?"D":"DD",o.join(r)):(o[0]=s?"D":"DD",o[1]=s?"M":"MM",o.join(r))):(o[c.indexOf("D")]=s?"D":"DD",o[c.indexOf("M")]=s?"M":"MM",o[c.indexOf("Y")]=u?"YYYY":"YY",o.join(r))}function rt(e){return(e.match(ip)||[]).join(" ").replace(Qh,"m").replace(Zh,"$1 $2 $3").replace(Jh,"$1").trim()}function at(e,t,n){return op.test(e)?fp(new Date(e)):t?fp.tz(e,n||dm(e),t):fp(e,n||dm(e))}function it(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.timezone,r=t.format;if(Kh.test(e)||Xh.test(e))return new Date(parseInt(e,10)).toISOString();var a=at(e,n,r);return a.isValid()||(e=rt(e),a=at(e,n,r)),a.isValid()?a.toISOString():null}function ot(e,t){var n=t.$,r=t.cleanConditionally,a=void 0===r||r,i=t.title,o=void 0===i?"":i,s=t.url,u=void 0===s?"":s,c=t.defaultCleaner,l=void 0===c||c;return je(e,n),l&&oe(e,n),ze(e,n,u),se(e,n,u),ue(e,n),ce(e,n),De(e,n,o),l&&Oe(e,n,a),de(e,n),fe(e,n),e}function st(e,t){var n=t.url,r=t.$;if(sp.test(e)&&(e=dt(e,n)),e.length>150){var a=r("h1");1===a.length&&(e=a.text())}return M(Ye(e,r).trim())}function ut(e){return e.reduce(function(e,t,n,r){return e+t})}function ct(e){if(Array.isArray(e))return e;if("string"==typeof e)return e.split("");throw Error("Parameter must be a string or array.")}function lt(e,t){if(e.length>=6){var n=function(){var n=e.reduce(function(e,t){return e[t]=e[t]?e[t]+1:1,e},{}),r=Ku(n).reduce(function(e,t){return e[1]<n[t]?[t,n[t]]:e},[0,0]),a=mu(r,2),i=a[0],o=a[1];o>=2&&i.length<=4&&(e=t.split(i));var s=[e[0],e.slice(-1)],u=s.reduce(function(e,t){return e.length>t.length?e:t},"");return u.length>10?{v:u}:{v:t}}();if("object"===("undefined"==typeof n?"undefined":Gf(n)))return n.v}return null}function ft(e,t){var n=Bs.parse(t),r=n.host,a=r.replace(up,""),i=e[0].toLowerCase().replace(" ",""),o=wm.levenshtein(i,a);if(o>.4&&i.length>5)return e.slice(2).join("");var s=e.slice(-1)[0].toLowerCase().replace(" ",""),u=wm.levenshtein(s,a);return u>.4&&s.length>=5?e.slice(0,-2).join(""):null}function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split(sp);if(1===n.length)return e;var r=lt(n,e);return r?r:(r=ft(n,t),r?r:e)}function ht(e,t){t.stripUnlikelyCandidates&&(e=J(e)),e=ne(e),e=Te(e,t.weightNodes);var n=Ee(e);return n}function pt(e){return(e.attr("class")||"")+" "+(e.attr("id")||"")}function mt(e){e=e.trim();var t=0;return Im.test(e)&&(t+=20),Gm.test(e)&&(t-=20),$m.test(e)&&(t-=10),Vm.test(e)&&(t+=10),t}function gt(e){return e.attr("alt")?5:0}function vt(e){var t=0,n=e.parents("figure").first();1===n.length&&(t+=25);var r=e.parent(),a=void 0;return 1===r.length&&(a=r.parent()),[r,a].forEach(function(e){Xc.test(pt(e))&&(t+=15)}),t}function yt(e){var t=0,n=e.next(),r=n.get(0);return r&&"figcaption"===r.tagName.toLowerCase()&&(t+=25),Xc.test(pt(n))&&(t+=15),t}function bt(e){var t=0,n=parseFloat(e.attr("width")),r=parseFloat(e.attr("height")),a=e.attr("src");if(n&&n<=50&&(t-=50),r&&r<=50&&(t-=50),n&&r&&!a.includes("sprite")){var i=n*r;i<5e3?t-=100:t+=Math.round(i/1e3)}return t}function _t(e,t){return e.length/2-t}function wt(e,t,n){if(e>0){var r=new Qm.SequenceMatcher(null,t,n).ratio(),a=1-r,i=-(250*(a-.2));return e+i}return 0}function At(e,t){var n=0;if(Qs.test(e.trim())){var r=parseInt(e,10);n=r<2?-30:Math.max(0,10-r),t&&t>=r&&(n-=50)}return n}function xt(e,t){return e&&!t?50:0}function Mt(e){return ng.test(e)?-25:0}function kt(e){return(e.attr("class")||"")+" "+(e.attr("id")||"")}function Tt(e){var t=e.parent(),n=!1,r=!1,a=0;return Nc(U(0,4)).forEach(function(){if(0!==t.length){var e=kt(t," ");!n&&mc.test(e)&&(n=!0,a+=25),!r&&hc.test(e)&&ng.test(e)&&(fc.test(e)||(r=!0,a-=25)),t=t.parent()}}),a}function St(e){return ig.test(e)?-200:0}function Et(e,t,n,r,a,i){if(void 0!==i.find(function(t){return e===t}))return!1;if(!e||e===t||e===n)return!1;var o=r.hostname,s=Bs.parse(e),u=s.hostname;if(u!==o)return!1;var c=e.replace(n,"");return!!eg.test(c)&&(!ng.test(a)&&!(a.length>25))}function Ct(e,t){return t.test(e)?0:-25}function Ot(e){return rg.test(e)?50:0}function Dt(e){return ag.test(e)&&rg.test(e)?-65:0}function jt(e){return new RegExp("^"+e,"i")}function Pt(e,t){return(t||e.text())+" "+(e.attr("class")||"")+" "+(e.attr("id")||"")}function zt(e){var t=e.links,n=e.articleUrl,r=e.baseUrl,a=e.parsedUrl,i=e.$,o=e.previousUrls,s=void 0===o?[]:o;a=a||Bs.parse(n);var u=jt(r),c=Fe(i),l=t.reduce(function(e,t){var o=Ie(t);if(!o.href)return e;var l=S(o.href),f=i(t),d=f.text();if(!Et(l,n,r,a,d,s))return e;e[l]?e[l].linkText=e[l].linkText+"|"+d:e[l]={score:0,linkText:d,href:l};var h=e[l],p=Pt(f,d),m=T(l),g=Ct(l,u);return g+=Ot(p),g+=Dt(p),g+=St(p),g+=Tt(f),g+=Mt(l),g+=xt(m,c),g+=At(d,m),g+=wt(g,n,l),h.score=g,e},{});return 0===Ku(l).length?null:l}function Nt(e){var t=Bs.parse(e),n=t.hostname;return n}function Wt(e){return{url:e,domain:Nt(e)}}function Lt(e,t,n,r,a){var i=0,o="";if(e.length<t)return e;for(var s=0,u=e.length;s<u;s++)if(o=e.charAt(s),r.indexOf(o)!==-1&&(i=s),!(s<t))return 0===i?a?e.substring(0,t-1)+n:"":e.substring(0,i)+n;return e}function Rt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;return e=e.replace(/[\s\n]+/g," ").trim(),lg(e,n,{ellipse:"…"})}function qt(e){var t=Ku(mg).find(function(t){return e(t).length>0});return mg[t]}function Yt(e,t,n){t=t||Bs.parse(e);var r=t,a=r.hostname,i=a.split(".").slice(-2).join(".");return Uh[a]||Uh[i]||qt(n)||pg}function Bt(e,t,n){var r=n.clean;return r?(t(r.join(","),e).remove(),e):e}function Ht(e,t,n){var r=n.transforms;return r?(Ku(r).forEach(function(n){var a=t(n,e),i=r[n];"string"==typeof i?a.each(function(e,a){re(t(a),t,r[n])}):"function"==typeof i&&a.each(function(e,n){var r=i(t(n),t);"string"==typeof r&&re(t(n),t,r)})}),e):e}function Ft(e,t,n){return t.find(function(t){if(Array.isArray(t)){if(n)return t.reduce(function(t,n){return t&&e(n).length>0},!0);var r=mu(t,2),a=r[0],i=r[1];return 1===e(a).length&&e(a).attr(i)&&""!==e(a).attr(i).trim()}return 1===e(t).length&&""!==e(t).text().trim()})}function It(e){var t=e.$,n=e.type,r=e.extractionOpts,a=e.extractHtml,i=void 0!==a&&a;if(!r)return null;if("string"==typeof r)return r;var o=r.selectors,s=r.defaultCleaner,u=void 0===s||s,c=Ft(t,o,i);if(!c)return null;var l=void 0;if(i)return Array.isArray(c)?!function(){l=t(c.join(","));var e=t("<div></div>");l.each(function(t,n){e.append(n)}),l=e}():l=t(c),l.wrap(t("<div></div>")),l=l.parent(),l=Ht(l,t,r),l=Bt(l,t,r),l=Am[n](l,da({},e,{defaultCleaner:u})),t.html(l);var f=void 0;if(Array.isArray(c)){var d=mu(c,2),h=d[0],p=d[1];f=t(h).attr(p).trim()}else{var m=t(c);m=Bt(m,t,r),m=Ht(m,t,r),f=m.text().trim()}return u?Am[n](f,da({},e,r)):f}function Ut(e){var t=e.type,n=e.extractor,r=e.fallback,a=void 0===r||r,i=It(da({},e,{extractionOpts:n[t]}));return i?i:a?pg[t](e):null}var Gt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},$t=r,Vt=a;"function"==typeof Gt.setTimeout&&($t=setTimeout),"function"==typeof Gt.clearTimeout&&(Vt=clearTimeout);var Kt,Xt=[],Jt=!1,Zt=-1;l.prototype.run=function(){this.fun.apply(null,this.array)};var Qt="browser",en="browser",tn=!0,nn={},rn=[],an="",on={},sn={},un={},cn=f,ln=f,fn=f,dn=f,hn=f,pn=f,mn=f,gn=Gt.performance||{},vn=gn.now||gn.mozNow||gn.msNow||gn.oNow||gn.webkitNow||function(){return(new Date).getTime()},yn=new Date,bn={nextTick:c,title:Qt,browser:tn,env:nn,argv:rn,version:an,versions:on,on:cn,addListener:ln,once:fn,off:dn,removeListener:hn,removeAllListeners:pn,emit:mn,binding:d,cwd:h,chdir:p,umask:m,hrtime:g,platform:en,release:sn,config:un,uptime:v},_n=n(function(e){!function(t){function n(e,t,n,r){var i=t&&t.prototype instanceof a?t:a,o=Object.create(i.prototype),s=new h(r||[]);return o._invoke=l(e,n,s),o}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function a(){}function i(){}function o(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function c(e){function t(n,a,i,o){var s=r(e[n],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l instanceof u?Promise.resolve(l.arg).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(l).then(function(e){c.value=e,i(c)},o)}o(s.arg)}function n(e,n){function r(){return new Promise(function(r,a){t(e,n,r,a)})}return a=a?a.then(r,r):r()}"object"==typeof bn&&bn.domain&&(t=bn.domain.bind(t));var a;this._invoke=n}function l(e,t,n){var a=x;return function(i,o){if(a===k)throw new Error("Generator is already running");if(a===T){if("throw"===i)throw o;return m()}for(;;){var s=n.delegate;if(s){if("return"===i||"throw"===i&&s.iterator[i]===g){n.delegate=null;var u=s.iterator.return;if(u){var c=r(u,s.iterator,o);if("throw"===c.type){i="throw",o=c.arg;continue}}if("return"===i)continue}var c=r(s.iterator[i],s.iterator,o);if("throw"===c.type){n.delegate=null,i="throw",o=c.arg;continue}i="next",o=g;var l=c.arg;if(!l.done)return a=M,l;n[s.resultName]=l.value,n.next=s.nextLoc,n.delegate=null}if("next"===i)n.sent=n._sent=o;else if("throw"===i){if(a===x)throw a=T,o;n.dispatchException(o)&&(i="next",o=g)}else"return"===i&&n.abrupt("return",o);a=k;var c=r(e,t,n);if("normal"===c.type){a=n.done?T:M;var l={value:c.arg,done:n.done};if(c.arg!==S)return l;n.delegate&&"next"===i&&(o=g)}else"throw"===c.type&&(a=T,i="throw",o=c.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(v.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:g,done:!0}}var g,v=Object.prototype.hasOwnProperty,y="function"==typeof Symbol?Symbol:{},b=y.iterator||"@@iterator",_=y.toStringTag||"@@toStringTag",w="object"==typeof e,A=t.regeneratorRuntime;if(A)return void(w&&(e.exports=A));A=t.regeneratorRuntime=w?e.exports:{},A.wrap=n;var x="suspendedStart",M="suspendedYield",k="executing",T="completed",S={},E=o.prototype=a.prototype;i.prototype=E.constructor=o,o.constructor=i,o[_]=i.displayName="GeneratorFunction",A.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===i||"GeneratorFunction"===(t.displayName||t.name))},A.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,_ in e||(e[_]="GeneratorFunction")),e.prototype=Object.create(E),e},A.awrap=function(e){return new u(e)},s(c.prototype),A.async=function(e,t,r,a){var i=new c(n(e,t,r,a));return A.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},s(E),E[b]=function(){return this},E[_]="Generator",E.toString=function(){return"[object Generator]"},A.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},A.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0, -this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return t("end");if(a.tryLoc<=this.prev){var o=v.call(a,"catchLoc"),s=v.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return t(a.catchLoc,!0);if(this.prev<a.finallyLoc)return t(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return t(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return t(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?this.next=a.finallyLoc:this.complete(i),S},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;d(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},S}}}("object"==typeof Gt?Gt:"object"==typeof window?window:"object"==typeof self?self:this)}),wn="object"==typeof Gt?Gt:"object"==typeof window?window:"object"==typeof self?self:void 0,An=wn.regeneratorRuntime&&Object.getOwnPropertyNames(wn).indexOf("regeneratorRuntime")>=0,xn=An&&wn.regeneratorRuntime;wn.regeneratorRuntime=void 0;var Mn=_n;if(An)wn.regeneratorRuntime=xn;else try{delete wn.regeneratorRuntime}catch(e){wn.regeneratorRuntime=void 0}var kn=Mn,Tn=n(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),Sn=n(function(e){var t=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=t)}),En=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},Cn=En,On=function(e,t,n){if(Cn(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},Dn=function(e){return"object"==typeof e?null!==e:"function"==typeof e},jn=Dn,Pn=function(e){if(!jn(e))throw TypeError(e+" is not an object!");return e},zn=function(e){try{return!!e()}catch(e){return!0}},Nn=!zn(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),Wn=Dn,Ln=Tn.document,Rn=Wn(Ln)&&Wn(Ln.createElement),qn=function(e){return Rn?Ln.createElement(e):{}},Yn=!Nn&&!zn(function(){return 7!=Object.defineProperty(qn("div"),"a",{get:function(){return 7}}).a}),Bn=Dn,Hn=function(e,t){if(!Bn(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Bn(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Bn(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Bn(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Fn=Pn,In=Yn,Un=Hn,Gn=Object.defineProperty,$n=Nn?Object.defineProperty:function(e,t,n){if(Fn(e),t=Un(t,!0),Fn(n),In)try{return Gn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e},Vn={f:$n},Kn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Xn=Vn,Jn=Kn,Zn=Nn?function(e,t,n){return Xn.f(e,t,Jn(1,n))}:function(e,t,n){return e[t]=n,e},Qn=Tn,er=Sn,tr=On,nr=Zn,rr="prototype",ar=function(e,t,n){var r,a,i,o=e&ar.F,s=e&ar.G,u=e&ar.S,c=e&ar.P,l=e&ar.B,f=e&ar.W,d=s?er:er[t]||(er[t]={}),h=d[rr],p=s?Qn:u?Qn[t]:(Qn[t]||{})[rr];s&&(n=t);for(r in n)a=!o&&p&&void 0!==p[r],a&&r in d||(i=a?p[r]:n[r],d[r]=s&&"function"!=typeof p[r]?n[r]:l&&a?tr(i,Qn):f&&p[r]==i?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[rr]=e[rr],t}(i):c&&"function"==typeof i?tr(Function.call,i):i,c&&((d.virtual||(d.virtual={}))[r]=i,e&ar.R&&h&&!h[r]&&nr(h,r,i)))};ar.F=1,ar.G=2,ar.S=4,ar.P=8,ar.B=16,ar.W=32,ar.U=64,ar.R=128;var ir=ar,or={}.hasOwnProperty,sr=function(e,t){return or.call(e,t)},ur={}.toString,cr=function(e){return ur.call(e).slice(8,-1)},lr=cr,fr=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==lr(e)?e.split(""):Object(e)},dr=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},hr=fr,pr=dr,mr=function(e){return hr(pr(e))},gr=Math.ceil,vr=Math.floor,yr=function(e){return isNaN(e=+e)?0:(e>0?vr:gr)(e)},br=yr,_r=Math.min,wr=function(e){return e>0?_r(br(e),9007199254740991):0},Ar=yr,xr=Math.max,Mr=Math.min,kr=function(e,t){return e=Ar(e),e<0?xr(e+t,0):Mr(e,t)},Tr=mr,Sr=wr,Er=kr,Cr=function(e){return function(t,n,r){var a,i=Tr(t),o=Sr(i.length),s=Er(r,o);if(e&&n!=n){for(;o>s;)if(a=i[s++],a!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},Or=Tn,Dr="__core-js_shared__",jr=Or[Dr]||(Or[Dr]={}),Pr=function(e){return jr[e]||(jr[e]={})},zr=0,Nr=Math.random(),Wr=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++zr+Nr).toString(36))},Lr=Pr("keys"),Rr=Wr,qr=function(e){return Lr[e]||(Lr[e]=Rr(e))},Yr=sr,Br=mr,Hr=Cr(!1),Fr=qr("IE_PROTO"),Ir=function(e,t){var n,r=Br(e),a=0,i=[];for(n in r)n!=Fr&&Yr(r,n)&&i.push(n);for(;t.length>a;)Yr(r,n=t[a++])&&(~Hr(i,n)||i.push(n));return i},Ur="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Gr=Ir,$r=Ur,Vr=Object.keys||function(e){return Gr(e,$r)},Kr=Object.getOwnPropertySymbols,Xr={f:Kr},Jr={}.propertyIsEnumerable,Zr={f:Jr},Qr=dr,ea=function(e){return Object(Qr(e))},ta=Vr,na=Xr,ra=Zr,aa=ea,ia=fr,oa=Object.assign,sa=!oa||zn(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=oa({},e)[n]||Object.keys(oa({},t)).join("")!=r})?function(e,t){for(var n=aa(e),r=arguments.length,a=1,i=na.f,o=ra.f;r>a;)for(var s,u=ia(arguments[a++]),c=i?ta(u).concat(i(u)):ta(u),l=c.length,f=0;l>f;)o.call(u,s=c[f++])&&(n[s]=u[s]);return n}:oa,ua=ir;ua(ua.S+ua.F,"Object",{assign:sa});var ca=Sn.Object.assign,la=n(function(e){e.exports={default:ca,__esModule:!0}}),fa=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=la,a=n(r);t.default=a.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}}),da=t(fa),ha=yr,pa=dr,ma=function(e){return function(t,n){var r,a,i=String(pa(t)),o=ha(n),s=i.length;return o<0||o>=s?e?"":void 0:(r=i.charCodeAt(o),r<55296||r>56319||o+1===s||(a=i.charCodeAt(o+1))<56320||a>57343?e?i.charAt(o):r:e?i.slice(o,o+2):(r-55296<<10)+(a-56320)+65536)}},ga=!0,va=Zn,ya={},ba=Vn,_a=Pn,wa=Vr,Aa=Nn?Object.defineProperties:function(e,t){_a(e);for(var n,r=wa(t),a=r.length,i=0;a>i;)ba.f(e,n=r[i++],t[n]);return e},xa=Tn.document&&document.documentElement,Ma=Pn,ka=Aa,Ta=Ur,Sa=qr("IE_PROTO"),Ea=function(){},Ca="prototype",Oa=function(){var e,t=qn("iframe"),n=Ta.length,r="<",a=">";for(t.style.display="none",xa.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+a+"document.F=Object"+r+"/script"+a),e.close(),Oa=e.F;n--;)delete Oa[Ca][Ta[n]];return Oa()},Da=Object.create||function(e,t){var n;return null!==e?(Ea[Ca]=Ma(e),n=new Ea,Ea[Ca]=null,n[Sa]=e):n=Oa(),void 0===t?n:ka(n,t)},ja=n(function(e){var t=Pr("wks"),n=Wr,r=Tn.Symbol,a="function"==typeof r,i=e.exports=function(e){return t[e]||(t[e]=a&&r[e]||(a?r:n)("Symbol."+e))};i.store=t}),Pa=Vn.f,za=sr,Na=ja("toStringTag"),Wa=function(e,t,n){e&&!za(e=n?e:e.prototype,Na)&&Pa(e,Na,{configurable:!0,value:t})},La=Da,Ra=Kn,qa=Wa,Ya={};Zn(Ya,ja("iterator"),function(){return this});var Ba=function(e,t,n){e.prototype=La(Ya,{next:Ra(1,n)}),qa(e,t+" Iterator")},Ha=sr,Fa=ea,Ia=qr("IE_PROTO"),Ua=Object.prototype,Ga=Object.getPrototypeOf||function(e){return e=Fa(e),Ha(e,Ia)?e[Ia]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Ua:null},$a=ga,Va=ir,Ka=va,Xa=Zn,Ja=sr,Za=ya,Qa=Ba,ei=Wa,ti=Ga,ni=ja("iterator"),ri=!([].keys&&"next"in[].keys()),ai="@@iterator",ii="keys",oi="values",si=function(){return this},ui=function(e,t,n,r,a,i,o){Qa(n,t,r);var s,u,c,l=function(e){if(!ri&&e in p)return p[e];switch(e){case ii:return function(){return new n(this,e)};case oi:return function(){return new n(this,e)}}return function(){return new n(this,e)}},f=t+" Iterator",d=a==oi,h=!1,p=e.prototype,m=p[ni]||p[ai]||a&&p[a],g=m||l(a),v=a?d?l("entries"):g:void 0,y="Array"==t?p.entries||m:m;if(y&&(c=ti(y.call(new e)),c!==Object.prototype&&(ei(c,f,!0),$a||Ja(c,ni)||Xa(c,ni,si))),d&&m&&m.name!==oi&&(h=!0,g=function(){return m.call(this)}),$a&&!o||!ri&&!h&&p[ni]||Xa(p,ni,g),Za[t]=g,Za[f]=si,a)if(s={values:d?g:l(oi),keys:i?g:l(ii),entries:v},o)for(u in s)u in p||Ka(p,u,s[u]);else Va(Va.P+Va.F*(ri||h),t,s);return s},ci=ma(!0);ui(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=ci(t,n),this._i+=e.length,{value:e,done:!1})});var li=function(){},fi=function(e,t){return{value:t,done:!!e}},di=li,hi=fi,pi=ya,mi=mr;ui(Array,"Array",function(e,t){this._t=mi(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,hi(1)):"keys"==t?hi(0,n):"values"==t?hi(0,e[n]):hi(0,[n,e[n]])},"values");pi.Arguments=pi.Array,di("keys"),di("values"),di("entries");for(var gi=Tn,vi=Zn,yi=ya,bi=ja("toStringTag"),_i=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],wi=0;wi<5;wi++){var Ai=_i[wi],xi=gi[Ai],Mi=xi&&xi.prototype;Mi&&!Mi[bi]&&vi(Mi,bi,Ai),yi[Ai]=yi.Array}var ki,Ti,Si,Ei=cr,Ci=ja("toStringTag"),Oi="Arguments"==Ei(function(){return arguments}()),Di=function(e,t){try{return e[t]}catch(e){}},ji=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=Di(t=Object(e),Ci))?n:Oi?Ei(t):"Object"==(r=Ei(t))&&"function"==typeof t.callee?"Arguments":r},Pi=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e},zi=Pn,Ni=function(e,t,n,r){try{return r?t(zi(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&zi(a.call(e)),t}},Wi=ya,Li=ja("iterator"),Ri=Array.prototype,qi=function(e){return void 0!==e&&(Wi.Array===e||Ri[Li]===e)},Yi=ji,Bi=ja("iterator"),Hi=ya,Fi=Sn.getIteratorMethod=function(e){if(void 0!=e)return e[Bi]||e["@@iterator"]||Hi[Yi(e)]},Ii=n(function(e){var t=On,n=Ni,r=qi,a=Pn,i=wr,o=Fi,s={},u={},c=e.exports=function(e,c,l,f,d){var h,p,m,g,v=d?function(){return e}:o(e),y=t(l,f,c?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(r(v)){for(h=i(e.length);h>b;b++)if(g=c?y(a(p=e[b])[0],p[1]):y(e[b]),g===s||g===u)return g}else for(m=v.call(e);!(p=m.next()).done;)if(g=n(m,y,p.value,c),g===s||g===u)return g};c.BREAK=s,c.RETURN=u}),Ui=Pn,Gi=En,$i=ja("species"),Vi=function(e,t){var n,r=Ui(e).constructor;return void 0===r||void 0==(n=Ui(r)[$i])?t:Gi(n)},Ki=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)},Xi=On,Ji=Ki,Zi=xa,Qi=qn,eo=Tn,to=eo.process,no=eo.setImmediate,ro=eo.clearImmediate,ao=eo.MessageChannel,io=0,oo={},so="onreadystatechange",uo=function(){var e=+this;if(oo.hasOwnProperty(e)){var t=oo[e];delete oo[e],t()}},co=function(e){uo.call(e.data)};no&&ro||(no=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return oo[++io]=function(){Ji("function"==typeof e?e:Function(e),t)},ki(io),io},ro=function(e){delete oo[e]},"process"==cr(to)?ki=function(e){to.nextTick(Xi(uo,e,1))}:ao?(Ti=new ao,Si=Ti.port2,Ti.port1.onmessage=co,ki=Xi(Si.postMessage,Si,1)):eo.addEventListener&&"function"==typeof postMessage&&!eo.importScripts?(ki=function(e){eo.postMessage(e+"","*")},eo.addEventListener("message",co,!1)):ki=so in Qi("script")?function(e){Zi.appendChild(Qi("script"))[so]=function(){Zi.removeChild(this),uo.call(e)}}:function(e){setTimeout(Xi(uo,e,1),0)});var lo={set:no,clear:ro},fo=Tn,ho=lo.set,po=fo.MutationObserver||fo.WebKitMutationObserver,mo=fo.process,go=fo.Promise,vo="process"==cr(mo),yo=function(){var e,t,n,r=function(){var r,a;for(vo&&(r=mo.domain)&&r.exit();e;){a=e.fn,e=e.next;try{a()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(vo)n=function(){mo.nextTick(r)};else if(po){var a=!0,i=document.createTextNode("");new po(r).observe(i,{characterData:!0}),n=function(){i.data=a=!a}}else if(go&&go.resolve){var o=go.resolve();n=function(){o.then(r)}}else n=function(){ho.call(fo,r)};return function(r){var a={fn:r,next:void 0};t&&(t.next=a),e||(e=a,n()),t=a}},bo=Zn,_o=function(e,t,n){for(var r in t)n&&e[r]?e[r]=t[r]:bo(e,r,t[r]);return e},wo=Tn,Ao=Sn,xo=Vn,Mo=Nn,ko=ja("species"),To=function(e){var t="function"==typeof Ao[e]?Ao[e]:wo[e];Mo&&t&&!t[ko]&&xo.f(t,ko,{configurable:!0,get:function(){return this}})},So=ja("iterator"),Eo=!1;try{var Co=[7][So]();Co.return=function(){Eo=!0},Array.from(Co,function(){throw 2})}catch(e){}var Oo,Do,jo,Po=function(e,t){if(!t&&!Eo)return!1;var n=!1;try{var r=[7],a=r[So]();a.next=function(){return{done:n=!0}},r[So]=function(){return a},e(r)}catch(e){}return n},zo=ga,No=Tn,Wo=On,Lo=ji,Ro=ir,qo=Dn,Yo=En,Bo=Pi,Ho=Ii,Fo=Vi,Io=lo.set,Uo=yo(),Go="Promise",$o=No.TypeError,Vo=No.process,Ko=No[Go],Vo=No.process,Xo="process"==Lo(Vo),Jo=function(){},Zo=!!function(){try{var e=Ko.resolve(1),t=(e.constructor={})[ja("species")]=function(e){e(Jo,Jo)};return(Xo||"function"==typeof PromiseRejectionEvent)&&e.then(Jo)instanceof t}catch(e){}}(),Qo=function(e,t){return e===t||e===Ko&&t===jo},es=function(e){var t;return!(!qo(e)||"function"!=typeof(t=e.then))&&t},ts=function(e){return Qo(Ko,e)?new ns(e):new Do(e)},ns=Do=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw $o("Bad Promise constructor");t=e,n=r}),this.resolve=Yo(t),this.reject=Yo(n)},rs=function(e){try{e()}catch(e){return{error:e}}},as=function(e,t){if(!e._n){e._n=!0;var n=e._c;Uo(function(){for(var r=e._v,a=1==e._s,i=0,o=function(t){var n,i,o=a?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2==e._h&&ss(e),e._h=1),o===!0?n=r:(c&&c.enter(),n=o(r),c&&c.exit()),n===t.promise?u($o("Promise-chain cycle")):(i=es(n))?i.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>i;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&is(e)})}},is=function(e){Io.call(No,function(){var t,n,r,a=e._v;if(os(e)&&(t=rs(function(){Xo?Vo.emit("unhandledRejection",a,e):(n=No.onunhandledrejection)?n({promise:e,reason:a}):(r=No.console)&&r.error&&r.error("Unhandled promise rejection",a)}),e._h=Xo||os(e)?2:1),e._a=void 0,t)throw t.error})},os=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!os(t.promise))return!1;return!0},ss=function(e){Io.call(No,function(){var t;Xo?Vo.emit("rejectionHandled",e):(t=No.onrejectionhandled)&&t({promise:e,reason:e._v})})},us=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),as(t,!0))},cs=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw $o("Promise can't be resolved itself");(t=es(e))?Uo(function(){var r={_w:n,_d:!1};try{t.call(e,Wo(cs,r,1),Wo(us,r,1))}catch(e){us.call(r,e)}}):(n._v=e,n._s=1,as(n,!1))}catch(e){us.call({_w:n,_d:!1},e)}}};Zo||(Ko=function(e){Bo(this,Ko,Go,"_h"),Yo(e),Oo.call(this);try{e(Wo(cs,this,1),Wo(us,this,1))}catch(e){us.call(this,e)}},Oo=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Oo.prototype=_o(Ko.prototype,{then:function(e,t){var n=ts(Fo(this,Ko));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=Xo?Vo.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&as(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),ns=function(){var e=new Oo;this.promise=e,this.resolve=Wo(cs,e,1),this.reject=Wo(us,e,1)}),Ro(Ro.G+Ro.W+Ro.F*!Zo,{Promise:Ko}),Wa(Ko,Go),To(Go),jo=Sn[Go],Ro(Ro.S+Ro.F*!Zo,Go,{reject:function(e){var t=ts(this),n=t.reject;return n(e),t.promise}}),Ro(Ro.S+Ro.F*(zo||!Zo),Go,{resolve:function(e){if(e instanceof Ko&&Qo(e.constructor,this))return e;var t=ts(this),n=t.resolve;return n(e),t.promise}}),Ro(Ro.S+Ro.F*!(Zo&&Po(function(e){Ko.all(e).catch(Jo)})),Go,{all:function(e){var t=this,n=ts(t),r=n.resolve,a=n.reject,i=rs(function(){var n=[],i=0,o=1;Ho(e,!1,function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--o||r(n))},a)}),--o||r(n)});return i&&a(i.error),n.promise},race:function(e){var t=this,n=ts(t),r=n.reject,a=rs(function(){Ho(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return a&&r(a.error),n.promise}});var ls=Sn.Promise,fs=n(function(e){e.exports={default:ls,__esModule:!0}}),ds=t(fs),hs=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=fs,a=n(r);t.default=function(e){return function(){var t=e.apply(this,arguments);return new a.default(function(e,n){function r(i,o){try{var s=t[i](o),u=s.value}catch(e){return void n(e)}return s.done?void e(u):a.default.resolve(u).then(function(e){r("next",e)},function(e){r("throw",e)})}return r("next")})}}}),ps=t(hs),ms={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}},gs=function(e,t,n,r){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var i=/\+/g;e=e.split(t);var o=1e3;r&&"number"==typeof r.maxKeys&&(o=r.maxKeys);var s=e.length;o>0&&s>o&&(s=o);for(var u=0;u<s;++u){var c,l,f,d,h=e[u].replace(i,"%20"),p=h.indexOf(n);p>=0?(c=h.substr(0,p),l=h.substr(p+1)):(c=h,l=""),f=decodeURIComponent(c),d=decodeURIComponent(l),y(a,f)?Array.isArray(a[f])?a[f].push(d):a[f]=[a[f],d]:a[f]=d}return a},vs=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},ys=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(r){var a=encodeURIComponent(vs(r))+n;return Array.isArray(e[r])?e[r].map(function(e){return a+encodeURIComponent(vs(e))}).join(t):a+encodeURIComponent(vs(e[r]))}).join(t):r?encodeURIComponent(vs(r))+n+encodeURIComponent(vs(e)):""},bs=n(function(e,t){t.decode=t.parse=gs,t.encode=t.stringify=ys}),_s=ms,ws=_,As=A,xs=x,Ms=w,ks=b,Ts=/^([a-z0-9.+-]+:)/i,Ss=/:[0-9]*$/,Es=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Cs=["<",">",'"',"`"," ","\r","\n","\t"],Os=["{","}","|","\\","^","`"].concat(Cs),Ds=["'"].concat(Os),js=["%","/","?",";","#"].concat(Ds),Ps=["/","?","#"],zs=255,Ns=/^[+a-z0-9A-Z_-]{0,63}$/,Ws=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ls={javascript:!0,"javascript:":!0},Rs={javascript:!0,"javascript:":!0},qs={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ys=bs;b.prototype.parse=function(e,t,n){if(!_s.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),a=r!==-1&&r<e.indexOf("#")?"?":"#",i=e.split(a),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(a);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var u=Es.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],t?this.query=Ys.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=Ts.exec(s);if(c){c=c[0];var l=c.toLowerCase();this.protocol=l,s=s.substr(c.length)}if(n||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f="//"===s.substr(0,2);!f||c&&Rs[c]||(s=s.substr(2),this.slashes=!0)}if(!Rs[c]&&(f||c&&!qs[c])){for(var d=-1,h=0;h<Ps.length;h++){var p=s.indexOf(Ps[h]);p!==-1&&(d===-1||p<d)&&(d=p)}var m,g;g=d===-1?s.lastIndexOf("@"):s.lastIndexOf("@",d),g!==-1&&(m=s.slice(0,g),s=s.slice(g+1),this.auth=decodeURIComponent(m)),d=-1;for(var h=0;h<js.length;h++){var p=s.indexOf(js[h]);p!==-1&&(d===-1||p<d)&&(d=p)}d===-1&&(d=s.length),this.host=s.slice(0,d),s=s.slice(d),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var y=this.hostname.split(/\./),h=0,b=y.length;h<b;h++){var _=y[h];if(_&&!_.match(Ns)){for(var w="",A=0,x=_.length;A<x;A++)w+=_.charCodeAt(A)>127?"x":_[A];if(!w.match(Ns)){var M=y.slice(0,h),k=y.slice(h+1),T=_.match(Ws);T&&(M.push(T[1]),k.unshift(T[2])),k.length&&(s="/"+k.join(".")+s),this.hostname=M.join(".");break}}}this.hostname.length>zs?this.hostname="":this.hostname=this.hostname.toLowerCase();var S=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+S,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ls[l])for(var h=0,b=Ds.length;h<b;h++){var C=Ds[h];if(s.indexOf(C)!==-1){var O=encodeURIComponent(C);O===C&&(O=escape(C)),s=s.split(C).join(O)}}var D=s.indexOf("#");D!==-1&&(this.hash=s.substr(D),s=s.slice(0,D));var j=s.indexOf("?");if(j!==-1?(this.search=s.substr(j),this.query=s.substr(j+1),t&&(this.query=Ys.parse(this.query)),s=s.slice(0,j)):t&&(this.search="",this.query={}),s&&(this.pathname=s),qs[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var S=this.pathname||"",P=this.search||"";this.path=S+P}return this.href=this.format(),this},b.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&_s.isObject(this.query)&&Object.keys(this.query).length&&(i=Ys.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||qs[t])&&a!==!1?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),o&&"?"!==o.charAt(0)&&(o="?"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+a+n+o+r},b.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},b.prototype.resolveObject=function(e){if(_s.isString(e)){var t=new b;t.parse(e,!1,!0),e=t}for(var n=new b,r=Object.keys(this),a=0;a<r.length;a++){var i=r[a];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var o=Object.keys(e),s=0;s<o.length;s++){var u=o[s];"protocol"!==u&&(n[u]=e[u])}return qs[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!qs[e.protocol]){for(var c=Object.keys(e),l=0;l<c.length;l++){var f=c[l];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||Rs[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||"",p=n.search||"";n.path=h+p}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),v=g||m||n.host&&e.pathname,y=v,_=n.pathname&&n.pathname.split("/")||[],d=e.pathname&&e.pathname.split("/")||[],w=n.protocol&&!qs[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===_[0]?_[0]=n.host:_.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),v=v&&(""===d[0]||""===_[0])),g)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,_=d;else if(d.length)_||(_=[]),_.pop(),_=_.concat(d),n.search=e.search,n.query=e.query;else if(!_s.isNullOrUndefined(e.search)){if(w){n.hostname=n.host=_.shift();var A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");A&&(n.auth=A.shift(),n.host=n.hostname=A.shift())}return n.search=e.search,n.query=e.query,_s.isNull(n.pathname)&&_s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!_.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=_.slice(-1)[0],M=(n.host||e.host||_.length>1)&&("."===x||".."===x)||""===x,k=0,T=_.length;T>=0;T--)x=_[T],"."===x?_.splice(T,1):".."===x?(_.splice(T,1),k++):k&&(_.splice(T,1),k--);if(!v&&!y)for(;k--;k)_.unshift("..");!v||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),M&&"/"!==_.join("/").substr(-1)&&_.push("");var S=""===_[0]||_[0]&&"/"===_[0].charAt(0);if(w){n.hostname=n.host=S?"":_.length?_.shift():"";var A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");A&&(n.auth=A.shift(),n.host=n.hostname=A.shift())}return v=v||n.host&&_.length,v&&!S&&_.unshift(""),_.length?n.pathname=_.join("/"):(n.pathname=null,n.path=null),_s.isNull(n.pathname)&&_s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},b.prototype.parseHost=function(){var e=this.host,t=Ss.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Bs={parse:ws,resolve:As,resolveObject:xs,format:Ms,Url:ks},Hs=n(function(e){!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(e,t){function n(e,t){t=t||te;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function r(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function a(e,t,n){return pe.isFunction(t)?pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?pe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?pe.grep(e,function(e){return oe.call(t,e)>-1!==n}):Me.test(t)?pe.filter(t,e,n):(t=pe.filter(t,e),pe.grep(e,function(e){return oe.call(t,e)>-1!==n&&1===e.nodeType}))}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t={};return pe.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function s(e){return e}function u(e){throw e}function c(e,t,n){var r;try{e&&pe.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&pe.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function l(){te.removeEventListener("DOMContentLoaded",l),e.removeEventListener("load",l),pe.ready()}function f(){this.expando=pe.expando+f.uid++}function d(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Le.test(e)?JSON.parse(e):e)}function h(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n=d(n)}catch(e){}We.set(e,t,n)}else n=void 0;return n}function p(e,t,n,r){var a,i=1,o=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),c=n&&n[3]||(pe.cssNumber[t]?"":"px"),l=(pe.cssNumber[t]||"px"!==c&&+u)&&Ye.exec(pe.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do i=i||".5",l/=i,pe.style(e,t,l+c);while(i!==(i=s()/u)&&1!==i&&--o)}return n&&(l=+l||+u||0,a=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=a)),a}function m(e){var t,n=e.ownerDocument,r=e.nodeName,a=Ie[r];return a?a:(t=n.body.appendChild(n.createElement(r)),a=pe.css(t,"display"),t.parentNode.removeChild(t),"none"===a&&(a="block"),Ie[r]=a,a)}function g(e,t){for(var n,r,a=[],i=0,o=e.length;i<o;i++)r=e[i],r.style&&(n=r.style.display,t?("none"===n&&(a[i]=Ne.get(r,"display")||null,a[i]||(r.style.display="")),""===r.style.display&&He(r)&&(a[i]=m(r))):"none"!==n&&(a[i]="none",Ne.set(r,"display",n)));for(i=0;i<o;i++)null!=a[i]&&(e[i].style.display=a[i]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],n):n}function y(e,t){for(var n=0,r=e.length;n<r;n++)Ne.set(e[n],"globalEval",!t||Ne.get(t[n],"globalEval"))}function b(e,t,n,r,a){for(var i,o,s,u,c,l,f=t.createDocumentFragment(),d=[],h=0,p=e.length;h<p;h++)if(i=e[h],i||0===i)if("object"===pe.type(i))pe.merge(d,i.nodeType?[i]:i);else if(Ke.test(i)){for(o=o||f.appendChild(t.createElement("div")),s=(Ge.exec(i)||["",""])[1].toLowerCase(),u=Ve[s]||Ve._default,o.innerHTML=u[1]+pe.htmlPrefilter(i)+u[2],l=u[0];l--;)o=o.lastChild;pe.merge(d,o.childNodes),o=f.firstChild,o.textContent=""}else d.push(t.createTextNode(i));for(f.textContent="",h=0;i=d[h++];)if(r&&pe.inArray(i,r)>-1)a&&a.push(i);else if(c=pe.contains(i.ownerDocument,i),o=v(f.appendChild(i),"script"),c&&y(o),n)for(l=0;i=o[l++];)$e.test(i.type||"")&&n.push(i);return f}function _(){return!0}function w(){return!1}function A(){try{return te.activeElement}catch(e){}}function x(e,t,n,r,a,i){var o,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)x(e,s,n,r,t[s],i);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),a===!1)a=w;else if(!a)return e;return 1===i&&(o=a,a=function(e){return pe().off(e),o.apply(this,arguments)},a.guid=o.guid||(o.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,a,r,n)})}function M(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function k(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function T(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function S(e,t){var n,r,a,i,o,s,u,c;if(1===t.nodeType){if(Ne.hasData(e)&&(i=Ne.access(e),o=Ne.set(t,i),c=i.events)){delete o.handle,o.events={};for(a in c)for(n=0,r=c[a].length;n<r;n++)pe.event.add(t,a,c[a][n])}We.hasData(e)&&(s=We.access(e),u=pe.extend({},s),We.set(t,u))}}function E(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function C(e,t,r,a){t=ae.apply([],t);var i,o,s,u,c,l,f=0,d=e.length,h=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&nt.test(p))return e.each(function(n){var i=e.eq(n);m&&(t[0]=p.call(this,n,i.html())),C(i,t,r,a)});if(d&&(i=b(t,e[0].ownerDocument,!1,e,a),o=i.firstChild,1===i.childNodes.length&&(i=o),o||a)){for(s=pe.map(v(i,"script"),k),u=s.length;f<d;f++)c=i,f!==h&&(c=pe.clone(c,!0,!0),u&&pe.merge(s,v(c,"script"))),r.call(e[f],c,f);if(u)for(l=s[s.length-1].ownerDocument,pe.map(s,T),f=0;f<u;f++)c=s[f],$e.test(c.type||"")&&!Ne.access(c,"globalEval")&&pe.contains(l,c)&&(c.src?pe._evalUrl&&pe._evalUrl(c.src):n(c.textContent.replace(at,""),l))}return e}function O(e,t,n){for(var r,a=t?pe.filter(t,e):e,i=0;null!=(r=a[i]);i++)n||1!==r.nodeType||pe.cleanData(v(r)), -r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&y(v(r,"script")),r.parentNode.removeChild(r));return e}function D(e,t,n){var r,a,i,o,s=e.style;return n=n||st(e),n&&(o=n.getPropertyValue(t)||n[t],""!==o||pe.contains(e.ownerDocument,e)||(o=pe.style(e,t)),!de.pixelMarginRight()&&ot.test(o)&&it.test(t)&&(r=s.width,a=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=a,s.maxWidth=i)),void 0!==o?o+"":o}function j(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function P(e){if(e in dt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in dt)return e}function z(e,t,n){var r=Ye.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function N(e,t,n,r,a){var i,o=0;for(i=n===(r?"border":"content")?4:"width"===t?1:0;i<4;i+=2)"margin"===n&&(o+=pe.css(e,n+Be[i],!0,a)),r?("content"===n&&(o-=pe.css(e,"padding"+Be[i],!0,a)),"margin"!==n&&(o-=pe.css(e,"border"+Be[i]+"Width",!0,a))):(o+=pe.css(e,"padding"+Be[i],!0,a),"padding"!==n&&(o+=pe.css(e,"border"+Be[i]+"Width",!0,a)));return o}function W(e,t,n){var r,a=!0,i=st(e),o="border-box"===pe.css(e,"boxSizing",!1,i);if(e.getClientRects().length&&(r=e.getBoundingClientRect()[t]),r<=0||null==r){if(r=D(e,t,i),(r<0||null==r)&&(r=e.style[t]),ot.test(r))return r;a=o&&(de.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+N(e,t,n||(o?"border":"content"),a,i)+"px"}function L(e,t,n,r,a){return new L.prototype.init(e,t,n,r,a)}function R(){pt&&(e.requestAnimationFrame(R),pe.fx.tick())}function q(){return e.setTimeout(function(){ht=void 0}),ht=pe.now()}function Y(e,t){var n,r=0,a={height:e};for(t=t?1:0;r<4;r+=2-t)n=Be[r],a["margin"+n]=a["padding"+n]=e;return t&&(a.opacity=a.width=e),a}function B(e,t,n){for(var r,a=(I.tweeners[t]||[]).concat(I.tweeners["*"]),i=0,o=a.length;i<o;i++)if(r=a[i].call(n,t,e))return r}function H(e,t,n){var r,a,i,o,s,u,c,l,f="width"in t||"height"in t,d=this,h={},p=e.style,m=e.nodeType&&He(e),v=Ne.get(e,"fxshow");n.queue||(o=pe._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,d.always(function(){d.always(function(){o.unqueued--,pe.queue(e,"fx").length||o.empty.fire()})}));for(r in t)if(a=t[r],mt.test(a)){if(delete t[r],i=i||"toggle"===a,a===(m?"hide":"show")){if("show"!==a||!v||void 0===v[r])continue;m=!0}h[r]=v&&v[r]||pe.style(e,r)}if(u=!pe.isEmptyObject(t),u||!pe.isEmptyObject(h)){f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],c=v&&v.display,null==c&&(c=Ne.get(e,"display")),l=pe.css(e,"display"),"none"===l&&(c?l=c:(g([e],!0),c=e.style.display||c,l=pe.css(e,"display"),g([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===pe.css(e,"float")&&(u||(d.done(function(){p.display=c}),null==c&&(l=p.display,c="none"===l?"":l)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),u=!1;for(r in h)u||(v?"hidden"in v&&(m=v.hidden):v=Ne.access(e,"fxshow",{display:c}),i&&(v.hidden=!m),m&&g([e],!0),d.done(function(){m||g([e]),Ne.remove(e,"fxshow");for(r in h)pe.style(e,r,h[r])})),u=B(m?v[r]:0,r,d),r in v||(v[r]=u.start,m&&(u.end=u.start,u.start=0))}}function F(e,t){var n,r,a,i,o;for(n in e)if(r=pe.camelCase(n),a=t[r],i=e[n],pe.isArray(i)&&(a=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),o=pe.cssHooks[r],o&&"expand"in o){i=o.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=a)}else t[r]=a}function I(e,t,n){var r,a,i=0,o=I.prefilters.length,s=pe.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var t=ht||q(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,i=1-r,o=0,u=c.tweens.length;o<u;o++)c.tweens[o].run(i);return s.notifyWith(e,[c,i,n]),i<1&&u?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||q(),duration:n.duration,tweens:[],createTween:function(t,n){var r=pe.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(a)return this;for(a=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),l=c.props;for(F(l,c.opts.specialEasing);i<o;i++)if(r=I.prefilters[i].call(c,e,l,c.opts))return pe.isFunction(r.stop)&&(pe._queueHooks(c.elem,c.opts.queue).stop=pe.proxy(r.stop,r)),r;return pe.map(l,B,c),pe.isFunction(c.opts.start)&&c.opts.start.call(e,c),pe.fx.timer(pe.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function U(e){var t=e.match(Oe)||[];return t.join(" ")}function G(e){return e.getAttribute&&e.getAttribute("class")||""}function $(e,t,n,r){var a;if(pe.isArray(t))pe.each(t,function(t,a){n||Tt.test(e)?r(e,a):$(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,n,r)});else if(n||"object"!==pe.type(t))r(e,t);else for(a in t)$(e+"["+a+"]",t[a],n,r)}function V(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,a=0,i=t.toLowerCase().match(Oe)||[];if(pe.isFunction(n))for(;r=i[a++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function K(e,t,n,r){function a(s){var u;return i[s]=!0,pe.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),u}var i={},o=e===Rt;return a(t.dataTypes[0])||!i["*"]&&a("*")}function X(e,t){var n,r,a=pe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((a[n]?e:r||(r={}))[n]=t[n]);return r&&pe.extend(!0,e,r),e}function J(e,t,n){for(var r,a,i,o,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){u.unshift(a);break}if(u[0]in n)i=u[0];else{for(a in n){if(!u[0]||e.converters[a+" "+u[0]]){i=a;break}o||(o=a)}i=i||o}if(i)return i!==u[0]&&u.unshift(i),n[i]}function Z(e,t,n,r){var a,i,o,s,u,c={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(i=l.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=l.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(o=c[u+" "+i]||c["* "+i],!o)for(a in c)if(s=a.split(" "),s[1]===i&&(o=c[u+" "+s[0]]||c["* "+s[0]])){o===!0?o=c[a]:c[a]!==!0&&(i=s[0],l.unshift(s[1]));break}if(o!==!0)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}function Q(e){return pe.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ee=[],te=e.document,ne=Object.getPrototypeOf,re=ee.slice,ae=ee.concat,ie=ee.push,oe=ee.indexOf,se={},ue=se.toString,ce=se.hasOwnProperty,le=ce.toString,fe=le.call(Object),de={},he="3.1.1",pe=function(e,t){return new pe.fn.init(e,t)},me=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ge=/^-ms-/,ve=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:he,constructor:pe,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ie,sort:ee.sort,splice:ee.splice},pe.extend=pe.fn.extend=function(){var e,t,n,r,a,i,o=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[s]||{},s++),"object"==typeof o||pe.isFunction(o)||(o={}),s===u&&(o=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],r=e[t],o!==r&&(c&&r&&(pe.isPlainObject(r)||(a=pe.isArray(r)))?(a?(a=!1,i=n&&pe.isArray(n)?n:[]):i=n&&pe.isPlainObject(n)?n:{},o[t]=pe.extend(c,i,r)):void 0!==r&&(o[t]=r));return o},pe.extend({expando:"jQuery"+(he+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=pe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ue.call(e))&&(!(t=ne(e))||(n=ce.call(t,"constructor")&&t.constructor,"function"==typeof n&&le.call(n)===fe))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?se[ue.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(ge,"ms-").replace(ve,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,a=0;if(r(e))for(n=e.length;a<n&&t.call(e[a],a,e[a])!==!1;a++);else for(a in e)if(t.call(e[a],a,e[a])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(me,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(r(Object(e))?pe.merge(n,"string"==typeof e?[e]:e):ie.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:oe.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,a=e.length;r<n;r++)e[a++]=t[r];return e.length=a,e},grep:function(e,t,n){for(var r,a=[],i=0,o=e.length,s=!n;i<o;i++)r=!t(e[i],i),r!==s&&a.push(e[i]);return a},map:function(e,t,n){var a,i,o=0,s=[];if(r(e))for(a=e.length;o<a;o++)i=t(e[o],o,n),null!=i&&s.push(i);else for(o in e)i=t(e[o],o,n),null!=i&&s.push(i);return ae.apply([],s)},guid:1,proxy:function(e,t){var n,r,a;if("string"==typeof t&&(n=e[t],t=e,e=n),pe.isFunction(e))return r=re.call(arguments,2),a=function(){return e.apply(t||this,r.concat(re.call(arguments)))},a.guid=e.guid=e.guid||pe.guid++,a},now:Date.now,support:de}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=ee[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){se["[object "+t+"]"]=t.toLowerCase()});var be=function(e){function t(e,t,n,r){var a,i,o,s,u,c,l,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:B)!==P&&j(t),t=t||P,N)){if(11!==p&&(u=ve.exec(e)))if(a=u[1]){if(9===p){if(!(o=t.getElementById(a)))return n;if(o.id===a)return n.push(o),n}else if(d&&(o=d.getElementById(a))&&q(t,o)&&o.id===a)return n.push(o),n}else{if(u[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=u[3])&&A.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(A.qsa&&!G[e+" "]&&(!W||!W.test(e))){if(1!==p)d=t,l=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,Ae):t.setAttribute("id",s=Y),c=T(e),i=c.length;i--;)c[i]="#"+s+" "+h(c[i]);l=c.join(","),d=ye.test(e)&&f(t.parentNode)||t}if(l)try{return Z.apply(n,d.querySelectorAll(l)),n}catch(e){}finally{s===Y&&t.removeAttribute("id")}}}return E(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>x.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[Y]=!0,e}function a(e){var t=P.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)x.attrHandle[n[r]]=t}function o(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Me(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var a,i=e([],n.length,t),o=i.length;o--;)n[a=i[o]]&&(n[a]=!(r[a]=n[a]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function h(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,a=t.next,i=a||r,o=n&&"parentNode"===i,s=F++;return t.first?function(t,n,a){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,a);return!1}:function(t,n,u){var c,l,f,d=[H,s];if(u){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||o)if(f=t[Y]||(t[Y]={}),l=f[t.uniqueID]||(f[t.uniqueID]={}),a&&a===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[i])&&c[0]===H&&c[1]===s)return d[2]=c[2];if(l[i]=d,d[2]=e(t,n,u))return!0}return!1}}function m(e){return e.length>1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var a=0,i=n.length;a<i;a++)t(e,n[a],r);return r}function v(e,t,n,r,a){for(var i,o=[],s=0,u=e.length,c=null!=t;s<u;s++)(i=e[s])&&(n&&!n(i,r,a)||(o.push(i),c&&t.push(s)));return o}function y(e,t,n,a,i,o){return a&&!a[Y]&&(a=y(a)),i&&!i[Y]&&(i=y(i,o)),r(function(r,o,s,u){var c,l,f,d=[],h=[],p=o.length,m=r||g(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:v(m,d,e,s,u),b=n?i||(r?e:p||a)?[]:o:y;if(n&&n(y,b,s,u),a)for(c=v(b,h),a(c,[],s,u),l=c.length;l--;)(f=c[l])&&(b[h[l]]=!(y[h[l]]=f));if(r){if(i||e){if(i){for(c=[],l=b.length;l--;)(f=b[l])&&c.push(y[l]=f);i(null,b=[],c,u)}for(l=b.length;l--;)(f=b[l])&&(c=i?ee(r,f):d[l])>-1&&(r[c]=!(o[c]=f))}}else b=v(b===o?b.splice(p,b.length):b),i?i(null,o,b,u):Z.apply(o,b)})}function b(e){for(var t,n,r,a=e.length,i=x.relative[e[0].type],o=i||x.relative[" "],s=i?1:0,u=p(function(e){return e===t},o,!0),c=p(function(e){return ee(t,e)>-1},o,!0),l=[function(e,n,r){var a=!i&&(r||n!==C)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,a}];s<a;s++)if(n=x.relative[e[s].type])l=[p(m(l),n)];else{if(n=x.filter[e[s].type].apply(null,e[s].matches),n[Y]){for(r=++s;r<a&&!x.relative[e[r].type];r++);return y(s>1&&m(l),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<r&&b(e.slice(s,r)),r<a&&b(e=e.slice(r)),r<a&&h(e))}l.push(n)}return m(l)}function _(e,n){var a=n.length>0,i=e.length>0,o=function(r,o,s,u,c){var l,f,d,h=0,p="0",m=r&&[],g=[],y=C,b=r||i&&x.find.TAG("*",c),_=H+=null==y?1:Math.random()||.1,w=b.length;for(c&&(C=o===P||o||c);p!==w&&null!=(l=b[p]);p++){if(i&&l){for(f=0,o||l.ownerDocument===P||(j(l),s=!N);d=e[f++];)if(d(l,o||P,s)){u.push(l);break}c&&(H=_)}a&&((l=!d&&l)&&h--,r&&m.push(l))}if(h+=p,a&&p!==h){for(f=0;d=n[f++];)d(m,g,o,s);if(r){if(h>0)for(;p--;)m[p]||g[p]||(g[p]=X.call(u));g=v(g)}Z.apply(u,g),c&&!r&&g.length>0&&h+n.length>1&&t.uniqueSort(u)}return c&&(H=_,C=y),m};return a?r(o):o}var w,A,x,M,k,T,S,E,C,O,D,j,P,z,N,W,L,R,q,Y="sizzle"+1*new Date,B=e.document,H=0,F=0,I=n(),U=n(),G=n(),$=function(e,t){return e===t&&(D=!0),0},V={}.hasOwnProperty,K=[],X=K.pop,J=K.push,Z=K.push,Q=K.slice,ee=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ae="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ie=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ae+")*)|.*)\\)|)",oe=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(ie),de=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ae),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_e=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ae=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},xe=function(){j()},Me=p(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Z.apply(K=Q.call(B.childNodes),B.childNodes),K[B.childNodes.length].nodeType}catch(e){Z={apply:K.length?function(e,t){J.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}A=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==P&&9===r.nodeType&&r.documentElement?(P=r,z=P.documentElement,N=!k(P),B!==P&&(n=P.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",xe,!1):n.attachEvent&&n.attachEvent("onunload",xe)),A.attributes=a(function(e){return e.className="i",!e.getAttribute("className")}),A.getElementsByTagName=a(function(e){return e.appendChild(P.createComment("")),!e.getElementsByTagName("*").length}),A.getElementsByClassName=ge.test(P.getElementsByClassName),A.getById=a(function(e){return z.appendChild(e).id=Y,!P.getElementsByName||!P.getElementsByName(Y).length}),A.getById?(x.filter.ID=function(e){var t=e.replace(be,_e);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&N){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var t=e.replace(be,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&N){var n,r,a,i=t.getElementById(e);if(i){if(n=i.getAttributeNode("id"),n&&n.value===e)return[i];for(a=t.getElementsByName(e),r=0;i=a[r++];)if(n=i.getAttributeNode("id"),n&&n.value===e)return[i]}return[]}}),x.find.TAG=A.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):A.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],a=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[a++];)1===n.nodeType&&r.push(n);return r}return i},x.find.CLASS=A.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&N)return t.getElementsByClassName(e)},L=[],W=[],(A.qsa=ge.test(P.querySelectorAll))&&(a(function(e){z.appendChild(e).innerHTML="<a id='"+Y+"'></a><select id='"+Y+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&W.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||W.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+Y+"-]").length||W.push("~="),e.querySelectorAll(":checked").length||W.push(":checked"),e.querySelectorAll("a#"+Y+"+*").length||W.push(".#.+[+~]")}),a(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=P.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&W.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&W.push(":enabled",":disabled"),z.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&W.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),W.push(",.*:")})),(A.matchesSelector=ge.test(R=z.matches||z.webkitMatchesSelector||z.mozMatchesSelector||z.oMatchesSelector||z.msMatchesSelector))&&a(function(e){A.disconnectedMatch=R.call(e,"*"),R.call(e,"[s!='']:x"),L.push("!=",ie)}),W=W.length&&new RegExp(W.join("|")),L=L.length&&new RegExp(L.join("|")),t=ge.test(z.compareDocumentPosition),q=t||ge.test(z.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!A.sortDetached&&t.compareDocumentPosition(e)===n?e===P||e.ownerDocument===B&&q(B,e)?-1:t===P||t.ownerDocument===B&&q(B,t)?1:O?ee(O,e)-ee(O,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,a=e.parentNode,i=t.parentNode,s=[e],u=[t];if(!a||!i)return e===P?-1:t===P?1:a?-1:i?1:O?ee(O,e)-ee(O,t):0;if(a===i)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?o(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},P):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&j(e),n=n.replace(le,"='$1']"),A.matchesSelector&&N&&!G[n+" "]&&(!L||!L.test(n))&&(!W||!W.test(n)))try{var r=R.call(e,n);if(r||A.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&j(e),q(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&j(e);var n=x.attrHandle[t.toLowerCase()],r=n&&V.call(x.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==r?r:A.attributes||!N?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Ae)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,a=0;if(D=!A.detectDuplicates,O=!A.sortStable&&e.slice(0),e.sort($),D){for(;t=e[a++];)t===e[a]&&(r=n.push(a));for(;r--;)e.splice(n[r],1)}return O=null,e},M=t.getText=function(e){var t,n="",r=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=M(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[r++];)n+=M(t);return n},x=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(be,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=T(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&I(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(a){var i=t.attr(a,e);return null==i?"!="===n:!n||(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(oe," ")+" ").indexOf(r)>-1:"|="===n&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,a){var i="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,h,p,m=i!==o?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(g){if(i){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&y){for(d=g,f=d[Y]||(d[Y]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],h=c[0]===H&&c[1],b=h&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(b=h=0)||p.pop();)if(1===d.nodeType&&++b&&d===t){l[e]=[H,h,b];break}}else if(y&&(d=t,f=d[Y]||(d[Y]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],h=c[0]===H&&c[1],b=h),b===!1)for(;(d=++h&&d&&d[m]||(b=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(f=d[Y]||(d[Y]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[H,b]),d!==t)););return b-=a,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var a,i=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[Y]?i(n):i.length>1?(a=[e,e,"",n],x.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,a=i(e,n),o=a.length;o--;)r=ee(e,a[o]),e[r]=!(t[r]=a[o])}):function(e){return i(e,0,a)}):i}},pseudos:{not:r(function(e){var t=[],n=[],a=S(e.replace(se,"$1"));return a[Y]?r(function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))}):function(e,r,i){return t[0]=e,a(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,_e),function(t){return(t.textContent||t.innerText||M(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,_e).toLowerCase(),function(t){var n;do if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===z},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},x.pseudos.nth=x.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})x.pseudos[w]=u(w);return d.prototype=x.filters=x.pseudos,x.setFilters=new d,T=t.tokenize=function(e,n){var r,a,i,o,s,u,c,l=U[e+" "];if(l)return n?0:l.slice(0);for(s=e,u=[],c=x.preFilter;s;){r&&!(a=ue.exec(s))||(a&&(s=s.slice(a[0].length)||s),u.push(i=[])),r=!1,(a=ce.exec(s))&&(r=a.shift(),i.push({value:r,type:a[0].replace(se," ")}),s=s.slice(r.length));for(o in x.filter)!(a=he[o].exec(s))||c[o]&&!(a=c[o](a))||(r=a.shift(),i.push({value:r,type:o,matches:a}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):U(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],a=[],i=G[e+" "];if(!i){for(t||(t=T(e)),n=t.length;n--;)i=b(t[n]),i[Y]?r.push(i):a.push(i);i=G(e,_(a,r)),i.selector=e}return i},E=t.select=function(e,t,n,r){var a,i,o,s,u,c="function"==typeof e&&e,l=!r&&T(e=c.selector||e);if(n=n||[],1===l.length){if(i=l[0]=l[0].slice(0),i.length>2&&"ID"===(o=i[0]).type&&9===t.nodeType&&N&&x.relative[i[1].type]){if(t=(x.find.ID(o.matches[0].replace(be,_e),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(a=he.needsContext.test(e)?0:i.length;a--&&(o=i[a],!x.relative[s=o.type]);)if((u=x.find[s])&&(r=u(o.matches[0].replace(be,_e),ye.test(i[0].type)&&f(t.parentNode)||t))){if(i.splice(a,1),e=r.length&&h(i),!e)return Z.apply(n,r),n;break}}return(c||S(e,l))(r,t,!N,n,!t||ye.test(e)&&f(t.parentNode)||t),n},A.sortStable=Y.split("").sort($).join("")===Y,A.detectDuplicates=!!D,j(),A.sortDetached=a(function(e){return 1&e.compareDocumentPosition(P.createElement("fieldset"))}),a(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),A.attributes&&a(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),a(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=be,pe.expr=be.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=be.uniqueSort,pe.text=be.getText,pe.isXMLDoc=be.isXML,pe.contains=be.contains,pe.escapeSelector=be.escape;var _e=function(e,t,n){for(var r=[],a=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(a&&pe(e).is(n))break;r.push(e)}return r},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ae=pe.expr.match.needsContext,xe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Me=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n,r=this.length,a=this;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t<r;t++)if(pe.contains(a[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)pe.find(e,a[t],n);return r>1?pe.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&Ae.test(e)?pe(e):e||[],!1).length}});var ke,Te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Se=pe.fn.init=function(e,t,n){var r,a;if(!e)return this;if(n=n||ke,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Te.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),xe.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return a=te.getElementById(r[2]),a&&(this[0]=a,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):pe.isFunction(e)?void 0!==n.ready?n.ready(e):e(pe):pe.makeArray(e,this)};Se.prototype=pe.fn,ke=pe(te);var Ee=/^(?:parents|prev(?:Until|All))/,Ce={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t=pe(e,this),n=t.length; -return this.filter(function(){for(var e=0;e<n;e++)if(pe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,a=this.length,i=[],o="string"!=typeof e&&pe(e);if(!Ae.test(e))for(;r<a;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?pe.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?oe.call(pe(e),this[0]):oe.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _e(e,"parentNode")},parentsUntil:function(e,t,n){return _e(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return _e(e,"nextSibling")},prevAll:function(e){return _e(e,"previousSibling")},nextUntil:function(e,t,n){return _e(e,"nextSibling",n)},prevUntil:function(e,t,n){return _e(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return e.contentDocument||pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var a=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(a=pe.filter(r,a)),this.length>1&&(Ce[e]||pe.uniqueSort(a),Ee.test(e)&&a.reverse()),this.pushStack(a)}});var Oe=/[^\x20\t\r\n\f]+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,a,i=[],s=[],u=-1,c=function(){for(a=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u<i.length;)i[u].apply(n[0],n[1])===!1&&e.stopOnFalse&&(u=i.length,n=!1);e.memory||(n=!1),t=!1,a&&(i=n?[]:"")},l={add:function(){return i&&(n&&!t&&(u=i.length-1,s.push(n)),function t(n){pe.each(n,function(n,r){pe.isFunction(r)?e.unique&&l.has(r)||i.push(r):r&&r.length&&"string"!==pe.type(r)&&t(r)})}(arguments),n&&!t&&c()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,i,n))>-1;)i.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return a=s=[],i=n="",this},disabled:function(){return!i},lock:function(){return a=s=[],n||t||(i=n=""),this},locked:function(){return!!a},fireWith:function(e,n){return a||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},pe.extend({Deferred:function(t){var n=[["notify","progress",pe.Callbacks("memory"),pe.Callbacks("memory"),2],["resolve","done",pe.Callbacks("once memory"),pe.Callbacks("once memory"),0,"resolved"],["reject","fail",pe.Callbacks("once memory"),pe.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return pe.Deferred(function(t){pe.each(n,function(n,r){var a=pe.isFunction(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,a?[e]:arguments)})}),e=null}).promise()},then:function(t,r,a){function i(t,n,r,a){return function(){var c=this,l=arguments,f=function(){var e,f;if(!(t<o)){if(e=r.apply(c,l),e===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,pe.isFunction(f)?a?f.call(e,i(o,n,s,a),i(o,n,u,a)):(o++,f.call(e,i(o,n,s,a),i(o,n,u,a),i(o,n,s,n.notifyWith))):(r!==s&&(c=void 0,l=[e]),(a||n.resolveWith)(c,l))}},d=a?f:function(){try{f()}catch(e){pe.Deferred.exceptionHook&&pe.Deferred.exceptionHook(e,d.stackTrace),t+1>=o&&(r!==u&&(c=void 0,l=[e]),n.rejectWith(c,l))}};t?d():(pe.Deferred.getStackHook&&(d.stackTrace=pe.Deferred.getStackHook()),e.setTimeout(d))}}var o=0;return pe.Deferred(function(e){n[0][3].add(i(0,e,pe.isFunction(a)?a:s,e.notifyWith)),n[1][3].add(i(0,e,pe.isFunction(t)?t:s)),n[2][3].add(i(0,e,pe.isFunction(r)?r:u))}).promise()},promise:function(e){return null!=e?pe.extend(e,a):a}},i={};return pe.each(n,function(e,t){var o=t[2],s=t[5];a[t[1]]=o.add,s&&o.add(function(){r=s},n[3-e][2].disable,n[0][2].lock),o.add(t[3].fire),i[t[0]]=function(){return i[t[0]+"With"](this===i?void 0:this,arguments),this},i[t[0]+"With"]=o.fireWith}),a.promise(i),t&&t.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),a=re.call(arguments),i=pe.Deferred(),o=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?re.call(arguments):n,--t||i.resolveWith(r,a)}};if(t<=1&&(c(e,i.done(o(n)).resolve,i.reject),"pending"===i.state()||pe.isFunction(a[n]&&a[n].then)))return i.then();for(;n--;)c(a[n],o(n),i.reject);return i.promise()}});var De=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;pe.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&De.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},pe.readyException=function(t){e.setTimeout(function(){throw t})};var je=pe.Deferred();pe.fn.ready=function(e){return je.then(e).catch(function(e){pe.readyException(e)}),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(e===!0?--pe.readyWait:pe.isReady)||(pe.isReady=!0,e!==!0&&--pe.readyWait>0||je.resolveWith(te,[pe]))}}),pe.ready.then=je.then,"complete"===te.readyState||"loading"!==te.readyState&&!te.documentElement.doScroll?e.setTimeout(pe.ready):(te.addEventListener("DOMContentLoaded",l),e.addEventListener("load",l));var Pe=function(e,t,n,r,a,i,o){var s=0,u=e.length,c=null==n;if("object"===pe.type(n)){a=!0;for(s in n)Pe(e,t,s,n[s],!0,i,o)}else if(void 0!==r&&(a=!0,pe.isFunction(r)||(o=!0),c&&(o?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(pe(e),n)})),t))for(;s<u;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return a?e:c?t.call(e):u?t(e[0],n):i},ze=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};f.uid=1,f.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ze(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,a=this.cache(e);if("string"==typeof t)a[pe.camelCase(t)]=n;else for(r in t)a[pe.camelCase(r)]=t[r];return a},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][pe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){pe.isArray(t)?t=t.map(pe.camelCase):(t=pe.camelCase(t),t=t in r?[t]:t.match(Oe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||pe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!pe.isEmptyObject(t)}};var Ne=new f,We=new f,Le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Re=/[A-Z]/g;pe.extend({hasData:function(e){return We.hasData(e)||Ne.hasData(e)},data:function(e,t,n){return We.access(e,t,n)},removeData:function(e,t){We.remove(e,t)},_data:function(e,t,n){return Ne.access(e,t,n)},_removeData:function(e,t){Ne.remove(e,t)}}),pe.fn.extend({data:function(e,t){var n,r,a,i=this[0],o=i&&i.attributes;if(void 0===e){if(this.length&&(a=We.get(i),1===i.nodeType&&!Ne.get(i,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&(r=o[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),h(i,r,a[r])));Ne.set(i,"hasDataAttrs",!0)}return a}return"object"==typeof e?this.each(function(){We.set(this,e)}):Pe(this,function(t){var n;if(i&&void 0===t){if(n=We.get(i,e),void 0!==n)return n;if(n=h(i,e),void 0!==n)return n}else this.each(function(){We.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){We.remove(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Ne.get(e,t),n&&(!r||pe.isArray(n)?r=Ne.access(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,a=n.shift(),i=pe._queueHooks(e,t),o=function(){pe.dequeue(e,t)};"inprogress"===a&&(a=n.shift(),r--),a&&("fx"===t&&n.unshift("inprogress"),delete i.stop,a.call(e,o,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ne.get(e,n)||Ne.access(e,n,{empty:pe.Callbacks("once memory").add(function(){Ne.remove(e,[t+"queue",n])})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,a=pe.Deferred(),i=this,o=this.length,s=function(){--r||a.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)n=Ne.get(i[o],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),a.promise(t)}});var qe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ye=new RegExp("^(?:([+-])=|)("+qe+")([a-z%]*)$","i"),Be=["Top","Right","Bottom","Left"],He=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&pe.contains(e.ownerDocument,e)&&"none"===pe.css(e,"display")},Fe=function(e,t,n,r){var a,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];a=n.apply(e,r||[]);for(i in t)e.style[i]=o[i];return a},Ie={};pe.fn.extend({show:function(){return g(this,!0)},hide:function(){return g(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){He(this)?pe(this).show():pe(this).hide()})}});var Ue=/^(?:checkbox|radio)$/i,Ge=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,$e=/^$|\/(?:java|ecma)script/i,Ve={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td;var Ke=/<|&#?\w+;/;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),de.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",de.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Xe=te.documentElement,Je=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qe=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,r,a){var i,o,s,u,c,l,f,d,h,p,m,g=Ne.get(e);if(g)for(n.handler&&(i=n,n=i.handler,a=i.selector),a&&pe.find.matchesSelector(Xe,a),n.guid||(n.guid=pe.guid++),(u=g.events)||(u=g.events={}),(o=g.handle)||(o=g.handle=function(t){return"undefined"!=typeof pe&&pe.event.triggered!==t.type?pe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],c=t.length;c--;)s=Qe.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h&&(f=pe.event.special[h]||{},h=(a?f.delegateType:f.bindType)||h,f=pe.event.special[h]||{},l=pe.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:a,needsContext:a&&pe.expr.match.needsContext.test(a),namespace:p.join(".")},i),(d=u[h])||(d=u[h]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,p,o)!==!1||e.addEventListener&&e.addEventListener(h,o)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),a?d.splice(d.delegateCount++,0,l):d.push(l),pe.event.global[h]=!0)},remove:function(e,t,n,r,a){var i,o,s,u,c,l,f,d,h,p,m,g=Ne.hasData(e)&&Ne.get(e);if(g&&(u=g.events)){for(t=(t||"").match(Oe)||[""],c=t.length;c--;)if(s=Qe.exec(t[c])||[],h=m=s[1],p=(s[2]||"").split(".").sort(),h){for(f=pe.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,d=u[h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=i=d.length;i--;)l=d[i],!a&&m!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(i,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));o&&!d.length&&(f.teardown&&f.teardown.call(e,p,g.handle)!==!1||pe.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)pe.event.remove(e,h+t[c],n,r,!0);pe.isEmptyObject(u)&&Ne.remove(e,"handle events")}},dispatch:function(e){var t,n,r,a,i,o,s=pe.event.fix(e),u=new Array(arguments.length),c=(Ne.get(this,"events")||{})[s.type]||[],l=pe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,s)!==!1){for(o=pe.event.handlers.call(this,s,c),t=0;(a=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=a.elem,n=0;(i=a.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,r=((pe.event.special[i.origType]||{}).handle||i.handler).apply(a.elem,u),void 0!==r&&(s.result=r)===!1&&(s.preventDefault(),s.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,a,i,o,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(i=[],o={},n=0;n<u;n++)r=t[n],a=r.selector+" ",void 0===o[a]&&(o[a]=r.needsContext?pe(a,this).index(c)>-1:pe.find(a,this,null,[c]).length),o[a]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(pe.Event.prototype,e,{enumerable:!0,configurable:!0,get:pe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[pe.expando]?e:new pe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==A()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===A()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&pe.nodeName(this,"input"))return this.click(),!1},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},pe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?_:w,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:w,isPropagationStopped:w,isImmediatePropagationStopped:w,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=_,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=_,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=_,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},pe.event.addProp),pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,a=e.relatedTarget,i=e.handleObj;return a&&(a===r||pe.contains(r,a))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),pe.fn.extend({on:function(e,t,n,r){return x(this,e,t,n,r)},one:function(e,t,n,r){return x(this,e,t,n,r,1)},off:function(e,t,n){var r,a;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,pe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(a in e)this.off(a,t,e[a]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=w),this.each(function(){pe.event.remove(this,e,n,t)})}});var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,at=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;pe.extend({htmlPrefilter:function(e){return e.replace(et,"<$1></$2>")},clone:function(e,t,n){var r,a,i,o,s=e.cloneNode(!0),u=pe.contains(e.ownerDocument,e);if(!(de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(o=v(s),i=v(e),r=0,a=i.length;r<a;r++)E(i[r],o[r]);if(t)if(n)for(i=i||v(e),o=o||v(s),r=0,a=i.length;r<a;r++)S(i[r],o[r]);else S(e,s);return o=v(s,"script"),o.length>0&&y(o,!u&&v(e,"script")),s},cleanData:function(e){for(var t,n,r,a=pe.event.special,i=0;void 0!==(n=e[i]);i++)if(ze(n)){if(t=n[Ne.expando]){if(t.events)for(r in t.events)a[r]?pe.event.remove(n,r):pe.removeEvent(n,r,t.handle);n[Ne.expando]=void 0}n[We.expando]&&(n[We.expando]=void 0)}}}),pe.fn.extend({detach:function(e){return O(this,e,!0)},remove:function(e){return O(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=M(this,e);t.appendChild(e)}})},prepend:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=M(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(pe.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ve[(Ge.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(pe.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return C(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(v(this)),n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,r=[],a=pe(e),i=a.length-1,o=0;o<=i;o++)n=o===i?this:this.clone(!0),pe(a[o])[t](n),ie.apply(r,n.get());return this.pushStack(r)}});var it=/^margin/,ot=new RegExp("^("+qe+")(?!px)[a-z%]+$","i"),st=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Xe.appendChild(o);var t=e.getComputedStyle(s);n="1%"!==t.top,i="2px"===t.marginLeft,r="4px"===t.width,s.style.marginRight="50%",a="4px"===t.marginRight,Xe.removeChild(o),s=null}}var n,r,a,i,o=te.createElement("div"),s=te.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),pe.extend(de,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),r},pixelMarginRight:function(){return t(),a},reliableMarginLeft:function(){return t(),i}}))}();var ut=/^(none|table(?!-c[ea]).+)/,ct={position:"absolute",visibility:"hidden",display:"block"},lt={letterSpacing:"0",fontWeight:"400"},ft=["Webkit","Moz","ms"],dt=te.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=D(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,i,o,s=pe.camelCase(t),u=e.style;return t=pe.cssProps[s]||(pe.cssProps[s]=P(s)||s),o=pe.cssHooks[t]||pe.cssHooks[s],void 0===n?o&&"get"in o&&void 0!==(a=o.get(e,!1,r))?a:u[t]:(i=typeof n,"string"===i&&(a=Ye.exec(n))&&a[1]&&(n=p(e,t,a),i="number"),null!=n&&n===n&&("number"===i&&(n+=a&&a[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(u[t]=n)),void 0)}},css:function(e,t,n,r){var a,i,o,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=P(s)||s),o=pe.cssHooks[t]||pe.cssHooks[s],o&&"get"in o&&(a=o.get(e,!0,n)),void 0===a&&(a=D(e,t,r)),"normal"===a&&t in lt&&(a=lt[t]),""===n||n?(i=parseFloat(a),n===!0||isFinite(i)?i||0:a):a}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return!ut.test(pe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?W(e,t,r):Fe(e,ct,function(){return W(e,t,r)})},set:function(e,n,r){var a,i=r&&st(e),o=r&&N(e,t,r,"border-box"===pe.css(e,"boxSizing",!1,i),i);return o&&(a=Ye.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=pe.css(e,t)),z(e,n,o)}}}),pe.cssHooks.marginLeft=j(de.reliableMarginLeft,function(e,t){if(t)return(parseFloat(D(e,"marginLeft"))||e.getBoundingClientRect().left-Fe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,a={},i="string"==typeof n?n.split(" "):[n];r<4;r++)a[e+Be[r]+t]=i[r]||i[r-2]||i[0];return a}},it.test(e)||(pe.cssHooks[e+t].set=z)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,a,i={},o=0;if(pe.isArray(t)){for(r=st(e),a=t.length;o<a;o++)i[t[o]]=pe.css(e,t[o],!1,r);return i}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)}}),pe.Tween=L,L.prototype={constructor:L,init:function(e,t,n,r,a,i){this.elem=e,this.prop=n,this.easing=a||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(pe.cssNumber[n]?"":"px")},cur:function(){var e=L.propHooks[this.prop];return e&&e.get?e.get(this):L.propHooks._default.get(this)},run:function(e){var t,n=L.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=L.prototype.init,pe.fx.step={};var ht,pt,mt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;pe.Animation=pe.extend(I,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return p(n.elem,e,Ye.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,a=e.length;r<a;r++)n=e[r],I.tweeners[n]=I.tweeners[n]||[],I.tweeners[n].unshift(t)},prefilters:[H],prefilter:function(e,t){t?I.prefilters.unshift(e):I.prefilters.push(e)}}),pe.speed=function(e,t,n){var r=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return pe.fx.off||te.hidden?r.duration=0:"number"!=typeof r.duration&&(r.duration in pe.fx.speeds?r.duration=pe.fx.speeds[r.duration]:r.duration=pe.fx.speeds._default),null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){pe.isFunction(r.old)&&r.old.call(this),r.queue&&pe.dequeue(this,r.queue)},r},pe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(He).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var a=pe.isEmptyObject(e),i=pe.speed(t,n,r),o=function(){var t=I(this,pe.extend({},e),i);(a||Ne.get(this,"finish"))&&t.stop(!0)};return o.finish=o,a||i.queue===!1?this.each(o):this.queue(i.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,a=null!=e&&e+"queueHooks",i=pe.timers,o=Ne.get(this);if(a)o[a]&&o[a].stop&&r(o[a]);else for(a in o)o[a]&&o[a].stop&>.test(a)&&r(o[a]);for(a=i.length;a--;)i[a].elem!==this||null!=e&&i[a].queue!==e||(i[a].anim.stop(n),t=!1,i.splice(a,1));!t&&n||pe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Ne.get(this),r=n[e+"queue"],a=n[e+"queueHooks"],i=pe.timers,o=r?r.length:0;for(n.finish=!0,pe.queue(this,e,[]),a&&a.stop&&a.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,r,a){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Y(t,!0),e,r,a)}}),pe.each({slideDown:Y("show"),slideUp:Y("hide"),slideToggle:Y("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),pe.timers=[],pe.fx.tick=function(){var e,t=0,n=pe.timers;for(ht=pe.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||pe.fx.stop(),ht=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){pt||(pt=e.requestAnimationFrame?e.requestAnimationFrame(R):e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(pt):e.clearInterval(pt),pt=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var a=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(a)}})},function(){var e=te.createElement("input"),t=te.createElement("select"),n=t.appendChild(te.createElement("option"));e.type="checkbox",de.checkOn=""!==e.value,de.optSelected=n.selected,e=te.createElement("input"),e.value="t",e.type="radio",de.radioValue="t"===e.value}();var vt,yt=pe.expr.attrHandle;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===i&&pe.isXMLDoc(e)||(a=pe.attrHooks[t.toLowerCase()]||(pe.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void pe.removeAttr(e,t):a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:(e.setAttribute(t,n+""),n):a&&"get"in a&&null!==(r=a.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,a=t&&t.match(Oe);if(a&&1===e.nodeType)for(;n=a[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):e.setAttribute(n,n),n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=yt[t]||pe.find.attr;yt[t]=function(e,t,r){var a,i,o=t.toLowerCase();return r||(i=yt[o],yt[o]=a,a=null!=n(e,t,r)?o:null,yt[o]=i),a}});var bt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[pe.propFix[e]||e]})}}),pe.extend({prop:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,a=pe.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:e[t]=n:a&&"get"in a&&null!==(r=a.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),pe.fn.extend({addClass:function(e){var t,n,r,a,i,o,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,G(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(a=G(n),r=1===n.nodeType&&" "+U(a)+" "){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=U(r),a!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,a,i,o,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,G(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(a=G(n),r=1===n.nodeType&&" "+U(a)+" "){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");s=U(r),a!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,G(this),t),t)}):this.each(function(){var t,r,a,i;if("string"===n)for(r=0,a=pe(this),i=e.match(Oe)||[];t=i[r++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||(t=G(this),t&&Ne.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ne.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+U(G(n))+" ").indexOf(t)>-1)return!0; -return!1}});var wt=/\r/g;pe.fn.extend({val:function(e){var t,n,r,a=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var a;1===this.nodeType&&(a=r?e.call(this,n,pe(this).val()):e,null==a?a="":"number"==typeof a?a+="":pe.isArray(a)&&(a=pe.map(a,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))});if(a)return t=pe.valHooks[a.type]||pe.valHooks[a.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:(n=a.value,"string"==typeof n?n.replace(wt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:U(pe.text(e))}},select:{get:function(e){var t,n,r,a=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],u=o?i+1:a.length;for(r=i<0?u:o?i:0;r<u;r++)if(n=a[r],(n.selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,a=e.options,i=pe.makeArray(t),o=a.length;o--;)r=a[o],(r.selected=pe.inArray(pe.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var At=/^(?:focusinfocus|focusoutblur)$/;pe.extend(pe.event,{trigger:function(t,n,r,a){var i,o,s,u,c,l,f,d=[r||te],h=ce.call(t,"type")?t.type:t,p=ce.call(t,"namespace")?t.namespace.split("."):[];if(o=s=r=r||te,3!==r.nodeType&&8!==r.nodeType&&!At.test(h+pe.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),c=h.indexOf(":")<0&&"on"+h,t=t[pe.expando]?t:new pe.Event(h,"object"==typeof t&&t),t.isTrigger=a?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),f=pe.event.special[h]||{},a||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!a&&!f.noBubble&&!pe.isWindow(r)){for(u=f.delegateType||h,At.test(u+h)||(o=o.parentNode);o;o=o.parentNode)d.push(o),s=o;s===(r.ownerDocument||te)&&d.push(s.defaultView||s.parentWindow||e)}for(i=0;(o=d[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||h,l=(Ne.get(o,"events")||{})[t.type]&&Ne.get(o,"handle"),l&&l.apply(o,n),l=c&&o[c],l&&l.apply&&ze(o)&&(t.result=l.apply(o,n),t.result===!1&&t.preventDefault());return t.type=h,a||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!ze(r)||c&&pe.isFunction(r[h])&&!pe.isWindow(r)&&(s=r[c],s&&(r[c]=null),pe.event.triggered=h,r[h](),pe.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(e,t,n){var r=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(r,null,t)}}),pe.fn.extend({trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return pe.event.trigger(e,t,n,!0)}}),pe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),de.focusin="onfocusin"in e,de.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var r=this.ownerDocument||this,a=Ne.access(r,t);a||r.addEventListener(e,n,!0),Ne.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this,a=Ne.access(r,t)-1;a?Ne.access(r,t,a):(r.removeEventListener(e,n,!0),Ne.remove(r,t))}}});var xt=e.location,Mt=pe.now(),kt=/\?/;pe.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var Tt=/\[\]$/,St=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],a=function(e,t){var n=pe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){a(this.name,this.value)});else for(n in e)$(n,e[n],t,a);return r.join("&")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&Ct.test(this.nodeName)&&!Et.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}});var Ot=/%20/g,Dt=/#.*$/,jt=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Lt={},Rt={},qt="*/".concat("*"),Yt=te.createElement("a");Yt.href=xt.href,pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:zt.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,pe.ajaxSettings),t):X(pe.ajaxSettings,e)},ajaxPrefilter:V(Lt),ajaxTransport:V(Rt),ajax:function(t,n){function r(t,n,r,s){var c,d,h,_,w,A=n;l||(l=!0,u&&e.clearTimeout(u),a=void 0,o=s||"",x.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(_=J(p,x,r)),_=Z(p,_,x,c),c?(p.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(pe.lastModified[i]=w),w=x.getResponseHeader("etag"),w&&(pe.etag[i]=w)),204===t||"HEAD"===p.type?A="nocontent":304===t?A="notmodified":(A=_.state,d=_.data,h=_.error,c=!h)):(h=A,!t&&A||(A="error",t<0&&(t=0))),x.status=t,x.statusText=(n||A)+"",c?v.resolveWith(m,[d,A,x]):v.rejectWith(m,[x,A,h]),x.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[x,p,c?d:h]),y.fireWith(m,[x,A]),f&&(g.trigger("ajaxComplete",[x,p]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var a,i,o,s,u,c,l,f,d,h,p=pe.ajaxSetup({},n),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?pe(m):pe.event,v=pe.Deferred(),y=pe.Callbacks("once memory"),b=p.statusCode||{},_={},w={},A="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=Pt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)x.always(e[x.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||A;return a&&a.abort(t),r(0,t),this}};if(v.promise(x),p.url=((t||p.url||xt.href)+"").replace(Wt,xt.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Oe)||[""],null==p.crossDomain){c=te.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Yt.protocol+"//"+Yt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=pe.param(p.data,p.traditional)),K(Lt,p,n,x),l)return x;f=pe.event&&p.global,f&&0===pe.active++&&pe.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nt.test(p.type),i=p.url.replace(Dt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(h=p.url.slice(i.length),p.data&&(i+=(kt.test(i)?"&":"?")+p.data,delete p.data),p.cache===!1&&(i=i.replace(jt,"$1"),h=(kt.test(i)?"&":"?")+"_="+Mt++ +h),p.url=i+h),p.ifModified&&(pe.lastModified[i]&&x.setRequestHeader("If-Modified-Since",pe.lastModified[i]),pe.etag[i]&&x.setRequestHeader("If-None-Match",pe.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]);for(d in p.headers)x.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(p.beforeSend.call(m,x,p)===!1||l))return x.abort();if(A="abort",y.add(p.complete),x.done(p.success),x.fail(p.error),a=K(Rt,p,n,x)){if(x.readyState=1,f&&g.trigger("ajaxSend",[x,p]),l)return x;p.async&&p.timeout>0&&(u=e.setTimeout(function(){x.abort("timeout")},p.timeout));try{l=!1,a.send(_,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return x},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,a){return pe.isFunction(n)&&(a=a||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:a,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pe.fn.extend({wrapAll:function(e){var t;return this[0]&&(pe.isFunction(e)&&(e=e.call(this[0])),t=pe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){pe(this).replaceWith(this.childNodes)}),this}}),pe.expr.pseudos.hidden=function(e){return!pe.expr.pseudos.visible(e)},pe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},pe.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},Ht=pe.ajaxSettings.xhr();de.cors=!!Ht&&"withCredentials"in Ht,de.ajax=Ht=!!Ht,pe.ajaxTransport(function(t){var n,r;if(de.cors||Ht&&!t.crossDomain)return{send:function(a,i){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest");for(o in a)s.setRequestHeader(o,a[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Bt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),pe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,a){t=pe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&a("error"===e.type?404:200,e.type)}),te.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Ft=[],It=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ft.pop()||pe.expando+"_"+Mt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var a,i,o,s=t.jsonp!==!1&&(It.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&It.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return a=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(It,"$1"+a):t.jsonp!==!1&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+a),t.converters["script json"]=function(){return o||pe.error(a+" was not called"),o[0]},t.dataTypes[0]="json",i=e[a],e[a]=function(){o=arguments},r.always(function(){void 0===i?pe(e).removeProp(a):e[a]=i,t[a]&&(t.jsonpCallback=n.jsonpCallback,Ft.push(a)),o&&pe.isFunction(i)&&i(o[0]),o=i=void 0}),"script"}),de.createHTMLDocument=function(){var e=te.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),pe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,a,i;return t||(de.createHTMLDocument?(t=te.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=te.location.href,t.head.appendChild(r)):t=te),a=xe.exec(e),i=!n&&[],a?[t.createElement(a[1])]:(a=b([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],a.childNodes))},pe.fn.load=function(e,t,n){var r,a,i,o=this,s=e.indexOf(" ");return s>-1&&(r=U(e.slice(s)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(a="POST"),o.length>0&&pe.ajax({url:e,type:a||"GET",dataType:"html",data:t}).done(function(e){i=arguments,o.html(r?pe("<div>").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.pseudos.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,a,i,o,s,u,c,l=pe.css(e,"position"),f=pe(e),d={};"static"===l&&(e.style.position="relative"),s=f.offset(),i=pe.css(e,"top"),u=pe.css(e,"left"),c=("absolute"===l||"fixed"===l)&&(i+u).indexOf("auto")>-1,c?(r=f.position(),o=r.top,a=r.left):(o=parseFloat(i)||0,a=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+o),null!=t.left&&(d.left=t.left-s.left+a),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r,a,i=this[0];if(i)return i.getClientRects().length?(r=i.getBoundingClientRect(),r.width||r.height?(a=i.ownerDocument,n=Q(a),t=a.documentElement,{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===pe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(r=e.offset()),r={top:r.top+pe.css(e[0],"borderTopWidth",!0),left:r.left+pe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-pe.css(n,"marginTop",!0),left:t.left-r.left-pe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||Xe})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;pe.fn[e]=function(r){return Pe(this,function(e,r,a){var i=Q(e);return void 0===a?i?i[t]:e[r]:void(i?i.scrollTo(n?i.pageXOffset:a,n?a:i.pageYOffset):e[r]=a)},e,r,arguments.length)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=j(de.pixelPosition,function(e,n){if(n)return n=D(e,t),ot.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(a,i){var o=arguments.length&&(n||"boolean"!=typeof a),s=n||(a===!0||i===!0?"margin":"border");return Pe(this,function(t,n,a){var i;return pe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===a?pe.css(t,n,s):pe.style(t,n,a,s)},t,o?a:void 0,o)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var Ut=e.jQuery,Gt=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=Gt),t&&e.jQuery===pe&&(e.jQuery=Ut),pe},t||(e.jQuery=e.$=pe),pe})}),Fs="mercury-parsing-container",Is=void 0;Hs.noConflict();var Us=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r&&(t&&"string"==typeof t?t=Is.find(t):t||(t=Is)),new Hs.fn.init(e,t,n)};Us.fn=Us.prototype=Hs.fn,Hs.extend(Us,Hs);var Gs=function(e){return e.find('script, style, link[rel="stylesheet"]').remove(),e};Us.cloneHtml=function(){var e=Gs(Us("html",null,null,!1).clone());return e.children().wrap("<div />").wrap("<div />")},Us.root=function(){return Us("*").first()},Us.browser=!0;var $s=function(e){var t=e.get(0);return!(!t||!t.tagName)&&"container"===t.tagName.toLowerCase()};Us.html=function(e){if(e)return $s(e)||$s(e.children("container"))?e.children("container").html()||e.html():Us("<div>").append(e.eq(0).clone()).html();var t=Gs(Us("body",null,null,!1).clone()),n=Gs(Us("head",null,null,!1).clone());if(Is&&Is.length>0)return Is.children().html();var r=Us("<container />").append(Us("<container>"+n.html()+"</container>")).append(Us("<container>"+t.html()+"</container>")).wrap("<container />").parent().html();return r},Us.load=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]&&arguments[2]);return e=e?Us("<container />").html(e):Us.cloneHtml(),Is=Is||Us('<div class="'+Fs+'" style="display:none;" />'),e=Gs(e),e.find("*").contents().each(function(){this.nodeType===Node.COMMENT_NODE&&Us(this).remove()}),Is.html(e),t?{$:Us,html:e.html()}:Us};var Vs={encodingExists:function(){return!1},decode:function(e){return e}},Ks=/\s{2,}/g,Xs=new RegExp("(page|paging|(p(a|g|ag)?(e|enum|ewanted|ing|ination)))?(=|/)([0-9]{1,3})","i"),Js=/[a-z]/i,Zs=/^[a-z]+$/i,Qs=/^[0-9]+$/i,eu=/charset=([\w-]+)\b/,tu="utf-8",nu=ji,ru=ja("iterator"),au=ya,iu=Sn.isIterable=function(e){var t=Object(e);return void 0!==t[ru]||"@@iterator"in t||au.hasOwnProperty(nu(t))},ou=iu,su=n(function(e){e.exports={default:ou,__esModule:!0}}),uu=Pn,cu=Fi,lu=Sn.getIterator=function(e){var t=cu(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return uu(t.call(e))},fu=lu,du=n(function(e){e.exports={default:fu,__esModule:!0}}),hu=t(du),pu=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=su,a=n(r),i=du,o=n(i);t.default=function(){function e(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var s,u=(0,o.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(a)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,a.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()}),mu=t(pu),gu=new RegExp(".( |$)"),vu=function(e){function t(){var t=e.indexOf("\r\n",r),a=e.indexOf("\n",r),i=e.indexOf("\r",r),o=[t,a,i],s=o.sort(function(e,t){return e>t?1:e<t?-1:0}).filter(function(e){return e!==-1})[0];if(void 0!==s)return n(s,s===t?2:1);var u=e.length;return u===r?null:n(u,0)}function n(t,n){var a=e.substr(r,t-r);return r=t+n,a}var r=0;return e=e.toString(),t},yu=vu,bu=/^[A-Z_]+(\/\d\.\d)? /,_u=/^([A-Z_]+) (.+) [A-Z]+\/(\d)\.(\d)$/,wu=/^[A-Z]+\/(\d)\.(\d) (\d{3}) (.*)$/,Au=function(e,t){return P(N(e),t)},xu=Au,Mu=XMLHttpRequest;if(!Mu)throw new Error("missing XMLHttpRequest");R.log={trace:Y,debug:Y,info:Y,warn:Y,error:Y};var ku=18e4,Tu=0;R.withCredentials=!1,R.DEFAULT_TIMEOUT=ku,R.defaults=function(e,t){var n=function(t){var n=function(n,r){n="string"==typeof n?{uri:n}:JSON.parse(JSON.stringify(n));for(var a in e)void 0===n[a]&&(n[a]=e[a]);return t(n,r)};return n},r=n(R);return r.get=n(R.get),r.post=n(R.post),r.put=n(R.put),r.head=n(R.head),r};var Su=["get","put","post","head"];Su.forEach(function(e){var t=e.toUpperCase(),n=e.toLowerCase();R[n]=function(e){"string"==typeof e?e={method:t,uri:e}:(e=JSON.parse(JSON.stringify(e)),e.method=t);var n=[e].concat(Array.prototype.slice.apply(arguments,[1]));return R.apply(this,n)}}),R.couch=function(e,t){function n(e,n,r){if(e)return t(e,n,r);if((n.statusCode<200||n.statusCode>299)&&r.error){e=new Error("CouchDB error: "+(r.error.reason||r.error.error));for(var a in r)e[a]=r[a];return t(e,n,r)}return t(e,n,r)}"string"==typeof e&&(e={uri:e}),e.json=!0,e.body&&(e.json=e.body),delete e.body,t=t||Y;var r=R(e,n);return r};var Eu=R,Cu=[U].map(kn.mark),Ou={badUrl:{error:!0,messages:"The url parameter passed does not look like a valid URL. Please check your data and try again."}},Du=Us.browser?{}:{"User-Agent":"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"},ju=1e4,Pu=["audio/mpeg","image/gif","image/jpeg","image/jpg"],zu=new RegExp("^("+Pu.join("|")+")$","i"),Nu=5242880,Wu=function(){function e(e,n){return t.apply(this,arguments)}var t=ps(kn.mark(function e(t,n){var r,a,i,o;return kn.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||Bs.parse(encodeURI(t)),r={url:n.href,headers:da({},Du),timeout:ju,jar:!0,encoding:null,gzip:!0,followAllRedirects:!0},e.next=4,$(r);case 4:return a=e.sent,i=a.response,o=a.body,e.prev=7,V(i),e.abrupt("return",{body:o,response:i});case 12:return e.prev=12,e.t0=e.catch(7),e.abrupt("return",Ou.badUrl);case 15:case"end":return e.stop()}},e,this,[[7,12]])}));return e}(),Lu=Ir,Ru=Ur.concat("length","prototype"),qu=Object.getOwnPropertyNames||function(e){return Lu(e,Ru)},Yu={f:qu},Bu=Yu,Hu=Xr,Fu=Pn,Iu=Tn.Reflect,Uu=Iu&&Iu.ownKeys||function(e){var t=Bu.f(Fu(e)),n=Hu.f;return n?t.concat(n(e)):t},Gu=ir;Gu(Gu.S,"Reflect",{ownKeys:Uu});var $u=Sn.Reflect.ownKeys,Vu=n(function(e){e.exports={default:$u,__esModule:!0}}),Ku=t(Vu),Xu=new RegExp("transparent|spacer|blank","i"),Ju="mercury-parser-keep",Zu=['iframe[src^="https://www.youtube.com"]','iframe[src^="https://www.youtube-nocookie.com"]','iframe[src^="http://www.youtube.com"]','iframe[src^="https://player.vimeo"]','iframe[src^="http://player.vimeo"]'],Qu=["title","script","noscript","link","style","hr","embed","iframe","object"],ec=["style","align"],tc=(ec.map(function(e){return"["+e+"]"}),ec.join(","),["src","srcset","href","class","id","alt","xlink:href","width","height"]),nc=new RegExp("^("+tc.join("|")+")$","i"),rc=["p"],ac=(rc.map(function(e){return e+":empty"}).join(","),["ul","ol","table","div","button","form"].join(",")),ic=["h2","h3","h4","h5","h6"],oc=ic.join(","),sc=["ad-break","adbox","advert","addthis","agegate","aux","blogger-labels","combx","comment","conversation","disqus","entry-unrelated","extra","foot","header","hidden","loader","login","menu","meta","nav","outbrain","pager","pagination","predicta","presence_control_external","popup","printfriendly","related","remove","remark","rss","share","shoutbox","sidebar","sociable","sponsor","taboola","tools"],uc=["and","article","body","blogindex","column","content","entry-content-asset","format","hfeed","hentry","hatom","main","page","posts","shadow"],cc=["a","blockquote","dl","div","img","p","pre","table"].join(","),lc=["article","articlecontent","instapaper_body","blog","body","content","entry-content-asset","entry","hentry","main","Normal","page","pagination","permalink","post","story","text","[-_]copy","\\Bcopy"],fc=new RegExp(lc.join("|"),"i"),dc=["adbox","advert","author","bio","bookmark","bottom","byline","clear","com-","combx","comment","comment\\B","contact","copy","credit","crumb","date","deck","excerpt","featured","foot","footer","footnote","graf","head","info","infotext","instapaper_ignore","jump","linebreak","link","masthead","media","meta","modal","outbrain","promo","pr_","related","respond","roundcontent","scroll","secondary","share","shopping","shoutbox","side","sidebar","sponsor","stamp","sub","summary","tags","tools","widget"],hc=new RegExp(dc.join("|"),"i"),pc="meta[name=generator][value^=WordPress]",mc=new RegExp("pag(e|ing|inat)","i"),gc=["article","aside","blockquote","body","br","button","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","map","object","ol","output","p","pre","progress","section","table","tbody","textarea","tfoot","th","thead","tr","ul","video"],vc=new RegExp("^("+gc.join("|")+")$","i"),yc=sc.join("|"),bc=new RegExp(yc,"i"),_c=uc.join("|"),wc=new RegExp(_c,"i"),Ac=Vn,xc=Kn,Mc=function(e,t,n){t in e?Ac.f(e,t,xc(0,n)):e[t]=n},kc=On,Tc=ir,Sc=ea,Ec=Ni,Cc=qi,Oc=wr,Dc=Mc,jc=Fi;Tc(Tc.S+Tc.F*!Po(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,a,i=Sc(e),o="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,c=void 0!==u,l=0,f=jc(i);if(c&&(u=kc(u,s>2?arguments[2]:void 0,2)),void 0==f||o==Array&&Cc(f))for(t=Oc(i.length),n=new o(t);t>l;l++)Dc(n,l,c?u(i[l],l):i[l]);else for(a=f.call(i),n=new o;!(r=a.next()).done;l++)Dc(n,l,c?Ec(a,u,[r.value,l],!0):r.value);return n.length=l,n}});var Pc=Sn.Array.from,zc=n(function(e){e.exports={default:Pc,__esModule:!0}}),Nc=t(zc),Wc=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=zc,a=n(r);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,a.default)(e)}}),Lc=t(Wc),Rc=ir;Rc(Rc.S+Rc.F*!Nn,"Object",{defineProperty:Vn.f});var qc=Sn.Object,Yc=function(e,t,n){return qc.defineProperty(e,t,n)},Bc=n(function(e){e.exports={default:Yc,__esModule:!0}}),Hc=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=Bc,a=n(r);t.default=function(e,t,n){return t in e?(0,a.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}),Fc=t(Hc),Ic=["ad-break","adbox","advert","addthis","agegate","aux","blogger-labels","combx","comment","conversation","disqus","entry-unrelated","extra","foot","form","header","hidden","loader","login","menu","meta","nav","pager","pagination","predicta","presence_control_external","popup","printfriendly","related","remove","remark","rss","share","shoutbox","sidebar","sociable","sponsor","tools"],Uc=["and","article","body","blogindex","column","content","entry-content-asset","format","hfeed","hentry","hatom","main","page","posts","shadow"],Gc=(["a","blockquote","dl","div","img","p","pre","table"].join(","),["br","b","i","label","hr","area","base","basefont","input","img","link","meta"]),$c=new RegExp("^("+Gc.join("|")+")$","i"),Vc=[[".hentry",".entry-content"],["entry",".entry-content"],[".entry",".entry_content"],[".post",".postbody"],[".post",".post_body"],[".post",".post-body"]],Kc=["figure","photo","image","caption"],Xc=new RegExp(Kc.join("|"),"i"),Jc=["article","articlecontent","instapaper_body","blog","body","content","entry-content-asset","entry","hentry","main","Normal","page","pagination","permalink","post","story","text","[-_]copy","\\Bcopy"],Zc=new RegExp(Jc.join("|"),"i"),Qc=new RegExp("entry-content-asset","i"),el=["adbox","advert","author","bio","bookmark","bottom","byline","clear","com-","combx","comment","comment\\B","contact","copy","credit","crumb","date","deck","excerpt","featured","foot","footer","footnote","graf","head","info","infotext","instapaper_ignore","jump","linebreak","link","masthead","media","meta","modal","outbrain","promo","pr_","related","respond","roundcontent","scroll","secondary","share","shopping","shoutbox","side","sidebar","sponsor","stamp","sub","summary","tags","tools","widget"],tl=new RegExp(el.join("|"),"i"),nl=(Ic.join("|"),Uc.join("|"),new RegExp("^(p|li|span|pre)$","i")),rl=new RegExp("^(td|blockquote|ol|ul|dl)$","i"),al=new RegExp("^(address|form)$","i"),il=new RegExp("^(p|pre)$","i"),ol=ja,sl={f:ol},ul=sl.f("iterator"),cl=n(function(e){e.exports={default:ul,__esModule:!0}}),ll=n(function(e){var t=Wr("meta"),n=Dn,r=sr,a=Vn.f,i=0,o=Object.isExtensible||function(){return!0},s=!zn(function(){return o(Object.preventExtensions({}))}),u=function(e){a(e,t,{value:{i:"O"+ ++i,w:{}}})},c=function(e,a){if(!n(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,t)){if(!o(e))return"F";if(!a)return"E";u(e)}return e[t].i},l=function(e,n){if(!r(e,t)){if(!o(e))return!0;if(!n)return!1;u(e)}return e[t].w},f=function(e){return s&&d.NEED&&o(e)&&!r(e,t)&&u(e),e},d=e.exports={KEY:t,NEED:!1,fastKey:c,getWeak:l,onFreeze:f}}),fl=Tn,dl=Sn,hl=ga,pl=sl,ml=Vn.f,gl=function(e){var t=dl.Symbol||(dl.Symbol=hl?{}:fl.Symbol||{});"_"==e.charAt(0)||e in t||ml(t,e,{value:pl.f(e)})},vl=Vr,yl=mr,bl=function(e,t){for(var n,r=yl(e),a=vl(r),i=a.length,o=0;i>o;)if(r[n=a[o++]]===t)return n},_l=Vr,wl=Xr,Al=Zr,xl=function(e){var t=_l(e),n=wl.f;if(n)for(var r,a=n(e),i=Al.f,o=0;a.length>o;)i.call(e,r=a[o++])&&t.push(r);return t},Ml=cr,kl=Array.isArray||function(e){return"Array"==Ml(e)},Tl=mr,Sl=Yu.f,El={}.toString,Cl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ol=function(e){try{return Sl(e)}catch(e){return Cl.slice()}},Dl=function(e){return Cl&&"[object Window]"==El.call(e)?Ol(e):Sl(Tl(e))},jl={f:Dl},Pl=Zr,zl=Kn,Nl=mr,Wl=Hn,Ll=sr,Rl=Yn,ql=Object.getOwnPropertyDescriptor,Yl=Nn?ql:function(e,t){if(e=Nl(e),t=Wl(t,!0),Rl)try{return ql(e,t)}catch(e){}if(Ll(e,t))return zl(!Pl.f.call(e,t),e[t])},Bl={f:Yl},Hl=Tn,Fl=sr,Il=Nn,Ul=ir,Gl=va,$l=ll.KEY,Vl=zn,Kl=Pr,Xl=Wa,Jl=Wr,Zl=ja,Ql=sl,ef=gl,tf=bl,nf=xl,rf=kl,af=Pn,of=mr,sf=Hn,uf=Kn,cf=Da,lf=jl,ff=Bl,df=Vn,hf=Vr,pf=ff.f,mf=df.f,gf=lf.f,vf=Hl.Symbol,yf=Hl.JSON,bf=yf&&yf.stringify,_f="prototype",wf=Zl("_hidden"),Af=Zl("toPrimitive"),xf={}.propertyIsEnumerable,Mf=Kl("symbol-registry"),kf=Kl("symbols"),Tf=Kl("op-symbols"),Sf=Object[_f],Ef="function"==typeof vf,Cf=Hl.QObject,Of=!Cf||!Cf[_f]||!Cf[_f].findChild,Df=Il&&Vl(function(){return 7!=cf(mf({},"a",{get:function(){return mf(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=pf(Sf,t);r&&delete Sf[t],mf(e,t,n),r&&e!==Sf&&mf(Sf,t,r)}:mf,jf=function(e){var t=kf[e]=cf(vf[_f]);return t._k=e,t},Pf=Ef&&"symbol"==typeof vf.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof vf},zf=function(e,t,n){return e===Sf&&zf(Tf,t,n),af(e),t=sf(t,!0),af(n),Fl(kf,t)?(n.enumerable?(Fl(e,wf)&&e[wf][t]&&(e[wf][t]=!1),n=cf(n,{enumerable:uf(0,!1)})):(Fl(e,wf)||mf(e,wf,uf(1,{})),e[wf][t]=!0),Df(e,t,n)):mf(e,t,n)},Nf=function(e,t){af(e);for(var n,r=nf(t=of(t)),a=0,i=r.length;i>a;)zf(e,n=r[a++],t[n]);return e},Wf=function(e,t){return void 0===t?cf(e):Nf(cf(e),t)},Lf=function(e){var t=xf.call(this,e=sf(e,!0));return!(this===Sf&&Fl(kf,e)&&!Fl(Tf,e))&&(!(t||!Fl(this,e)||!Fl(kf,e)||Fl(this,wf)&&this[wf][e])||t)},Rf=function(e,t){if(e=of(e),t=sf(t,!0),e!==Sf||!Fl(kf,t)||Fl(Tf,t)){ -var n=pf(e,t);return!n||!Fl(kf,t)||Fl(e,wf)&&e[wf][t]||(n.enumerable=!0),n}},qf=function(e){for(var t,n=gf(of(e)),r=[],a=0;n.length>a;)Fl(kf,t=n[a++])||t==wf||t==$l||r.push(t);return r},Yf=function(e){for(var t,n=e===Sf,r=gf(n?Tf:of(e)),a=[],i=0;r.length>i;)!Fl(kf,t=r[i++])||n&&!Fl(Sf,t)||a.push(kf[t]);return a};Ef||(vf=function(){if(this instanceof vf)throw TypeError("Symbol is not a constructor!");var e=Jl(arguments.length>0?arguments[0]:void 0),t=function(n){this===Sf&&t.call(Tf,n),Fl(this,wf)&&Fl(this[wf],e)&&(this[wf][e]=!1),Df(this,e,uf(1,n))};return Il&&Of&&Df(Sf,e,{configurable:!0,set:t}),jf(e)},Gl(vf[_f],"toString",function(){return this._k}),ff.f=Rf,df.f=zf,Yu.f=lf.f=qf,Zr.f=Lf,Xr.f=Yf,Il&&!ga&&Gl(Sf,"propertyIsEnumerable",Lf,!0),Ql.f=function(e){return jf(Zl(e))}),Ul(Ul.G+Ul.W+Ul.F*!Ef,{Symbol:vf});for(var Bf="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Hf=0;Bf.length>Hf;)Zl(Bf[Hf++]);for(var Bf=hf(Zl.store),Hf=0;Bf.length>Hf;)ef(Bf[Hf++]);Ul(Ul.S+Ul.F*!Ef,"Symbol",{for:function(e){return Fl(Mf,e+="")?Mf[e]:Mf[e]=vf(e)},keyFor:function(e){if(Pf(e))return tf(Mf,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Of=!0},useSimple:function(){Of=!1}}),Ul(Ul.S+Ul.F*!Ef,"Object",{create:Wf,defineProperty:zf,defineProperties:Nf,getOwnPropertyDescriptor:Rf,getOwnPropertyNames:qf,getOwnPropertySymbols:Yf}),yf&&Ul(Ul.S+Ul.F*(!Ef||Vl(function(){var e=vf();return"[null]"!=bf([e])||"{}"!=bf({a:e})||"{}"!=bf(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Pf(e)){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);return t=r[1],"function"==typeof t&&(n=t),!n&&rf(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Pf(t))return t}),r[1]=t,bf.apply(yf,r)}}}),vf[_f][Af]||Zn(vf[_f],Af,vf[_f].valueOf),Xl(vf,"Symbol"),Xl(Math,"Math",!0),Xl(Hl.JSON,"JSON",!0),gl("asyncIterator"),gl("observable");var Ff=Sn.Symbol,If=n(function(e){e.exports={default:Ff,__esModule:!0}}),Uf=n(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=cl,a=n(r),i=If,o=n(i),s="function"==typeof o.default&&"symbol"==typeof a.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};t.default="function"==typeof o.default&&"symbol"===s(a.default)?function(e){return"undefined"==typeof e?"undefined":s(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":"undefined"==typeof e?"undefined":s(e)}}),Gf=t(Uf),$f=new RegExp("https?://","i"),Vf=new RegExp(".(png|gif|jpe?g)","i"),Kf=["script","style","form"].join(","),Xf={create:function(e,t,n){var r=this;return ps(kn.mark(function a(){var i,o;return kn.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(i=void 0,!t){a.next=6;break}o={statusMessage:"OK",statusCode:200,headers:{"content-type":"text/html","content-length":500}},i={body:t,response:o},a.next=9;break;case 6:return a.next=8,Wu(e,n);case 8:i=a.sent;case 9:if(!i.error){a.next=12;break}return i.failed=!0,a.abrupt("return",i);case 12:return a.abrupt("return",r.generateDoc(i));case 13:case"end":return a.stop()}},a,r)}))()},generateDoc:function(e){var t=e.body,n=e.response,r=n.headers["content-type"];if(!r.includes("html")&&!r.includes("text"))throw new Error("Content does not appear to be text.");var a=this.encodeDoc({content:t,contentType:r});if(0===a.root().children().length)throw new Error("No children, likely a bad parse.");return a=X(a),a=$e(a),a=Xe(a)},encodeDoc:function(e){var t=e.content,n=e.contentType,r=j(n),a=Vs.decode(t,r),i=Us.load(a),o=i("meta[http-equiv=content-type]").attr("content"),s=j(o);return s!==r&&(a=Vs.decode(t,s),i=Us.load(a)),i}},Jf=ir,Zf=Sn,Qf=zn,ed=function(e,t){var n=(Zf.Object||{})[e]||Object[e],r={};r[e]=t(n),Jf(Jf.S+Jf.F*Qf(function(){n(1)}),"Object",r)},td=ea,nd=Vr;ed("keys",function(){return function(e){return nd(td(e))}});var rd=Sn.Object.keys,ad=n(function(e){e.exports={default:rd,__esModule:!0}}),id=t(ad),od=function(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})},sd={domain:"blogspot.com",content:{selectors:[".post-content noscript"],clean:[],transforms:{noscript:"div"}},author:{selectors:[".post-author-name"]},title:{selectors:[".post h2.title"]},date_published:{selectors:["span.publishdate"]}},ud={domain:"nymag.com",content:{selectors:["div.article-content","section.body","article.article"],clean:[".ad",".single-related-story"],transforms:{h1:"h2",noscript:function(e,t){var n=t.browser?t(e.text()):e.children();return 1===n.length&&void 0!==n.get(0)&&"img"===n.get(0).tagName.toLowerCase()?"figure":null}}},title:{selectors:["h1.lede-feature-title","h1.headline-primary","h1"]},author:{selectors:[".by-authors",".lede-feature-author"]},dek:{selectors:[".lede-feature-teaser"]},date_published:{selectors:[["time.article-timestamp[datetime]","datetime"],"time.article-timestamp"]}},cd={domain:"wikipedia.org",content:{selectors:["#mw-content-text"],defaultCleaner:!1,transforms:{".infobox img":function(e){var t=e.parents(".infobox");0===t.children("img").length&&t.prepend(e)},".infobox caption":"figcaption",".infobox":"figure"},clean:[".mw-editsection","figure tr, figure td, figure tbody","#toc",".navbox"]},author:"Wikipedia Contributors",title:{selectors:["h2.title"]},date_published:{selectors:["#footer-info-lastmod"]}},ld={domain:"twitter.com",content:{transforms:{".permalink[role=main]":function(e,t){var n=e.find(".tweet"),r=t('<div id="TWEETS_GO_HERE"></div>');r.append(n),e.replaceWith(r)},s:"span"},selectors:[".permalink[role=main]"],defaultCleaner:!1,clean:[".stream-item-footer","button",".tweet-details-fixer"]},author:{selectors:[".tweet.permalink-tweet .username"]},date_published:{selectors:[[".permalink-tweet ._timestamp[data-time-ms]","data-time-ms"]]}},fd={domain:"www.nytimes.com",title:{selectors:["h1.g-headline",'h1[itemprop="headline"]',"h1.headline"]},author:{selectors:[['meta[name="author"]',"value"],".g-byline",".byline"]},content:{selectors:["div.g-blocks","article#story"],transforms:{"img.g-lazy":function(e){var t=e.attr("src"),n=640;t=t.replace("{{size}}",n),e.attr("src",t)}},clean:[".ad","header#story-header",".story-body-1 .lede.video",".visually-hidden","#newsletter-promo",".promo",".comments-button",".hidden",".comments",".supplemental",".nocontent",".story-footer-links"]},date_published:{selectors:[['meta[name="article:published"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:null,next_page_url:null,excerpt:null},dd={domain:"www.theatlantic.com",title:{selectors:["h1.hed"]},author:{selectors:["article#article .article-cover-extra .metadata .byline a"]},content:{selectors:[[".article-cover figure.lead-img",".article-body"],".article-body"],transforms:[],clean:[".partner-box",".callout"]},date_published:{selectors:[['time[itemProp="datePublished"]',"datetime"]]},lead_image_url:null,next_page_url:null,excerpt:null},hd={domain:"www.newyorker.com",title:{selectors:["h1.title"]},author:{selectors:[".contributors"]},content:{selectors:["div#articleBody","div.articleBody"],transforms:[],clean:[]},date_published:{selectors:[['meta[name="article:published_time"]',"value"],['time[itemProp="datePublished"]',"content"]],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[".dek","h2.dek"]},next_page_url:null,excerpt:null},pd={domain:"www.wired.com",title:{selectors:["h1.post-title"]},author:{selectors:['a[rel="author"]']},content:{selectors:["article.content"],transforms:[],clean:[".visually-hidden","figcaption img.photo"]},date_published:{selectors:[['meta[itemprop="datePublished"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:null,excerpt:null},md={domain:"www.msn.com",title:{selectors:["h1"]},author:{selectors:["span.authorname-txt"]},content:{selectors:["div.richtext"],transforms:[],clean:["span.caption"]},date_published:{selectors:["span.time"]},lead_image_url:{selectors:[]},dek:{selectors:[]},next_page_url:null,excerpt:null},gd={domain:"www.yahoo.com",title:{selectors:["header.canvas-header"]},author:{selectors:["span.provider-name"]},content:{selectors:[".content-canvas"],transforms:[],clean:[".figure-caption"]},date_published:{selectors:[["time.date[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:null,excerpt:null},vd={domain:"www.buzzfeed.com",title:{selectors:['h1[id="post-title"]']},author:{selectors:['a[data-action="user/username"]',"byline__author"]},content:{selectors:[[".longform_custom_header_media","#buzz_sub_buzz"],"#buzz_sub_buzz"],defaultCleaner:!1,transforms:{h2:"b","div.longform_custom_header_media":function(e){return e.has("img")&&e.has(".longform_header_image_source")?"figure":null},"figure.longform_custom_header_media .longform_header_image_source":"figcaption"},clean:[".instapaper_ignore",".suplist_list_hide .buzz_superlist_item .buzz_superlist_number_inline",".share-box",".print"]},date_published:{selectors:[".buzz-datetime"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:null,excerpt:null},yd={domain:"fandom.wikia.com",title:{selectors:["h1.entry-title"]},author:{selectors:[".author vcard",".fn"]},content:{selectors:[".grid-content",".entry-content"],transforms:[],clean:[]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:null,excerpt:null},bd={domain:"www.littlethings.com",title:{selectors:["h1.post-title"]},author:{selectors:[['meta[name="author"]',"value"]]},content:{selectors:[".mainContentIntro",".content-wrapper"],transforms:[],clean:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},next_page_url:null,excerpt:null},_d={domain:"www.politico.com",title:{selectors:[['meta[name="og:title"]',"value"]]},author:{selectors:[".story-main-content .byline .vcard"]},content:{selectors:[".story-main-content",".content-group",".story-core",".story-text"],transforms:[],clean:["figcaption"]},date_published:{selectors:[[".story-main-content .timestamp time[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:null,excerpt:null},wd={domain:"deadspin.com",supportedDomains:["jezebel.com","lifehacker.com","kotaku.com","gizmodo.com","jalopnik.com","kinja.com"],title:{selectors:["h1.headline"]},author:{selectors:[".author"]},content:{selectors:[".post-content",".entry-content"],transforms:{'iframe.lazyload[data-recommend-id^="youtube://"]':function(e){var t=e.attr("id").split("youtube-")[1];e.attr("src","https://www.youtube.com/embed/"+t)}},clean:[".magnifier",".lightbox"]},date_published:{selectors:[["time.updated[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:{selectors:[]},excerpt:{selectors:[]}},Ad={domain:"www.broadwayworld.com",title:{selectors:["h1.article-title"]},author:{selectors:["span[itemprop=author]"]},content:{selectors:["div[itemprop=articlebody]"],transforms:{},clean:[]},date_published:{selectors:[["meta[itemprop=datePublished]","value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:{selectors:[]},excerpt:{selectors:[]}},xd={domain:"www.apartmenttherapy.com",title:{selectors:["h1.headline"]},author:{selectors:[".PostByline__name"]},content:{selectors:["div.post__content"],transforms:{'div[data-render-react-id="images/LazyPicture"]':function(e,t){var n=JSON.parse(e.attr("data-props")),r=n.sources[0].src,a=t("<img />").attr("src",r);e.replaceWith(a)}},clean:[]},date_published:{selectors:[[".PostByline__timestamp[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:{selectors:[]},excerpt:{selectors:[]}},Md={domain:"medium.com",supportedDomains:["trackchanges.postlight.com"],title:{selectors:["h1"]},author:{selectors:[['meta[name="author"]',"value"]]},content:{selectors:[[".section-content"],".section-content","article > div > section"],transforms:{iframe:function(e){var t=/https:\/\/i.embed.ly\/.+url=https:\/\/i\.ytimg\.com\/vi\/(\w+)\//,n=decodeURIComponent(e.attr("data-thumbnail"));if(t.test(n)){var r=n.match(t),a=mu(r,2),i=(a[0],a[1]);e.attr("src","https://www.youtube.com/embed/"+i);var o=e.parents("figure"),s=o.find("figcaption");o.empty().append([e,s])}},figure:function(e){if(!(e.find("iframe").length>0)){var t=e.find("img").slice(-1)[0],n=e.find("figcaption");e.empty().append([t,n])}}},clean:[]},date_published:{selectors:[["time[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},dek:{selectors:[]},next_page_url:{selectors:[]},excerpt:{selectors:[]}},kd={domain:"www.tmz.com",title:{selectors:[".post-title-breadcrumb","h1",".headline"]},author:"TMZ STAFF",date_published:{selectors:[".article-posted-date"],timezone:"America/Los_Angeles"},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-content",".all-post-body"],transforms:{},clean:[".lightbox-link"]}},Td={domain:"www.washingtonpost.com",title:{selectors:["h1","#topper-headline-wrapper"]},author:{selectors:[".pb-byline"]},date_published:{selectors:[['.pb-timestamp[itemprop="datePublished"]',"content"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-body"],transforms:{"div.inline-content":function(e){return e.has("img,iframe,video").length>0?"figure":(e.remove(),null)},".pb-caption":"figcaption"},clean:[".interstitial-link",".newsletter-inline-unit"]}},Sd={domain:"www.huffingtonpost.com",title:{selectors:["h1.headline__title"]},author:{selectors:["span.author-card__details__name"]},date_published:{selectors:[['meta[name="article:modified_time"]',"value"],['meta[name="article:published_time"]',"value"]]},dek:{selectors:["h2.headline__subtitle"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.entry__body"],defaultCleaner:!1,transforms:{},clean:[".pull-quote",".tag-cloud",".embed-asset",".below-entry",".entry-corrections","#suggested-story"]}},Ed={domain:"newrepublic.com",title:{selectors:["h1.article-headline",".minutes-primary h1.minute-title"]},author:{selectors:["div.author-list",".minutes-primary h3.minute-byline"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]],timezone:"America/New_York"},dek:{selectors:["h2.article-subhead"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".article-cover","div.content-body"],[".minute-image",".minutes-primary div.content-body"]],transforms:{},clean:["aside"]}},Cd={domain:"money.cnn.com",title:{selectors:[".article-title"]},author:{selectors:[".byline a"]},date_published:{selectors:[['meta[name="date"]',"value"]],timezone:"GMT"},dek:{selectors:["#storytext h2"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["#storytext"],transforms:{},clean:[".inStoryHeading"]}},Od={domain:"www.theverge.com",supportedDomains:["www.polygon.com"],title:{selectors:["h1"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:["h2.p-dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".c-entry-hero .e-image",".c-entry-intro",".c-entry-content"],[".e-image--hero",".c-entry-content"],".l-wrapper .l-feature","div.c-entry-content"],transforms:{noscript:function(e){var t=e.children();return 1===t.length&&"img"===t.get(0).tagName?"span":null}},clean:[".aside","img.c-dynamic-image"]}},Dd={domain:"www.cnn.com",title:{selectors:["h1.pg-headline","h1"]},author:{selectors:[".metadata__byline__author"]},date_published:{selectors:[['meta[name="pubdate"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".media__video--thumbnail",".zn-body-text"],".zn-body-text",'div[itemprop="articleBody"]'],transforms:{".zn-body__paragraph, .el__leafmedia--sourced-paragraph":function(e){var t=e.html();return t?"p":null},".zn-body__paragraph":function(e){e.has("a")&&e.text().trim()===e.find("a").text().trim()&&e.remove()},".media__video--thumbnail":"figure"},clean:[]}},jd={domain:"www.aol.com",title:{selectors:["h1.p-article__title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[".p-article__byline__date"],timezone:"America/New_York"},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-content"],transforms:{},clean:[]}},Pd={domain:"www.youtube.com",title:{selectors:[".watch-title","h1.watch-title-container"]},author:{selectors:[".yt-user-info"]},date_published:{selectors:[['meta[itemProp="datePublished"]',"value"]],timezone:"GMT"},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{defaultCleaner:!1,selectors:[["#player-api","#eow-description"]],transforms:{"#player-api":function(e,t){var n=t('meta[itemProp="videoId"]').attr("value");e.html('\n <iframe src="https://www.youtube.com/embed/'+n+'" frameborder="0" allowfullscreen></iframe>')}},clean:[]}},zd={domain:"www.theguardian.com",title:{selectors:[".content__headline"]},author:{selectors:["p.byline"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[".content__standfirst"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".content__article-body"],transforms:{},clean:[".hide-on-mobile",".inline-icon"]}},Nd={domain:"www.sbnation.com",title:{selectors:["h1.c-page-title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:["h2.c-entry-summary.p-dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.c-entry-content"],transforms:{},clean:[]}},Wd={domain:"www.bloomberg.com",title:{selectors:[".lede-headline","h1.article-title","h1.lede-text-only__hed"]},author:{selectors:[['meta[name="parsely-author"]',"value"],".byline-details__link",".bydek",".author"]},date_published:{selectors:[["time.published-at","datetime"],["time[datetime]","datetime"],['meta[name="date"]',"value"],['meta[name="parsely-pub-date"]',"value"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-body__content",["section.copy-block"],".body-copy"],transforms:{},clean:[".inline-newsletter",".page-ad"]}},Ld={domain:"www.bustle.com",title:{selectors:["h1.post-page__title"]},author:{selectors:["div.content-meta__author"]},date_published:{selectors:[["time.content-meta__published-date[datetime]","datetime"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".post-page__body"],transforms:{},clean:[]}},Rd={domain:"www.npr.org",title:{selectors:["h1",".storytitle"]},author:{selectors:["p.byline__name.byline__name--block"]},date_published:{selectors:[[".dateblock time[datetime]","datetime"],['meta[name="date"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"],['meta[name="twitter:image:src"]',"value"]]},content:{selectors:[".storytext"],transforms:{".bucketwrap.image":"figure",".bucketwrap.image .credit-caption":"figcaption"},clean:["div.enlarge_measure"]}},qd={domain:"www.recode.net",title:{selectors:["h1.c-page-title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:["h2.c-entry-summary.p-dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["figure.e-image--hero",".c-entry-content"],".c-entry-content"],transforms:{},clean:[]}},Yd={domain:"qz.com",title:{selectors:["header.item-header.content-width-responsive"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[".timestamp"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["figure.featured-image",".item-body"],".item-body"],transforms:{},clean:[".article-aside",".progressive-image-thumbnail"]}},Bd={domain:"www.dmagazine.com",title:{selectors:["h1.story__title"]},author:{selectors:[".story__info .story__info__item:first-child"]},date_published:{selectors:[".story__info"],timezone:"America/Chicago"},dek:{selectors:[".story__subhead"]},lead_image_url:{selectors:[["article figure a:first-child","href"]]},content:{selectors:[".story__content"],transforms:{},clean:[]}},Hd={domain:"www.reuters.com",title:{selectors:["h1.article-headline"]},author:{selectors:[".author"]},date_published:{selectors:[['meta[name="og:article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["#article-text"],transforms:{".article-subtitle":"h4"},clean:["#article-byline .author"]}},Fd={domain:"mashable.com",title:{selectors:["h1.title"]},author:{selectors:["span.author_name a"]},date_published:{selectors:[['meta[name="og:article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["section.article-content.blueprint"],transforms:{".image-credit":"figcaption"},clean:[]}},Id={domain:"www.chicagotribune.com",title:{selectors:["h1.trb_ar_hl_t"]},author:{selectors:["span.trb_ar_by_nm_au"]},date_published:{selectors:[['meta[itemprop="datePublished"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.trb_ar_page"],transforms:{},clean:[]}},Ud={domain:"www.vox.com",title:{selectors:["h1.c-page-title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[".p-dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["figure.e-image--hero",".c-entry-content"],".c-entry-content"],transforms:{"figure .e-image__image noscript":function(e){var t=e.html();e.parents(".e-image__image").find(".c-dynamic-image").replaceWith(t)},"figure .e-image__meta":"figcaption"},clean:[]}},Gd={domain:"news.nationalgeographic.com",title:{selectors:["h1","h1.main-title"]},author:{selectors:[".byline-component__contributors b span"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]],format:"ddd MMM DD HH:mm:ss zz YYYY",timezone:"EST"},dek:{selectors:[".article__deck"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".parsys.content",".__image-lead__"],".content"],transforms:{".parsys.content":function(e,t){var n=e.find(".image.parbase.section").find(".picturefill").first().data("platform-src");n&&e.prepend(t('<img class="__image-lead__" src="'+n+'"/>'))}},clean:[".pull-quote.pull-quote--large"]}},$d={domain:"www.nationalgeographic.com",title:{selectors:["h1","h1.main-title"]},author:{selectors:[".byline-component__contributors b span"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[".article__deck"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".parsys.content",".__image-lead__"],".content"],transforms:{".parsys.content":function(e,t){var n=e.children().first();if(n.hasClass("imageGroup")){var r=n.find(".media--medium__container").children().first(),a=r.data("platform-image1-path"),i=r.data("platform-image2-path");i&&a&&e.prepend(t('<div class="__image-lead__">\n <img src="'+a+'"/>\n <img src="'+i+'"/>\n </div>'))}else{var o=e.find(".image.parbase.section").find(".picturefill").first().data("platform-src");o&&e.prepend(t('<img class="__image-lead__" src="'+o+'"/>'))}}},clean:[".pull-quote.pull-quote--small"]}},Vd={domain:"www.latimes.com",title:{selectors:[".trb_ar_hl"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[itemprop="datePublished"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".trb_ar_main"],transforms:{".trb_ar_la":function(e){var t=e.find("figure");e.replaceWith(t)}},clean:[".trb_ar_by",".trb_ar_cr"]}},Kd={domain:"pagesix.com",supportedDomains:["nypost.com"],title:{selectors:["h1 a"]},author:{selectors:[".byline"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[['meta[name="description"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["#featured-image-wrapper",".entry-content"],".entry-content"],transforms:{"#featured-image-wrapper":"figure",".wp-caption-text":"figcaption"},clean:[".modal-trigger"]}},Xd={domain:"thefederalistpapers.org",title:{selectors:["h1.entry-title"]},author:{selectors:["main span.entry-author-name"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-content"],transforms:{},clean:[["p[style]"]]}},Jd={domain:"www.cbssports.com",title:{selectors:[".article-headline"]},author:{selectors:[".author-name"]},date_published:{selectors:[[".date-original-reading-time time","datetime"]],timezone:"UTC"},dek:{selectors:[".article-subline"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article"],transforms:{},clean:[]}},Zd={domain:"www.msnbc.com",title:{selectors:["h1","h1.is-title-pane"]},author:{selectors:[".author"]},date_published:{selectors:[['meta[name="DC.date.issued"]',"value"]]},dek:{selectors:[['meta[name="description"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".pane-node-body"],transforms:{".pane-node-body":function(e,t){var n=mu(Zd.lead_image_url.selectors[0],2),r=n[0],a=n[1],i=t(r).attr(a);i&&e.prepend('<img src="'+i+'" />')}},clean:[]}},Qd={domain:"www.thepoliticalinsider.com",title:{selectors:[['meta[name="sailthru.title"]',"value"]]},author:{selectors:[['meta[name="sailthru.author"]',"value"]]},date_published:{selectors:[['meta[name="sailthru.date"]',"value"]],timezone:"America/New_York"},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div#article-body"],transforms:{},clean:[]}},eh={domain:"www.mentalfloss.com",title:{selectors:["h1.title",".title-group",".inner"]},author:{selectors:[".field-name-field-enhanced-authors"]},date_published:{selectors:[".date-display-single"],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.field.field-name-body"],transforms:{},clean:[]}},th={domain:"abcnews.go.com",title:{selectors:[".article-header h1"]},author:{selectors:[".authors"],clean:[".author-overlay",".by-text"]},date_published:{selectors:[".timestamp"],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-copy"],transforms:{},clean:[]}},nh={domain:"www.nydailynews.com",title:{selectors:["h1#ra-headline"]},author:{selectors:[['meta[name="parsely-author"]',"value"]]},date_published:{selectors:[['meta[name="sailthru.date"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["article#ra-body"],transforms:{},clean:["dl#ra-tags",".ra-related","a.ra-editor","dl#ra-share-bottom"]}},rh={domain:"www.cnbc.com",title:{selectors:["h1.title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div#article_body.content","div.story"],transforms:{},clean:[]}},ah={domain:"www.popsugar.com",title:{selectors:["h2.post-title","title-text"]},author:{selectors:[['meta[name="article:author"]',"value"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["#content"],transforms:{},clean:[".share-copy-title",".post-tags",".reactions"]}},ih={domain:"observer.com",title:{selectors:["h1.entry-title"]},author:{selectors:[".author",".vcard"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:["h2.dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.entry-content"],transforms:{},clean:[]}},oh={domain:"people.com",title:{selectors:[['meta[name="og:title"]',"value"]]},author:{selectors:["a.author.url.fn"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.article-body__inner"],transforms:{},clean:[]}},sh={domain:"www.usmagazine.com",title:{selectors:["header h1"]},author:{selectors:["a.article-byline.tracked-offpage"]},date_published:{timezone:"America/New_York",selectors:["time.article-published-date"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.article-body-inner"],transforms:{},clean:[".module-related"]}},uh={domain:"www.rollingstone.com",title:{selectors:["h1.content-title"]},author:{selectors:["a.content-author.tracked-offpage"]},date_published:{selectors:["time.content-published-date"],timezone:"America/New_York"},dek:{selectors:[".content-description"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".lead-container",".article-content"],".article-content"],transforms:{},clean:[".module-related"]}},ch={domain:"247sports.com",title:{selectors:["title","article header h1"]},author:{selectors:[".author"]},date_published:{selectors:[["time[data-published]","data-published"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["section.body.article"],transforms:{},clean:[]}},lh={domain:"uproxx.com",title:{selectors:["div.post-top h1"]},author:{selectors:[".post-top .authorname"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".post-body"],transforms:{"div.image":"figure","div.image .wp-media-credit":"figcaption"},clean:[]}},fh={domain:"www.eonline.com",title:{selectors:["h1.article__title"]},author:{selectors:[".entry-meta__author a"]},date_published:{selectors:[['meta[itemprop="datePublished"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".post-content section, .post-content div.post-content__image"]],transforms:{"div.post-content__image":"figure","div.post-content__image .image__credits":"figcaption"},clean:[]}},dh={domain:"www.miamiherald.com",title:{selectors:["h1.title"]},date_published:{selectors:["p.published-date"],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.dateline-storybody"],transforms:{},clean:[]}},hh={domain:"www.refinery29.com",title:{selectors:["h1.title"]},author:{selectors:[".contributor"]},date_published:{selectors:[['meta[name="sailthru.date"]',"value"]],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".full-width-opener",".article-content"],".article-content",".body"],transforms:{"div.loading noscript":function(e){var t=e.html();e.parents(".loading").replaceWith(t)},".section-image":"figure",".section-image .content-caption":"figcaption",".section-text":"p"},clean:[".story-share"]}},ph={domain:"www.macrumors.com",title:{selectors:["h1","h1.title"]},author:{selectors:[".author-url"]},date_published:{selectors:[".article .byline"],format:"dddd MMMM D, YYYY h:mm A zz",timezone:"America/Los_Angeles"},dek:{selectors:[['meta[name="description"]',"value"]] -},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article"],transforms:{},clean:[]}},mh={domain:"www.androidcentral.com",title:{selectors:["h1","h1.main-title"]},author:{selectors:[".meta-by"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[['meta[name="og:description"]',"value"]]},lead_image_url:{selectors:[[".image-large","src"]]},content:{selectors:[".article-body"],transforms:{},clean:[".intro","blockquote"]}},gh={domain:"www.si.com",title:{selectors:["h1","h1.headline"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[".timestamp"],timezone:"America/New_York"},dek:{selectors:[".quick-hit ul"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["p",".marquee_large_2x",".component.image"]],transforms:{noscript:function(e){var t=e.children();return 1===t.length&&"img"===t.get(0).tagName?"figure":null}},clean:[[".inline-thumb",".primary-message",".description",".instructions"]]}},vh={domain:"www.rawstory.com",title:{selectors:[".blog-title"]},author:{selectors:[".blog-author a:first-of-type"]},date_published:{selectors:[".blog-author a:last-of-type"],timezone:"EST"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".blog-content"],transforms:{},clean:[]}},yh={domain:"www.cnet.com",title:{selectors:[['meta[name="og:title"]',"value"]]},author:{selectors:["a.author"]},date_published:{selectors:["time"],timezone:"America/Los_Angeles"},dek:{selectors:[".article-dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["img.__image-lead__",".article-main-body"],".article-main-body"],transforms:{"figure.image":function(e){var t=e.find("img");t.attr("width","100%"),t.attr("height","100%"),t.addClass("__image-lead__"),e.remove(".imgContainer").prepend(t)}},clean:[]}},bh={domain:"www.cinemablend.com",title:{selectors:[".story_title"]},author:{selectors:[".author"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]],timezone:"EST"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div#wrap_left_content"],transforms:{},clean:[]}},_h={domain:"www.today.com",title:{selectors:["h1.entry-headline"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="DC.date.issued"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-container"],transforms:{},clean:[".label-comment"]}},wh={domain:"www.howtogeek.com",title:{selectors:["title"]},author:{selectors:["#authorinfobox a"]},date_published:{selectors:["#authorinfobox + div li"],timezone:"GMT"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".thecontent"],transforms:{},clean:[]}},Ah={domain:"www.al.com",title:{selectors:[['meta[name="title"]',"value"]]},author:{selectors:[['meta[name="article_author"]',"value"]]},date_published:{selectors:[['meta[name="article_date_original"]',"value"]],timezone:"EST"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-content"],transforms:{},clean:[]}},xh={domain:"www.thepennyhoarder.com",title:{selectors:[['meta[name="dcterms.title"]',"value"]]},author:{selectors:[['link[rel="author"]',"title"]]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".post-img",".post-text"],".post-text"],transforms:{},clean:[]}},Mh={domain:"www.westernjournalism.com",title:{selectors:["title","h1.entry-title"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[['meta[name="DC.date.issued"]',"value"]]},dek:{selectors:[".subtitle"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.article-sharing.top + div"],transforms:{},clean:[".ad-notice-small"]}},kh={domain:"fusion.net",title:{selectors:[".post-title",".single-title",".headline"]},author:{selectors:[".show-for-medium .byline"]},date_published:{selectors:[["time.local-time","datetime"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".post-featured-media",".article-content"],".article-content"],transforms:{".fusion-youtube-oembed":"figure"},clean:[]}},Th={domain:"www.americanow.com",title:{selectors:[".title",['meta[name="title"]',"value"]]},author:{selectors:[".byline"]},date_published:{selectors:[['meta[name="publish_date"]',"value"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".article-content",".image",".body"],".body"],transforms:{},clean:[".article-video-wrapper",".show-for-small-only"]}},Sh={domain:"sciencefly.com",title:{selectors:[".entry-title",".cb-entry-title",".cb-single-title"]},author:{selectors:["div.cb-author","div.cb-author-title"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[]},lead_image_url:{selectors:[["div.theiaPostSlider_slides img","src"]]},content:{selectors:["div.theiaPostSlider_slides"],transforms:{},clean:[]}},Eh={domain:"hellogiggles.com",title:{selectors:[".title"]},author:{selectors:[".author-link"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-content"],transforms:{},clean:[]}},Ch={domain:"thoughtcatalog.com",title:{selectors:["h1.title",['meta[name="og:title"]',"value"]]},author:{selectors:["div.col-xs-12.article_header div.writer-container.writer-container-inline.writer-no-avatar h4.writer-name","h1.writer-name"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry.post"],transforms:{},clean:[".tc_mark"]}},Oh={domain:"www.nj.com",title:{selectors:[['meta[name="title"]',"value"]]},author:{selectors:[['meta[name="article_author"]',"value"]]},date_published:{selectors:[['meta[name="article_date_original"]',"value"]],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-content"],transforms:{},clean:[]}},Dh={domain:"www.inquisitr.com",title:{selectors:["h1.entry-title.story--header--title"]},author:{selectors:["div.story--header--author"]},date_published:{selectors:[['meta[name="datePublished"]',"value"]]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["article.story",".entry-content."],transforms:{},clean:[".post-category",".story--header--socials",".story--header--content"]}},jh={domain:"www.nbcnews.com",title:{selectors:["div.article-hed h1"]},author:{selectors:["span.byline_author"]},date_published:{selectors:[[".flag_article-wrapper time.timestamp_article[datetime]","datetime"],".flag_article-wrapper time"],timezone:"America/New_York"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["div.article-body"],transforms:{},clean:[]}},Ph={domain:"fortune.com",title:{selectors:["h1"]},author:{selectors:[['meta[name="author"]',"value"]]},date_published:{selectors:[".MblGHNMJ"],timezone:"UTC"},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["picture","article.row"],"article.row"],transforms:{},clean:[]}},zh={domain:"www.linkedin.com",title:{selectors:[".article-title","h1"]},author:{selectors:[['meta[name="article:author"]',"value"],".entity-name a[rel=author]"]},date_published:{selectors:[['time[itemprop="datePublished"]',"datetime"]],timezone:"America/Los_Angeles"},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[["header figure",".prose"],".prose"],transforms:{},clean:[".entity-image"]}},Nh={domain:"obamawhitehouse.archives.gov",supportedDomains:["whitehouse.gov"],title:{selectors:["h1",".pane-node-title"]},author:{selectors:[".blog-author-link",".node-person-name-link"]},date_published:{selectors:[['meta[name="article:published_time"]',"value"]]},dek:{selectors:[".field-name-field-forall-summary"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{defaultCleaner:!1,selectors:["div#content-start",".pane-node-field-forall-body"],transforms:{},clean:[".pane-node-title",".pane-custom.pane-1"]}},Wh={domain:"www.opposingviews.com",title:{selectors:["h1.title"]},author:{selectors:["div.date span span a"]},date_published:{selectors:[['meta[name="publish_date"]',"value"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-content"],transforms:{},clean:[".show-for-small-only"]}},Lh={domain:"www.prospectmagazine.co.uk",title:{selectors:[".page-title"]},author:{selectors:[".aside_author .title"]},date_published:{selectors:[".post-info"],timezone:"Europe/London"},dek:{selectors:[".page-subtitle"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:["article .post_content"],transforms:{},clean:[]}},Rh={domain:"forward.com",title:{selectors:[['meta[name="og:title"]',"value"]]},author:{selectors:[".author-name",['meta[name="sailthru.author"]',"value"]]},date_published:{selectors:[['meta[name="date"]',"value"]]},dek:{selectors:[]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".post-item-media-wrap",".post-item p"]],transforms:{},clean:[".donate-box",".message",".subtitle"]}},qh={domain:"www.qdaily.com",title:{selectors:["h2","h2.title"]},author:{selectors:[".name"]},date_published:{selectors:[[".date.smart-date","data-origindate"]]},dek:{selectors:[".excerpt"]},lead_image_url:{selectors:[[".article-detail-hd img","src"]]},content:{selectors:[".detail"],transforms:{},clean:[".lazyload",".lazylad",".lazylood"]}},Yh={domain:"gothamist.com",supportedDomains:["chicagoist.com","laist.com","sfist.com","shanghaiist.com","dcist.com"],title:{selectors:["h1",".entry-header h1"]},author:{selectors:[".author"]},date_published:{selectors:["abbr","abbr.published"],timezone:"America/New_York"},dek:{selectors:[null]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".entry-body"],transforms:{"div.image-none":"figure",".image-none i":"figcaption","div.image-left":"figure",".image-left i":"figcaption","div.image-right":"figure",".image-right i":"figcaption"},clean:[".image-none br",".image-left br",".image-right br",".galleryEase"]}},Bh={domain:"www.fool.com",title:{selectors:["h1"]},author:{selectors:[".author-inline .author-name"]},date_published:{selectors:[['meta[name="date"]',"value"]]},dek:{selectors:["header h2"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".article-content"],transforms:{".caption img":function(e){var t=e.attr("src");e.parent().replaceWith('<figure><img src="'+t+'"/></figure>')},".caption":"figcaption"},clean:["#pitch"]}},Hh={domain:"www.slate.com",title:{selectors:[".hed","h1"]},author:{selectors:["a[rel=author]"]},date_published:{selectors:[".pub-date"],timezone:"America/New_York"},dek:{selectors:[".dek"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[".body"],transforms:{},clean:[".about-the-author",".pullquote",".newsletter-signup-component",".top-comment"]}},Fh={domain:"ici.radio-canada.ca",title:{selectors:["h1"]},author:{selectors:[['meta[name="dc.creator"]',"value"]]},date_published:{selectors:[['meta[name="dc.date.created"]',"value"]],timezone:"America/New_York"},dek:{selectors:[".bunker-component.lead"]},lead_image_url:{selectors:[['meta[name="og:image"]',"value"]]},content:{selectors:[[".main-multimedia-item",".news-story-content"]],transforms:{},clean:[]}},Ih=Object.freeze({BloggerExtractor:sd,NYMagExtractor:ud,WikipediaExtractor:cd,TwitterExtractor:ld,NYTimesExtractor:fd,TheAtlanticExtractor:dd,NewYorkerExtractor:hd,WiredExtractor:pd,MSNExtractor:md,YahooExtractor:gd,BuzzfeedExtractor:vd,WikiaExtractor:yd,LittleThingsExtractor:bd,PoliticoExtractor:_d,DeadspinExtractor:wd,BroadwayWorldExtractor:Ad,ApartmentTherapyExtractor:xd,MediumExtractor:Md,WwwTmzComExtractor:kd,WwwWashingtonpostComExtractor:Td,WwwHuffingtonpostComExtractor:Sd,NewrepublicComExtractor:Ed,MoneyCnnComExtractor:Cd,WwwThevergeComExtractor:Od,WwwCnnComExtractor:Dd,WwwAolComExtractor:jd,WwwYoutubeComExtractor:Pd,WwwTheguardianComExtractor:zd,WwwSbnationComExtractor:Nd,WwwBloombergComExtractor:Wd,WwwBustleComExtractor:Ld,WwwNprOrgExtractor:Rd,WwwRecodeNetExtractor:qd,QzComExtractor:Yd,WwwDmagazineComExtractor:Bd,WwwReutersComExtractor:Hd,MashableComExtractor:Fd,WwwChicagotribuneComExtractor:Id,WwwVoxComExtractor:Ud,NewsNationalgeographicComExtractor:Gd,WwwNationalgeographicComExtractor:$d,WwwLatimesComExtractor:Vd,PagesixComExtractor:Kd,ThefederalistpapersOrgExtractor:Xd,WwwCbssportsComExtractor:Jd,WwwMsnbcComExtractor:Zd,WwwThepoliticalinsiderComExtractor:Qd,WwwMentalflossComExtractor:eh,AbcnewsGoComExtractor:th,WwwNydailynewsComExtractor:nh,WwwCnbcComExtractor:rh,WwwPopsugarComExtractor:ah,ObserverComExtractor:ih,PeopleComExtractor:oh,WwwUsmagazineComExtractor:sh,WwwRollingstoneComExtractor:uh,twofortysevensportsComExtractor:ch,UproxxComExtractor:lh,WwwEonlineComExtractor:fh,WwwMiamiheraldComExtractor:dh,WwwRefinery29ComExtractor:hh,WwwMacrumorsComExtractor:ph,WwwAndroidcentralComExtractor:mh,WwwSiComExtractor:gh,WwwRawstoryComExtractor:vh,WwwCnetComExtractor:yh,WwwCinemablendComExtractor:bh,WwwTodayComExtractor:_h,WwwHowtogeekComExtractor:wh,WwwAlComExtractor:Ah,WwwThepennyhoarderComExtractor:xh,WwwWesternjournalismComExtractor:Mh,FusionNetExtractor:kh,WwwAmericanowComExtractor:Th,ScienceflyComExtractor:Sh,HellogigglesComExtractor:Eh,ThoughtcatalogComExtractor:Ch,WwwNjComExtractor:Oh,WwwInquisitrComExtractor:Dh,WwwNbcnewsComExtractor:jh,FortuneComExtractor:Ph,WwwLinkedinComExtractor:zh,ObamawhitehouseArchivesGovExtractor:Nh,WwwOpposingviewsComExtractor:Wh,WwwProspectmagazineCoUkExtractor:Lh,ForwardComExtractor:Rh,WwwQdailyComExtractor:qh,GothamistComExtractor:Yh,WwwFoolComExtractor:Bh,WwwSlateComExtractor:Hh,IciRadioCanadaCaExtractor:Fh}),Uh=id(Ih).reduce(function(e,t){var n=Ih[t];return da({},e,Je(n))},{}),Gh=n(function(e,t){(function(){function e(e){if("undefined"==typeof e)throw new Error("TypeError missing argument");if("string"!=typeof e)throw new Error("TypeError getDirection expects strings");if(""===e)return l;if(e.indexOf(i)>-1&&e.indexOf(o)>-1)return c;if(e.indexOf(i)>-1)return s;if(e.indexOf(o)>-1)return u;var t=n(e,u),r=n(e,s);return t&&r?c:r?s:t?u:l}function n(e,t){var n,a,i,o,c=!1,l=!1,d=!1;for(d=e.search(/[0-9]/)>-1,e=e.replace(/[\s\n\0\f\t\v\'\"\-0-9\+\?\!]+/gm,""),n=0;n<e.length;n++){a=e.charAt(n),o=!1;for(i in f)f.hasOwnProperty(i)&&r(a,f[i][0],f[i][1])&&(c=!0,o=!0);o===!1&&(l=!0)}return t===u?c:t===s?l||!c&&d:void 0}function r(e,t,n){var r=e.charCodeAt(0),a=parseInt(t,16),i=parseInt(n,16);return r>a&&r<i}function a(){String.prototype.getDirection=function(){return e(this.valueOf())}}var i="‎",o="‏",s="ltr",u="rtl",c="bidi",l="",f={Hebrew:["0590","05FF"],Arabic:["0600","06FF"],NKo:["07C0","07FF"],Syriac:["0700","074F"],Thaana:["0780","07BF"],Tifinagh:["2D30","2D7F"]};"undefined"!=typeof t?(t.getDirection=e,t.patch=a):this.stringDirection={getDirection:e,patch:a}}).call(this)}),$h=/^\s*(posted |written )?by\s*:?\s*(.*)/i,Vh=new RegExp("http(s)?://","i"),Kh=/^\d{13}$/i,Xh=/^\d{10}$/i,Jh=/^\s*published\s*:?\s*(.*)/i,Zh=/(.*\d)(am|pm)(.*)/i,Qh=/\.m\./i,ep=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],tp=ep.join("|"),np="[0-9]{1,2}:[0-9]{2,2}( ?[ap].?m.?)?",rp="[0-9]{1,2}[/-][0-9]{1,2}[/-][0-9]{2,4}",ap="-[0-9]{3,4}$",ip=new RegExp("("+np+")|("+rp+")|("+ap+")|([0-9]{1,4})|("+tp+")","ig"),op=/-\d{3,4}$/,sp=/(: | - | \| )/g,up=new RegExp(".com$|.net$|.org$|.co.uk$","g"),cp=n(function(e){!function(e){function t(e){if(e&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(e)&&!/%[^0-9a-f]/i.test(e)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(e)){var t=[],n="",r="",a="",o="",s="",u="";if(t=i(e),n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],n&&n.length&&a.length>=0){if(r&&r.length){if(0!==a.length&&!/^\//.test(a))return}else if(/^\/\//.test(a))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(n.toLowerCase()))return u+=n+":",r&&r.length&&(u+="//"+r),u+=a,o&&o.length&&(u+="?"+o),s&&s.length&&(u+="#"+s),u}}}function n(e,n){if(t(e)){var r=[],a="",o="",s="",u="",c="",l="",f="";if(r=i(e),a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],a){if(n){if("https"!=a.toLowerCase())return}else if("http"!=a.toLowerCase())return;if(o)return/:(\d+)$/.test(o)&&(u=o.match(/:(\d+)$/)[0],o=o.replace(/:\d+$/,"")),f+=a+":",f+="//"+o,u&&(f+=u),f+=s,c&&c.length&&(f+="?"+c),l&&l.length&&(f+="#"+l),f}}}function r(e){return n(e,!0)}function a(e){return n(e)||r(e)}e.exports.is_uri=t,e.exports.is_http_uri=n,e.exports.is_https_uri=r,e.exports.is_web_uri=a,e.exports.isUri=t,e.exports.isHttpUri=n,e.exports.isHttpsUri=r,e.exports.isWebUri=a;var i=function(e){var t=e.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return t}}(e)}),lp=n(function(t,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.moment=r()}(this,function(){function n(){return vr.apply(null,arguments)}function r(e){vr=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){var t;for(t in e)return!1;return!0}function s(e){return"number"==typeof value||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function f(e,t){for(var n in t)l(t,n)&&(e[n]=t[n]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,r){return bt(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function p(e){return null==e._pf&&(e._pf=h()),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=br.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function g(e){var t=d(NaN);return null!=e?f(p(t),e):p(t).userInvalidated=!0,t}function v(e){return void 0===e}function y(e,t){var n,r,a;if(v(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),v(t._i)||(e._i=t._i),v(t._f)||(e._f=t._f),v(t._l)||(e._l=t._l),v(t._strict)||(e._strict=t._strict),v(t._tzm)||(e._tzm=t._tzm),v(t._isUTC)||(e._isUTC=t._isUTC),v(t._offset)||(e._offset=t._offset),v(t._pf)||(e._pf=p(t)),v(t._locale)||(e._locale=t._locale),_r.length>0)for(n in _r)r=_r[n],a=t[r],v(a)||(e[r]=a);return e}function b(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),wr===!1&&(wr=!0,n.updateOffset(this),wr=!1)}function _(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function A(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function x(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&A(e[r])!==A(t[r]))&&o++;return o+i}function M(e){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var r=!0;return f(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){for(var a,i=[],o=0;o<arguments.length;o++){if(a="","object"==typeof arguments[o]){a+="\n["+o+"] ";for(var s in arguments[0])a+=s+": "+arguments[0][s]+", ";a=a.slice(0,-2)}else a=arguments[o];i.push(a)}M(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)},t)}function T(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),Ar[e]||(M(t),Ar[e]=!0)}function S(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function E(e){var t,n;for(n in e)t=e[n],S(t)?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function C(e,t){var n,r=f({},e);for(n in t)l(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)l(e,n)&&!l(t,n)&&i(e[n])&&(r[n]=f({},r[n]));return r}function O(e){null!=e&&this.set(e)}function D(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return S(r)?r.call(t,n):r}function j(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function P(){return this._invalidDate}function z(e){return this._ordinal.replace("%d",e)}function N(e,t,n,r){var a=this._relativeTime[n];return S(a)?a(e,t,n,r):a.replace(/%d/i,e)}function W(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)}function L(e,t){var n=e.toLowerCase();jr[n]=jr[n+"s"]=jr[t]=e}function R(e){return"string"==typeof e?jr[e]||jr[e.toLowerCase()]:void 0}function q(e){var t,n,r={};for(n in e)l(e,n)&&(t=R(n),t&&(r[t]=e[n]));return r}function Y(e,t){Pr[e]=t}function B(e){var t=[];for(var n in e)t.push({unit:n,priority:Pr[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function H(e,t){return function(r){return null!=r?(I(this,e,r),n.updateOffset(this,t),this):F(this,e)}}function F(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function I(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function U(e){return e=R(e),S(this[e])?this[e]():this}function G(e,t){if("object"==typeof e){e=q(e);for(var n=B(e),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit])}else if(e=R(e),S(this[e]))return this[e](t);return this}function $(e,t,n){var r=""+Math.abs(e),a=t-r.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}function V(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(Lr[e]=a),t&&(Lr[t[0]]=function(){return $(a.apply(this,arguments),t[1],t[2])}),n&&(Lr[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function K(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function X(e){var t,n,r=e.match(zr);for(t=0,n=r.length;t<n;t++)Lr[r[t]]?r[t]=Lr[r[t]]:r[t]=K(r[t]);return function(t){var a,i="";for(a=0;a<n;a++)i+=r[a]instanceof Function?r[a].call(t,e):r[a];return i}}function J(e,t){return e.isValid()?(t=Z(t,e.localeData()),Wr[t]=Wr[t]||X(t),Wr[t](e)):e.localeData().invalidDate()}function Z(e,t){function n(e){return t.longDateFormat(e)||e}var r=5;for(Nr.lastIndex=0;r>=0&&Nr.test(e);)e=e.replace(Nr,n),Nr.lastIndex=0,r-=1;return e}function Q(e,t,n){ta[e]=S(t)?t:function(e,r){return e&&n?n:t}}function ee(e,t){return l(ta,e)?ta[e](t._strict,t._locale):new RegExp(te(e))}function te(e){return ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,a){return t||n||r||a}))}function ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=A(e)}),n=0;n<e.length;n++)na[e[n]]=r}function ae(e,t){re(e,function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)})}function ie(e,t,n){null!=t&&l(na,e)&&na[e](t,n._a,n,e)}function oe(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function se(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ha).test(t)?"format":"standalone"][e.month()]:this._months}function ue(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ha.test(t)?"format":"standalone"][e.month()]:this._monthsShort}function ce(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?(a=da.call(this._shortMonthsParse,o),a!==-1?a:null):(a=da.call(this._longMonthsParse,o),a!==-1?a:null):"MMM"===t?(a=da.call(this._shortMonthsParse,o),a!==-1?a:(a=da.call(this._longMonthsParse,o),a!==-1?a:null)):(a=da.call(this._longMonthsParse,o),a!==-1?a:(a=da.call(this._shortMonthsParse,o),a!==-1?a:null))}function le(e,t,n){var r,a,i;if(this._monthsParseExact)return ce.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=A(t);else if(t=e.localeData().monthsParse(t),!s(t))return e;return n=Math.min(e.date(),oe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function de(e){return null!=e?(fe(this,e),n.updateOffset(this,!0),this):F(this,"Month")}function he(){return oe(this.year(),this.month())}function pe(e){return this._monthsParseExact?(l(this,"_monthsRegex")||ge.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ga),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function me(e){return this._monthsParseExact?(l(this,"_monthsRegex")||ge.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=va),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ge(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=d([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=ne(r[t]),a[t]=ne(a[t]);for(t=0;t<24;t++)i[t]=ne(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ve(e){return ye(e)?366:365}function ye(e){return e%4===0&&e%100!==0||e%400===0}function be(){return ye(this.year())}function _e(e,t,n,r,a,i,o){var s=new Date(e,t,n,r,a,i,o);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function we(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ae(e,t,n){var r=7+t-n,a=(7+we(e,0,r).getUTCDay()-t)%7;return-a+r-1}function xe(e,t,n,r,a){var i,o,s=(7+n-r)%7,u=Ae(e,r,a),c=1+7*(t-1)+s+u;return c<=0?(i=e-1,o=ve(i)+c):c>ve(e)?(i=e+1,o=c-ve(e)):(i=e,o=c),{year:i,dayOfYear:o}}function Me(e,t,n){var r,a,i=Ae(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?(a=e.year()-1,r=o+ke(a,t,n)):o>ke(e.year(),t,n)?(r=o-ke(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function ke(e,t,n){var r=Ae(e,t,n),a=Ae(e+1,t,n);return(ve(e)-r+a)/7}function Te(e){return Me(e,this._week.dow,this._week.doy).week}function Se(){return this._week.dow}function Ee(){return this._week.doy}function Ce(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Oe(e){var t=Me(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function De(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function je(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pe(e,t){return e?a(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function ze(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ne(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function We(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?(a=da.call(this._weekdaysParse,o),a!==-1?a:null):"ddd"===t?(a=da.call(this._shortWeekdaysParse,o),a!==-1?a:null):(a=da.call(this._minWeekdaysParse,o),a!==-1?a:null):"dddd"===t?(a=da.call(this._weekdaysParse,o),a!==-1?a:(a=da.call(this._shortWeekdaysParse,o),a!==-1?a:(a=da.call(this._minWeekdaysParse,o),a!==-1?a:null))):"ddd"===t?(a=da.call(this._shortWeekdaysParse,o),a!==-1?a:(a=da.call(this._weekdaysParse,o),a!==-1?a:(a=da.call(this._minWeekdaysParse,o),a!==-1?a:null))):(a=da.call(this._minWeekdaysParse,o),a!==-1?a:(a=da.call(this._weekdaysParse,o),a!==-1?a:(a=da.call(this._shortWeekdaysParse,o),a!==-1?a:null)))}function Le(e,t,n){var r,a,i;if(this._weekdaysParseExact)return We.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Re(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=De(e,this.localeData()),this.add(e-t,"d")):t}function qe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ye(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=je(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=xa),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function He(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ma),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Fe(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ka), -this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ie(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],u=[],c=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),u.push(i),c.push(r),c.push(a),c.push(i);for(o.sort(e),s.sort(e),u.sort(e),c.sort(e),t=0;t<7;t++)s[t]=ne(s[t]),u[t]=ne(u[t]),c[t]=ne(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ue(){return this.hours()%12||12}function Ge(){return this.hours()||24}function $e(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ve(e,t){return t._meridiemParse}function Ke(e){return"p"===(e+"").toLowerCase().charAt(0)}function Xe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Je(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,n,r,a,i=0;i<e.length;){for(a=Je(e[i]).split("-"),t=a.length,n=Je(e[i+1]),n=n?n.split("-"):null;t>0;){if(r=Qe(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&x(a,n,!0)>=t-1)break;t--}i++}return null}function Qe(n){var r=null;if(!Oa[n]&&"undefined"!=typeof t&&t&&t.exports)try{r=Ta._abbr,e("./locale/"+n),et(r)}catch(e){}return Oa[n]}function et(e,t){var n;return e&&(n=v(t)?rt(e):tt(e,t),n&&(Ta=n)),Ta._abbr}function tt(e,t){if(null!==t){var n=Ca;if(t.abbr=e,null!=Oa[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Oa[e]._config;else if(null!=t.parentLocale){if(null==Oa[t.parentLocale])return Da[t.parentLocale]||(Da[t.parentLocale]=[]),Da[t.parentLocale].push({name:e,config:t}),null;n=Oa[t.parentLocale]._config}return Oa[e]=new O(C(n,t)),Da[e]&&Da[e].forEach(function(e){tt(e.name,e.config)}),et(e),Oa[e]}return delete Oa[e],null}function nt(e,t){if(null!=t){var n,r=Ca;null!=Oa[e]&&(r=Oa[e]._config),t=C(r,t),n=new O(t),n.parentLocale=Oa[e],Oa[e]=n,et(e)}else null!=Oa[e]&&(null!=Oa[e].parentLocale?Oa[e]=Oa[e].parentLocale:null!=Oa[e]&&delete Oa[e]);return Oa[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ta;if(!a(e)){if(t=Qe(e))return t;e=[e]}return Ze(e)}function at(){return kr(Oa)}function it(e){var t,n=e._a;return n&&p(e).overflow===-2&&(t=n[aa]<0||n[aa]>11?aa:n[ia]<1||n[ia]>oe(n[ra],n[aa])?ia:n[oa]<0||n[oa]>24||24===n[oa]&&(0!==n[sa]||0!==n[ua]||0!==n[ca])?oa:n[sa]<0||n[sa]>59?sa:n[ua]<0||n[ua]>59?ua:n[ca]<0||n[ca]>999?ca:-1,p(e)._overflowDayOfYear&&(t<ra||t>ia)&&(t=ia),p(e)._overflowWeeks&&t===-1&&(t=la),p(e)._overflowWeekday&&t===-1&&(t=fa),p(e).overflow=t),e}function ot(e){var t,n,r,a,i,o,s=e._i,u=ja.exec(s)||Pa.exec(s);if(u){for(p(e).iso=!0,t=0,n=Na.length;t<n;t++)if(Na[t][1].exec(u[1])){a=Na[t][0],r=Na[t][2]!==!1;break}if(null==a)return void(e._isValid=!1);if(u[3]){for(t=0,n=Wa.length;t<n;t++)if(Wa[t][1].exec(u[3])){i=(u[2]||" ")+Wa[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(u[4]){if(!za.exec(u[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),dt(e)}else e._isValid=!1}function st(e){var t=La.exec(e._i);return null!==t?void(e._d=new Date(+t[1])):(ot(e),void(e._isValid===!1&&(delete e._isValid,n.createFromInputFallback(e))))}function ut(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function lt(e){var t,n,r,a,i=[];if(!e._d){for(r=ct(e),e._w&&null==e._a[ia]&&null==e._a[aa]&&ft(e),e._dayOfYear&&(a=ut(e._a[ra],r[ra]),e._dayOfYear>ve(a)&&(p(e)._overflowDayOfYear=!0),n=we(a,0,e._dayOfYear),e._a[aa]=n.getUTCMonth(),e._a[ia]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[oa]&&0===e._a[sa]&&0===e._a[ua]&&0===e._a[ca]&&(e._nextDay=!0,e._a[oa]=0),e._d=(e._useUTC?we:_e).apply(null,i),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[oa]=24)}}function ft(e){var t,n,r,a,i,o,s,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)i=1,o=4,n=ut(t.GG,e._a[ra],Me(_t(),1,4).year),r=ut(t.W,1),a=ut(t.E,1),(a<1||a>7)&&(u=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var c=Me(_t(),i,o);n=ut(t.gg,e._a[ra],c.year),r=ut(t.w,c.week),null!=t.d?(a=t.d,(a<0||a>6)&&(u=!0)):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(u=!0)):a=i}r<1||r>ke(n,i,o)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=xe(n,r,a,i,o),e._a[ra]=s.year,e._dayOfYear=s.dayOfYear)}function dt(e){if(e._f===n.ISO_8601)return void ot(e);e._a=[],p(e).empty=!0;var t,r,a,i,o,s=""+e._i,u=s.length,c=0;for(a=Z(e._f,e._locale).match(zr)||[],t=0;t<a.length;t++)i=a[t],r=(s.match(ee(i,e))||[])[0],r&&(o=s.substr(0,s.indexOf(r)),o.length>0&&p(e).unusedInput.push(o),s=s.slice(s.indexOf(r)+r.length),c+=r.length),Lr[i]?(r?p(e).empty=!1:p(e).unusedTokens.push(i),ie(i,r,e)):e._strict&&!r&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-c,s.length>0&&p(e).unusedInput.push(s),e._a[oa]<=12&&p(e).bigHour===!0&&e._a[oa]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[oa]=ht(e._locale,e._a[oa],e._meridiem),lt(e),it(e)}function ht(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function pt(e){var t,n,r,a,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],dt(t),m(t)&&(i+=p(t).charsLeftOver,i+=10*p(t).unusedTokens.length,p(t).score=i,(null==r||i<r)&&(r=i,n=t));f(e,n||t)}function mt(e){if(!e._d){var t=q(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),lt(e)}}function gt(e){var t=new b(it(vt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function vt(e){var t=e._i,n=e._f;return e._locale=e._locale||rt(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new b(it(t)):(u(t)?e._d=t:a(n)?pt(e):n?dt(e):yt(e),m(e)||(e._d=null),e))}function yt(e){var t=e._i;void 0===t?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?st(e):a(t)?(e._a=c(t.slice(0),function(e){return parseInt(e,10)}),lt(e)):"object"==typeof t?mt(e):s(t)?e._d=new Date(t):n.createFromInputFallback(e)}function bt(e,t,n,r,s){var u={};return n!==!0&&n!==!1||(r=n,n=void 0),(i(e)&&o(e)||a(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=s,u._l=n,u._i=e,u._f=t,u._strict=r,gt(u)}function _t(e,t,n,r){return bt(e,t,n,r,!1)}function wt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return _t();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function At(){var e=[].slice.call(arguments,0);return wt("isBefore",e)}function xt(){var e=[].slice.call(arguments,0);return wt("isAfter",e)}function Mt(e){var t=q(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||0,o=t.day||0,s=t.hour||0,u=t.minute||0,c=t.second||0,l=t.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=rt(),this._bubble()}function kt(e){return e instanceof Mt}function Tt(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function St(e,t){V(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+$(~~(e/60),2)+t+$(~~e%60,2)})}function Et(e,t){var n=(t||"").match(e);if(null===n)return null;var r=n[n.length-1]||[],a=(r+"").match(Ba)||["-",0,0],i=+(60*a[1])+A(a[2]);return 0===i?0:"+"===a[0]?i:-i}function Ct(e,t){var r,a;return t._isUTC?(r=t.clone(),a=(_(e)||u(e)?e.valueOf():_t(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+a),n.updateOffset(r,!1),r):_t(e).local()}function Ot(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Dt(e,t){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(e=Et(Zr,e),null===e)return this}else Math.abs(e)<16&&(e*=60);return!this._isUTC&&t&&(r=Ot(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?$t(this,Ht(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ot(this)}function jt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Pt(e){return this.utcOffset(0,e)}function zt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ot(this),"m")),this}function Nt(){if(null!=this._tzm)this.utcOffset(this._tzm);else if("string"==typeof this._i){var e=Et(Jr,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Wt(e){return!!this.isValid()&&(e=e?_t(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function Lt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Rt(){if(!v(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=vt(e),e._a){var t=e._isUTC?d(e._a):_t(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qt(){return!!this.isValid()&&!this._isUTC}function Yt(){return!!this.isValid()&&this._isUTC}function Bt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ht(e,t){var n,r,a,i=e,o=null;return kt(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(i={},t?i[t]=e:i.milliseconds=e):(o=Ha.exec(e))?(n="-"===o[1]?-1:1,i={y:0,d:A(o[ia])*n,h:A(o[oa])*n,m:A(o[sa])*n,s:A(o[ua])*n,ms:A(Tt(1e3*o[ca]))*n}):(o=Fa.exec(e))?(n="-"===o[1]?-1:1,i={y:Ft(o[2],n),M:Ft(o[3],n),w:Ft(o[4],n),d:Ft(o[5],n),h:Ft(o[6],n),m:Ft(o[7],n),s:Ft(o[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(a=Ut(_t(i.from),_t(i.to)),i={},i.ms=a.milliseconds,i.M=a.months),r=new Mt(i),kt(e)&&l(e,"_locale")&&(r._locale=e._locale),r}function Ft(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function It(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Ut(e,t){var n;return e.isValid()&&t.isValid()?(t=Ct(t,e),e.isBefore(t)?n=It(e,t):(n=It(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Gt(e,t){return function(n,r){var a,i;return null===r||isNaN(+r)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),n="string"==typeof n?+n:n,a=Ht(n,r),$t(this,a,e),this}}function $t(e,t,r,a){var i=t._milliseconds,o=Tt(t._days),s=Tt(t._months);e.isValid()&&(a=null==a||a,i&&e._d.setTime(e._d.valueOf()+i*r),o&&I(e,"Date",F(e,"Date")+o*r),s&&fe(e,F(e,"Month")+s*r),a&&n.updateOffset(e,o||s))}function Vt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Kt(e,t){var r=e||_t(),a=Ct(r,this).startOf("day"),i=n.calendarFormat(this,a)||"sameElse",o=t&&(S(t[i])?t[i].call(this,r):t[i]);return this.format(o||this.localeData().calendar(i,this,_t(r)))}function Xt(){return new b(this)}function Jt(e,t){var n=_(e)?e:_t(e);return!(!this.isValid()||!n.isValid())&&(t=R(v(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Zt(e,t){var n=_(e)?e:_t(e);return!(!this.isValid()||!n.isValid())&&(t=R(v(t)?"millisecond":t),"millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Qt(e,t,n,r){return r=r||"()",("("===r[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))}function en(e,t){var n,r=_(e)?e:_t(e);return!(!this.isValid()||!r.isValid())&&(t=R(t||"millisecond"),"millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function tn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function nn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function rn(e,t,n){var r,a,i,o;return this.isValid()?(r=Ct(e,this),r.isValid()?(a=6e4*(r.utcOffset()-this.utcOffset()),t=R(t),"year"===t||"month"===t||"quarter"===t?(o=an(this,r),"quarter"===t?o/=3:"year"===t&&(o/=12)):(i=this-r,o="second"===t?i/1e3:"minute"===t?i/6e4:"hour"===t?i/36e5:"day"===t?(i-a)/864e5:"week"===t?(i-a)/6048e5:i),n?o:w(o)):NaN):NaN}function an(e,t){var n,r,a=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(a,"months");return t-i<0?(n=e.clone().add(a-1,"months"),r=(t-i)/(i-n)):(n=e.clone().add(a+1,"months"),r=(t-i)/(n-i)),-(a+r)||0}function on(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function sn(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?S(Date.prototype.toISOString)?this.toDate().toISOString():J(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function un(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]';return this.format(n+r+a+i)}function cn(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=J(this,e);return this.localeData().postformat(t)}function ln(e,t){return this.isValid()&&(_(e)&&e.isValid()||_t(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fn(e){return this.from(_t(),e)}function dn(e,t){return this.isValid()&&(_(e)&&e.isValid()||_t(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function hn(e){return this.to(_t(),e)}function pn(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function mn(){return this._locale}function gn(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function vn(e){return e=R(e),void 0===e||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function yn(){return this._d.valueOf()-6e4*(this._offset||0)}function bn(){return Math.floor(this.valueOf()/1e3)}function _n(){return new Date(this.valueOf())}function wn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function An(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xn(){return this.isValid()?this.toISOString():null}function Mn(){return m(this)}function kn(){return f({},p(this))}function Tn(){return p(this).overflow}function Sn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function En(e,t){V(0,[e,e.length],0,t)}function Cn(e){return Pn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function On(e){return Pn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Dn(){return ke(this.year(),1,4)}function jn(){var e=this.localeData()._week;return ke(this.year(),e.dow,e.doy)}function Pn(e,t,n,r,a){var i;return null==e?Me(this,r,a).year:(i=ke(e,r,a),t>i&&(t=i),zn.call(this,e,t,n,r,a))}function zn(e,t,n,r,a){var i=xe(e,t,n,r,a),o=we(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Nn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Wn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Ln(e,t){t[ca]=A(1e3*("0."+e))}function Rn(){return this._isUTC?"UTC":""}function qn(){return this._isUTC?"Coordinated Universal Time":""}function Yn(e){return _t(1e3*e)}function Bn(){return _t.apply(null,arguments).parseZone()}function Hn(e){return e}function Fn(e,t,n,r){var a=rt(),i=d().set(r,t);return a[n](i,e)}function In(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Fn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=Fn(e,r,n,"month");return a}function Un(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var a=rt(),i=e?a._week.dow:0;if(null!=n)return Fn(t,(n+i)%7,r,"day");var o,u=[];for(o=0;o<7;o++)u[o]=Fn(t,(o+i)%7,r,"day");return u}function Gn(e,t){return In(e,t,"months")}function $n(e,t){return In(e,t,"monthsShort")}function Vn(e,t,n){return Un(e,t,n,"weekdays")}function Kn(e,t,n){return Un(e,t,n,"weekdaysShort")}function Xn(e,t,n){return Un(e,t,n,"weekdaysMin")}function Jn(){var e=this._data;return this._milliseconds=ei(this._milliseconds),this._days=ei(this._days),this._months=ei(this._months),e.milliseconds=ei(e.milliseconds),e.seconds=ei(e.seconds),e.minutes=ei(e.minutes),e.hours=ei(e.hours),e.months=ei(e.months),e.years=ei(e.years),this}function Zn(e,t,n,r){var a=Ht(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Qn(e,t){return Zn(this,e,t,1)}function er(e,t){return Zn(this,e,t,-1)}function tr(e){return e<0?Math.floor(e):Math.ceil(e)}function nr(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,u=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*tr(ar(s)+o),o=0,s=0),u.milliseconds=i%1e3,e=w(i/1e3),u.seconds=e%60,t=w(e/60),u.minutes=t%60,n=w(t/60),u.hours=n%24,o+=w(n/24),a=w(rr(o)),s+=a,o-=tr(ar(a)),r=w(s/12),s%=12,u.days=o,u.months=s,u.years=r,this}function rr(e){return 4800*e/146097}function ar(e){return 146097*e/4800}function ir(e){var t,n,r=this._milliseconds;if(e=R(e),"month"===e||"year"===e)return t=this._days+r/864e5,n=this._months+rr(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ar(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function or(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)}function sr(e){return function(){return this.as(e)}}function ur(e){return e=R(e),this[e+"s"]()}function cr(e){return function(){return this._data[e]}}function lr(){return w(this.days()/7)}function fr(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}function dr(e,t,n){var r=Ht(e).abs(),a=gi(r.as("s")),i=gi(r.as("m")),o=gi(r.as("h")),s=gi(r.as("d")),u=gi(r.as("M")),c=gi(r.as("y")),l=a<vi.s&&["s",a]||i<=1&&["m"]||i<vi.m&&["mm",i]||o<=1&&["h"]||o<vi.h&&["hh",o]||s<=1&&["d"]||s<vi.d&&["dd",s]||u<=1&&["M"]||u<vi.M&&["MM",u]||c<=1&&["y"]||["yy",c];return l[2]=t,l[3]=+e>0,l[4]=n,fr.apply(null,l)}function hr(e){return void 0===e?gi:"function"==typeof e&&(gi=e,!0)}function pr(e,t){return void 0!==vi[e]&&(void 0===t?vi[e]:(vi[e]=t,!0))}function mr(e){var t=this.localeData(),n=dr(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function gr(){var e,t,n,r=yi(this._milliseconds)/1e3,a=yi(this._days),i=yi(this._months);e=w(r/60),t=w(e/60),r%=60,e%=60,n=w(i/12),i%=12;var o=n,s=i,u=a,c=t,l=e,f=r,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(o?o+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||l||f?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(f?f+"S":""):"P0D"}var vr,yr;yr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var br=yr,_r=n.momentProperties=[],wr=!1,Ar={};n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var xr;xr=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)l(e,t)&&n.push(t);return n};var Mr,kr=xr,Tr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Sr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Er="Invalid date",Cr="%d",Or=/\d{1,2}/,Dr={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},jr={},Pr={},zr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Nr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wr={},Lr={},Rr=/\d/,qr=/\d\d/,Yr=/\d{3}/,Br=/\d{4}/,Hr=/[+-]?\d{6}/,Fr=/\d\d?/,Ir=/\d\d\d\d?/,Ur=/\d\d\d\d\d\d?/,Gr=/\d{1,3}/,$r=/\d{1,4}/,Vr=/[+-]?\d{1,6}/,Kr=/\d+/,Xr=/[+-]?\d+/,Jr=/Z|[+-]\d\d:?\d\d/gi,Zr=/Z|[+-]\d\d(?::?\d\d)?/gi,Qr=/[+-]?\d+(\.\d{1,3})?/,ea=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ta={},na={},ra=0,aa=1,ia=2,oa=3,sa=4,ua=5,ca=6,la=7,fa=8;Mr=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};var da=Mr;V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),V("MMMM",0,0,function(e){return this.localeData().months(this,e)}),L("month","M"),Y("month",8),Q("M",Fr),Q("MM",Fr,qr),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),re(["M","MM"],function(e,t){t[aa]=A(e)-1}),re(["MMM","MMMM"],function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[aa]=a:p(n).invalidMonth=e});var ha=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,pa="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ma="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ga=ea,va=ea;V("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),L("year","y"),Y("year",1),Q("Y",Xr),Q("YY",Fr,qr),Q("YYYY",$r,Br),Q("YYYYY",Vr,Hr),Q("YYYYYY",Vr,Hr),re(["YYYYY","YYYYYY"],ra),re("YYYY",function(e,t){t[ra]=2===e.length?n.parseTwoDigitYear(e):A(e)}),re("YY",function(e,t){t[ra]=n.parseTwoDigitYear(e)}),re("Y",function(e,t){t[ra]=parseInt(e,10)}),n.parseTwoDigitYear=function(e){return A(e)+(A(e)>68?1900:2e3)};var ya=H("FullYear",!0);V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),Y("week",5),Y("isoWeek",5),Q("w",Fr),Q("ww",Fr,qr),Q("W",Fr),Q("WW",Fr,qr),ae(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=A(e)});var ba={dow:0,doy:6};V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),Q("d",Fr),Q("e",Fr),Q("E",Fr),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ae(["dd","ddd","dddd"],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:p(n).invalidWeekday=e}),ae(["d","e","E"],function(e,t,n,r){t[r]=A(e)});var _a="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Aa="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xa=ea,Ma=ea,ka=ea;V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Ue),V("k",["kk",2],0,Ge),V("hmm",0,0,function(){return""+Ue.apply(this)+$(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Ue.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+$(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)}),$e("a",!0),$e("A",!1),L("hour","h"),Y("hour",13),Q("a",Ve),Q("A",Ve),Q("H",Fr),Q("h",Fr),Q("HH",Fr,qr),Q("hh",Fr,qr),Q("hmm",Ir),Q("hmmss",Ur),Q("Hmm",Ir),Q("Hmmss",Ur),re(["H","HH"],oa),re(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),re(["h","hh"],function(e,t,n){t[oa]=A(e),p(n).bigHour=!0}),re("hmm",function(e,t,n){var r=e.length-2;t[oa]=A(e.substr(0,r)),t[sa]=A(e.substr(r)),p(n).bigHour=!0}),re("hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[oa]=A(e.substr(0,r)),t[sa]=A(e.substr(r,2)),t[ua]=A(e.substr(a)),p(n).bigHour=!0}),re("Hmm",function(e,t,n){var r=e.length-2;t[oa]=A(e.substr(0,r)),t[sa]=A(e.substr(r))}),re("Hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[oa]=A(e.substr(0,r)),t[sa]=A(e.substr(r,2)),t[ua]=A(e.substr(a))});var Ta,Sa=/[ap]\.?m?\.?/i,Ea=H("Hours",!0),Ca={calendar:Tr,longDateFormat:Sr,invalidDate:Er,ordinal:Cr,ordinalParse:Or,relativeTime:Dr,months:pa,monthsShort:ma,week:ba,weekdays:_a,weekdaysMin:Aa,weekdaysShort:wa,meridiemParse:Sa},Oa={},Da={},ja=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Pa=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,za=/Z|[+-]\d\d(?::?\d\d)?/,Na=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Wa=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],La=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=k("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),n.ISO_8601=function(){};var Ra=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),qa=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}),Ya=function(){return Date.now?Date.now():+new Date};St("Z",":"),St("ZZ",""),Q("Z",Zr),Q("ZZ",Zr),re(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Et(Zr,e)});var Ba=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var Ha=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Fa=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ht.fn=Mt.prototype;var Ia=Gt(1,"add"),Ua=Gt(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ga=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),En("gggg","weekYear"),En("ggggg","weekYear"),En("GGGG","isoWeekYear"),En("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),Q("G",Xr),Q("g",Xr),Q("GG",Fr,qr),Q("gg",Fr,qr),Q("GGGG",$r,Br),Q("gggg",$r,Br),Q("GGGGG",Vr,Hr),Q("ggggg",Vr,Hr),ae(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=A(e)}),ae(["gg","GG"],function(e,t,r,a){t[a]=n.parseTwoDigitYear(e)}),V("Q",0,"Qo","quarter"),L("quarter","Q"),Y("quarter",7),Q("Q",Rr),re("Q",function(e,t){t[aa]=3*(A(e)-1)}),V("D",["DD",2],"Do","date"),L("date","D"),Y("date",9),Q("D",Fr),Q("DD",Fr,qr),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),re(["D","DD"],ia),re("Do",function(e,t){t[ia]=A(e.match(Fr)[0],10)});var $a=H("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),Y("dayOfYear",4),Q("DDD",Gr),Q("DDDD",Yr),re(["DDD","DDDD"],function(e,t,n){n._dayOfYear=A(e)}),V("m",["mm",2],0,"minute"),L("minute","m"),Y("minute",14),Q("m",Fr),Q("mm",Fr,qr),re(["m","mm"],sa);var Va=H("Minutes",!1);V("s",["ss",2],0,"second"),L("second","s"),Y("second",15),Q("s",Fr),Q("ss",Fr,qr),re(["s","ss"],ua);var Ka=H("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),Y("millisecond",16),Q("S",Gr,Rr),Q("SS",Gr,qr),Q("SSS",Gr,Yr);var Xa;for(Xa="SSSS";Xa.length<=9;Xa+="S")Q(Xa,Kr);for(Xa="S";Xa.length<=9;Xa+="S")re(Xa,Ln);var Ja=H("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var Za=b.prototype;Za.add=Ia,Za.calendar=Kt,Za.clone=Xt,Za.diff=rn,Za.endOf=vn,Za.format=cn,Za.from=ln,Za.fromNow=fn,Za.to=dn,Za.toNow=hn,Za.get=U,Za.invalidAt=Tn,Za.isAfter=Jt,Za.isBefore=Zt,Za.isBetween=Qt,Za.isSame=en,Za.isSameOrAfter=tn,Za.isSameOrBefore=nn,Za.isValid=Mn,Za.lang=Ga,Za.locale=pn,Za.localeData=mn,Za.max=qa,Za.min=Ra,Za.parsingFlags=kn,Za.set=G,Za.startOf=gn,Za.subtract=Ua,Za.toArray=wn,Za.toObject=An,Za.toDate=_n,Za.toISOString=sn,Za.inspect=un,Za.toJSON=xn,Za.toString=on,Za.unix=bn,Za.valueOf=yn,Za.creationData=Sn,Za.year=ya,Za.isLeapYear=be,Za.weekYear=Cn,Za.isoWeekYear=On,Za.quarter=Za.quarters=Nn,Za.month=de,Za.daysInMonth=he,Za.week=Za.weeks=Ce,Za.isoWeek=Za.isoWeeks=Oe,Za.weeksInYear=jn,Za.isoWeeksInYear=Dn,Za.date=$a,Za.day=Za.days=Re,Za.weekday=qe,Za.isoWeekday=Ye,Za.dayOfYear=Wn,Za.hour=Za.hours=Ea,Za.minute=Za.minutes=Va,Za.second=Za.seconds=Ka,Za.millisecond=Za.milliseconds=Ja,Za.utcOffset=Dt,Za.utc=Pt,Za.local=zt,Za.parseZone=Nt,Za.hasAlignedHourOffset=Wt,Za.isDST=Lt,Za.isLocal=qt,Za.isUtcOffset=Yt,Za.isUtc=Bt,Za.isUTC=Bt,Za.zoneAbbr=Rn,Za.zoneName=qn,Za.dates=k("dates accessor is deprecated. Use date instead.",$a),Za.months=k("months accessor is deprecated. Use month instead",de),Za.years=k("years accessor is deprecated. Use year instead",ya),Za.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jt),Za.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Rt);var Qa=O.prototype;Qa.calendar=D,Qa.longDateFormat=j, -Qa.invalidDate=P,Qa.ordinal=z,Qa.preparse=Hn,Qa.postformat=Hn,Qa.relativeTime=N,Qa.pastFuture=W,Qa.set=E,Qa.months=se,Qa.monthsShort=ue,Qa.monthsParse=le,Qa.monthsRegex=me,Qa.monthsShortRegex=pe,Qa.week=Te,Qa.firstDayOfYear=Ee,Qa.firstDayOfWeek=Se,Qa.weekdays=Pe,Qa.weekdaysMin=Ne,Qa.weekdaysShort=ze,Qa.weekdaysParse=Le,Qa.weekdaysRegex=Be,Qa.weekdaysShortRegex=He,Qa.weekdaysMinRegex=Fe,Qa.isPM=Ke,Qa.meridiem=Xe,et("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===A(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),n.lang=k("moment.lang is deprecated. Use moment.locale instead.",et),n.langData=k("moment.langData is deprecated. Use moment.localeData instead.",rt);var ei=Math.abs,ti=sr("ms"),ni=sr("s"),ri=sr("m"),ai=sr("h"),ii=sr("d"),oi=sr("w"),si=sr("M"),ui=sr("y"),ci=cr("milliseconds"),li=cr("seconds"),fi=cr("minutes"),di=cr("hours"),hi=cr("days"),pi=cr("months"),mi=cr("years"),gi=Math.round,vi={s:45,m:45,h:22,d:26,M:11},yi=Math.abs,bi=Mt.prototype;return bi.abs=Jn,bi.add=Qn,bi.subtract=er,bi.as=ir,bi.asMilliseconds=ti,bi.asSeconds=ni,bi.asMinutes=ri,bi.asHours=ai,bi.asDays=ii,bi.asWeeks=oi,bi.asMonths=si,bi.asYears=ui,bi.valueOf=or,bi._bubble=nr,bi.get=ur,bi.milliseconds=ci,bi.seconds=li,bi.minutes=fi,bi.hours=di,bi.days=hi,bi.weeks=lr,bi.months=pi,bi.years=mi,bi.humanize=mr,bi.toISOString=gr,bi.toString=gr,bi.toJSON=gr,bi.locale=pn,bi.localeData=mn,bi.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gr),bi.lang=Ga,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Q("x",Xr),Q("X",Qr),re("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),re("x",function(e,t,n){n._d=new Date(A(e))}),n.version="2.16.0",r(_t),n.fn=Za,n.min=At,n.max=xt,n.now=Ya,n.utc=d,n.unix=Yn,n.months=Gn,n.isDate=u,n.locale=et,n.invalid=g,n.duration=Ht,n.isMoment=_,n.weekdays=Vn,n.parseZone=Bn,n.localeData=rt,n.isDuration=kt,n.monthsShort=$n,n.weekdaysMin=Xn,n.defineLocale=tt,n.updateLocale=nt,n.locales=at,n.weekdaysShort=Kn,n.normalizeUnits=R,n.relativeTimeRounding=hr,n.relativeTimeThreshold=pr,n.calendarFormat=Vt,n.prototype=Za,n})}),fp=n(function(e){!function(t,n){"function"==typeof define&&define.amd?define(["moment"],n):"object"==typeof e&&e.exports?e.exports=n(lp):n(t.moment)}(this,function(e){function t(e){return e>96?e-87:e>64?e-29:e-48}function n(e){var n,r=0,a=e.split("."),i=a[0],o=a[1]||"",s=1,u=0,c=1;for(45===e.charCodeAt(0)&&(r=1,c=-1),r;r<i.length;r++)n=t(i.charCodeAt(r)),u=60*u+n;for(r=0;r<o.length;r++)s/=60,n=t(o.charCodeAt(r)),u+=n*s;return u*c}function r(e){for(var t=0;t<e.length;t++)e[t]=n(e[t])}function a(e,t){for(var n=0;n<t;n++)e[n]=Math.round((e[n-1]||0)+6e4*e[n]);e[t-1]=1/0}function i(e,t){var n,r=[];for(n=0;n<t.length;n++)r[n]=e[t[n]];return r}function o(e){var t=e.split("|"),n=t[2].split(" "),o=t[3].split(""),s=t[4].split(" ");return r(n),r(o),r(s),a(s,o.length),{name:t[0],abbrs:i(t[1].split(" "),o),offsets:i(n,o),untils:s,population:0|t[5]}}function s(e){e&&this._set(o(e))}function u(e){var t=e.toTimeString(),n=t.match(/\([a-z ]+\)/i);n&&n[0]?(n=n[0].match(/[A-Z]/g),n=n?n.join(""):void 0):(n=t.match(/[A-Z]{3,5}/g),n=n?n[0]:void 0),"GMT"===n&&(n=void 0),this.at=+e,this.abbr=n,this.offset=e.getTimezoneOffset()}function c(e){this.zone=e,this.offsetScore=0,this.abbrScore=0}function l(e,t){for(var n,r;r=6e4*((t.at-e.at)/12e4|0);)n=new u(new Date(e.at+r)),n.offset===e.offset?e=n:t=n;return e}function f(){var e,t,n,r=(new Date).getFullYear()-2,a=new u(new Date(r,0,1)),i=[a];for(n=1;n<48;n++)t=new u(new Date(r,n,1)),t.offset!==a.offset&&(e=l(a,t),i.push(e),i.push(new u(new Date(e.at+6e4)))),a=t;for(n=0;n<4;n++)i.push(new u(new Date(r+n,0,1))),i.push(new u(new Date(r+n,6,1)));return i}function d(e,t){return e.offsetScore!==t.offsetScore?e.offsetScore-t.offsetScore:e.abbrScore!==t.abbrScore?e.abbrScore-t.abbrScore:t.zone.population-e.zone.population}function h(e,t){var n,a;for(r(t),n=0;n<t.length;n++)a=t[n],z[a]=z[a]||{},z[a][e]=!0}function p(e){var t,n,r,a=e.length,i={},o=[];for(t=0;t<a;t++){r=z[e[t].offset]||{};for(n in r)r.hasOwnProperty(n)&&(i[n]=!0)}for(t in i)i.hasOwnProperty(t)&&o.push(P[t]);return o}function m(){try{var e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e){var t=P[v(e)];if(t)return t;k("Moment Timezone found "+e+" from the Intl api, but did not have that data loaded.")}}catch(e){}var n,r,a,i=f(),o=i.length,s=p(i),u=[];for(r=0;r<s.length;r++){for(n=new c(b(s[r]),o),a=0;a<o;a++)n.scoreOffsetAt(i[a]);u.push(n)}return u.sort(d),u.length>0?u[0].zone.name:void 0}function g(e){return C&&!e||(C=m()),C}function v(e){return(e||"").toLowerCase().replace(/\//g,"_")}function y(e){var t,n,r,a;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)r=e[t].split("|"),n=r[0],a=v(n),D[a]=e[t],P[a]=n,r[5]&&h(a,r[2].split(" "))}function b(e,t){e=v(e);var n,r=D[e];return r instanceof s?r:"string"==typeof r?(r=new s(r),D[e]=r,r):j[e]&&t!==b&&(n=b(j[e],b))?(r=D[e]=new s,r._set(n),r.name=P[e],r):null}function _(){var e,t=[];for(e in P)P.hasOwnProperty(e)&&(D[e]||D[j[e]])&&P[e]&&t.push(P[e]);return t.sort()}function w(e){var t,n,r,a;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)n=e[t].split("|"),r=v(n[0]),a=v(n[1]),j[r]=a,P[r]=n[0],j[a]=r,P[a]=n[1]}function A(e){y(e.zones),w(e.links),T.dataVersion=e.version}function x(e){return x.didShowError||(x.didShowError=!0,k("moment.tz.zoneExists('"+e+"') has been deprecated in favor of !moment.tz.zone('"+e+"')")),!!b(e)}function M(e){return!(!e._a||void 0!==e._tzm)}function k(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}function T(t){var n=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1],a=b(r),i=e.utc.apply(null,n);return a&&!e.isMoment(t)&&M(i)&&i.add(a.parse(i),"minutes"),i.tz(r),i}function S(e){return function(){return this._z?this._z.abbr(this):e.call(this)}}function E(e){return function(){return this._z=null,e.apply(this,arguments)}}if(void 0!==e.tz)return k("Moment Timezone "+e.tz.version+" was already loaded "+(e.tz.dataVersion?"with data from ":"without any data")+e.tz.dataVersion),e;var C,O="0.5.10",D={},j={},P={},z={},N=e.version.split("."),W=+N[0],L=+N[1];(W<2||2===W&&L<6)&&k("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+e.version+". See momentjs.com"),s.prototype={_set:function(e){this.name=e.name,this.abbrs=e.abbrs,this.untils=e.untils,this.offsets=e.offsets,this.population=e.population},_index:function(e){var t,n=+e,r=this.untils;for(t=0;t<r.length;t++)if(n<r[t])return t},parse:function(e){var t,n,r,a,i=+e,o=this.offsets,s=this.untils,u=s.length-1;for(a=0;a<u;a++)if(t=o[a],n=o[a+1],r=o[a?a-1:a],t<n&&T.moveAmbiguousForward?t=n:t>r&&T.moveInvalidForward&&(t=r),i<s[a]-6e4*t)return o[a];return o[u]},abbr:function(e){return this.abbrs[this._index(e)]},offset:function(e){return this.offsets[this._index(e)]}},c.prototype.scoreOffsetAt=function(e){this.offsetScore+=Math.abs(this.zone.offset(e.at)-e.offset),this.zone.abbr(e.at).replace(/[^A-Z]/g,"")!==e.abbr&&this.abbrScore++},T.version=O,T.dataVersion="",T._zones=D,T._links=j,T._names=P,T.add=y,T.link=w,T.load=A,T.zone=b,T.zoneExists=x,T.guess=g,T.names=_,T.Zone=s,T.unpack=o,T.unpackBase60=n,T.needsOffset=M,T.moveInvalidForward=!0,T.moveAmbiguousForward=!1;var R=e.fn;e.tz=T,e.defaultZone=null,e.updateOffset=function(t,n){var r,a=e.defaultZone;void 0===t._z&&(a&&M(t)&&!t._isUTC&&(t._d=e.utc(t._a)._d,t.utc().add(a.parse(t),"minutes")),t._z=a),t._z&&(r=t._z.offset(t),Math.abs(r)<16&&(r/=60),void 0!==t.utcOffset?t.utcOffset(-r,n):t.zone(r,n))},R.tz=function(t){return t?(this._z=b(t),this._z?e.updateOffset(this):k("Moment Timezone has no data for "+t+". See http://momentjs.com/timezone/docs/#/data-loading/."),this):this._z?this._z.name:void 0},R.zoneName=S(R.zoneName),R.zoneAbbr=S(R.zoneAbbr),R.utc=E(R.utc),e.tz.setDefault=function(t){return(W<2||2===W&&L<9)&&k("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+e.version+"."),e.defaultZone=t?b(t):null,e};var q=e.momentProperties;return"[object Array]"===Object.prototype.toString.call(q)?(q.push("_z"),q.push("_a")):q&&(q._z=null),A({version:"2016j",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Khartoum|EAT|-30|0||51e5","Africa/Algiers|CET|-10|0||26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET EEST|-20 -30|010101010|1Cby0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6","Africa/Casablanca|WET WEST|0 -10|01010101010101010101010101010101010101010|1Cco0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0|32e5","Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5","Africa/Windhoek|WAST WAT|-20 -10|01010101010101010101010|1C1c0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0|32e4","America/Adak|HST HDT|a0 90|01010101010101010101010|1BR00 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1BQX0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Santo_Domingo|AST|40|0||29e5","America/Araguaina|BRT BRST|30 20|010|1IdD0 Lz0|14e4","America/Argentina/Buenos_Aires|ART|30|0|","America/Asuncion|PYST PYT|30 40|01010101010101010101010|1C430 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Bahia|BRT BRST|30 20|010|1FJf0 Rb0|27e5","America/Bahia_Banderas|MST CDT CST|70 50 60|01212121212121212121212|1C1l0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3","America/Fortaleza|BRT|30|0||34e5","America/Managua|CST|60|0||22e5","America/Manaus|AMT|40|0||19e5","America/Bogota|COT|50|0||90e5","America/Denver|MST MDT|70 60|01010101010101010101010|1BQV0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Campo_Grande|AMST AMT|30 40|01010101010101010101010|1BIr0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|77e4","America/Cancun|CST CDT EST|60 50 50|010101010102|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4","America/Caracas|VET VET|4u 40|01|1QMT0|29e5","America/Cayenne|GFT|30|0||58e3","America/Chicago|CST CDT|60 50|01010101010101010101010|1BQU0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|MST MDT|70 60|01010101010101010101010|1C1l0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4","America/Phoenix|MST|70|0||42e5","America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/New_York|EST EDT|50 40|01010101010101010101010|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Rio_Branco|AMT ACT|40 50|01|1KLE0|31e4","America/Fort_Nelson|PST PDT MST|80 70 70|010101010102|1BQW0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2","America/Halifax|AST ADT|40 30|01010101010101010101010|1BQS0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Godthab|WGT WGST|30 20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3","America/Goose_Bay|AST ADT|40 30|01010101010101010101010|1BQQ1 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2","America/Grand_Turk|EST EDT AST|50 40 40|0101010101012|1BQT0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Guayaquil|ECT|50|0||27e5","America/Guyana|GYT|40|0||80e4","America/Havana|CST CDT|50 40|01010101010101010101010|1BQR0 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/La_Paz|BOT|40|0||19e5","America/Lima|PET|50|0||11e6","America/Mexico_City|CST CDT|60 50|01010101010101010101010|1C1k0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6","America/Metlakatla|PST AKST AKDT|80 90 80|012121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Miquelon|PMST PMDT|30 20|01010101010101010101010|1BQR0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Montevideo|UYST UYT|20 30|010101010101|1BQQ0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5","America/Noronha|FNT|20|0||30e2","America/North_Dakota/Beulah|MST MDT CST CDT|70 60 60 50|01232323232323232323232|1BQV0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0","America/Paramaribo|SRT|30|0||24e4","America/Port-au-Prince|EST EDT|50 40|010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","America/Santiago|CLST CLT|30 40|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|62e5","America/Sao_Paulo|BRST BRT|20 30|01010101010101010101010|1BIq0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1C10 Lz0 1C10 Lz0 1C10|20e6","America/Scoresbysund|EGT EGST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452","America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1BQPv 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","Antarctica/Casey|+11 +08|-b0 -80|01010|1BN30 40P0 KL0 blz0|10","Antarctica/Davis|+05 +07|-50 -70|0101|1BPw0 3Wn0 KN0|70","Antarctica/DumontDUrville|+10|-a0|0||80","Antarctica/Macquarie|AEDT MIST|-b0 -b0|01|1C140|1","Asia/Tashkent|+05|-50|0||23e5","Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5","Antarctica/Rothera|-03|30|0||130","Antarctica/Syowa|+03|-30|0||20","Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40","Asia/Almaty|+06|-60|0||15e5","Asia/Baghdad|AST|-30|0||66e5","Asia/Amman|EET EEST|-20 -30|010101010101010101010|1BVy0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e5","Asia/Kamchatka|+12 +11|-c0 -b0|010|1Dp30 WM0|18e4","Asia/Baku|+04 +05|-40 -50|0101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5","Asia/Bangkok|ICT|-70|0||15e6","Asia/Barnaul|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3rd0","Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1BWm0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5","Asia/Brunei|BNT|-80|0||42e4","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+09 +10 +08|-90 -a0 -80|010120|1BWh0 1qM0 WM0 8Hz0 3re0|33e4","Asia/Choibalsan|CHOT CHOST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|38e3","Asia/Shanghai|CST|-80|0||23e6","Asia/Colombo|+0530|-5u|0||22e5","Asia/Dhaka|BDT|-60|0||16e6","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1C0m0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0|26e5","Asia/Dili|TLT|-90|0||19e4","Asia/Dubai|GST|-40|0||39e5","Asia/Famagusta|EET EEST +03|-20 -30 -30|010101010101012|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0","Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1BVW1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0|18e5","Asia/Hebron|EET EEST|-20 -30|0101010101010101010101010|1BVy0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0|25e4","Asia/Hong_Kong|HKT|-80|0||73e5","Asia/Hovd|HOVT HOVST|-70 -80|0101010101010|1O8H0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|81e3","Asia/Irkutsk|+08 +09|-80 -90|01010|1BWi0 1qM0 WM0 8Hz0|60e4","Europe/Istanbul|EET EEST +03|-20 -30 -30|010101010101012|1BWp0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1BVA0 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4","Asia/Kabul|AFT|-4u|0||46e5","Asia/Karachi|PKT|-50|0||24e6","Asia/Urumqi|XJT|-60|0||32e5","Asia/Kathmandu|NPT|-5J|0||12e5","Asia/Khandyga|+10 +11 +09|-a0 -b0 -90|010102|1BWg0 1qM0 WM0 17V0 7zD0|66e2","Asia/Krasnoyarsk|+07 +08|-70 -80|01010|1BWj0 1qM0 WM0 8Hz0|10e5","Asia/Kuala_Lumpur|MYT|-80|0||71e5","Asia/Magadan|+11 +12 +10|-b0 -c0 -a0|010120|1BWf0 1qM0 WM0 8Hz0 3Cq0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PHT|-80|0||24e6","Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5","Asia/Novokuznetsk|+07 +06|-70 -60|010|1Dp80 WM0|55e4","Asia/Novosibirsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 4eN0|15e5","Asia/Omsk|+06 +07|-60 -70|01010|1BWk0 1qM0 WM0 8Hz0|12e5","Asia/Pyongyang|KST KST|-90 -8u|01|1P4D0|29e5","Asia/Rangoon|MMT|-6u|0||48e5","Asia/Sakhalin|+10 +11|-a0 -b0|010101|1BWg0 1qM0 WM0 8Hz0 3rd0|58e4","Asia/Seoul|KST|-90|0||23e6","Asia/Singapore|SGT|-80|0||56e5","Asia/Srednekolymsk|+11 +12|-b0 -c0|01010|1BWf0 1qM0 WM0 8Hz0|35e2","Asia/Tbilisi|+04|-40|0||11e5","Asia/Tehran|IRST IRDT|-3u -4u|01010101010101010101010|1BTUu 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6","Asia/Thimphu|BTT|-60|0||79e3","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+06 +07|-60 -70|010101|1BWk0 1qM0 WM0 8Hz0 3Qp0|10e5","Asia/Ulaanbaatar|ULAT ULAST|-80 -90|0101010101010|1O8G0 1cJ0 1cP0 1cJ0 1cP0 1fx0 1cP0 1cJ0 1cP0 1cJ0 1cP0 1cJ0|12e5","Asia/Ust-Nera|+11 +12 +10|-b0 -c0 -a0|010102|1BWf0 1qM0 WM0 17V0 7zD0|65e2","Asia/Vladivostok|+10 +11|-a0 -b0|01010|1BWg0 1qM0 WM0 8Hz0|60e4","Asia/Yakutsk|+09 +10|-90 -a0|01010|1BWh0 1qM0 WM0 8Hz0|28e4","Asia/Yekaterinburg|+05 +06|-50 -60|01010|1BWl0 1qM0 WM0 8Hz0|14e5","Asia/Yerevan|+04 +05|-40 -50|01010|1BWm0 1qM0 WM0 1qM0|13e5","Atlantic/Azores|AZOT AZOST|10 0|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5","Atlantic/Cape_Verde|CVT|10|0||50e4","Atlantic/South_Georgia|GST|20|0||30","Atlantic/Stanley|FKST FKT|30 40|010|1C6R0 U10|21e2","Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1C140 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1C14u 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST|-a0|0||20e5","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|ACWST|-8J|0||368","Australia/Lord_Howe|LHDT LHST|-b0 -au|01010101010101010101010|1C130 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347","Australia/Perth|AWST|-80|0||18e5","Pacific/Easter|EASST EAST|50 60|010101010101010101010|1C1f0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0|30e2","Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Etc/GMT+1|-01|10|0|","Etc/GMT+10|-10|a0|0|","Etc/GMT+11|-11|b0|0|","Etc/GMT+12|-12|c0|0|","Etc/GMT+2|-02|20|0|","Etc/GMT+4|-04|40|0|","Etc/GMT+5|-05|50|0|","Etc/GMT+6|-06|60|0|","Etc/GMT+7|-07|70|0|","Etc/GMT+8|-08|80|0|","Etc/GMT+9|-09|90|0|","Etc/GMT-1|+01|-10|0|","Etc/GMT-11|+11|-b0|0|","Etc/GMT-12|+12|-c0|0|","Etc/GMT-13|+13|-d0|0|","Etc/GMT-14|+14|-e0|0|","Etc/GMT-2|+02|-20|0|","Etc/GMT-7|+07|-70|0|","Etc/GMT-8|+08|-80|0|","Etc/GMT-9|+09|-90|0|","Etc/UCT|UCT|0|0|","Etc/UTC|UTC|0|0|","Europe/Astrakhan|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 3rd0","Europe/London|GMT BST|0 -10|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6","Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1BWo0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4","Europe/Kaliningrad|EET EEST +03|-20 -30 -30|01020|1BWo0 1qM0 WM0 8Hz0|44e4","Europe/Volgograd|+03 +04|-30 -40|01010|1BWn0 1qM0 WM0 8Hz0|10e5","Europe/Minsk|EET EEST +03|-20 -30 -30|0102|1BWo0 1qM0 WM0|19e5","Europe/Moscow|MSK MSD MSK|-30 -40 -40|01020|1BWn0 1qM0 WM0 8Hz0|16e6","Europe/Samara|+04 +03|-40 -30|010|1Dpb0 WM0|12e5","Europe/Saratov|+03 +04|-30 -40|010101|1BWn0 1qM0 WM0 8Hz0 5810","Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|01010101023|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4","Pacific/Honolulu|HST|a0|0||37e4","Indian/Chagos|IOT|-60|0||30e2","Indian/Christmas|CXT|-70|0||21e2","Indian/Cocos|CCT|-6u|0||596","Indian/Mahe|SCT|-40|0||79e3","Indian/Maldives|MVT|-50|0||35e4","Indian/Mauritius|MUT|-40|0||15e4","Indian/Reunion|RET|-40|0||84e4","Pacific/Majuro|MHT|-c0|0||28e3","MET|MET MEST|-10 -20|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00","Pacific/Chatham|CHADT CHAST|-dJ -cJ|01010101010101010101010|1C120 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600","Pacific/Apia|SST SDT WSDT WSST|b0 a0 -e0 -d0|01012323232323232323232|1Dbn0 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3","Pacific/Bougainville|PGT BST|-a0 -b0|01|1NwE0|18e4","Pacific/Chuuk|CHUT|-a0|0||49e3","Pacific/Efate|VUT|-b0|0||66e3","Pacific/Enderbury|PHOT|-d0|0||1","Pacific/Fakaofo|TKT TKT|b0 -d0|01|1Gfn0|483","Pacific/Fiji|FJST FJT|-d0 -c0|01010101010101010101010|1BWe0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|88e4","Pacific/Funafuti|TVT|-c0|0||45e2","Pacific/Galapagos|GALT|60|0||25e3","Pacific/Gambier|GAMT|90|0||125","Pacific/Guadalcanal|SBT|-b0|0||11e4","Pacific/Guam|ChST|-a0|0||17e4","Pacific/Kiritimati|LINT|-e0|0||51e2","Pacific/Kosrae|KOST|-b0|0||66e2","Pacific/Marquesas|MART|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Nauru|NRT|-c0|0||10e3","Pacific/Niue|NUT|b0|0||12e2","Pacific/Norfolk|NFT NFT|-bu -b0|01|1PoCu|25e4","Pacific/Noumea|NCT|-b0|0||98e3","Pacific/Palau|PWT|-90|0||21e3","Pacific/Pitcairn|PST|80|0||56","Pacific/Pohnpei|PONT|-b0|0||34e3","Pacific/Port_Moresby|PGT|-a0|0||25e4","Pacific/Rarotonga|CKT|a0|0||13e3","Pacific/Tahiti|TAHT|a0|0||18e4","Pacific/Tarawa|GILT|-c0|0||29e3","Pacific/Tongatapu|+13 +14|-d0 -e0|0101010101|1S4d0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1SM0|75e3","Pacific/Wake|WAKT|-c0|0||16e3","Pacific/Wallis|WFT|-c0|0||94"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Bissau","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Monrovia","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|America/Danmarkshavn","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Algiers|Africa/Tunis","Africa/Cairo|Egypt","Africa/Casablanca|Africa/El_Aaiun","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Khartoum|Africa/Addis_Ababa","Africa/Khartoum|Africa/Asmara","Africa/Khartoum|Africa/Asmera","Africa/Khartoum|Africa/Dar_es_Salaam","Africa/Khartoum|Africa/Djibouti","Africa/Khartoum|Africa/Juba","Africa/Khartoum|Africa/Kampala","Africa/Khartoum|Africa/Mogadishu","Africa/Khartoum|Africa/Nairobi","Africa/Khartoum|Indian/Antananarivo","Africa/Khartoum|Indian/Comoro","Africa/Khartoum|Indian/Mayotte","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Ndjamena","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|America/Juneau","America/Anchorage|America/Nome","America/Anchorage|America/Sitka","America/Anchorage|America/Yakutat","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Argentina/Catamarca","America/Argentina/Buenos_Aires|America/Argentina/ComodRivadavia","America/Argentina/Buenos_Aires|America/Argentina/Cordoba","America/Argentina/Buenos_Aires|America/Argentina/Jujuy","America/Argentina/Buenos_Aires|America/Argentina/La_Rioja","America/Argentina/Buenos_Aires|America/Argentina/Mendoza","America/Argentina/Buenos_Aires|America/Argentina/Rio_Gallegos","America/Argentina/Buenos_Aires|America/Argentina/Salta","America/Argentina/Buenos_Aires|America/Argentina/San_Juan","America/Argentina/Buenos_Aires|America/Argentina/San_Luis","America/Argentina/Buenos_Aires|America/Argentina/Tucuman","America/Argentina/Buenos_Aires|America/Argentina/Ushuaia","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Buenos_Aires|America/Catamarca","America/Argentina/Buenos_Aires|America/Cordoba","America/Argentina/Buenos_Aires|America/Jujuy","America/Argentina/Buenos_Aires|America/Mendoza","America/Argentina/Buenos_Aires|America/Rosario","America/Campo_Grande|America/Cuiaba","America/Chicago|America/Indiana/Knox","America/Chicago|America/Indiana/Tell_City","America/Chicago|America/Knox_IN","America/Chicago|America/Matamoros","America/Chicago|America/Menominee","America/Chicago|America/North_Dakota/Center","America/Chicago|America/North_Dakota/New_Salem","America/Chicago|America/Rainy_River","America/Chicago|America/Rankin_Inlet","America/Chicago|America/Resolute","America/Chicago|America/Winnipeg","America/Chicago|CST6CDT","America/Chicago|Canada/Central","America/Chicago|US/Central","America/Chicago|US/Indiana-Starke","America/Chihuahua|America/Mazatlan","America/Chihuahua|Mexico/BajaSur","America/Denver|America/Boise","America/Denver|America/Cambridge_Bay","America/Denver|America/Edmonton","America/Denver|America/Inuvik","America/Denver|America/Ojinaga","America/Denver|America/Shiprock","America/Denver|America/Yellowknife","America/Denver|Canada/Mountain","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Fortaleza|America/Belem","America/Fortaleza|America/Maceio","America/Fortaleza|America/Recife","America/Fortaleza|America/Santarem","America/Halifax|America/Glace_Bay","America/Halifax|America/Moncton","America/Halifax|America/Thule","America/Halifax|Atlantic/Bermuda","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Los_Angeles|America/Dawson","America/Los_Angeles|America/Ensenada","America/Los_Angeles|America/Santa_Isabel","America/Los_Angeles|America/Tijuana","America/Los_Angeles|America/Vancouver","America/Los_Angeles|America/Whitehorse","America/Los_Angeles|Canada/Pacific","America/Los_Angeles|Canada/Yukon","America/Los_Angeles|Mexico/BajaNorte","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Managua|America/Belize","America/Managua|America/Costa_Rica","America/Managua|America/El_Salvador","America/Managua|America/Guatemala","America/Managua|America/Regina","America/Managua|America/Swift_Current","America/Managua|America/Tegucigalpa","America/Managua|Canada/East-Saskatchewan","America/Managua|Canada/Saskatchewan","America/Manaus|America/Boa_Vista","America/Manaus|America/Porto_Velho","America/Manaus|Brazil/West","America/Mexico_City|America/Merida","America/Mexico_City|America/Monterrey","America/Mexico_City|Mexico/General","America/New_York|America/Detroit","America/New_York|America/Fort_Wayne","America/New_York|America/Indiana/Indianapolis","America/New_York|America/Indiana/Marengo","America/New_York|America/Indiana/Petersburg","America/New_York|America/Indiana/Vevay","America/New_York|America/Indiana/Vincennes","America/New_York|America/Indiana/Winamac","America/New_York|America/Indianapolis","America/New_York|America/Iqaluit","America/New_York|America/Kentucky/Louisville","America/New_York|America/Kentucky/Monticello","America/New_York|America/Louisville","America/New_York|America/Montreal","America/New_York|America/Nassau","America/New_York|America/Nipigon","America/New_York|America/Pangnirtung","America/New_York|America/Thunder_Bay","America/New_York|America/Toronto","America/New_York|Canada/Eastern","America/New_York|EST5EDT","America/New_York|US/East-Indiana","America/New_York|US/Eastern","America/New_York|US/Michigan","America/Noronha|Brazil/DeNoronha","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|America/Jamaica","America/Panama|EST","America/Panama|Jamaica","America/Phoenix|America/Creston","America/Phoenix|America/Dawson_Creek","America/Phoenix|America/Hermosillo","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Rio_Branco|America/Eirunepe","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Antarctica/Palmer","America/Santiago|Chile/Continental","America/Santo_Domingo|America/Anguilla","America/Santo_Domingo|America/Antigua","America/Santo_Domingo|America/Aruba","America/Santo_Domingo|America/Barbados","America/Santo_Domingo|America/Blanc-Sablon","America/Santo_Domingo|America/Curacao","America/Santo_Domingo|America/Dominica","America/Santo_Domingo|America/Grenada","America/Santo_Domingo|America/Guadeloupe","America/Santo_Domingo|America/Kralendijk","America/Santo_Domingo|America/Lower_Princes","America/Santo_Domingo|America/Marigot","America/Santo_Domingo|America/Martinique","America/Santo_Domingo|America/Montserrat","America/Santo_Domingo|America/Port_of_Spain","America/Santo_Domingo|America/Puerto_Rico","America/Santo_Domingo|America/St_Barthelemy","America/Santo_Domingo|America/St_Kitts","America/Santo_Domingo|America/St_Lucia","America/Santo_Domingo|America/St_Thomas","America/Santo_Domingo|America/St_Vincent","America/Santo_Domingo|America/Tortola","America/Santo_Domingo|America/Virgin","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","Antarctica/DumontDUrville|Etc/GMT-10","Antarctica/Rothera|Etc/GMT+3","Antarctica/Syowa|Etc/GMT-3","Asia/Almaty|Antarctica/Vostok","Asia/Almaty|Asia/Bishkek","Asia/Almaty|Asia/Qyzylorda","Asia/Almaty|Etc/GMT-6","Asia/Baghdad|Asia/Aden","Asia/Baghdad|Asia/Bahrain","Asia/Baghdad|Asia/Kuwait","Asia/Baghdad|Asia/Qatar","Asia/Baghdad|Asia/Riyadh","Asia/Bangkok|Asia/Ho_Chi_Minh","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Saigon","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Hong_Kong|Hongkong","Asia/Jakarta|Asia/Pontianak","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kamchatka|Asia/Anadyr","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Kuching","Asia/Makassar|Asia/Ujung_Pandang","Asia/Rangoon|Asia/Yangon","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|Asia/Macao","Asia/Shanghai|Asia/Macau","Asia/Shanghai|Asia/Taipei","Asia/Shanghai|PRC","Asia/Shanghai|ROC","Asia/Singapore|Singapore","Asia/Tashkent|Antarctica/Mawson","Asia/Tashkent|Asia/Aqtau","Asia/Tashkent|Asia/Aqtobe","Asia/Tashkent|Asia/Ashgabat","Asia/Tashkent|Asia/Ashkhabad","Asia/Tashkent|Asia/Atyrau","Asia/Tashkent|Asia/Dushanbe","Asia/Tashkent|Asia/Oral","Asia/Tashkent|Asia/Samarkand","Asia/Tashkent|Etc/GMT-5","Asia/Tashkent|Indian/Kerguelen","Asia/Tbilisi|Etc/GMT-4","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Australia/Adelaide|Australia/Broken_Hill","Australia/Adelaide|Australia/South","Australia/Adelaide|Australia/Yancowinna","Australia/Brisbane|Australia/Lindeman","Australia/Brisbane|Australia/Queensland","Australia/Darwin|Australia/North","Australia/Lord_Howe|Australia/LHI","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/Currie","Australia/Sydney|Australia/Hobart","Australia/Sydney|Australia/Melbourne","Australia/Sydney|Australia/NSW","Australia/Sydney|Australia/Tasmania","Australia/Sydney|Australia/Victoria","Etc/UCT|UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Astrakhan|Europe/Ulyanovsk","Europe/Athens|Asia/Nicosia","Europe/Athens|EET","Europe/Athens|Europe/Bucharest","Europe/Athens|Europe/Helsinki","Europe/Athens|Europe/Kiev","Europe/Athens|Europe/Mariehamn","Europe/Athens|Europe/Nicosia","Europe/Athens|Europe/Riga","Europe/Athens|Europe/Sofia","Europe/Athens|Europe/Tallinn","Europe/Athens|Europe/Uzhgorod","Europe/Athens|Europe/Vilnius","Europe/Athens|Europe/Zaporozhye","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Atlantic/Canary","Europe/Lisbon|Atlantic/Faeroe","Europe/Lisbon|Atlantic/Faroe","Europe/Lisbon|Atlantic/Madeira","Europe/Lisbon|Portugal","Europe/Lisbon|WET","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Paris|Africa/Ceuta","Europe/Paris|Arctic/Longyearbyen","Europe/Paris|Atlantic/Jan_Mayen","Europe/Paris|CET","Europe/Paris|Europe/Amsterdam","Europe/Paris|Europe/Andorra","Europe/Paris|Europe/Belgrade","Europe/Paris|Europe/Berlin","Europe/Paris|Europe/Bratislava","Europe/Paris|Europe/Brussels","Europe/Paris|Europe/Budapest","Europe/Paris|Europe/Busingen","Europe/Paris|Europe/Copenhagen","Europe/Paris|Europe/Gibraltar","Europe/Paris|Europe/Ljubljana","Europe/Paris|Europe/Luxembourg","Europe/Paris|Europe/Madrid","Europe/Paris|Europe/Malta","Europe/Paris|Europe/Monaco","Europe/Paris|Europe/Oslo","Europe/Paris|Europe/Podgorica","Europe/Paris|Europe/Prague","Europe/Paris|Europe/Rome","Europe/Paris|Europe/San_Marino","Europe/Paris|Europe/Sarajevo","Europe/Paris|Europe/Skopje","Europe/Paris|Europe/Stockholm","Europe/Paris|Europe/Tirane","Europe/Paris|Europe/Vaduz","Europe/Paris|Europe/Vatican","Europe/Paris|Europe/Vienna","Europe/Paris|Europe/Warsaw","Europe/Paris|Europe/Zagreb","Europe/Paris|Europe/Zurich","Europe/Paris|Poland","Europe/Volgograd|Europe/Kirov","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Majuro|Kwajalein","Pacific/Majuro|Pacific/Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pohnpei|Pacific/Ponape"] -}),e})}),dp=tt,hp=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],pp=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mp=["Su","Mo","Tu","We","Th","Fr","Sa"],gp=["January","February","March","April","May","June","July","August","September","October","November","December"],vp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yp="AM",bp="PM",_p="am",wp="pm",Ap=new RegExp(hp.join("|"),"i"),xp=new RegExp(pp.join("|"),"i"),Mp=new RegExp("\\b("+mp.join("|")+")\\b","i"),kp=new RegExp(gp.join("|"),"i"),Tp=new RegExp(vp.join("|"),"i"),Sp=/(\d+)(st|nd|rd|th)\b/i,Ep=/(\d{1,4})([\/\.\-])(\d{1,2})[\/\.\-](\d{1,4})/,Cp=/((\+|\-)\d\d:?\d\d)$/,Op="("+[yp,bp].join("|")+")",Dp="("+[_p,wp].join("|")+")",jp=new RegExp(Dp),Pp=new RegExp(Op),zp=new RegExp("0\\d\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+Op,"i"),Np=new RegExp("0\\d\\:\\d{1,2}(\\s*)"+Op,"i"),Wp=new RegExp("0\\d(\\s*)"+Op,"i"),Lp=new RegExp("\\d{1,2}\\:\\d{1,2}\\:\\d{1,2}(\\s*)"+Op,"i"),Rp=new RegExp("\\d{1,2}\\:\\d{1,2}(\\s*)"+Op,"i"),qp=new RegExp("\\d{1,2}(\\s*)"+Op,"i"),Yp=/\d{2}:\d{2}:\d{2}\.\d{3}/,Bp=/\d{2}:\d{2}:\d{2}\.\d{2}/,Hp=/\d{2}:\d{2}:\d{2}\.\d{1}/,Fp=/0\d:\d{2}:\d{2}/,Ip=/0\d:\d{2}/,Up=/\d{1,2}:\d{2}:\d{2}/,Gp=/\d{1,2}:\d{2}:\d{2}\.\d{3}/,$p=/\d{1,2}:\d{2}:\d{2}\.\d{2}/,Vp=/\d{1,2}:\d{2}:\d{2}\.\d{1}/,Kp=/\d{1,2}:\d{2}/,Xp=/\d{4}/,Jp=/0\d/,Zp=/\d{1,2}/,Qp=/\d{2}/,em=/^([1-9])\/([1-9]|0[1-9])$/,tm=/^([1-9])\/(1[012])$/,nm=/^(0[1-9]|[12][0-9]|3[01])\/([1-9])$/,rm=/^(0[1-9]|[12][0-9]|3[01])\/(1[012]|0[1-9])$/,am=/^([1-9])\/([1-9][0-9])$/,im=/^(0[1-9]|1[012])\/([1-9][0-9])$/,om=/([\/][M]|[M][\/]|[MM]|[MMMM])/,sm=/\b(at)\b/i,um=/\d{13}/,cm=/\d{10}/,lm={"/":"MDY",".":"DMY","-":"YMD"},fm=dp,dm=fm;"undefined"!=typeof window&&window.moment&&(window.moment.parseFormat=fm);var hm=n(function(e,t){(function(){function n(e,t,n){for(var r=(n||0)-1,a=e?e.length:0;++r<a;)if(e[r]===t)return r;return-1}function r(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var a="number"==r?t:b+t;return e=(e=e[r])&&e[a],"object"==r?e&&n(e,t)>-1?0:-1:e?0:-1}function a(e){var t=this.cache,n=typeof e;if("boolean"==n||null==e)t[e]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:b+e,a=t[n]||(t[n]={});"object"==n?(a[r]||(a[r]=[])).push(e):a[r]=!0}}function i(e){return e.charCodeAt(0)}function o(e,t){for(var n=e.criteria,r=t.criteria,a=-1,i=n.length;++a<i;){var o=n[a],s=r[a];if(o!==s){if(o>s||"undefined"==typeof o)return 1;if(o<s||"undefined"==typeof s)return-1}}return e.index-t.index}function s(e){var t=-1,n=e.length,r=e[0],i=e[n/2|0],o=e[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var s=l();s.false=s.null=s.true=s.undefined=!1;var u=l();for(u.array=e,u.cache=s,u.push=a;++t<n;)u.push(e[t]);return u}function u(e){return"\\"+K[e]}function c(){return g.pop()||[]}function l(){return v.pop()||{array:null,cache:null,criteria:null,false:!1,index:0,null:!1,number:null,object:null,push:null,string:null,true:!1,undefined:!1,value:null}}function f(e){e.length=0,g.length<w&&g.push(e)}function d(e){var t=e.cache;t&&d(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,v.length<w&&v.push(e)}function h(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length:0);for(var r=-1,a=n-t||0,i=Array(a<0?0:a);++r<a;)i[r]=e[t+r];return i}function p(e){function t(e){return e&&"object"==typeof e&&!Zn(e)&&zn.call(e,"__wrapped__")?e:new a(e)}function a(e,t){this.__chain__=!!t,this.__wrapped__=e}function g(e){function t(){if(r){var e=h(r);Nn.apply(e,arguments)}if(this instanceof t){var i=w(n.prototype),o=n.apply(i,e||arguments);return Oe(o)?o:i}return n.apply(a,e||arguments)}var n=e[0],r=e[2],a=e[4];return Jn(t,e),t}function v(e,t,n,r,a){if(n){var i=n(e);if("undefined"!=typeof i)return i}var o=Oe(e);if(!o)return e;var s=Sn.call(e);if(!U[s])return e;var u=Kn[s];switch(s){case R:case q:return new u(+e);case B:case I:return new u(e);case F:return i=u(e.source,S.exec(e)),i.lastIndex=e.lastIndex,i}var l=Zn(e);if(t){var d=!r;r||(r=c()),a||(a=c());for(var p=r.length;p--;)if(r[p]==e)return a[p];i=l?u(e.length):{}}else i=l?h(e):ir({},e);return l&&(zn.call(e,"index")&&(i.index=e.index),zn.call(e,"input")&&(i.input=e.input)),t?(r.push(e),a.push(i),(l?Xe:ur)(e,function(e,o){i[o]=v(e,t,n,r,a)}),d&&(f(r),f(a)),i):i}function w(e,t){return Oe(e)?Yn(e):{}}function K(e,t,n){if("function"!=typeof e)return Jt;if("undefined"==typeof t||!("prototype"in e))return e;var r=e.__bindData__;if("undefined"==typeof r&&(Xn.funcNames&&(r=!e.name),r=r||!Xn.funcDecomp,!r)){var a=jn.call(e);Xn.funcNames||(r=!E.test(a)),r||(r=j.test(a),Jn(e,r))}if(r===!1||r!==!0&&1&r[1])return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)};case 4:return function(n,r,a,i){return e.call(t,n,r,a,i)}}return zt(e,t)}function J(e){function t(){var e=u?o:this;if(a){var p=h(a);Nn.apply(p,arguments)}if((i||l)&&(p||(p=h(arguments)),i&&Nn.apply(p,i),l&&p.length<s))return r|=16,J([n,f?r:r&-4,p,null,o,s]);if(p||(p=arguments),c&&(n=e[d]),this instanceof t){e=w(n.prototype);var m=n.apply(e,p);return Oe(m)?m:e}return n.apply(e,p)}var n=e[0],r=e[1],a=e[2],i=e[3],o=e[4],s=e[5],u=1&r,c=2&r,l=4&r,f=8&r,d=n;return Jn(t,e),t}function Z(e,t){var a=-1,i=ue(),o=e?e.length:0,u=o>=_&&i===n,c=[];if(u){var l=s(t);l?(i=r,t=l):u=!1}for(;++a<o;){var f=e[a];i(t,f)<0&&c.push(f)}return u&&d(t),c}function Q(e,t,n,r){for(var a=(r||0)-1,i=e?e.length:0,o=[];++a<i;){var s=e[a];if(s&&"object"==typeof s&&"number"==typeof s.length&&(Zn(s)||de(s))){t||(s=Q(s,t,n));var u=-1,c=s.length,l=o.length;for(o.length+=c;++u<c;)o[l++]=s[u]}else n||o.push(s)}return o}function ee(e,t,n,r,a,i){if(n){var o=n(e,t);if("undefined"!=typeof o)return!!o}if(e===t)return 0!==e||1/e==1/t;var s=typeof e,u=typeof t;if(!(e!==e||e&&V[s]||t&&V[u]))return!1;if(null==e||null==t)return e===t;var l=Sn.call(e),d=Sn.call(t);if(l==W&&(l=H),d==W&&(d=H),l!=d)return!1;switch(l){case R:case q:return+e==+t;case B:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case F:case I:return e==An(t)}var h=l==L;if(!h){var p=zn.call(e,"__wrapped__"),m=zn.call(t,"__wrapped__");if(p||m)return ee(p?e.__wrapped__:e,m?t.__wrapped__:t,n,r,a,i);if(l!=H)return!1;var g=e.constructor,v=t.constructor;if(g!=v&&!(Ce(g)&&g instanceof g&&Ce(v)&&v instanceof v)&&"constructor"in e&&"constructor"in t)return!1}var y=!a;a||(a=c()),i||(i=c());for(var b=a.length;b--;)if(a[b]==e)return i[b]==t;var _=0;if(o=!0,a.push(e),i.push(t),h){if(b=e.length,_=t.length,o=_==b,o||r)for(;_--;){var w=b,A=t[_];if(r)for(;w--&&!(o=ee(e[w],A,n,r,a,i)););else if(!(o=ee(e[_],A,n,r,a,i)))break}}else sr(t,function(t,s,u){if(zn.call(u,s))return _++,o=zn.call(e,s)&&ee(e[s],t,n,r,a,i)}),o&&!r&&sr(e,function(e,t,n){if(zn.call(n,t))return o=--_>-1});return a.pop(),i.pop(),y&&(f(a),f(i)),o}function ne(e,t,n,r,a){(Zn(t)?Xe:ur)(t,function(t,i){var o,s,u=t,c=e[i];if(t&&((s=Zn(t))||cr(t))){for(var l=r.length;l--;)if(o=r[l]==t){c=a[l];break}if(!o){var f;n&&(u=n(c,t),(f="undefined"!=typeof u)&&(c=u)),f||(c=s?Zn(c)?c:[]:cr(c)?c:{}),r.push(t),a.push(c),f||ne(c,t,n,r,a)}}else n&&(u=n(c,t),"undefined"==typeof u&&(u=t)),"undefined"!=typeof u&&(c=u);e[i]=c})}function re(e,t){return e+Dn(Vn()*(t-e+1))}function ae(e,t,a){var i=-1,o=ue(),u=e?e.length:0,l=[],h=!t&&u>=_&&o===n,p=a||h?c():l;if(h){var m=s(p);o=r,p=m}for(;++i<u;){var g=e[i],v=a?a(g,i,e):g;(t?!i||p[p.length-1]!==v:o(p,v)<0)&&((a||h)&&p.push(v),l.push(g))}return h?(f(p.array),d(p)):a&&f(p),l}function ie(e){return function(n,r,a){var i={};r=t.createCallback(r,a,3);var o=-1,s=n?n.length:0;if("number"==typeof s)for(;++o<s;){var u=n[o];e(i,u,r(u,o,n),n)}else ur(n,function(t,n,a){e(i,t,r(t,n,a),a)});return i}}function oe(e,t,n,r,a,i){var o=1&t,s=2&t,u=4&t,c=16&t,l=32&t;if(!s&&!Ce(e))throw new xn;c&&!n.length&&(t&=-17,c=n=!1),l&&!r.length&&(t&=-33,l=r=!1);var f=e&&e.__bindData__;if(f&&f!==!0)return f=h(f),f[2]&&(f[2]=h(f[2])),f[3]&&(f[3]=h(f[3])),!o||1&f[1]||(f[4]=a),!o&&1&f[1]&&(t|=8),!u||4&f[1]||(f[5]=i),c&&Nn.apply(f[2]||(f[2]=[]),n),l&&Rn.apply(f[3]||(f[3]=[]),r),f[1]|=t,oe.apply(null,f);var d=1==t||17===t?g:J;return d([e,t,n,r,a,i])}function se(e){return tr[e]}function ue(){var e=(e=t.indexOf)===vt?n:e;return e}function ce(e){return"function"==typeof e&&En.test(e)}function le(e){var t,n;return!!(e&&Sn.call(e)==H&&(t=e.constructor,!Ce(t)||t instanceof t))&&(sr(e,function(e,t){n=t}),"undefined"==typeof n||zn.call(e,n))}function fe(e){return nr[e]}function de(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Sn.call(e)==W||!1}function he(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n=t,t=!1),v(e,t,"function"==typeof n&&K(n,r,1))}function pe(e,t,n){return v(e,!0,"function"==typeof t&&K(t,n,1))}function me(e,t){var n=w(e);return t?ir(n,t):n}function ge(e,n,r){var a;return n=t.createCallback(n,r,3),ur(e,function(e,t,r){if(n(e,t,r))return a=t,!1}),a}function ve(e,n,r){var a;return n=t.createCallback(n,r,3),be(e,function(e,t,r){if(n(e,t,r))return a=t,!1}),a}function ye(e,t,n){var r=[];sr(e,function(e,t){r.push(t,e)});var a=r.length;for(t=K(t,n,3);a--&&t(r[a--],r[a],e)!==!1;);return e}function be(e,t,n){var r=er(e),a=r.length;for(t=K(t,n,3);a--;){var i=r[a];if(t(e[i],i,e)===!1)break}return e}function _e(e){var t=[];return sr(e,function(e,n){Ce(e)&&t.push(n)}),t.sort()}function we(e,t){return!!e&&zn.call(e,t)}function Ae(e){for(var t=-1,n=er(e),r=n.length,a={};++t<r;){var i=n[t];a[e[i]]=i}return a}function xe(e){return e===!0||e===!1||e&&"object"==typeof e&&Sn.call(e)==R||!1}function Me(e){return e&&"object"==typeof e&&Sn.call(e)==q||!1}function ke(e){return e&&1===e.nodeType||!1}function Te(e){var t=!0;if(!e)return t;var n=Sn.call(e),r=e.length;return n==L||n==I||n==W||n==H&&"number"==typeof r&&Ce(e.splice)?!r:(ur(e,function(){return t=!1}),t)}function Se(e,t,n,r){return ee(e,t,"function"==typeof n&&K(n,r,2))}function Ee(e){return Hn(e)&&!Fn(parseFloat(e))}function Ce(e){return"function"==typeof e}function Oe(e){return!(!e||!V[typeof e])}function De(e){return Pe(e)&&e!=+e}function je(e){return null===e}function Pe(e){return"number"==typeof e||e&&"object"==typeof e&&Sn.call(e)==B||!1}function ze(e){return e&&"object"==typeof e&&Sn.call(e)==F||!1}function Ne(e){return"string"==typeof e||e&&"object"==typeof e&&Sn.call(e)==I||!1}function We(e){return"undefined"==typeof e}function Le(e,n,r){var a={};return n=t.createCallback(n,r,3),ur(e,function(e,t,r){a[t]=n(e,t,r)}),a}function Re(e){var t=arguments,n=2;if(!Oe(e))return e;if("number"!=typeof t[2]&&(n=t.length),n>3&&"function"==typeof t[n-2])var r=K(t[--n-1],t[n--],2);else n>2&&"function"==typeof t[n-1]&&(r=t[--n]);for(var a=h(arguments,1,n),i=-1,o=c(),s=c();++i<n;)ne(e,a[i],r,o,s);return f(o),f(s),e}function qe(e,n,r){var a={};if("function"!=typeof n){var i=[];sr(e,function(e,t){i.push(t)}),i=Z(i,Q(arguments,!0,!1,1));for(var o=-1,s=i.length;++o<s;){var u=i[o];a[u]=e[u]}}else n=t.createCallback(n,r,3),sr(e,function(e,t,r){n(e,t,r)||(a[t]=e)});return a}function Ye(e){for(var t=-1,n=er(e),r=n.length,a=pn(r);++t<r;){var i=n[t];a[t]=[i,e[i]]}return a}function Be(e,n,r){var a={};if("function"!=typeof n)for(var i=-1,o=Q(arguments,!0,!1,1),s=Oe(e)?o.length:0;++i<s;){var u=o[i];u in e&&(a[u]=e[u])}else n=t.createCallback(n,r,3),sr(e,function(e,t,r){n(e,t,r)&&(a[t]=e)});return a}function He(e,n,r,a){var i=Zn(e);if(null==r)if(i)r=[];else{var o=e&&e.constructor,s=o&&o.prototype;r=w(s)}return n&&(n=t.createCallback(n,a,4),(i?Xe:ur)(e,function(e,t,a){return n(r,e,t,a)})),r}function Fe(e){for(var t=-1,n=er(e),r=n.length,a=pn(r);++t<r;)a[t]=e[n[t]];return a}function Ie(e){for(var t=arguments,n=-1,r=Q(t,!0,!1,1),a=t[2]&&t[2][t[1]]===e?1:r.length,i=pn(a);++n<a;)i[n]=e[r[n]];return i}function Ue(e,t,n){var r=-1,a=ue(),i=e?e.length:0,o=!1;return n=(n<0?Un(0,i+n):n)||0,Zn(e)?o=a(e,t,n)>-1:"number"==typeof i?o=(Ne(e)?e.indexOf(t,n):a(e,t,n))>-1:ur(e,function(e){if(++r>=n)return!(o=e===t)}),o}function Ge(e,n,r){var a=!0;n=t.createCallback(n,r,3);var i=-1,o=e?e.length:0;if("number"==typeof o)for(;++i<o&&(a=!!n(e[i],i,e)););else ur(e,function(e,t,r){return a=!!n(e,t,r)});return a}function $e(e,n,r){var a=[];n=t.createCallback(n,r,3);var i=-1,o=e?e.length:0;if("number"==typeof o)for(;++i<o;){var s=e[i];n(s,i,e)&&a.push(s)}else ur(e,function(e,t,r){n(e,t,r)&&a.push(e)});return a}function Ve(e,n,r){n=t.createCallback(n,r,3);var a=-1,i=e?e.length:0;if("number"!=typeof i){var o;return ur(e,function(e,t,r){if(n(e,t,r))return o=e,!1}),o}for(;++a<i;){var s=e[a];if(n(s,a,e))return s}}function Ke(e,n,r){var a;return n=t.createCallback(n,r,3),Je(e,function(e,t,r){if(n(e,t,r))return a=e,!1}),a}function Xe(e,t,n){var r=-1,a=e?e.length:0;if(t=t&&"undefined"==typeof n?t:K(t,n,3),"number"==typeof a)for(;++r<a&&t(e[r],r,e)!==!1;);else ur(e,t);return e}function Je(e,t,n){var r=e?e.length:0;if(t=t&&"undefined"==typeof n?t:K(t,n,3),"number"==typeof r)for(;r--&&t(e[r],r,e)!==!1;);else{var a=er(e);r=a.length,ur(e,function(e,n,i){return n=a?a[--r]:--r,t(i[n],n,i)})}return e}function Ze(e,t){var n=h(arguments,2),r=-1,a="function"==typeof t,i=e?e.length:0,o=pn("number"==typeof i?i:0);return Xe(e,function(e){o[++r]=(a?t:e[t]).apply(e,n)}),o}function Qe(e,n,r){var a=-1,i=e?e.length:0;if(n=t.createCallback(n,r,3),"number"==typeof i)for(var o=pn(i);++a<i;)o[a]=n(e[a],a,e);else o=[],ur(e,function(e,t,r){o[++a]=n(e,t,r)});return o}function et(e,n,r){var a=-(1/0),o=a;if("function"!=typeof n&&r&&r[n]===e&&(n=null),null==n&&Zn(e))for(var s=-1,u=e.length;++s<u;){var c=e[s];c>o&&(o=c)}else n=null==n&&Ne(e)?i:t.createCallback(n,r,3),Xe(e,function(e,t,r){var i=n(e,t,r);i>a&&(a=i,o=e)});return o}function tt(e,n,r){var a=1/0,o=a;if("function"!=typeof n&&r&&r[n]===e&&(n=null),null==n&&Zn(e))for(var s=-1,u=e.length;++s<u;){var c=e[s];c<o&&(o=c)}else n=null==n&&Ne(e)?i:t.createCallback(n,r,3),Xe(e,function(e,t,r){var i=n(e,t,r);i<a&&(a=i,o=e)});return o}function nt(e,n,r,a){if(!e)return r;var i=arguments.length<3;n=t.createCallback(n,a,4);var o=-1,s=e.length;if("number"==typeof s)for(i&&(r=e[++o]);++o<s;)r=n(r,e[o],o,e);else ur(e,function(e,t,a){r=i?(i=!1,e):n(r,e,t,a)});return r}function rt(e,n,r,a){var i=arguments.length<3;return n=t.createCallback(n,a,4),Je(e,function(e,t,a){r=i?(i=!1,e):n(r,e,t,a)}),r}function at(e,n,r){return n=t.createCallback(n,r,3),$e(e,function(e,t,r){return!n(e,t,r)})}function it(e,t,n){if(e&&"number"!=typeof e.length&&(e=Fe(e)),null==t||n)return e?e[re(0,e.length-1)]:m;var r=ot(e);return r.length=Gn(Un(0,t),r.length),r}function ot(e){var t=-1,n=e?e.length:0,r=pn("number"==typeof n?n:0);return Xe(e,function(e){var n=re(0,++t);r[t]=r[n],r[n]=e}),r}function st(e){var t=e?e.length:0;return"number"==typeof t?t:er(e).length}function ut(e,n,r){var a;n=t.createCallback(n,r,3);var i=-1,o=e?e.length:0;if("number"==typeof o)for(;++i<o&&!(a=n(e[i],i,e)););else ur(e,function(e,t,r){return!(a=n(e,t,r))});return!!a}function ct(e,n,r){var a=-1,i=Zn(n),s=e?e.length:0,u=pn("number"==typeof s?s:0);for(i||(n=t.createCallback(n,r,3)),Xe(e,function(e,t,r){var o=u[++a]=l();i?o.criteria=Qe(n,function(t){return e[t]}):(o.criteria=c())[0]=n(e,t,r),o.index=a,o.value=e}),s=u.length,u.sort(o);s--;){var h=u[s];u[s]=h.value,i||f(h.criteria),d(h)}return u}function lt(e){return e&&"number"==typeof e.length?h(e):Fe(e)}function ft(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var a=e[t];a&&r.push(a)}return r}function dt(e){return Z(e,Q(arguments,!0,!0,1))}function ht(e,n,r){var a=-1,i=e?e.length:0;for(n=t.createCallback(n,r,3);++a<i;)if(n(e[a],a,e))return a;return-1}function pt(e,n,r){var a=e?e.length:0;for(n=t.createCallback(n,r,3);a--;)if(n(e[a],a,e))return a;return-1}function mt(e,n,r){var a=0,i=e?e.length:0;if("number"!=typeof n&&null!=n){var o=-1;for(n=t.createCallback(n,r,3);++o<i&&n(e[o],o,e);)a++}else if(a=n,null==a||r)return e?e[0]:m;return h(e,0,Gn(Un(0,a),i))}function gt(e,t,n,r){return"boolean"!=typeof t&&null!=t&&(r=n,n="function"!=typeof t&&r&&r[t]===e?null:t,t=!1),null!=n&&(e=Qe(e,n,r)),Q(e,t)}function vt(e,t,r){if("number"==typeof r){var a=e?e.length:0;r=r<0?Un(0,a+r):r||0}else if(r){var i=Tt(e,t);return e[i]===t?i:-1}return n(e,t,r)}function yt(e,n,r){var a=0,i=e?e.length:0;if("number"!=typeof n&&null!=n){var o=i;for(n=t.createCallback(n,r,3);o--&&n(e[o],o,e);)a++}else a=null==n||r?1:n||a;return h(e,0,Gn(Un(0,i-a),i))}function bt(){for(var e=[],t=-1,a=arguments.length,i=c(),o=ue(),u=o===n,l=c();++t<a;){var h=arguments[t];(Zn(h)||de(h))&&(e.push(h),i.push(u&&h.length>=_&&s(t?e[t]:l)))}var p=e[0],m=-1,g=p?p.length:0,v=[];e:for(;++m<g;){var y=i[0];if(h=p[m],(y?r(y,h):o(l,h))<0){for(t=a,(y||l).push(h);--t;)if(y=i[t],(y?r(y,h):o(e[t],h))<0)continue e;v.push(h)}}for(;a--;)y=i[a],y&&d(y);return f(i),f(l),v}function _t(e,n,r){var a=0,i=e?e.length:0;if("number"!=typeof n&&null!=n){var o=i;for(n=t.createCallback(n,r,3);o--&&n(e[o],o,e);)a++}else if(a=n,null==a||r)return e?e[i-1]:m;return h(e,Un(0,i-a))}function wt(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(n<0?Un(0,r+n):Gn(n,r-1))+1);r--;)if(e[r]===t)return r;return-1}function At(e){for(var t=arguments,n=0,r=t.length,a=e?e.length:0;++n<r;)for(var i=-1,o=t[n];++i<a;)e[i]===o&&(Ln.call(e,i--,1),a--);return e}function xt(e,t,n){e=+e||0,n="number"==typeof n?n:+n||1,null==t&&(t=e,e=0);for(var r=-1,a=Un(0,Cn((t-e)/(n||1))),i=pn(a);++r<a;)i[r]=e,e+=n;return i}function Mt(e,n,r){var a=-1,i=e?e.length:0,o=[];for(n=t.createCallback(n,r,3);++a<i;){var s=e[a];n(s,a,e)&&(o.push(s),Ln.call(e,a--,1),i--)}return o}function kt(e,n,r){if("number"!=typeof n&&null!=n){var a=0,i=-1,o=e?e.length:0;for(n=t.createCallback(n,r,3);++i<o&&n(e[i],i,e);)a++}else a=null==n||r?1:Un(0,n);return h(e,a)}function Tt(e,n,r,a){var i=0,o=e?e.length:i;for(r=r?t.createCallback(r,a,1):Jt,n=r(n);i<o;){var s=i+o>>>1;r(e[s])<n?i=s+1:o=s}return i}function St(){return ae(Q(arguments,!0,!0))}function Et(e,n,r,a){return"boolean"!=typeof n&&null!=n&&(a=r,r="function"!=typeof n&&a&&a[n]===e?null:n,n=!1),null!=r&&(r=t.createCallback(r,a,3)),ae(e,n,r)}function Ct(e){return Z(e,h(arguments,1))}function Ot(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(Zn(n)||de(n))var r=r?ae(Z(r,n).concat(Z(n,r))):n}return r||[]}function Dt(){for(var e=arguments.length>1?arguments:arguments[0],t=-1,n=e?et(hr(e,"length")):0,r=pn(n<0?0:n);++t<n;)r[t]=hr(e,t);return r}function jt(e,t){var n=-1,r=e?e.length:0,a={};for(t||!r||Zn(e[0])||(t=[]);++n<r;){var i=e[n];t?a[i]=t[n]:i&&(a[i[0]]=i[1])}return a}function Pt(e,t){if(!Ce(t))throw new xn;return function(){if(--e<1)return t.apply(this,arguments)}}function zt(e,t){return arguments.length>2?oe(e,17,h(arguments,2),null,t):oe(e,1,null,null,t)}function Nt(e){for(var t=arguments.length>1?Q(arguments,!0,!1,1):_e(e),n=-1,r=t.length;++n<r;){var a=t[n];e[a]=oe(e[a],1,null,null,e)}return e}function Wt(e,t){return arguments.length>2?oe(t,19,h(arguments,2),null,e):oe(t,3,null,null,e)}function Lt(){for(var e=arguments,t=e.length;t--;)if(!Ce(e[t]))throw new xn;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}}function Rt(e,t){return t="number"==typeof t?t:+t||e.length,oe(e,4,null,null,null,t)}function qt(e,t,n){var r,a,i,o,s,u,c,l=0,f=!1,d=!0;if(!Ce(e))throw new xn;if(t=Un(0,t)||0,n===!0){var h=!0;d=!1}else Oe(n)&&(h=n.leading,f="maxWait"in n&&(Un(t,n.maxWait)||0),d="trailing"in n?n.trailing:d);var p=function(){var n=t-(mr()-o);if(n<=0){a&&On(a);var f=c;a=u=c=m,f&&(l=mr(),i=e.apply(s,r),u||a||(r=s=null))}else u=Wn(p,n)},g=function(){u&&On(u),a=u=c=m,(d||f!==t)&&(l=mr(),i=e.apply(s,r),u||a||(r=s=null))};return function(){if(r=arguments,o=mr(),s=this,c=d&&(u||!h),f===!1)var n=h&&!u;else{a||h||(l=o);var m=f-(o-l),v=m<=0;v?(a&&(a=On(a)),l=o,i=e.apply(s,r)):a||(a=Wn(g,m))}return v&&u?u=On(u):u||t===f||(u=Wn(p,t)),n&&(v=!0,i=e.apply(s,r)),!v||u||a||(r=s=null),i}}function Yt(e){if(!Ce(e))throw new xn;var t=h(arguments,1);return Wn(function(){e.apply(m,t)},1)}function Bt(e,t){if(!Ce(e))throw new xn;var n=h(arguments,2);return Wn(function(){e.apply(m,n)},t)}function Ht(e,t){if(!Ce(e))throw new xn;var n=function(){var r=n.cache,a=t?t.apply(this,arguments):b+arguments[0];return zn.call(r,a)?r[a]:r[a]=e.apply(this,arguments)};return n.cache={},n}function Ft(e){var t,n;if(!Ce(e))throw new xn;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}}function It(e){return oe(e,16,h(arguments,1))}function Ut(e){return oe(e,32,null,h(arguments,1))}function Gt(e,t,n){var r=!0,a=!0;if(!Ce(e))throw new xn;return n===!1?r=!1:Oe(n)&&(r="leading"in n?n.leading:r,a="trailing"in n?n.trailing:a),G.leading=r,G.maxWait=t,G.trailing=a,qt(e,t,G)}function $t(e,t){return oe(t,16,[e])}function Vt(e){return function(){return e}}function Kt(e,t,n){var r=typeof e;if(null==e||"function"==r)return K(e,t,n);if("object"!=r)return tn(e);var a=er(e),i=a[0],o=e[i];return 1!=a.length||o!==o||Oe(o)?function(t){for(var n=a.length,r=!1;n--&&(r=ee(t[a[n]],e[a[n]],null,!0)););return r}:function(e){var t=e[i];return o===t&&(0!==o||1/o==1/t)}}function Xt(e){return null==e?"":An(e).replace(ar,se)}function Jt(e){return e}function Zt(e,n,r){var i=!0,o=n&&_e(n);n&&(r||o.length)||(null==r&&(r=n),s=a,n=e,e=t,o=_e(n)),r===!1?i=!1:Oe(r)&&"chain"in r&&(i=r.chain);var s=e,u=Ce(s);Xe(o,function(t){var r=e[t]=n[t];u&&(s.prototype[t]=function(){var t=this.__chain__,n=this.__wrapped__,a=[n];Nn.apply(a,arguments);var o=r.apply(e,a);if(i||t){if(n===o&&Oe(o))return this;o=new s(o),o.__chain__=t}return o})})}function Qt(){return e._=Tn,this}function en(){}function tn(e){return function(t){return t[e]}}function nn(e,t,n){var r=null==e,a=null==t;if(null==n&&("boolean"==typeof e&&a?(n=e,e=1):a||"boolean"!=typeof t||(n=t,a=!0)),r&&a&&(t=1),e=+e||0,a?(t=e,e=0):t=+t||0,n||e%1||t%1){var i=Vn();return Gn(e+i*(t-e+parseFloat("1e-"+((i+"").length-1))),t)}return re(e,t)}function rn(e,t){if(e){var n=e[t];return Ce(n)?e[t]():n}}function an(e,n,r){var a=t.templateSettings;e=An(e||""),r=or({},r,a);var i,o=or({},r.imports,a.imports),s=er(o),c=Fe(o),l=0,f=r.interpolate||D,d="__p += '",h=wn((r.escape||D).source+"|"+f.source+"|"+(f===C?T:D).source+"|"+(r.evaluate||D).source+"|$","g");e.replace(h,function(t,n,r,a,o,s){return r||(r=a),d+=e.slice(l,s).replace(P,u),n&&(d+="' +\n__e("+n+") +\n'"),o&&(i=!0,d+="';\n"+o+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+t.length,t}),d+="';\n";var p=r.variable,g=p;g||(p="obj",d="with ("+p+") {\n"+d+"\n}\n"),d=(i?d.replace(x,""):d).replace(M,"$1").replace(k,"$1;"),d="function("+p+") {\n"+(g?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+N++ +"]")+"\n*/";try{var y=vn(s,"return "+d+v).apply(m,c)}catch(e){throw e.source=d,e}return n?y(n):(y.source=d,y)}function on(e,t,n){e=(e=+e)>-1?e:0;var r=-1,a=pn(e);for(t=K(t,n,1);++r<e;)a[r]=t(r);return a}function sn(e){return null==e?"":An(e).replace(rr,fe)}function un(e){var t=++y;return An(null==e?"":e)+t}function cn(e){return e=new a(e),e.__chain__=!0,e}function ln(e,t){return t(e),e}function fn(){return this.__chain__=!0,this}function dn(){return An(this.__wrapped__)}function hn(){return this.__wrapped__}e=e?te.defaults(X.Object(),e,te.pick(X,z)):X;var pn=e.Array,mn=e.Boolean,gn=e.Date,vn=e.Function,yn=e.Math,bn=e.Number,_n=e.Object,wn=e.RegExp,An=e.String,xn=e.TypeError,Mn=[],kn=_n.prototype,Tn=e._,Sn=kn.toString,En=wn("^"+An(Sn).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Cn=yn.ceil,On=e.clearTimeout,Dn=yn.floor,jn=vn.prototype.toString,Pn=ce(Pn=_n.getPrototypeOf)&&Pn,zn=kn.hasOwnProperty,Nn=Mn.push,Wn=e.setTimeout,Ln=Mn.splice,Rn=Mn.unshift,qn=function(){try{var e={},t=ce(t=_n.defineProperty)&&t,n=t(e,e,e)&&t}catch(e){}return n}(),Yn=ce(Yn=_n.create)&&Yn,Bn=ce(Bn=pn.isArray)&&Bn,Hn=e.isFinite,Fn=e.isNaN,In=ce(In=_n.keys)&&In,Un=yn.max,Gn=yn.min,$n=e.parseInt,Vn=yn.random,Kn={};Kn[L]=pn,Kn[R]=mn,Kn[q]=gn,Kn[Y]=vn,Kn[H]=_n,Kn[B]=bn,Kn[F]=wn,Kn[I]=An,a.prototype=t.prototype;var Xn=t.support={};Xn.funcDecomp=!ce(e.WinRTError)&&j.test(p),Xn.funcNames="string"==typeof vn.name,t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:C,variable:"",imports:{_:t}},Yn||(w=function(){function t(){}return function(n){if(Oe(n)){t.prototype=n;var r=new t;t.prototype=null}return r||e.Object()}}());var Jn=qn?function(e,t){$.value=t,qn(e,"__bindData__",$),$.value=null}:en,Zn=Bn||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Sn.call(e)==L||!1},Qn=function(e){var t,n=e,r=[];if(!n)return r;if(!V[typeof e])return r;for(t in n)zn.call(n,t)&&r.push(t);return r},er=In?function(e){return Oe(e)?In(e):[]}:Qn,tr={"&":"&","<":"<",">":">",'"':""","'":"'"},nr=Ae(tr),rr=wn("("+er(nr).join("|")+")","g"),ar=wn("["+er(tr).join("")+"]","g"),ir=function(e,t,n){var r,a=e,i=a;if(!a)return i;var o=arguments,s=0,u="number"==typeof n?2:o.length;if(u>3&&"function"==typeof o[u-2])var c=K(o[--u-1],o[u--],2);else u>2&&"function"==typeof o[u-1]&&(c=o[--u]);for(;++s<u;)if(a=o[s],a&&V[typeof a])for(var l=-1,f=V[typeof a]&&er(a),d=f?f.length:0;++l<d;)r=f[l],i[r]=c?c(i[r],a[r]):a[r];return i},or=function(e,t,n){var r,a=e,i=a;if(!a)return i;for(var o=arguments,s=0,u="number"==typeof n?2:o.length;++s<u;)if(a=o[s],a&&V[typeof a])for(var c=-1,l=V[typeof a]&&er(a),f=l?l.length:0;++c<f;)r=l[c],"undefined"==typeof i[r]&&(i[r]=a[r]);return i},sr=function(e,t,n){var r,a=e,i=a;if(!a)return i;if(!V[typeof a])return i;t=t&&"undefined"==typeof n?t:K(t,n,3);for(r in a)if(t(a[r],r,e)===!1)return i;return i},ur=function(e,t,n){var r,a=e,i=a;if(!a)return i;if(!V[typeof a])return i;t=t&&"undefined"==typeof n?t:K(t,n,3);for(var o=-1,s=V[typeof a]&&er(a),u=s?s.length:0;++o<u;)if(r=s[o],t(a[r],r,e)===!1)return i;return i},cr=Pn?function(e){if(!e||Sn.call(e)!=H)return!1;var t=e.valueOf,n=ce(t)&&(n=Pn(t))&&Pn(n);return n?e==n||Pn(e)==n:le(e)}:le,lr=ie(function(e,t,n){zn.call(e,n)?e[n]++:e[n]=1}),fr=ie(function(e,t,n){(zn.call(e,n)?e[n]:e[n]=[]).push(t)}),dr=ie(function(e,t,n){e[n]=t}),hr=Qe,pr=$e,mr=ce(mr=gn.now)&&mr||function(){return(new gn).getTime()},gr=8==$n(A+"08")?$n:function(e,t){return $n(Ne(e)?e.replace(O,""):e,t||0)};return t.after=Pt,t.assign=ir,t.at=Ie,t.bind=zt,t.bindAll=Nt,t.bindKey=Wt,t.chain=cn,t.compact=ft,t.compose=Lt,t.constant=Vt,t.countBy=lr,t.create=me,t.createCallback=Kt,t.curry=Rt,t.debounce=qt,t.defaults=or,t.defer=Yt,t.delay=Bt,t.difference=dt,t.filter=$e,t.flatten=gt,t.forEach=Xe,t.forEachRight=Je,t.forIn=sr,t.forInRight=ye,t.forOwn=ur,t.forOwnRight=be,t.functions=_e,t.groupBy=fr,t.indexBy=dr,t.initial=yt,t.intersection=bt,t.invert=Ae,t.invoke=Ze,t.keys=er,t.map=Qe,t.mapValues=Le,t.max=et,t.memoize=Ht,t.merge=Re,t.min=tt,t.omit=qe,t.once=Ft,t.pairs=Ye,t.partial=It,t.partialRight=Ut,t.pick=Be,t.pluck=hr,t.property=tn,t.pull=At,t.range=xt,t.reject=at,t.remove=Mt,t.rest=kt,t.shuffle=ot,t.sortBy=ct,t.tap=ln,t.throttle=Gt,t.times=on,t.toArray=lt,t.transform=He,t.union=St,t.uniq=Et,t.values=Fe,t.where=pr,t.without=Ct,t.wrap=$t,t.xor=Ot,t.zip=Dt,t.zipObject=jt,t.collect=Qe,t.drop=kt,t.each=Xe,t.eachRight=Je,t.extend=ir,t.methods=_e,t.object=jt,t.select=$e,t.tail=kt,t.unique=Et,t.unzip=Dt,Zt(t),t.clone=he,t.cloneDeep=pe,t.contains=Ue,t.escape=Xt,t.every=Ge,t.find=Ve,t.findIndex=ht,t.findKey=ge,t.findLast=Ke,t.findLastIndex=pt,t.findLastKey=ve,t.has=we,t.identity=Jt,t.indexOf=vt,t.isArguments=de,t.isArray=Zn,t.isBoolean=xe,t.isDate=Me,t.isElement=ke,t.isEmpty=Te,t.isEqual=Se,t.isFinite=Ee,t.isFunction=Ce,t.isNaN=De,t.isNull=je,t.isNumber=Pe,t.isObject=Oe,t.isPlainObject=cr,t.isRegExp=ze,t.isString=Ne,t.isUndefined=We,t.lastIndexOf=wt,t.mixin=Zt,t.noConflict=Qt,t.noop=en,t.now=mr,t.parseInt=gr,t.random=nn,t.reduce=nt,t.reduceRight=rt,t.result=rn,t.runInContext=p,t.size=st,t.some=ut,t.sortedIndex=Tt,t.template=an,t.unescape=sn,t.uniqueId=un,t.all=Ge,t.any=ut,t.detect=Ve,t.findWhere=Ve,t.foldl=nt,t.foldr=rt,t.include=Ue,t.inject=nt,Zt(function(){var e={};return ur(t,function(n,r){t.prototype[r]||(e[r]=n)}),e}(),!1),t.first=mt,t.last=_t,t.sample=it,t.take=mt,t.head=mt,ur(t,function(e,n){var r="sample"!==n;t.prototype[n]||(t.prototype[n]=function(t,n){var i=this.__chain__,o=e(this.__wrapped__,t,n);return i||null!=t&&(!n||r&&"function"==typeof t)?new a(o,i):o})}),t.VERSION="2.4.2",t.prototype.chain=fn,t.prototype.toString=dn,t.prototype.value=hn,t.prototype.valueOf=hn,Xe(["join","pop","shift"],function(e){var n=Mn[e];t.prototype[e]=function(){var e=this.__chain__,t=n.apply(this.__wrapped__,arguments);return e?new a(t,e):t}}),Xe(["push","reverse","sort","unshift"],function(e){var n=Mn[e];t.prototype[e]=function(){return n.apply(this.__wrapped__,arguments),this}}),Xe(["concat","slice","splice"],function(e){var n=Mn[e];t.prototype[e]=function(){return new a(n.apply(this.__wrapped__,arguments),this.__chain__)}}),t}var m,g=[],v=[],y=0,b=+new Date+"",_=75,w=40,A=" \t\v\f \ufeff\n\r\u2028\u2029 ᠎              ",x=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|\b__t\)) \+\n'';/g,T=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,E=/^\s*function[ \n\r\t]+\w/,C=/<%=([\s\S]+?)%>/g,O=RegExp("^["+A+"]*0+(?=.$)"),D=/($^)/,j=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,z=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],N=0,W="[object Arguments]",L="[object Array]",R="[object Boolean]",q="[object Date]",Y="[object Function]",B="[object Number]",H="[object Object]",F="[object RegExp]",I="[object String]",U={};U[Y]=!1,U[W]=U[L]=U[R]=U[q]=U[B]=U[H]=U[F]=U[I]=!0;var G={leading:!1,maxWait:0,trailing:!1},$={configurable:!1,enumerable:!1,value:null,writable:!1},V={boolean:!1,function:!0,object:!0,number:!1,string:!1,undefined:!1},K={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},X=V[typeof window]&&window||this,J=V[typeof t]&&t&&!t.nodeType&&t,Z=V[typeof e]&&e&&!e.nodeType&&e,Q=Z&&Z.exports===J&&J,ee=V[typeof Gt]&≫!ee||ee.global!==ee&&ee.window!==ee||(X=ee);var te=p();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X._=te,define(function(){return te})):J&&Z?Q?(Z.exports=te)._=te:J._=te:X._=te}).call(this)}),pm=hm,mm=function(e,t,n){e=ct(e),t=ct(t);var r,a;e.length>t.length?(r=e,a=t):(r=t,a=e);var i,o,s,u,c=n?n:.7,l=.1,f=Math.floor(Math.max(r.length/2-1,0)),d=[],h=[],p=0;for(i=0;i<a.length;i++)for(u=a[i],o=Math.max(i-f,0),s=Math.min(i+f+1,r.length);o<s;o++)if(!h[o]&&u===r[o]){d[i]=o,h[o]=!0,p++;break}var m,g,v=[],y=[],b=0,_=0;for(m=0,g=0;m<a.length;m++)d[m]>-1&&(v[g]=a[m],g++);for(m=0,g=0;m<r.length;m++)h[m]&&(y[g]=r[m],g++);for(i=0;i<v.length;i++)v[i]!==y[i]&&b++;for(i=0;i<a.length&&e[i]===t[i];i++)_++;var w=p,n=b/2;if(w){var A=(w/e.length+w/t.length+(w-n)/w)/3,x=A<c?A:A+Math.min(l,1/r.length)*_*(1-A);return x}return 0},gm=function(e,t,n){if(e=ct(e),t=ct(t),0===e.length)return t.length;if(0===t.length)return e.length;var r,a,i,o,s=n?n:{d:1,i:1,s:1},u=[],c=[],l=t.length+1;for(r=0;r<l;r++)u[r]=r;for(r=0;r<e.length;r++){for(c[0]=r+1,a=0;a<t.length;a++)i=e[r]===t[a]?0:s.s,c[a+1]=Math.min(c[a]+s.d,u[a+1]+s.i,u[a]+i);for(a=0;a<l;a++)u[a]=c[a]}return o=Math.max(e.length,t.length),(o-c[t.length])/o},vm=function(e,t,n){e=ct(e),t=ct(t);var r,a,i,o,s,u,c,l=e.length,f=t.length,d=n?n:2,h=[],p=[],m=[],g=[],v=[];if(0===l||0===f)return l===f?1:0;if(r=0,l<d||f<d){for(a=0,o=Math.min(l,f);a<o;a++)e[a]===t[a]&&r++;return r/Math.max(l,f)}for(a=0;a<l+d-1;a++)a<d-1?h[a]=0:h[a]=e[a-d+1];for(a=0;a<=l;a++)p[a]=a;for(i=1;i<=f;i++){if(i<d){for(s=0;s<d-i;s++)v[s]=0;for(s=d-i;s<d;s++)v[s]=t[s-(d-i)]}else v=t.slice(i-d,i);for(m[0]=i,a=1;a<=l;a++){for(r=0,u=d,o=0;o<d;o++)h[a-1+o]!==v[o]?r++:0===h[a-1+o]&&u--;c=r/u,m[a]=Math.min(Math.min(m[a-1]+1,p[a]+1),p[a-1]+c)}g=p,p=m,m=g}return 1-p[l]/Math.max(l,f)},ym=function(e,t){var n=[];Object.keys(e).forEach(function(e){t[e]&&n.push(e)});var r=n.length;if(0===r)return 0;var a=ut(n.map(function(t){ -return e[t]})),i=ut(n.map(function(e){return t[e]})),o=ut(n.map(function(t){return Math.pow(e[t],2)})),s=ut(n.map(function(e){return Math.pow(t[e],2)})),u=ut(n.map(function(n){return e[n]*t[n]})),c=u-a*i/r,l=Math.sqrt((o-Math.pow(a,2)/r)*(s-Math.pow(i,2)/r));return 0===l?0:c/l},bm=function(e,t){return e=ct(e),t=ct(t),pm.intersection(e,t).length/pm.union(e,t).length},_m=function(e,t){e=ct(e),t=ct(t);var n=pm.intersection(e,t).length;return n/(e.length+t.length-n)},wm={jarowinkler:mm,levenshtein:gm,ngram:vm,pearson:ym,jaccard:bm,tanimoto:_m},Am={author:Ze,lead_image_url:Qe,dek:et,date_published:it,content:ot,title:st},xm={defaultOpts:{stripUnlikelyCandidates:!0,weightNodes:!0,cleanConditionally:!0},extract:function(e,t){var n=e.$,r=e.html,a=e.title,i=e.url;t=da({},this.defaultOpts,t),n=n||Us.load(r);var o=this.getContentNode(n,a,i,t);if(He(o))return this.cleanAndReturnNode(o,n);var s=!0,u=!1,c=void 0;try{for(var l,f=hu(Ku(t).filter(function(e){return t[e]===!0}));!(s=(l=f.next()).done);s=!0){var d=l.value;if(t[d]=!1,n=Us.load(r),o=this.getContentNode(n,a,i,t),He(o))break}}catch(e){u=!0,c=e}finally{try{!s&&f.return&&f.return()}finally{if(u)throw c}}return this.cleanAndReturnNode(o,n)},getContentNode:function(e,t,n,r){return ot(ht(e,r),{$:e,cleanConditionally:r.cleanConditionally,title:t,url:n})},cleanAndReturnNode:function(e,t){return e?M(t.html(e)):null}},Mm=["tweetmeme-title","dc.title","rbtitle","headline","title"],km=["og:title"],Tm=[".hentry .entry-title","h1#articleHeader","h1.articleHeader","h1.article",".instapaper_title","#meebo-title"],Sm=["article h1","#entry-title",".entry-title","#entryTitle","#entrytitle",".entryTitle",".entrytitle","#articleTitle",".articleTitle","post post-title","h1.title","h2.article","h1","html head title","title"],Em={extract:function(e){var t=e.$,n=e.url,r=e.metaCache,a=void 0;return(a=Le(t,Mm,r))?st(a,{url:n,$:t}):(a=qe(t,Tm))?st(a,{url:n,$:t}):(a=Le(t,km,r))?st(a,{url:n,$:t}):(a=qe(t,Sm),a?st(a,{url:n,$:t}):"")}},Cm=["byl","clmst","dc.author","dcsext.author","dc.creator","rbauthors","authors"],Om=300,Dm=[".entry .entry-author",".author.vcard .fn",".author .vcard .fn",".byline.vcard .fn",".byline .vcard .fn",".byline .by .author",".byline .by",".byline .author",".post-author.vcard",".post-author .vcard","a[rel=author]","#by_author",".by_author","#entryAuthor",".entryAuthor",".byline a[href*=author]","#author .authorname",".author .authorname","#author",".author",".articleauthor",".ArticleAuthor",".byline"],jm=/^[\n\s]*By/i,Pm=[["#byline",jm],[".byline",jm]],zm={extract:function(e){var t=e.$,n=e.metaCache,r=void 0;if(r=Le(t,Cm,n),r&&r.length<Om)return Ze(r);if(r=qe(t,Dm,2),r&&r.length<Om)return Ze(r);var a=!0,i=!1,o=void 0;try{for(var s,u=hu(Pm);!(a=(s=u.next()).done);a=!0){var c=s.value,l=mu(c,2),f=l[0],d=l[1],h=t(f);if(1===h.length){var p=h.text();if(d.test(p))return Ze(p)}}}catch(e){i=!0,o=e}finally{try{!a&&u.return&&u.return()}finally{if(i)throw o}}return null}},Nm=["article:published_time","displaydate","dc.date","dc.date.issued","rbpubdate","publish_date","pub_date","pagedate","pubdate","revision_date","doc_date","date_created","content_create_date","lastmodified","created","date"],Wm=[".hentry .dtstamp.published",".hentry .published",".hentry .dtstamp.updated",".hentry .updated",".single .published",".meta .published",".meta .postDate",".entry-date",".byline .date",".postmetadata .date",".article_datetime",".date-header",".story-date",".dateStamp","#story .datetime",".dateline",".pubdate"],Lm="(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)",Rm=[new RegExp("/(20\\d{2}/\\d{2}/\\d{2})/","i"),new RegExp("(20\\d{2}-[01]\\d-[0-3]\\d)","i"),new RegExp("/(20\\d{2}/"+Lm+"/[0-3]\\d)/","i")],qm={extract:function(e){var t=e.$,n=e.url,r=e.metaCache,a=void 0;return(a=Le(t,Nm,r,!1))?it(a):(a=qe(t,Wm))?it(a):(a=k(n,Rm),a?it(a):null)}},Ym={extract:function(){return null}},Bm=["og:image","twitter:image","image_src"],Hm=["link[rel=image_src]"],Fm=["upload","wp-content","large","photo","wp-image"],Im=new RegExp(Fm.join("|"),"i"),Um=["spacer","sprite","blank","throbber","gradient","tile","bg","background","icon","social","header","hdr","advert","spinner","loader","loading","default","rating","share","facebook","twitter","theme","promo","ads","wp-includes"],Gm=new RegExp(Um.join("|"),"i"),$m=/\.gif(\?.*)?$/i,Vm=/\.jpe?g(\?.*)?$/i,Km={extract:function(e){var t=e.$,n=e.content,r=e.metaCache,a=e.html,i=void 0;t.browser||0!==t("head").length||t("*").first().prepend(a);var o=Le(t,Bm,r,!1);if(o&&(i=Qe(o)))return i;var s=t(n),u=t("img",s).toArray(),c={};u.forEach(function(e,n){var r=t(e),a=r.attr("src");if(a){var i=mt(a);i+=gt(r),i+=vt(r),i+=yt(r),i+=bt(r),i+=_t(u,n),c[a]=i}});var l=Ku(c).reduce(function(e,t){return c[t]>e[1]?[t,c[t]]:e},[null,0]),f=mu(l,2),d=f[0],h=f[1];if(h>0&&(i=Qe(d)))return i;var p=!0,m=!1,g=void 0;try{for(var v,y=hu(Hm);!(p=(v=y.next()).done);p=!0){var b=v.value,_=t(b).first(),w=_.attr("src");if(w&&(i=Qe(w)))return i;var A=_.attr("href");if(A&&(i=Qe(A)))return i;var x=_.attr("value");if(x&&(i=Qe(x)))return i}}catch(e){m=!0,g=e}finally{try{!p&&y.return&&y.return()}finally{if(m)throw g}}return null}},Xm=n(function(e,t){(function(){var n,r,a,i,o,s,u,c,l,f,d,h,p,m,g;a=Math.floor,f=Math.min,r=function(e,t){return e<t?-1:e>t?1:0},l=function(e,t,n,i,o){var s;if(null==n&&(n=0),null==o&&(o=r),n<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);n<i;)s=a((n+i)/2),o(t,e[s])<0?i=s:n=s+1;return[].splice.apply(e,[n,n-n].concat(t)),t},s=function(e,t,n){return null==n&&(n=r),e.push(t),m(e,0,e.length-1,n)},o=function(e,t){var n,a;return null==t&&(t=r),n=e.pop(),e.length?(a=e[0],e[0]=n,g(e,0,t)):a=n,a},c=function(e,t,n){var a;return null==n&&(n=r),a=e[0],e[0]=t,g(e,0,n),a},u=function(e,t,n){var a;return null==n&&(n=r),e.length&&n(e[0],t)<0&&(a=[e[0],t],t=a[0],e[0]=a[1],g(e,0,n)),t},i=function(e,t){var n,i,o,s,u,c;for(null==t&&(t=r),s=function(){c=[];for(var t=0,n=a(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),u=[],i=0,o=s.length;i<o;i++)n=s[i],u.push(g(e,n,t));return u},p=function(e,t,n){var a;if(null==n&&(n=r),a=e.indexOf(t),a!==-1)return m(e,0,a,n),g(e,a,n)},d=function(e,t,n){var a,o,s,c,l;if(null==n&&(n=r),o=e.slice(0,t),!o.length)return o;for(i(o,n),l=e.slice(t),s=0,c=l.length;s<c;s++)a=l[s],u(o,a,n);return o.sort(n).reverse()},h=function(e,t,n){var a,s,u,c,d,h,p,m,g,v;if(null==n&&(n=r),10*t<=e.length){if(c=e.slice(0,t).sort(n),!c.length)return c;for(u=c[c.length-1],m=e.slice(t),d=0,p=m.length;d<p;d++)a=m[d],n(a,u)<0&&(l(c,a,0,null,n),c.pop(),u=c[c.length-1]);return c}for(i(e,n),v=[],s=h=0,g=f(t,e.length);0<=g?h<g:h>g;s=0<=g?++h:--h)v.push(o(e,n));return v},m=function(e,t,n,a){var i,o,s;for(null==a&&(a=r),i=e[n];n>t&&(s=n-1>>1,o=e[s],a(i,o)<0);)e[n]=o,n=s;return e[n]=i},g=function(e,t,n){var a,i,o,s,u;for(null==n&&(n=r),i=e.length,u=t,o=e[t],a=2*t+1;a<i;)s=a+1,s<i&&!(n(e[a],e[s])<0)&&(a=s),e[t]=e[a],t=a,a=2*t+1;return e[t]=o,m(e,u,t,n)},n=function(){function e(e){this.cmp=null!=e?e:r,this.nodes=[]}return e.push=s,e.pop=o,e.replace=c,e.pushpop=u,e.heapify=i,e.updateItem=p,e.nlargest=d,e.nsmallest=h,e.prototype.push=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return p(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),function(n,r){return"function"==typeof define&&define.amd?define([],r):"object"==typeof t?e.exports=r():n.Heap=r()}(this,function(){return n})}).call(this)}),Jm=Xm,Zm=n(function(e,t){(function(){var e,n,r,a,i,o,s,u,c,l,f,d,h,p,m,g,v,y,b,_,w=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};s=Math.floor,c=Math.max,l=Math.min,n=Jm,g=function(e,t){return t?2*e/t:1},m=function(e,t){var n,r,a,i,o,s;for(o=[e.length,t.length],r=o[0],a=o[1],n=i=0,s=l(r,a);0<=s?i<s:i>s;n=0<=s?++i:--i){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return r-a},_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p=function(e){var t,n,r;for(n=0,r=e.length;n<r;n++)if(t=e[n])return!0;return!1},i=function(){function e(e,t,n,r){this.isjunk=e,null==t&&(t=""),null==n&&(n=""),this.autojunk=null==r||r,this.a=this.b=null,this.setSeqs(t,n)}return e.prototype.setSeqs=function(e,t){return this.setSeq1(e),this.setSeq2(t)},e.prototype.setSeq1=function(e){if(e!==this.a)return this.a=e,this.matchingBlocks=this.opcodes=null},e.prototype.setSeq2=function(e){if(e!==this.b)return this.b=e,this.matchingBlocks=this.opcodes=null,this.fullbcount=null,this._chainB()},e.prototype._chainB=function(){var e,t,n,r,a,i,o,u,c,l,f,d,h,p,m,g;for(e=this.b,this.b2j=t={},r=d=0,p=e.length;d<p;r=++d)n=e[r],i=_(t,n)?t[n]:t[n]=[],i.push(r);if(u={},o=this.isjunk)for(g=Object.keys(t),h=0,m=g.length;h<m;h++)n=g[h],o(n)&&(u[n]=!0,delete t[n]);if(f={},c=e.length,this.autojunk&&c>=200){l=s(c/100)+1;for(n in t)a=t[n],a.length>l&&(f[n]=!0,delete t[n])}return this.isbjunk=function(e){return _(u,e)},this.isbpopular=function(e){return _(f,e)}},e.prototype.findLongestMatch=function(e,t,n,r){var a,i,o,s,u,c,l,f,d,h,p,m,g,v,y,b,w,A,x,M,k;for(b=[this.a,this.b,this.b2j,this.isbjunk],a=b[0],i=b[1],o=b[2],f=b[3],w=[e,n,0],s=w[0],u=w[1],c=w[2],h={},l=g=e;e<=t?g<t:g>t;l=e<=t?++g:--g){for(m={},A=_(o,a[l])?o[a[l]]:[],v=0,y=A.length;v<y;v++)if(d=A[v],!(d<n)){if(d>=r)break;p=m[d]=(h[d-1]||0)+1,p>c&&(x=[l-p+1,d-p+1,p],s=x[0],u=x[1],c=x[2])}h=m}for(;s>e&&u>n&&!f(i[u-1])&&a[s-1]===i[u-1];)M=[s-1,u-1,c+1],s=M[0],u=M[1],c=M[2];for(;s+c<t&&u+c<r&&!f(i[u+c])&&a[s+c]===i[u+c];)c++;for(;s>e&&u>n&&f(i[u-1])&&a[s-1]===i[u-1];)k=[s-1,u-1,c+1],s=k[0],u=k[1],c=k[2];for(;s+c<t&&u+c<r&&f(i[u+c])&&a[s+c]===i[u+c];)c++;return[s,u,c]},e.prototype.getMatchingBlocks=function(){var e,t,n,r,a,i,o,s,u,c,l,f,d,h,p,g,v,y,b,_,w,A,x,M,k,T;if(this.matchingBlocks)return this.matchingBlocks;for(A=[this.a.length,this.b.length],h=A[0],p=A[1],y=[[0,h,0,p]],g=[];y.length;)x=y.pop(),t=x[0],e=x[1],r=x[2],n=x[3],M=b=this.findLongestMatch(t,e,r,n),a=M[0],s=M[1],l=M[2],l&&(g.push(b),t<a&&r<s&&y.push([t,a,r,s]),a+l<e&&s+l<n&&y.push([a+l,e,s+l,n]));for(g.sort(m),i=u=f=0,v=[],_=0,w=g.length;_<w;_++)k=g[_],o=k[0],c=k[1],d=k[2],i+f===o&&u+f===c?f+=d:(f&&v.push([i,u,f]),T=[o,c,d],i=T[0],u=T[1],f=T[2]);return f&&v.push([i,u,f]),v.push([h,p,0]),this.matchingBlocks=v},e.prototype.getOpcodes=function(){var e,t,n,r,a,i,o,s,u,c,l,f;if(this.opcodes)return this.opcodes;for(r=a=0,this.opcodes=t=[],c=this.getMatchingBlocks(),s=0,u=c.length;s<u;s++)l=c[s],e=l[0],n=l[1],i=l[2],o="",r<e&&a<n?o="replace":r<e?o="delete":a<n&&(o="insert"),o&&t.push([o,r,e,a,n]),f=[e+i,n+i],r=f[0],a=f[1],i&&t.push(["equal",e,r,n,a]);return t},e.prototype.getGroupedOpcodes=function(e){var t,n,r,a,i,o,s,u,f,d,h,p,m,g,v;for(null==e&&(e=3),t=this.getOpcodes(),t.length||(t=[["equal",0,1,0,1]]),"equal"===t[0][0]&&(p=t[0],f=p[0],a=p[1],i=p[2],o=p[3],s=p[4],t[0]=[f,c(a,i-e),i,c(o,s-e),s]),"equal"===t[t.length-1][0]&&(m=t[t.length-1],f=m[0],a=m[1],i=m[2],o=m[3],s=m[4],t[t.length-1]=[f,a,l(i,a+e),o,l(s,o+e)]),u=e+e,r=[],n=[],d=0,h=t.length;d<h;d++)g=t[d],f=g[0],a=g[1],i=g[2],o=g[3],s=g[4],"equal"===f&&i-a>u&&(n.push([f,a,l(i,a+e),o,l(s,o+e)]),r.push(n),n=[],v=[c(a,i-e),c(o,s-e)],a=v[0],o=v[1]),n.push([f,a,i,o,s]);return!n.length||1===n.length&&"equal"===n[0][0]||r.push(n),r},e.prototype.ratio=function(){var e,t,n,r,a;for(t=0,a=this.getMatchingBlocks(),n=0,r=a.length;n<r;n++)e=a[n],t+=e[2];return g(t,this.a.length+this.b.length)},e.prototype.quickRatio=function(){var e,t,n,r,a,i,o,s,u,c,l;if(!this.fullbcount)for(this.fullbcount=n={},c=this.b,i=0,s=c.length;i<s;i++)t=c[i],n[t]=(n[t]||0)+1;for(n=this.fullbcount,e={},r=0,l=this.a,o=0,u=l.length;o<u;o++)t=l[o],a=_(e,t)?e[t]:n[t]||0,e[t]=a-1,a>0&&r++;return g(r,this.a.length+this.b.length)},e.prototype.realQuickRatio=function(){var e,t,n;return n=[this.a.length,this.b.length],e=n[0],t=n[1],g(l(e,t),e+t)},e}(),u=function(e,t,r,a){var o,s,u,c,l,f,d,h,p,g;if(null==r&&(r=3),null==a&&(a=.6),!(r>0))throw new Error("n must be > 0: ("+r+")");if(!(0<=a&&a<=1))throw new Error("cutoff must be in [0.0, 1.0]: ("+a+")");for(o=[],s=new i,s.setSeq2(e),l=0,d=t.length;l<d;l++)c=t[l],s.setSeq1(c),s.realQuickRatio()>=a&&s.quickRatio()>=a&&s.ratio()>=a&&o.push([s.ratio(),c]);for(o=n.nlargest(o,r,m),g=[],f=0,h=o.length;f<h;f++)p=o[f],u=p[0],c=p[1],g.push(c);return g},v=function(e,t){var n,r,a;for(a=[0,e.length],n=a[0],r=a[1];n<r&&e[n]===t;)n++;return n},e=function(){function e(e,t){this.linejunk=e,this.charjunk=t}return e.prototype.compare=function(e,t){var n,r,a,o,s,u,c,l,f,d,h,p,m,g,v;for(s=new i(this.linejunk,e,t),l=[],g=s.getOpcodes(),d=0,p=g.length;d<p;d++){switch(v=g[d],f=v[0],r=v[1],n=v[2],o=v[3],a=v[4],f){case"replace":u=this._fancyReplace(e,r,n,t,o,a);break;case"delete":u=this._dump("-",e,r,n);break;case"insert":u=this._dump("+",t,o,a);break;case"equal":u=this._dump(" ",e,r,n);break;default:throw new Error("unknow tag ("+f+")")}for(h=0,m=u.length;h<m;h++)c=u[h],l.push(c)}return l},e.prototype._dump=function(e,t,n,r){var a,i,o;for(o=[],a=i=n;n<=r?i<r:i>r;a=n<=r?++i:--i)o.push(""+e+" "+t[a]);return o},e.prototype._plainReplace=function(e,t,n,r,a,i){var o,s,u,c,l,f,d,h,p,m;for(i-a<n-t?(o=this._dump("+",r,a,i),l=this._dump("-",e,t,n)):(o=this._dump("-",e,t,n),l=this._dump("+",r,a,i)),c=[],m=[o,l],f=0,h=m.length;f<h;f++)for(s=m[f],d=0,p=s.length;d<p;d++)u=s[d],c.push(u);return c},e.prototype._fancyReplace=function(e,t,n,r,a,o){var s,u,c,l,f,d,h,p,m,g,v,y,b,_,w,A,x,M,k,T,S,E,C,O,D,j,P,z,N,W,L,R,q,Y,B,H,F,I,U,G,$,V,K,X,J,Z,Q,ee,te;for(F=[.74,.75],h=F[0],w=F[1],_=new i(this.charjunk),I=[null,null],A=I[0],x=I[1],C=[],k=D=a;a<=o?D<o:D>o;k=a<=o?++D:--D)for(g=r[k],_.setSeq2(g),M=j=t;t<=n?j<n:j>n;M=t<=n?++j:--j)u=e[M],u!==g?(_.setSeq1(u),_.realQuickRatio()>h&&_.quickRatio()>h&&_.ratio()>h&&(K=[_.ratio(),M,k],h=K[0],p=K[1],m=K[2])):null===A&&(V=[M,k],A=V[0],x=V[1]);if(h<w){if(null===A){for(X=this._plainReplace(e,t,n,r,a,o),P=0,N=X.length;P<N;P++)E=X[P],C.push(E);return C}J=[A,x,1],p=J[0],m=J[1],h=J[2]}else A=null;for(Z=this._fancyHelper(e,t,p,r,a,m),z=0,W=Z.length;z<W;z++)E=Z[z],C.push(E);if(Q=[e[p],r[m]],s=Q[0],d=Q[1],null===A){for(f=b="",_.setSeqs(s,d),ee=_.getOpcodes(),Y=0,L=ee.length;Y<L;Y++)switch(te=ee[Y],O=te[0],c=te[1],l=te[2],v=te[3],y=te[4],U=[l-c,y-v],T=U[0],S=U[1],O){case"replace":f+=Array(T+1).join("^"),b+=Array(S+1).join("^");break;case"delete":f+=Array(T+1).join("-");break;case"insert":b+=Array(S+1).join("+");break;case"equal":f+=Array(T+1).join(" "),b+=Array(S+1).join(" ");break;default:throw new Error("unknow tag ("+O+")")}for(G=this._qformat(s,d,f,b),B=0,R=G.length;B<R;B++)E=G[B],C.push(E)}else C.push(" "+s);for($=this._fancyHelper(e,p+1,n,r,m+1,o),H=0,q=$.length;H<q;H++)E=$[H],C.push(E);return C},e.prototype._fancyHelper=function(e,t,n,r,a,i){var o;return o=[],t<n?o=a<i?this._fancyReplace(e,t,n,r,a,i):this._dump("-",e,t,n):a<i&&(o=this._dump("+",r,a,i)),o},e.prototype._qformat=function(e,t,n,r){var a,i;return i=[],a=l(v(e,"\t"),v(t,"\t")),a=l(a,v(n.slice(0,a)," ")),a=l(a,v(r.slice(0,a)," ")),n=n.slice(a).replace(/\s+$/,""),r=r.slice(a).replace(/\s+$/,""),i.push("- "+e),n.length&&i.push("? "+Array(a+1).join("\t")+n+"\n"),i.push("+ "+t),r.length&&i.push("? "+Array(a+1).join("\t")+r+"\n"),i},e}(),a=function(e,t){return null==t&&(t=/^\s*#?\s*$/),t.test(e)},r=function(e,t){return null==t&&(t=" \t"),w.call(t,e)>=0},b=function(e,t){var n,r;return n=e+1,r=t-e,1===r?""+n:(r||n--,""+n+","+r)},h=function(e,t,n){var r,a,o,s,u,c,l,f,d,h,p,m,g,v,y,_,w,A,x,M,k,T,S,E,C,O,D,j,P,z,N,W,L,R,q,Y,B,H;for(W=null!=n?n:{},u=W.fromfile,M=W.tofile,c=W.fromfiledate,k=W.tofiledate,_=W.n,y=W.lineterm,null==u&&(u=""),null==M&&(M=""),null==c&&(c=""),null==k&&(k=""),null==_&&(_=3),null==y&&(y="\n"),v=[],w=!1,L=new i(null,e,t).getGroupedOpcodes(),T=0,O=L.length;T<O;T++)for(l=L[T],w||(w=!0,s=c?"\t"+c:"",x=k?"\t"+k:"",v.push("--- "+u+s+y),v.push("+++ "+M+x+y)),R=[l[0],l[l.length-1]],o=R[0],m=R[1],r=b(o[1],m[2]),a=b(o[3],m[4]),v.push("@@ -"+r+" +"+a+" @@"+y),S=0,D=l.length;S<D;S++)if(q=l[S],A=q[0],f=q[1],d=q[2],h=q[3],p=q[4],"equal"!==A){if("replace"===A||"delete"===A)for(B=e.slice(f,d),C=0,P=B.length;C<P;C++)g=B[C],v.push("-"+g);if("replace"===A||"insert"===A)for(H=t.slice(h,p),N=0,z=H.length;N<z;N++)g=H[N],v.push("+"+g)}else for(Y=e.slice(f,d),E=0,j=Y.length;E<j;E++)g=Y[E],v.push(" "+g);return v},y=function(e,t){var n,r;return n=e+1,r=t-e,r||n--,r<=1?""+n:""+n+","+(n+r-1)},o=function(e,t,n){var r,a,o,s,u,c,l,f,d,h,m,g,v,b,_,w,A,x,M,k,T,S,E,C,O,D,j,P,z,N,W,L,R,q,Y,B,H,F,I,U;for(q=null!=n?n:{},u=q.fromfile,T=q.tofile,c=q.fromfiledate,S=q.tofiledate,w=q.n,_=q.lineterm,null==u&&(u=""),null==T&&(T=""),null==c&&(c=""),null==S&&(S=""),null==w&&(w=3),null==_&&(_="\n"),A={insert:"+ ",delete:"- ",replace:"! ",equal:" "},x=!1,b=[],Y=new i(null,e,t).getGroupedOpcodes(),C=0,P=Y.length;C<P;C++)if(l=Y[C],!x){if(x=!0,s=c?"\t"+c:"",k=S?"\t"+S:"",b.push("*** "+u+s+_),b.push("--- "+T+k+_),B=[l[0],l[l.length-1]],o=B[0],g=B[1],b.push("***************"+_),r=y(o[1],g[2]),b.push("*** "+r+" ****"+_),p(function(){var e,t,n,r;for(r=[],e=0,t=l.length;e<t;e++)n=l[e],M=n[0],E=n[1],E=n[2],E=n[3],E=n[4],r.push("replace"===M||"delete"===M);return r}()))for(O=0,z=l.length;O<z;O++)if(H=l[O],M=H[0],f=H[1],d=H[2],E=H[3],E=H[4],"insert"!==M)for(F=e.slice(f,d),D=0,N=F.length;D<N;D++)v=F[D],b.push(A[M]+v);if(a=y(o[3],g[4]),b.push("--- "+a+" ----"+_),p(function(){var e,t,n,r;for(r=[],e=0,t=l.length;e<t;e++)n=l[e],M=n[0],E=n[1],E=n[2],E=n[3],E=n[4],r.push("replace"===M||"insert"===M);return r}()))for(j=0,W=l.length;j<W;j++)if(I=l[j],M=I[0],E=I[1],E=I[2],h=I[3],m=I[4],"delete"!==M)for(U=t.slice(h,m),R=0,L=U.length;R<L;R++)v=U[R],b.push(A[M]+v)}return b},f=function(t,n,a,i){return null==i&&(i=r),new e(a,i).compare(t,n)},d=function(e,t){var n,r,a,i,o,s,u;if(i={1:"- ",2:"+ "}[t],!i)throw new Error("unknow delta choice (must be 1 or 2): "+t);for(a=[" ",i],r=[],o=0,s=e.length;o<s;o++)n=e[o],u=n.slice(0,2),w.call(a,u)>=0&&r.push(n.slice(2));return r},t._arrayCmp=m,t.SequenceMatcher=i,t.getCloseMatches=u,t._countLeading=v,t.Differ=e,t.IS_LINE_JUNK=a,t.IS_CHARACTER_JUNK=r,t._formatRangeUnified=b,t.unifiedDiff=h,t._formatRangeContext=y,t.contextDiff=o,t.ndiff=f,t.restore=d}).call(this)}),Qm=Zm,eg=/\d/,tg=["print","archive","comment","discuss","e-mail","email","share","reply","all","login","sign","single","adx","entry-unrelated"],ng=new RegExp(tg.join("|"),"i"),rg=new RegExp("(next|weiter|continue|>([^|]|$)|»([^|]|$))","i"),ag=new RegExp("(first|last|end)","i"),ig=new RegExp("(prev|earl|old|new|<|«)","i"),og={extract:function(e){var t=e.$,n=e.url,r=e.parsedUrl,a=e.previousUrls,i=void 0===a?[]:a;r=r||Bs.parse(n);var o=S(n),s=C(n,r),u=t("a[href]").toArray(),c=zt({links:u,articleUrl:o,baseUrl:s,parsedUrl:r,$:t,previousUrls:i});if(!c)return null;var l=Ku(c).reduce(function(e,t){var n=c[t];return n.score>e.score?n:e},{score:-100});return l.score>=50?l.href:null}},sg=["og:url"],ug={extract:function(e){var t=e.$,n=e.url,r=e.metaCache,a=t("link[rel=canonical]");if(0!==a.length){var i=a.attr("href");if(i)return Wt(i)}var o=Le(t,sg,r);return Wt(o?o:n)}},cg={ellipse:"…",chars:[" ","-"],max:140,truncate:!0},lg=function(e,t,n){if("string"!=typeof e||0===e.length)return"";if(0===t)return"";n=n||{};for(var r in cg)null!==n[r]&&"undefined"!=typeof n[r]||(n[r]=cg[r]);return n.max=t||n.max,Lt(e,n.max,n.ellipse,n.chars,n.truncate)},fg=["og:description","twitter:description"],dg={extract:function(e){var t=e.$,n=e.content,r=e.metaCache,a=Le(t,fg,r);if(a)return Rt(Ye(a,t));var i=200,o=n.slice(0,5*i);return Rt(t(o).text(),t,i)}},hg={extract:function(e){var t=e.content,n=Us.load(t),r=n("div").first(),a=M(r.text());return a.split(/\s/).length}},pg={domain:"*",title:Em.extract,date_published:qm.extract,author:zm.extract,content:xm.extract.bind(xm),lead_image_url:Km.extract,dek:Ym.extract,next_page_url:og.extract,url_and_domain:ug.extract,excerpt:dg.extract,word_count:hg.extract,direction:function(e){var t=e.title;return Gh.getDirection(t)},extract:function(e){var t=e.html,n=e.$;if(t&&!n){var r=Us.load(t);e.$=r}var a=this.title(e),i=this.date_published(e),o=this.author(e),s=this.content(da({},e,{title:a})),u=this.lead_image_url(da({},e,{content:s})),c=this.dek(da({},e,{content:s})),l=this.next_page_url(e),f=this.excerpt(da({},e,{content:s})),d=this.word_count(da({},e,{content:s})),h=this.direction({title:a}),p=this.url_and_domain(e),m=p.url,g=p.domain;return{title:a,author:o,date_published:i||null,dek:c,lead_image_url:u,content:s,next_page_url:l,url:m,domain:g,excerpt:f,word_count:d,direction:h}}},mg={'meta[name="al:ios:app_name"][value="Medium"]':Md,'meta[name="generator"][value="blogger"]':sd},gg={extract:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pg,t=arguments[1],n=t,r=n.contentOnly,a=n.extractedTitle;if("*"===e.domain)return e.extract(t);if(t=da({},t,{extractor:e}),r){var i=Ut(da({},t,{type:"content",extractHtml:!0,title:a}));return{content:i}}var o=Ut(da({},t,{type:"title"})),s=Ut(da({},t,{type:"date_published"})),u=Ut(da({},t,{type:"author"})),c=Ut(da({},t,{type:"next_page_url"})),l=Ut(da({},t,{type:"content",extractHtml:!0,title:o})),f=Ut(da({},t,{type:"lead_image_url",content:l})),d=Ut(da({},t,{type:"excerpt",content:l})),h=Ut(da({},t,{type:"dek",content:l,excerpt:d})),p=Ut(da({},t,{type:"word_count",content:l})),m=Ut(da({},t,{type:"direction",title:o})),g=Ut(da({},t,{type:"url_and_domain"}))||{url:null,domain:null},v=g.url,y=g.domain;return{title:o,content:l,author:u,date_published:s,lead_image_url:f,dek:h,next_page_url:c,url:v,domain:y,excerpt:d,word_count:p,direction:m}}},vg=function(){function e(e){return t.apply(this,arguments)}var t=ps(kn.mark(function e(t){var n,r,a,i,o,s=t.next_page_url,u=t.html,c=t.$,l=t.metaCache,f=t.result,d=t.Extractor,h=t.title,p=t.url;return kn.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=1,r=[S(p)];case 2:if(!(s&&n<26)){e.next=15;break}return n+=1,e.next=6,Xf.create(s);case 6:c=e.sent,u=c.html(),a={url:s,html:u,$:c,metaCache:l,contentOnly:!0,extractedTitle:h,previousUrls:r},i=gg.extract(d,a),r.push(s),f=da({},f,{content:f.content+"<hr><h4>Page "+n+"</h4>"+i.content}),s=i.next_page_url,e.next=2;break;case 15:return o=pg.word_count({content:"<div>"+f.content+"</div>"}),e.abrupt("return",da({},f,{total_pages:n,pages_rendered:n,word_count:o}));case 17:case"end":return e.stop()}},e,this)}));return e}(),yg={parse:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ps(kn.mark(function a(){var i,o,s,u,c,l,f,d,h,p,m,g;return kn.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=r.fetchAllPages,o=void 0===i||i,s=r.fallback,u=void 0===s||s,!e&&Us.browser&&(e=window.location.href,t=t||Us.html()),c=Bs.parse(e),G(c)){n.next=5;break}return n.abrupt("return",Ou.badUrl);case 5:return n.next=7,Xf.create(e,t,c);case 7:if(l=n.sent,f=Yt(e,c,l),!l.failed){n.next=11;break}return n.abrupt("return",l);case 11:if(t||(t=l.html()),d=l("meta").map(function(e,t){return l(t).attr("name")}).toArray(),h=gg.extract(f,{url:e,html:t,$:l,metaCache:d,parsedUrl:c,fallback:u}),p=h,m=p.title,g=p.next_page_url,!o||!g){n.next=21;break}return n.next=18,vg({Extractor:f,next_page_url:g,html:t,$:l,metaCache:d,result:h,title:m,url:e});case 18:h=n.sent,n.next=22;break;case 21:h=da({},h,{total_pages:1,rendered_pages:1});case 22:return n.abrupt("return",h);case 23:case"end":return n.stop()}},a,n)}))()},browser:!!Us.browser,fetchResource:function(e){var t=this;return ps(kn.mark(function n(){return kn.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Xf.create(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},n,t)}))()}};return yg}(); +var Mercury = (function() { + 'use strict'; + + function commonjsRequire() { + throw new Error( + 'Dynamic requires are not currently supported by rollup-plugin-commonjs' + ); + } + + function createCommonjsModule(fn, module) { + return ( + (module = { exports: {} }), fn(module, module.exports), module.exports + ); + } + + var runtime = createCommonjsModule(function(module) { + /** + * 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) { + 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 runtime = global.regeneratorRuntime; + + if (runtime) { + { + // 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 = 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. + result.value = unwrapped; + resolve(result); + }, + function(error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke('throw', error, resolve, 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 || (typeof self === 'object' && self); + })() || Function('return this')() + ); + }); + + /** + * 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 || (typeof self === 'object' && self); + })() || 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; + var runtimeModule = 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; + } + } + + var regenerator = runtimeModule; + + var toString = {}.toString; + + var _cof = function(it) { + return toString.call(it).slice(8, -1); + }; + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + // eslint-disable-next-line no-prototype-builtins + + var _iobject = Object('z').propertyIsEnumerable(0) + ? Object + : function(it) { + return _cof(it) == 'String' ? it.split('') : Object(it); + }; + + // 7.2.1 RequireObjectCoercible(argument) + var _defined = function(it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; + }; + + // to indexed object, toObject with fallback for non-array-like ES3 strings + + var _toIobject = function(it) { + return _iobject(_defined(it)); + }; + + var f = {}.propertyIsEnumerable; + + var _objectPie = { + f: f, + }; + + var _propertyDesc = function(bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value, + }; + }; + + var _isObject = function(it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + + // 7.1.1 ToPrimitive(input [, PreferredType]) + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + + var _toPrimitive = 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"); + }; + + var hasOwnProperty = {}.hasOwnProperty; + + var _has = function(it, key) { + return hasOwnProperty.call(it, key); + }; + + var _fails = function(exec) { + try { + return !!exec(); + } catch (e) { + return true; + } + }; + + // Thank's IE8 for his funny defineProperty + var _descriptors = !_fails(function() { + return ( + Object.defineProperty({}, 'a', { + get: function() { + return 7; + }, + }).a != 7 + ); + }); + + var _global = createCommonjsModule(function(module) { + // 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 + }); + + var document$1 = _global.document; // typeof document.createElement is 'object' in old IE + + var is = _isObject(document$1) && _isObject(document$1.createElement); + + var _domCreate = function(it) { + return is ? document$1.createElement(it) : {}; + }; + + var _ie8DomDefine = + !_descriptors && + !_fails(function() { + return ( + Object.defineProperty(_domCreate('div'), 'a', { + get: function() { + return 7; + }, + }).a != 7 + ); + }); + + var gOPD = Object.getOwnPropertyDescriptor; + var f$1 = _descriptors + ? gOPD + : function getOwnPropertyDescriptor(O, P) { + O = _toIobject(O); + P = _toPrimitive(P, true); + if (_ie8DomDefine) + try { + return gOPD(O, P); + } catch (e) { + /* empty */ + } + if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]); + }; + + var _objectGopd = { + f: f$1, + }; + + var _core = createCommonjsModule(function(module) { + var core = (module.exports = { + version: '2.6.2', + }); + if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + }); + var _core_1 = _core.version; + + var _aFunction = function(it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; + }; + + // optional / simple context binding + + var _ctx = 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); + }; + }; + + var _anObject = function(it) { + if (!_isObject(it)) throw TypeError(it + ' is not an object!'); + return it; + }; + + var dP = Object.defineProperty; + var f$2 = _descriptors + ? Object.defineProperty + : function defineProperty(O, P, Attributes) { + _anObject(O); + P = _toPrimitive(P, true); + _anObject(Attributes); + if (_ie8DomDefine) + 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; + }; + + var _objectDp = { + f: f$2, + }; + + var _hide = _descriptors + ? function(object, key, value) { + return _objectDp.f(object, key, _propertyDesc(1, value)); + } + : function(object, key, value) { + object[key] = value; + return object; + }; + + 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` + + var _export = $export; + + // most Object methods by ES6 should accept primitives + + var _objectSap = 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 + ); + }; + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + + var $getOwnPropertyDescriptor = _objectGopd.f; + + _objectSap('getOwnPropertyDescriptor', function() { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(_toIobject(it), key); + }; + }); + + var $Object = _core.Object; + + var getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); + }; + + var getOwnPropertyDescriptor$1 = getOwnPropertyDescriptor; + + var _redefine = _hide; + + var id = 0; + var px = Math.random(); + + var _uid = function(key) { + return 'Symbol('.concat( + key === undefined ? '' : key, + ')_', + (++id + px).toString(36) + ); + }; + + var _meta = createCommonjsModule(function(module) { + var META = _uid('meta'); + + var setDesc = _objectDp.f; + + var id = 0; + + var isExtensible = + Object.isExtensible || + function() { + return true; + }; + + var FREEZE = !_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, + }); + }); + var _meta_1 = _meta.KEY; + var _meta_2 = _meta.NEED; + var _meta_3 = _meta.fastKey; + var _meta_4 = _meta.getWeak; + var _meta_5 = _meta.onFreeze; + + var _library = true; + + var _shared = createCommonjsModule(function(module) { + 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: 'pure', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)', + }); + }); + + var _wks = createCommonjsModule(function(module) { + var store = _shared('wks'); + + var Symbol = _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; + }); + + var def = _objectDp.f; + + var TAG = _wks('toStringTag'); + + var _setToStringTag = function(it, tag, stat) { + if (it && !_has((it = stat ? it : it.prototype), TAG)) + def(it, TAG, { + configurable: true, + value: tag, + }); + }; + + var f$3 = _wks; + + var _wksExt = { + f: f$3, + }; + + var defineProperty = _objectDp.f; + + var _wksDefine = function(name) { + var $Symbol = _core.Symbol || (_core.Symbol = {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) + defineProperty($Symbol, name, { + value: _wksExt.f(name), + }); + }; + + // 7.1.4 ToInteger + var ceil = Math.ceil; + var floor = Math.floor; + + var _toInteger = function(it) { + return isNaN((it = +it)) ? 0 : (it > 0 ? floor : ceil)(it); + }; + + // 7.1.15 ToLength + + var min = Math.min; + + var _toLength = function(it) { + return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + + var max = Math.max; + var min$1 = Math.min; + + var _toAbsoluteIndex = function(index, length) { + index = _toInteger(index); + return index < 0 ? max(index + length, 0) : min$1(index, length); + }; + + // false -> Array#indexOf + // true -> Array#includes + + var _arrayIncludes = 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; + }; + }; + + var shared = _shared('keys'); + + var _sharedKey = function(key) { + return shared[key] || (shared[key] = _uid(key)); + }; + + var arrayIndexOf = _arrayIncludes(false); + + var IE_PROTO = _sharedKey('IE_PROTO'); + + var _objectKeysInternal = 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; + }; + + // IE 8- don't enum bug keys + var _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( + ',' + ); + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + + var _objectKeys = + Object.keys || + function keys(O) { + return _objectKeysInternal(O, _enumBugKeys); + }; + + var f$4 = Object.getOwnPropertySymbols; + + var _objectGops = { + f: f$4, + }; + + // all enumerable object keys, includes symbols + + var _enumKeys = function(it) { + var result = _objectKeys(it); + var getSymbols = _objectGops.f; + + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = _objectPie.f; + var i = 0; + var key; + + while (symbols.length > i) + if (isEnum.call(it, (key = symbols[i++]))) result.push(key); + } + + return result; + }; + + // 7.2.2 IsArray(argument) + + var _isArray = + Array.isArray || + function isArray(arg) { + return _cof(arg) == 'Array'; + }; + + var _objectDps = _descriptors + ? Object.defineProperties + : function defineProperties(O, Properties) { + _anObject(O); + var keys = _objectKeys(Properties); + var length = keys.length; + var i = 0; + var P; + + while (length > i) _objectDp.f(O, (P = keys[i++]), Properties[P]); + + return O; + }; + + var document$2 = _global.document; + + var _html = document$2 && document$2.documentElement; + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + + var IE_PROTO$1 = _sharedKey('IE_PROTO'); + + var Empty = function() { + /* empty */ + }; + + var PROTOTYPE$1 = '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 = _domCreate('iframe'); + + var i = _enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + + _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$1][_enumBugKeys[i]]; + + return createDict(); + }; + + var _objectCreate = + Object.create || + function create(O, Properties) { + var result; + + if (O !== null) { + Empty[PROTOTYPE$1] = _anObject(O); + result = new Empty(); + Empty[PROTOTYPE$1] = null; // add "__proto__" for Object.getPrototypeOf polyfill + + result[IE_PROTO$1] = O; + } else result = createDict(); + + return Properties === undefined ? result : _objectDps(result, Properties); + }; + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + + var hiddenKeys = _enumBugKeys.concat('length', 'prototype'); + + var f$5 = + Object.getOwnPropertyNames || + function getOwnPropertyNames(O) { + return _objectKeysInternal(O, hiddenKeys); + }; + + var _objectGopn = { + f: f$5, + }; + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + + var gOPN = _objectGopn.f; + + var toString$1 = {}.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(); + } + }; + + var f$6 = function getOwnPropertyNames(it) { + return windowNames && toString$1.call(it) == '[object Window]' + ? getWindowNames(it) + : gOPN(_toIobject(it)); + }; + + var _objectGopnExt = { + f: f$6, + }; + + var META = _meta.KEY; + + var gOPD$1 = _objectGopd.f; + var dP$1 = _objectDp.f; + var gOPN$1 = _objectGopnExt.f; + var $Symbol = _global.Symbol; + var $JSON = _global.JSON; + + var _stringify = $JSON && $JSON.stringify; + + var PROTOTYPE$2 = '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$2]; + 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$2] || !QObject[PROTOTYPE$2].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + + var setSymbolDesc = + _descriptors && + _fails(function() { + return ( + _objectCreate( + dP$1({}, 'a', { + get: function() { + return dP$1(this, 'a', { + value: 7, + }).a; + }, + }) + ).a != 7 + ); + }) + ? function(it, key, D) { + var protoDesc = gOPD$1(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP$1(it, key, D); + if (protoDesc && it !== ObjectProto) + dP$1(ObjectProto, key, protoDesc); + } + : dP$1; + + var wrap = function(tag) { + var sym = (AllSymbols[tag] = _objectCreate($Symbol[PROTOTYPE$2])); + + 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$1(it, HIDDEN, _propertyDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (_has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _objectCreate(D, { + enumerable: _propertyDesc(0, false), + }); + } + + return setSymbolDesc(it, key, D); + } + + return dP$1(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 + ? _objectCreate(it) + : $defineProperties(_objectCreate(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$1 = function getOwnPropertyDescriptor(it, key) { + it = _toIobject(it); + key = _toPrimitive(key, true); + if (it === ObjectProto && _has(AllSymbols, key) && !_has(OPSymbols, key)) + return; + var D = gOPD$1(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$1(_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$1(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, _propertyDesc(1, value)); + }; + + if (_descriptors && setter) + setSymbolDesc(ObjectProto, tag, { + configurable: true, + set: $set, + }); + return wrap(tag); + }; + + _redefine($Symbol[PROTOTYPE$2], 'toString', function toString() { + return this._k; + }); + _objectGopd.f = $getOwnPropertyDescriptor$1; + _objectDp.f = $defineProperty; + _objectGopn.f = _objectGopnExt.f = $getOwnPropertyNames; + _objectPie.f = $propertyIsEnumerable; + _objectGops.f = $getOwnPropertySymbols; + + if (_descriptors && !_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 = 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split( // 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 + ',' + ), + j = 0; + es6Symbols.length > j; + + ) + _wks(es6Symbols[j++]); + + for ( + var wellKnownSymbols = _objectKeys(_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$1, + // 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$2][TO_PRIMITIVE] || + _hide($Symbol[PROTOTYPE$2], TO_PRIMITIVE, $Symbol[PROTOTYPE$2].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); + + var getOwnPropertySymbols = _core.Object.getOwnPropertySymbols; + + var getOwnPropertySymbols$1 = getOwnPropertySymbols; + + // 7.1.13 ToObject(argument) + + var _toObject = function(it) { + return Object(_defined(it)); + }; + + // 19.1.2.14 Object.keys(O) + + _objectSap('keys', function() { + return function keys(it) { + return _objectKeys(_toObject(it)); + }; + }); + + var keys = _core.Object.keys; + + var keys$1 = keys; + + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + + _export(_export.S + _export.F * !_descriptors, 'Object', { + defineProperty: _objectDp.f, + }); + + var $Object$1 = _core.Object; + + var defineProperty$1 = function defineProperty(it, key, desc) { + return $Object$1.defineProperty(it, key, desc); + }; + + var defineProperty$2 = defineProperty$1; + + function _defineProperty(obj, key, value) { + if (key in obj) { + defineProperty$2(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + + return obj; + } + + var defineProperty$3 = _defineProperty; + + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + var ownKeys = keys$1(source); + + if (typeof getOwnPropertySymbols$1 === 'function') { + ownKeys = ownKeys.concat( + getOwnPropertySymbols$1(source).filter(function(sym) { + return getOwnPropertyDescriptor$1(source, sym).enumerable; + }) + ); + } + + ownKeys.forEach(function(key) { + defineProperty$3(target, key, source[key]); + }); + } + + return target; + } + + var objectSpread = _objectSpread; + + // true -> String#at + // false -> String#codePointAt + + var _stringAt = 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; + }; + }; + + var _iterators = {}; + + var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + + _hide(IteratorPrototype, _wks('iterator'), function() { + return this; + }); + + var _iterCreate = function(Constructor, NAME, next) { + Constructor.prototype = _objectCreate(IteratorPrototype, { + next: _propertyDesc(1, next), + }); + _setToStringTag(Constructor, NAME + ' Iterator'); + }; + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + + var IE_PROTO$2 = _sharedKey('IE_PROTO'); + + var ObjectProto$1 = Object.prototype; + + var _objectGpo = + Object.getPrototypeOf || + function(O) { + O = _toObject(O); + if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2]; + + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + + return O instanceof Object ? ObjectProto$1 : null; + }; + + var ITERATOR = _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; + }; + + var _iterDefine = 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 = _objectGpo($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; + }; + + var $at = _stringAt(true); // 21.1.3.27 String.prototype[@@iterator]() + + _iterDefine( + 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, + }; + } + ); + + var _iterStep = function(done, value) { + return { + value: value, + done: !!done, + }; + }; + + // 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]() + + var es6_array_iterator = _iterDefine( + 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 _iterStep(1); + } + + if (kind == 'keys') return _iterStep(0, index); + if (kind == 'values') return _iterStep(0, O[index]); + return _iterStep(0, [index, O[index]]); + }, + 'values' + ); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + + _iterators.Arguments = _iterators.Array; + + var TO_STRING_TAG = _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; + } + + // getting tag from 19.1.3.6 Object.prototype.toString() + + var TAG$1 = _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 */ + } + }; + + var _classof = function(it) { + var O, T, B; + return it === undefined + ? 'Undefined' + : it === null + ? 'Null' // @@toStringTag case + : typeof (T = tryGet((O = Object(it)), TAG$1)) == 'string' + ? T // builtinTag case + : ARG + ? _cof(O) // ES3 arguments fallback + : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' + ? 'Arguments' + : B; + }; + + var _anInstance = function(it, Constructor, name, forbiddenField) { + if ( + !(it instanceof Constructor) || + (forbiddenField !== undefined && forbiddenField in it) + ) { + throw TypeError(name + ': incorrect invocation!'); + } + + return it; + }; + + // call something on iterator step with safe closing on error + + var _iterCall = 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; + } + }; + + // check on default Array iterator + + var ITERATOR$1 = _wks('iterator'); + + var ArrayProto = Array.prototype; + + var _isArrayIter = function(it) { + return ( + it !== undefined && + (_iterators.Array === it || ArrayProto[ITERATOR$1] === it) + ); + }; + + var ITERATOR$2 = _wks('iterator'); + + var core_getIteratorMethod = (_core.getIteratorMethod = function(it) { + if (it != undefined) + return it[ITERATOR$2] || it['@@iterator'] || _iterators[_classof(it)]; + }); + + var _forOf = createCommonjsModule(function(module) { + var BREAK = {}; + var RETURN = {}; + + var exports = (module.exports = function( + iterable, + entries, + fn, + that, + ITERATOR + ) { + var iterFn = ITERATOR + ? function() { + return iterable; + } + : core_getIteratorMethod(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 = _iterCall(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } + }); + + exports.BREAK = BREAK; + exports.RETURN = RETURN; + }); + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + + var SPECIES = _wks('species'); + + var _speciesConstructor = function(O, D) { + var C = _anObject(O).constructor; + var S; + return C === undefined || (S = _anObject(C)[SPECIES]) == undefined + ? D + : _aFunction(S); + }; + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + var _invoke = 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); + }; + + 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 (_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 _domCreate('script')) { + defer = function(id) { + _html.appendChild(_domCreate('script'))[ + ONREADYSTATECHANGE + ] = function() { + _html.removeChild(this); + run.call(id); + }; + }; // Rest old browsers + } else { + defer = function(id) { + setTimeout(_ctx(run, id, 1), 0); + }; + } + } + + var _task = { + set: setTask, + clear: clearTask, + }; + + var macrotask = _task.set; + + var Observer = _global.MutationObserver || _global.WebKitMutationObserver; + var process$1 = _global.process; + var Promise$1 = _global.Promise; + var isNode = _cof(process$1) == 'process'; + + var _microtask = function() { + var head, last, notify; + + var flush = function() { + var parent, fn; + if (isNode && (parent = process$1.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$1.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$1 && Promise$1.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise$1.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; + }; + }; + + 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); + } + + var f$7 = function(C) { + return new PromiseCapability(C); + }; + + var _newPromiseCapability = { + f: f$7, + }; + + var _perform = function(exec) { + try { + return { + e: false, + v: exec(), + }; + } catch (e) { + return { + e: true, + v: e, + }; + } + }; + + var navigator = _global.navigator; + var _userAgent = (navigator && navigator.userAgent) || ''; + + var _promiseResolve = 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; + }; + + var _redefineAll = 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; + }; + + var SPECIES$1 = _wks('species'); + + var _setSpecies = function(KEY) { + var C = typeof _core[KEY] == 'function' ? _core[KEY] : _global[KEY]; + if (_descriptors && C && !C[SPECIES$1]) + _objectDp.f(C, SPECIES$1, { + configurable: true, + get: function() { + return this; + }, + }); + }; + + var ITERATOR$3 = _wks('iterator'); + + var SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR$3](); + + riter['return'] = function() { + SAFE_CLOSING = true; + }; // eslint-disable-next-line no-throw-literal + } catch (e) { + /* empty */ + } + + var _iterDetect = function(exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + + try { + var arr = [7]; + var iter = arr[ITERATOR$3](); + + iter.next = function() { + return { + done: (safe = true), + }; + }; + + arr[ITERATOR$3] = function() { + return iter; + }; + + exec(arr); + } catch (e) { + /* empty */ + } + + return safe; + }; + + var task = _task.set; + + var microtask = _microtask(); + + var PROMISE = 'Promise'; + var TypeError$1 = _global.TypeError; + var process$2 = _global.process; + var versions = process$2 && process$2.versions; + var v8 = (versions && versions.v8) || ''; + var $Promise = _global[PROMISE]; + var isNode$1 = _classof(process$2) == 'process'; + + var empty = function() { + /* empty */ + }; + + var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; + var newPromiseCapability = (newGenericPromiseCapability = + _newPromiseCapability.f); + var USE_NATIVE$1 = !!(function() { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + + var FakePromise = ((promise.constructor = {})[_wks('species')] = function( + exec + ) { + exec(empty, empty); + }); // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + + return ( + (isNode$1 || 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$1('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$1) { + process$2.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$1 || 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$1) { + process$2.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$1("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$1) { + // 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 = _redefineAll($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$1 ? process$2.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); + }; + + _newPromiseCapability.f = newPromiseCapability = function(C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + } + + _export(_export.G + _export.W + _export.F * !USE_NATIVE$1, { + Promise: $Promise, + }); + + _setToStringTag($Promise, PROMISE); + + _setSpecies(PROMISE); + + Wrapper = _core[PROMISE]; // statics + + _export(_export.S + _export.F * !USE_NATIVE$1, 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$1), 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$1 && + _iterDetect(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; + }, + } + ); + + _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 + ); + }, + }); + + _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; + }, + }); + + var promise = _core.Promise; + + var promise$1 = promise; + + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + promise$1.resolve(value).then(_next, _throw); + } + } + + function _asyncToGenerator(fn) { + return function() { + var self = this, + args = arguments; + return new promise$1(function(resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep( + gen, + resolve, + reject, + _next, + _throw, + 'next', + value + ); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); + } + + _next(undefined); + }); + }; + } + + var asyncToGenerator = _asyncToGenerator; + + var util = { + isString: function(arg) { + return typeof arg === 'string'; + }, + isObject: function(arg) { + return typeof arg === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + }, + }; + + // Copyright Joyent, Inc. and other Node contributors. + // obj.hasOwnProperty(prop) will break. + // See: https://github.com/joyent/node/issues/1707 + + function hasOwnProperty$1(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + + var decode = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + var maxKeys = 1000; + + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; // maxKeys <= 0 means that we should not limit keys count + + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, + vstr, + k, + v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty$1(obj, k)) { + obj[k] = v; + } else if (Array.isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; + }; + + // Copyright Joyent, Inc. and other Node contributors. + + var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } + }; + + var encode = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return Object.keys(obj) + .map(function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + + if (Array.isArray(obj[k])) { + return obj[k] + .map(function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }) + .join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }) + .join(sep); + } + + if (!name) return ''; + return ( + encodeURIComponent(stringifyPrimitive(name)) + + eq + + encodeURIComponent(stringifyPrimitive(obj)) + ); + }; + + var querystring = createCommonjsModule(function(module, exports) { + exports.decode = exports.parse = decode; + exports.encode = exports.stringify = encode; + }); + var querystring_1 = querystring.decode; + var querystring_2 = querystring.parse; + var querystring_3 = querystring.encode; + var querystring_4 = querystring.stringify; + + var parse = urlParse; + var resolve = urlResolve; + var resolveObject = urlResolveObject; + var format = urlFormat; + var Url_1 = Url; + + function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; + } // Reference: RFC 3986, RFC 1808, RFC 2396 + // define these here so at least they only have to be + // compiled once on the first module load. + + var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ["'"].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + javascript: true, + 'javascript:': true, + }, + // protocols that never have a hostname. + hostlessProtocol = { + javascript: true, + 'javascript:': true, + }, + // protocols that always contain a // bit. + slashedProtocol = { + http: true, + https: true, + ftp: true, + gopher: true, + file: true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true, + }; + + function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + var u = new Url(); + u.parse(url, parseQueryString, slashesDenoteHost); + return u; + } + + Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError( + "Parameter 'url' must be a string, not " + typeof url + ); + } // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + + var queryIndex = url.indexOf('?'), + splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + var rest = url; // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + + if (simplePath[2]) { + this.search = simplePath[2]; + + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + + return this; + } + } + + var proto = protocolPattern.exec(rest); + + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if ( + !hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto])) + ) { + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + // find the first instance of any hostEndingChars + var hostEnd = -1; + + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; + } // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + + var auth, atSign; + + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } // Now we have a portion which is definitely the auth. + // Pull that off. + + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } // the host is the remaining to the left of the first non-host char + + hostEnd = -1; + + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; + } // if we still have not hit it, then the entire thing is a host. + + if (hostEnd === -1) hostEnd = rest.length; + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); // pull out port. + + this.parseHost(); // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + + this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + + var ipv6Hostname = + this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; // validate a little. + + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } // we test again with ASCII char only + + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; // strip [ and ] from the hostname + // the host field still retains them, though + + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } // now rest is set to the post-host stuff. + // chop off any delim chars. + + if (!unsafeProtocol[lowerProto]) { + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) continue; + var esc = encodeURIComponent(ae); + + if (esc === ae) { + esc = escape(ae); + } + + rest = rest.split(ae).join(esc); + } + } // chop off from the tail first. + + var hash = rest.indexOf('#'); + + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + + var qm = rest.indexOf('?'); + + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + + if (rest) this.pathname = rest; + + if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { + this.pathname = '/'; + } //to support http.request + + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } // finally, reconstruct the href based on what has been validated. + + this.href = this.format(); + return this; + }; // format a parsed object into a url string + + function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); + } + + Url.prototype.format = function() { + var auth = this.auth || ''; + + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = + auth + + (this.hostname.indexOf(':') === -1 + ? this.hostname + : '[' + this.hostname + ']'); + + if (this.port) { + host += ':' + this.port; + } + } + + if ( + this.query && + util.isObject(this.query) && + Object.keys(this.query).length + ) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && '?' + query) || ''; + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + + if ( + this.slashes || + ((!protocol || slashedProtocol[protocol]) && host !== false) + ) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + return protocol + host + pathname + search + hash; + }; + + function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); + } + + Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); + }; + + function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); + } + + Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } // hash is always overridden, no matter what. + // even href="" will remove it. + + result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here. + + if (relative.href === '') { + result.href = result.format(); + return result; + } // hrefs like //foo/bar always cut to the protocol. + + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') result[rkey] = relative[rkey]; + } //urlParse appends trailing / to urls like http://www.example.com + + if ( + slashedProtocol[result.protocol] && + result.hostname && + !result.pathname + ) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + + while (relPath.length && !(relative.host = relPath.shift())); + + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; // to support http.request + + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/', + isRelAbs = + relative.host || + (relative.pathname && relative.pathname.charAt(0) === '/'), + mustEndAbs = + isRelAbs || isSourceAbs || (result.host && relative.pathname), + removeAllDots = mustEndAbs, + srcPath = (result.pathname && result.pathname.split('/')) || [], + relPath = (relative.pathname && relative.pathname.split('/')) || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + + if (psychotic) { + result.hostname = ''; + result.port = null; + + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + + result.host = ''; + + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + + relative.host = null; + } + + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = + relative.host || relative.host === '' ? relative.host : result.host; + result.hostname = + relative.hostname || relative.hostname === '' + ? relative.hostname + : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + + var authInHost = + result.host && result.host.indexOf('@') > 0 + ? result.host.split('@') + : false; + + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + result.search = relative.search; + result.query = relative.query; //to support http.request + + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = + (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; //to support http.request + + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + + result.href = result.format(); + return result; + } // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = + ((result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..')) || + last === ''; // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + + var up = 0; + + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } // if the path is allowed to go above the root, restore leading ..s + + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if ( + mustEndAbs && + srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/') + ) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') { + srcPath.push(''); + } + + var isAbsolute = + srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); // put the host back + + if (psychotic) { + result.hostname = result.host = isAbsolute + ? '' + : srcPath.length + ? srcPath.shift() + : ''; //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + + var authInHost = + result.host && result.host.indexOf('@') > 0 + ? result.host.split('@') + : false; + + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } //to support request.http + + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = + (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + }; + + Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + + if (port) { + port = port[0]; + + if (port !== ':') { + this.port = port.substr(1); + } + + host = host.substr(0, host.length - port.length); + } + + if (host) this.hostname = host; + }; + + var url = { + parse: parse, + resolve: resolve, + resolveObject: resolveObject, + format: format, + Url: Url_1, + }; + + var jquery_min = createCommonjsModule(function(module) { + /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ + !(function(e, t) { + module.exports = e.document + ? t(e, !0) + : function(e) { + if (!e.document) + throw new Error('jQuery requires a window with a document'); + return t(e); + }; + })('undefined' != typeof window ? window : this, function(e, t) { + var n = [], + r = e.document, + i = Object.getPrototypeOf, + o = n.slice, + a = n.concat, + s = n.push, + u = n.indexOf, + l = {}, + c = l.toString, + f = l.hasOwnProperty, + p = f.toString, + d = p.call(Object), + h = {}, + g = function e(t) { + return 'function' == typeof t && 'number' != typeof t.nodeType; + }, + y = function e(t) { + return null != t && t === t.window; + }, + v = { + type: !0, + src: !0, + noModule: !0, + }; + + function m(e, t, n) { + var i, + o = (t = t || r).createElement('script'); + if (((o.text = e), n)) for (i in v) n[i] && (o[i] = n[i]); + t.head.appendChild(o).parentNode.removeChild(o); + } + + function x(e) { + return null == e + ? e + '' + : 'object' == typeof e || 'function' == typeof e + ? l[c.call(e)] || 'object' + : typeof e; + } + + var w = function(e, t) { + return new w.fn.init(e, t); + }, + T = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; + + (w.fn = w.prototype = { + jquery: '3.3.1', + constructor: w, + length: 0, + toArray: function() { + return o.call(this); + }, + get: function(e) { + return null == e + ? o.call(this) + : e < 0 + ? this[e + this.length] + : this[e]; + }, + pushStack: function(e) { + var t = w.merge(this.constructor(), e); + return (t.prevObject = this), t; + }, + each: function(e) { + return w.each(this, e); + }, + map: function(e) { + return this.pushStack( + w.map(this, function(t, n) { + return e.call(t, n, t); + }) + ); + }, + slice: function() { + return this.pushStack(o.apply(this, arguments)); + }, + first: function() { + return this.eq(0); + }, + last: function() { + return this.eq(-1); + }, + eq: function(e) { + var t = this.length, + n = +e + (e < 0 ? t : 0); + return this.pushStack(n >= 0 && n < t ? [this[n]] : []); + }, + end: function() { + return this.prevObject || this.constructor(); + }, + push: s, + sort: n.sort, + splice: n.splice, + }), + (w.extend = w.fn.extend = function() { + var e, + t, + n, + r, + i, + o, + a = arguments[0] || {}, + s = 1, + u = arguments.length, + l = !1; + + for ( + 'boolean' == typeof a && ((l = a), (a = arguments[s] || {}), s++), + 'object' == typeof a || g(a) || (a = {}), + s === u && ((a = this), s--); + s < u; + s++ + ) + if (null != (e = arguments[s])) + for (t in e) + (n = a[t]), + a !== (r = e[t]) && + (l && r && (w.isPlainObject(r) || (i = Array.isArray(r))) + ? (i + ? ((i = !1), (o = n && Array.isArray(n) ? n : [])) + : (o = n && w.isPlainObject(n) ? n : {}), + (a[t] = w.extend(l, o, r))) + : void 0 !== r && (a[t] = r)); + + return a; + }), + w.extend({ + expando: 'jQuery' + ('3.3.1' + Math.random()).replace(/\D/g, ''), + isReady: !0, + error: function(e) { + throw new Error(e); + }, + noop: function() {}, + isPlainObject: function(e) { + var t, n; + return ( + !(!e || '[object Object]' !== c.call(e)) && + (!(t = i(e)) || + ('function' == + typeof (n = f.call(t, 'constructor') && t.constructor) && + p.call(n) === d)) + ); + }, + isEmptyObject: function(e) { + var t; + + for (t in e) return !1; + + return !0; + }, + globalEval: function(e) { + m(e); + }, + each: function(e, t) { + var n, + r = 0; + + if (C(e)) { + for (n = e.length; r < n; r++) + if (!1 === t.call(e[r], r, e[r])) break; + } else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; + + return e; + }, + trim: function(e) { + return null == e ? '' : (e + '').replace(T, ''); + }, + makeArray: function(e, t) { + var n = t || []; + return ( + null != e && + (C(Object(e)) + ? w.merge(n, 'string' == typeof e ? [e] : e) + : s.call(n, e)), + n + ); + }, + inArray: function(e, t, n) { + return null == t ? -1 : u.call(t, e, n); + }, + merge: function(e, t) { + for (var n = +t.length, r = 0, i = e.length; r < n; r++) + e[i++] = t[r]; + + return (e.length = i), e; + }, + grep: function(e, t, n) { + for (var r, i = [], o = 0, a = e.length, s = !n; o < a; o++) + (r = !t(e[o], o)) !== s && i.push(e[o]); + + return i; + }, + map: function(e, t, n) { + var r, + i, + o = 0, + s = []; + if (C(e)) + for (r = e.length; o < r; o++) + null != (i = t(e[o], o, n)) && s.push(i); + else for (o in e) null != (i = t(e[o], o, n)) && s.push(i); + return a.apply([], s); + }, + guid: 1, + support: h, + }), + 'function' == typeof Symbol && + (w.fn[Symbol.iterator] = n[Symbol.iterator]), + w.each( + 'Boolean Number String Function Array Date RegExp Object Error Symbol'.split( + ' ' + ), + function(e, t) { + l['[object ' + t + ']'] = t.toLowerCase(); + } + ); + + function C(e) { + var t = !!e && 'length' in e && e.length, + n = x(e); + return ( + !g(e) && + !y(e) && + ('array' === n || + 0 === t || + ('number' == typeof t && t > 0 && t - 1 in e)) + ); + } + + var E = (function(e) { + var t, + n, + r, + i, + o, + a, + s, + u, + l, + c, + f, + p, + d, + h, + g, + y, + v, + m, + x, + b = 'sizzle' + 1 * new Date(), + w = e.document, + T = 0, + C = 0, + E = ae(), + k = ae(), + S = ae(), + D = function(e, t) { + return e === t && (f = !0), 0; + }, + N = {}.hasOwnProperty, + A = [], + j = A.pop, + q = A.push, + L = A.push, + H = A.slice, + O = function(e, t) { + for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; + + return -1; + }, + P = + 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', + M = '[\\x20\\t\\r\\n\\f]', + R = '(?:\\\\.|[\\w-]|[^\0-\\xa0])+', + I = + '\\[' + + M + + '*(' + + R + + ')(?:' + + M + + '*([*^$|!~]?=)' + + M + + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + + R + + '))|)' + + M + + '*\\]', + W = + ':(' + + R + + ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' + + I + + ')*)|.*)\\)|)', + $ = new RegExp(M + '+', 'g'), + B = new RegExp( + '^' + M + '+|((?:^|[^\\\\])(?:\\\\.)*)' + M + '+$', + 'g' + ), + F = new RegExp('^' + M + '*,' + M + '*'), + _ = new RegExp('^' + M + '*([>+~]|' + M + ')' + M + '*'), + z = new RegExp('=' + M + '*([^\\]\'"]*?)' + M + '*\\]', 'g'), + X = new RegExp(W), + U = new RegExp('^' + R + '$'), + V = { + ID: new RegExp('^#(' + R + ')'), + CLASS: new RegExp('^\\.(' + R + ')'), + TAG: new RegExp('^(' + R + '|[*])'), + ATTR: new RegExp('^' + I), + PSEUDO: new RegExp('^' + W), + CHILD: new RegExp( + '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + + M + + '*(even|odd|(([+-]|)(\\d*)n|)' + + M + + '*(?:([+-]|)' + + M + + '*(\\d+)|))' + + M + + '*\\)|)', + 'i' + ), + bool: new RegExp('^(?:' + P + ')$', 'i'), + needsContext: new RegExp( + '^' + + M + + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + + M + + '*((?:-\\d)?\\d*)' + + M + + '*\\)|)(?=[^-]|$)', + 'i' + ), + }, + G = /^(?:input|select|textarea|button)$/i, + Y = /^h\d$/i, + Q = /^[^{]+\{\s*\[native \w/, + J = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + K = /[+~]/, + Z = new RegExp('\\\\([\\da-f]{1,6}' + M + '?|(' + M + ')|.)', 'ig'), + ee = function(e, t, n) { + var r = '0x' + t - 65536; + return r !== r || n + ? t + : r < 0 + ? String.fromCharCode(r + 65536) + : String.fromCharCode((r >> 10) | 55296, (1023 & r) | 56320); + }, + te = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + ne = function(e, t) { + return t + ? '\0' === e + ? '\ufffd' + : e.slice(0, -1) + + '\\' + + e.charCodeAt(e.length - 1).toString(16) + + ' ' + : '\\' + e; + }, + re = function() { + p(); + }, + ie = me( + function(e) { + return !0 === e.disabled && ('form' in e || 'label' in e); + }, + { + dir: 'parentNode', + next: 'legend', + } + ); + + try { + L.apply((A = H.call(w.childNodes)), w.childNodes), + A[w.childNodes.length].nodeType; + } catch (e) { + L = { + apply: A.length + ? function(e, t) { + q.apply(e, H.call(t)); + } + : function(e, t) { + var n = e.length, + r = 0; + + while ((e[n++] = t[r++])); + + e.length = n - 1; + }, + }; + } + + function oe(e, t, r, i) { + var o, + s, + l, + c, + f, + h, + v, + m = t && t.ownerDocument, + T = t ? t.nodeType : 9; + if ( + ((r = r || []), + 'string' != typeof e || !e || (1 !== T && 9 !== T && 11 !== T)) + ) + return r; + + if ( + !i && + ((t ? t.ownerDocument || t : w) !== d && p(t), (t = t || d), g) + ) { + if (11 !== T && (f = J.exec(e))) + if ((o = f[1])) { + if (9 === T) { + if (!(l = t.getElementById(o))) return r; + if (l.id === o) return r.push(l), r; + } else if ( + m && + (l = m.getElementById(o)) && + x(t, l) && + l.id === o + ) + return r.push(l), r; + } else { + if (f[2]) return L.apply(r, t.getElementsByTagName(e)), r; + if ( + (o = f[3]) && + n.getElementsByClassName && + t.getElementsByClassName + ) + return L.apply(r, t.getElementsByClassName(o)), r; + } + + if (n.qsa && !S[e + ' '] && (!y || !y.test(e))) { + if (1 !== T) (m = t), (v = e); + else if ('object' !== t.nodeName.toLowerCase()) { + (c = t.getAttribute('id')) + ? (c = c.replace(te, ne)) + : t.setAttribute('id', (c = b)), + (s = (h = a(e)).length); + + while (s--) h[s] = '#' + c + ' ' + ve(h[s]); + + (v = h.join(',')), (m = (K.test(e) && ge(t.parentNode)) || t); + } + if (v) + try { + return L.apply(r, m.querySelectorAll(v)), r; + } catch (e) { + } finally { + c === b && t.removeAttribute('id'); + } + } + } + + return u(e.replace(B, '$1'), t, r, i); + } + + function ae() { + var e = []; + + function t(n, i) { + return ( + e.push(n + ' ') > r.cacheLength && delete t[e.shift()], + (t[n + ' '] = i) + ); + } + + return t; + } + + function se(e) { + return (e[b] = !0), e; + } + + function ue(e) { + var t = d.createElement('fieldset'); + + try { + return !!e(t); + } catch (e) { + return !1; + } finally { + t.parentNode && t.parentNode.removeChild(t), (t = null); + } + } + + function le(e, t) { + var n = e.split('|'), + i = n.length; + + while (i--) r.attrHandle[n[i]] = t; + } + + function ce(e, t) { + var n = t && e, + r = + n && + 1 === e.nodeType && + 1 === t.nodeType && + e.sourceIndex - t.sourceIndex; + if (r) return r; + if (n) while ((n = n.nextSibling)) if (n === t) return -1; + return e ? 1 : -1; + } + + function fe(e) { + return function(t) { + return 'input' === t.nodeName.toLowerCase() && t.type === e; + }; + } + + function pe(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return ('input' === n || 'button' === n) && t.type === e; + }; + } + + function de(e) { + return function(t) { + return 'form' in t + ? t.parentNode && !1 === t.disabled + ? 'label' in t + ? 'label' in t.parentNode + ? t.parentNode.disabled === e + : t.disabled === e + : t.isDisabled === e || (t.isDisabled !== !e && ie(t) === e) + : t.disabled === e + : 'label' in t && t.disabled === e; + }; + } + + function he(e) { + return se(function(t) { + return ( + (t = +t), + se(function(n, r) { + var i, + o = e([], n.length, t), + a = o.length; + + while (a--) n[(i = o[a])] && (n[i] = !(r[i] = n[i])); + }) + ); + }); + } + + function ge(e) { + return e && 'undefined' != typeof e.getElementsByTagName && e; + } + + (n = oe.support = {}), + (o = oe.isXML = function(e) { + var t = e && (e.ownerDocument || e).documentElement; + return !!t && 'HTML' !== t.nodeName; + }), + (p = oe.setDocument = function(e) { + var t, + i, + a = e ? e.ownerDocument || e : w; + return a !== d && 9 === a.nodeType && a.documentElement + ? ((d = a), + (h = d.documentElement), + (g = !o(d)), + w !== d && + (i = d.defaultView) && + i.top !== i && + (i.addEventListener + ? i.addEventListener('unload', re, !1) + : i.attachEvent && i.attachEvent('onunload', re)), + (n.attributes = ue(function(e) { + return (e.className = 'i'), !e.getAttribute('className'); + })), + (n.getElementsByTagName = ue(function(e) { + return ( + e.appendChild(d.createComment('')), + !e.getElementsByTagName('*').length + ); + })), + (n.getElementsByClassName = Q.test(d.getElementsByClassName)), + (n.getById = ue(function(e) { + return ( + (h.appendChild(e).id = b), + !d.getElementsByName || !d.getElementsByName(b).length + ); + })), + n.getById + ? ((r.filter.ID = function(e) { + var t = e.replace(Z, ee); + return function(e) { + return e.getAttribute('id') === t; + }; + }), + (r.find.ID = function(e, t) { + if ('undefined' != typeof t.getElementById && g) { + var n = t.getElementById(e); + return n ? [n] : []; + } + })) + : ((r.filter.ID = function(e) { + var t = e.replace(Z, ee); + return function(e) { + var n = + 'undefined' != typeof e.getAttributeNode && + e.getAttributeNode('id'); + return n && n.value === t; + }; + }), + (r.find.ID = function(e, t) { + if ('undefined' != typeof t.getElementById && g) { + var n, + r, + i, + o = t.getElementById(e); + + if (o) { + if ((n = o.getAttributeNode('id')) && n.value === e) + return [o]; + (i = t.getElementsByName(e)), (r = 0); + + while ((o = i[r++])) + if ((n = o.getAttributeNode('id')) && n.value === e) + return [o]; + } + + return []; + } + })), + (r.find.TAG = n.getElementsByTagName + ? function(e, t) { + return 'undefined' != typeof t.getElementsByTagName + ? t.getElementsByTagName(e) + : n.qsa + ? t.querySelectorAll(e) + : void 0; + } + : function(e, t) { + var n, + r = [], + i = 0, + o = t.getElementsByTagName(e); + + if ('*' === e) { + while ((n = o[i++])) 1 === n.nodeType && r.push(n); + + return r; + } + + return o; + }), + (r.find.CLASS = + n.getElementsByClassName && + function(e, t) { + if ('undefined' != typeof t.getElementsByClassName && g) + return t.getElementsByClassName(e); + }), + (v = []), + (y = []), + (n.qsa = Q.test(d.querySelectorAll)) && + (ue(function(e) { + (h.appendChild(e).innerHTML = + "<a id='" + + b + + "'></a><select id='" + + b + + "-\r\\' msallowcapture=''><option selected=''></option></select>"), + e.querySelectorAll("[msallowcapture^='']").length && + y.push('[*^$]=' + M + '*(?:\'\'|"")'), + e.querySelectorAll('[selected]').length || + y.push('\\[' + M + '*(?:value|' + P + ')'), + e.querySelectorAll('[id~=' + b + '-]').length || + y.push('~='), + e.querySelectorAll(':checked').length || + y.push(':checked'), + e.querySelectorAll('a#' + b + '+*').length || + y.push('.#.+[+~]'); + }), + ue(function(e) { + e.innerHTML = + "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; + var t = d.createElement('input'); + t.setAttribute('type', 'hidden'), + e.appendChild(t).setAttribute('name', 'D'), + e.querySelectorAll('[name=d]').length && + y.push('name' + M + '*[*^$|!~]?='), + 2 !== e.querySelectorAll(':enabled').length && + y.push(':enabled', ':disabled'), + (h.appendChild(e).disabled = !0), + 2 !== e.querySelectorAll(':disabled').length && + y.push(':enabled', ':disabled'), + e.querySelectorAll('*,:x'), + y.push(',.*:'); + })), + (n.matchesSelector = Q.test( + (m = + h.matches || + h.webkitMatchesSelector || + h.mozMatchesSelector || + h.oMatchesSelector || + h.msMatchesSelector) + )) && + ue(function(e) { + (n.disconnectedMatch = m.call(e, '*')), + m.call(e, "[s!='']:x"), + v.push('!=', W); + }), + (y = y.length && new RegExp(y.join('|'))), + (v = v.length && new RegExp(v.join('|'))), + (t = Q.test(h.compareDocumentPosition)), + (x = + t || Q.test(h.contains) + ? function(e, t) { + var n = 9 === e.nodeType ? e.documentElement : e, + r = t && t.parentNode; + return ( + e === r || + !( + !r || + 1 !== r.nodeType || + !(n.contains + ? n.contains(r) + : e.compareDocumentPosition && + 16 & e.compareDocumentPosition(r)) + ) + ); + } + : function(e, t) { + if (t) + while ((t = t.parentNode)) if (t === e) return !0; + return !1; + }), + (D = t + ? function(e, t) { + if (e === t) return (f = !0), 0; + var r = + !e.compareDocumentPosition - !t.compareDocumentPosition; + return ( + r || + (1 & + (r = + (e.ownerDocument || e) === (t.ownerDocument || t) + ? e.compareDocumentPosition(t) + : 1) || + (!n.sortDetached && t.compareDocumentPosition(e) === r) + ? e === d || (e.ownerDocument === w && x(w, e)) + ? -1 + : t === d || (t.ownerDocument === w && x(w, t)) + ? 1 + : c + ? O(c, e) - O(c, t) + : 0 + : 4 & r + ? -1 + : 1) + ); + } + : function(e, t) { + if (e === t) return (f = !0), 0; + var n, + r = 0, + i = e.parentNode, + o = t.parentNode, + a = [e], + s = [t]; + if (!i || !o) + return e === d + ? -1 + : t === d + ? 1 + : i + ? -1 + : o + ? 1 + : c + ? O(c, e) - O(c, t) + : 0; + if (i === o) return ce(e, t); + n = e; + + while ((n = n.parentNode)) a.unshift(n); + + n = t; + + while ((n = n.parentNode)) s.unshift(n); + + while (a[r] === s[r]) r++; + + return r + ? ce(a[r], s[r]) + : a[r] === w + ? -1 + : s[r] === w + ? 1 + : 0; + }), + d) + : d; + }), + (oe.matches = function(e, t) { + return oe(e, null, null, t); + }), + (oe.matchesSelector = function(e, t) { + if ( + ((e.ownerDocument || e) !== d && p(e), + (t = t.replace(z, "='$1']")), + n.matchesSelector && + g && + !S[t + ' '] && + (!v || !v.test(t)) && + (!y || !y.test(t))) + ) + try { + var r = m.call(e, t); + if ( + r || + n.disconnectedMatch || + (e.document && 11 !== e.document.nodeType) + ) + return r; + } catch (e) {} + return oe(t, d, null, [e]).length > 0; + }), + (oe.contains = function(e, t) { + return (e.ownerDocument || e) !== d && p(e), x(e, t); + }), + (oe.attr = function(e, t) { + (e.ownerDocument || e) !== d && p(e); + var i = r.attrHandle[t.toLowerCase()], + o = + i && N.call(r.attrHandle, t.toLowerCase()) + ? i(e, t, !g) + : void 0; + return void 0 !== o + ? o + : n.attributes || !g + ? e.getAttribute(t) + : (o = e.getAttributeNode(t)) && o.specified + ? o.value + : null; + }), + (oe.escape = function(e) { + return (e + '').replace(te, ne); + }), + (oe.error = function(e) { + throw new Error('Syntax error, unrecognized expression: ' + e); + }), + (oe.uniqueSort = function(e) { + var t, + r = [], + i = 0, + o = 0; + + if ( + ((f = !n.detectDuplicates), + (c = !n.sortStable && e.slice(0)), + e.sort(D), + f) + ) { + while ((t = e[o++])) t === e[o] && (i = r.push(o)); + + while (i--) e.splice(r[i], 1); + } + + return (c = null), e; + }), + (i = oe.getText = function(e) { + var t, + n = '', + r = 0, + o = e.nodeType; + + if (o) { + if (1 === o || 9 === o || 11 === o) { + if ('string' == typeof e.textContent) return e.textContent; + + for (e = e.firstChild; e; e = e.nextSibling) n += i(e); + } else if (3 === o || 4 === o) return e.nodeValue; + } else while ((t = e[r++])) n += i(t); + + return n; + }), + ((r = oe.selectors = { + cacheLength: 50, + createPseudo: se, + match: V, + attrHandle: {}, + find: {}, + relative: { + '>': { + dir: 'parentNode', + first: !0, + }, + ' ': { + dir: 'parentNode', + }, + '+': { + dir: 'previousSibling', + first: !0, + }, + '~': { + dir: 'previousSibling', + }, + }, + preFilter: { + ATTR: function(e) { + return ( + (e[1] = e[1].replace(Z, ee)), + (e[3] = (e[3] || e[4] || e[5] || '').replace(Z, ee)), + '~=' === e[2] && (e[3] = ' ' + e[3] + ' '), + e.slice(0, 4) + ); + }, + CHILD: function(e) { + return ( + (e[1] = e[1].toLowerCase()), + 'nth' === e[1].slice(0, 3) + ? (e[3] || oe.error(e[0]), + (e[4] = +(e[4] + ? e[5] + (e[6] || 1) + : 2 * ('even' === e[3] || 'odd' === e[3]))), + (e[5] = +(e[7] + e[8] || 'odd' === e[3]))) + : e[3] && oe.error(e[0]), + e + ); + }, + PSEUDO: function(e) { + var t, + n = !e[6] && e[2]; + return V.CHILD.test(e[0]) + ? null + : (e[3] + ? (e[2] = e[4] || e[5] || '') + : n && + X.test(n) && + (t = a(n, !0)) && + (t = n.indexOf(')', n.length - t) - n.length) && + ((e[0] = e[0].slice(0, t)), (e[2] = n.slice(0, t))), + e.slice(0, 3)); + }, + }, + filter: { + TAG: function(e) { + var t = e.replace(Z, ee).toLowerCase(); + return '*' === e + ? function() { + return !0; + } + : function(e) { + return e.nodeName && e.nodeName.toLowerCase() === t; + }; + }, + CLASS: function(e) { + var t = E[e + ' ']; + return ( + t || + ((t = new RegExp('(^|' + M + ')' + e + '(' + M + '|$)')) && + E(e, function(e) { + return t.test( + ('string' == typeof e.className && e.className) || + ('undefined' != typeof e.getAttribute && + e.getAttribute('class')) || + '' + ); + })) + ); + }, + ATTR: function(e, t, n) { + return function(r) { + var i = oe.attr(r, e); + return null == i + ? '!=' === t + : !t || + ((i += ''), + '=' === t + ? i === n + : '!=' === t + ? i !== n + : '^=' === t + ? n && 0 === i.indexOf(n) + : '*=' === t + ? n && i.indexOf(n) > -1 + : '$=' === t + ? n && i.slice(-n.length) === n + : '~=' === t + ? (' ' + i.replace($, ' ') + ' ').indexOf(n) > -1 + : '|=' === t && + (i === n || i.slice(0, n.length + 1) === n + '-')); + }; + }, + CHILD: function(e, t, n, r, i) { + var o = 'nth' !== e.slice(0, 3), + a = 'last' !== e.slice(-4), + s = 'of-type' === t; + return 1 === r && 0 === i + ? function(e) { + return !!e.parentNode; + } + : function(t, n, u) { + var l, + c, + f, + p, + d, + h, + g = o !== a ? 'nextSibling' : 'previousSibling', + y = t.parentNode, + v = s && t.nodeName.toLowerCase(), + m = !u && !s, + x = !1; + + if (y) { + if (o) { + while (g) { + p = t; + + while ((p = p[g])) + if ( + s + ? p.nodeName.toLowerCase() === v + : 1 === p.nodeType + ) + return !1; + + h = g = 'only' === e && !h && 'nextSibling'; + } + + return !0; + } + + if (((h = [a ? y.firstChild : y.lastChild]), a && m)) { + (x = + (d = + (l = + (c = + (f = (p = y)[b] || (p[b] = {}))[p.uniqueID] || + (f[p.uniqueID] = {}))[e] || [])[0] === T && + l[1]) && l[2]), + (p = d && y.childNodes[d]); + + while ( + (p = (++d && p && p[g]) || (x = d = 0) || h.pop()) + ) + if (1 === p.nodeType && ++x && p === t) { + c[e] = [T, d, x]; + break; + } + } else if ( + (m && + (x = d = + (l = + (c = + (f = (p = t)[b] || (p[b] = {}))[p.uniqueID] || + (f[p.uniqueID] = {}))[e] || [])[0] === T && + l[1]), + !1 === x) + ) + while ( + (p = (++d && p && p[g]) || (x = d = 0) || h.pop()) + ) + if ( + (s + ? p.nodeName.toLowerCase() === v + : 1 === p.nodeType) && + ++x && + (m && + ((c = + (f = p[b] || (p[b] = {}))[p.uniqueID] || + (f[p.uniqueID] = {}))[e] = [T, x]), + p === t) + ) + break; + + return (x -= i) === r || (x % r == 0 && x / r >= 0); + } + }; + }, + PSEUDO: function(e, t) { + var n, + i = + r.pseudos[e] || + r.setFilters[e.toLowerCase()] || + oe.error('unsupported pseudo: ' + e); + return i[b] + ? i(t) + : i.length > 1 + ? ((n = [e, e, '', t]), + r.setFilters.hasOwnProperty(e.toLowerCase()) + ? se(function(e, n) { + var r, + o = i(e, t), + a = o.length; + + while (a--) e[(r = O(e, o[a]))] = !(n[r] = o[a]); + }) + : function(e) { + return i(e, 0, n); + }) + : i; + }, + }, + pseudos: { + not: se(function(e) { + var t = [], + n = [], + r = s(e.replace(B, '$1')); + return r[b] + ? se(function(e, t, n, i) { + var o, + a = r(e, null, i, []), + s = e.length; + + while (s--) (o = a[s]) && (e[s] = !(t[s] = o)); + }) + : function(e, i, o) { + return ( + (t[0] = e), r(t, null, o, n), (t[0] = null), !n.pop() + ); + }; + }), + has: se(function(e) { + return function(t) { + return oe(e, t).length > 0; + }; + }), + contains: se(function(e) { + return ( + (e = e.replace(Z, ee)), + function(t) { + return ( + (t.textContent || t.innerText || i(t)).indexOf(e) > -1 + ); + } + ); + }), + lang: se(function(e) { + return ( + U.test(e || '') || oe.error('unsupported lang: ' + e), + (e = e.replace(Z, ee).toLowerCase()), + function(t) { + var n; + + do { + if ( + (n = g + ? t.lang + : t.getAttribute('xml:lang') || + t.getAttribute('lang')) + ) + return ( + (n = n.toLowerCase()) === e || + 0 === n.indexOf(e + '-') + ); + } while ((t = t.parentNode) && 1 === t.nodeType); + + return !1; + } + ); + }), + target: function(t) { + var n = e.location && e.location.hash; + return n && n.slice(1) === t.id; + }, + root: function(e) { + return e === h; + }, + focus: function(e) { + return ( + e === d.activeElement && + (!d.hasFocus || d.hasFocus()) && + !!(e.type || e.href || ~e.tabIndex) + ); + }, + enabled: de(!1), + disabled: de(!0), + checked: function(e) { + var t = e.nodeName.toLowerCase(); + return ( + ('input' === t && !!e.checked) || + ('option' === t && !!e.selected) + ); + }, + selected: function(e) { + return ( + e.parentNode && e.parentNode.selectedIndex, !0 === e.selected + ); + }, + empty: function(e) { + for (e = e.firstChild; e; e = e.nextSibling) + if (e.nodeType < 6) return !1; + + return !0; + }, + parent: function(e) { + return !r.pseudos.empty(e); + }, + header: function(e) { + return Y.test(e.nodeName); + }, + input: function(e) { + return G.test(e.nodeName); + }, + button: function(e) { + var t = e.nodeName.toLowerCase(); + return ('input' === t && 'button' === e.type) || 'button' === t; + }, + text: function(e) { + var t; + return ( + 'input' === e.nodeName.toLowerCase() && + 'text' === e.type && + (null == (t = e.getAttribute('type')) || + 'text' === t.toLowerCase()) + ); + }, + first: he(function() { + return [0]; + }), + last: he(function(e, t) { + return [t - 1]; + }), + eq: he(function(e, t, n) { + return [n < 0 ? n + t : n]; + }), + even: he(function(e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + + return e; + }), + odd: he(function(e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + + return e; + }), + lt: he(function(e, t, n) { + for (var r = n < 0 ? n + t : n; --r >= 0; ) e.push(r); + + return e; + }), + gt: he(function(e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); + + return e; + }), + }, + }).pseudos.nth = r.pseudos.eq); + + for (t in { + radio: !0, + checkbox: !0, + file: !0, + password: !0, + image: !0, + }) + r.pseudos[t] = fe(t); + + for (t in { + submit: !0, + reset: !0, + }) + r.pseudos[t] = pe(t); + + function ye() {} + + (ye.prototype = r.filters = r.pseudos), + (r.setFilters = new ye()), + (a = oe.tokenize = function(e, t) { + var n, + i, + o, + a, + s, + u, + l, + c = k[e + ' ']; + if (c) return t ? 0 : c.slice(0); + (s = e), (u = []), (l = r.preFilter); + + while (s) { + (n && !(i = F.exec(s))) || + (i && (s = s.slice(i[0].length) || s), u.push((o = []))), + (n = !1), + (i = _.exec(s)) && + ((n = i.shift()), + o.push({ + value: n, + type: i[0].replace(B, ' '), + }), + (s = s.slice(n.length))); + + for (a in r.filter) + !(i = V[a].exec(s)) || + (l[a] && !(i = l[a](i))) || + ((n = i.shift()), + o.push({ + value: n, + type: a, + matches: i, + }), + (s = s.slice(n.length))); + + if (!n) break; + } + + return t ? s.length : s ? oe.error(e) : k(e, u).slice(0); + }); + + function ve(e) { + for (var t = 0, n = e.length, r = ''; t < n; t++) r += e[t].value; + + return r; + } + + function me(e, t, n) { + var r = t.dir, + i = t.next, + o = i || r, + a = n && 'parentNode' === o, + s = C++; + return t.first + ? function(t, n, i) { + while ((t = t[r])) if (1 === t.nodeType || a) return e(t, n, i); + + return !1; + } + : function(t, n, u) { + var l, + c, + f, + p = [T, s]; + + if (u) { + while ((t = t[r])) + if ((1 === t.nodeType || a) && e(t, n, u)) return !0; + } else + while ((t = t[r])) + if (1 === t.nodeType || a) + if ( + ((f = t[b] || (t[b] = {})), + (c = f[t.uniqueID] || (f[t.uniqueID] = {})), + i && i === t.nodeName.toLowerCase()) + ) + t = t[r] || t; + else { + if ((l = c[o]) && l[0] === T && l[1] === s) + return (p[2] = l[2]); + if (((c[o] = p), (p[2] = e(t, n, u)))) return !0; + } + + return !1; + }; + } + + function xe(e) { + return e.length > 1 + ? function(t, n, r) { + var i = e.length; + + while (i--) if (!e[i](t, n, r)) return !1; + + return !0; + } + : e[0]; + } + + function be(e, t, n) { + for (var r = 0, i = t.length; r < i; r++) oe(e, t[r], n); + + return n; + } + + function we(e, t, n, r, i) { + for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++) + (o = e[s]) && ((n && !n(o, r, i)) || (a.push(o), l && t.push(s))); + + return a; + } + + function Te(e, t, n, r, i, o) { + return ( + r && !r[b] && (r = Te(r)), + i && !i[b] && (i = Te(i, o)), + se(function(o, a, s, u) { + var l, + c, + f, + p = [], + d = [], + h = a.length, + g = o || be(t || '*', s.nodeType ? [s] : s, []), + y = !e || (!o && t) ? g : we(g, p, e, s, u), + v = n ? (i || (o ? e : h || r) ? [] : a) : y; + + if ((n && n(y, v, s, u), r)) { + (l = we(v, d)), r(l, [], s, u), (c = l.length); + + while (c--) (f = l[c]) && (v[d[c]] = !(y[d[c]] = f)); + } + + if (o) { + if (i || e) { + if (i) { + (l = []), (c = v.length); + + while (c--) (f = v[c]) && l.push((y[c] = f)); + + i(null, (v = []), l, u); + } + + c = v.length; + + while (c--) + (f = v[c]) && + (l = i ? O(o, f) : p[c]) > -1 && + (o[l] = !(a[l] = f)); + } + } else (v = we(v === a ? v.splice(h, v.length) : v)), i ? i(null, a, v, u) : L.apply(a, v); + }) + ); + } + + function Ce(e) { + for ( + var t, + n, + i, + o = e.length, + a = r.relative[e[0].type], + s = a || r.relative[' '], + u = a ? 1 : 0, + c = me( + function(e) { + return e === t; + }, + s, + !0 + ), + f = me( + function(e) { + return O(t, e) > -1; + }, + s, + !0 + ), + p = [ + function(e, n, r) { + var i = + (!a && (r || n !== l)) || + ((t = n).nodeType ? c(e, n, r) : f(e, n, r)); + return (t = null), i; + }, + ]; + u < o; + u++ + ) + if ((n = r.relative[e[u].type])) p = [me(xe(p), n)]; + else { + if ((n = r.filter[e[u].type].apply(null, e[u].matches))[b]) { + for (i = ++u; i < o; i++) if (r.relative[e[i].type]) break; + + return Te( + u > 1 && xe(p), + u > 1 && + ve( + e.slice(0, u - 1).concat({ + value: ' ' === e[u - 2].type ? '*' : '', + }) + ).replace(B, '$1'), + n, + u < i && Ce(e.slice(u, i)), + i < o && Ce((e = e.slice(i))), + i < o && ve(e) + ); + } + + p.push(n); + } + + return xe(p); + } + + function Ee(e, t) { + var n = t.length > 0, + i = e.length > 0, + o = function(o, a, s, u, c) { + var f, + h, + y, + v = 0, + m = '0', + x = o && [], + b = [], + w = l, + C = o || (i && r.find.TAG('*', c)), + E = (T += null == w ? 1 : Math.random() || 0.1), + k = C.length; + + for ( + c && (l = a === d || a || c); + m !== k && null != (f = C[m]); + m++ + ) { + if (i && f) { + (h = 0), a || f.ownerDocument === d || (p(f), (s = !g)); + + while ((y = e[h++])) + if (y(f, a || d, s)) { + u.push(f); + break; + } + + c && (T = E); + } + + n && ((f = !y && f) && v--, o && x.push(f)); + } + + if (((v += m), n && m !== v)) { + h = 0; + + while ((y = t[h++])) y(x, b, a, s); + + if (o) { + if (v > 0) while (m--) x[m] || b[m] || (b[m] = j.call(u)); + b = we(b); + } + + L.apply(u, b), + c && + !o && + b.length > 0 && + v + t.length > 1 && + oe.uniqueSort(u); + } + + return c && ((T = E), (l = w)), x; + }; + + return n ? se(o) : o; + } + + return ( + (s = oe.compile = function(e, t) { + var n, + r = [], + i = [], + o = S[e + ' ']; + + if (!o) { + t || (t = a(e)), (n = t.length); + + while (n--) (o = Ce(t[n]))[b] ? r.push(o) : i.push(o); + + (o = S(e, Ee(i, r))).selector = e; + } + + return o; + }), + (u = oe.select = function(e, t, n, i) { + var o, + u, + l, + c, + f, + p = 'function' == typeof e && e, + d = !i && a((e = p.selector || e)); + + if (((n = n || []), 1 === d.length)) { + if ( + (u = d[0] = d[0].slice(0)).length > 2 && + 'ID' === (l = u[0]).type && + 9 === t.nodeType && + g && + r.relative[u[1].type] + ) { + if (!(t = (r.find.ID(l.matches[0].replace(Z, ee), t) || [])[0])) + return n; + p && (t = t.parentNode), (e = e.slice(u.shift().value.length)); + } + + o = V.needsContext.test(e) ? 0 : u.length; + + while (o--) { + if (((l = u[o]), r.relative[(c = l.type)])) break; + + if ( + (f = r.find[c]) && + (i = f( + l.matches[0].replace(Z, ee), + (K.test(u[0].type) && ge(t.parentNode)) || t + )) + ) { + if ((u.splice(o, 1), !(e = i.length && ve(u)))) + return L.apply(n, i), n; + break; + } + } + } + + return ( + (p || s(e, d))( + i, + t, + !g, + n, + !t || (K.test(e) && ge(t.parentNode)) || t + ), + n + ); + }), + (n.sortStable = + b + .split('') + .sort(D) + .join('') === b), + (n.detectDuplicates = !!f), + p(), + (n.sortDetached = ue(function(e) { + return 1 & e.compareDocumentPosition(d.createElement('fieldset')); + })), + ue(function(e) { + return ( + (e.innerHTML = "<a href='#'></a>"), + '#' === e.firstChild.getAttribute('href') + ); + }) || + le('type|href|height|width', function(e, t, n) { + if (!n) + return e.getAttribute(t, 'type' === t.toLowerCase() ? 1 : 2); + }), + (n.attributes && + ue(function(e) { + return ( + (e.innerHTML = '<input/>'), + e.firstChild.setAttribute('value', ''), + '' === e.firstChild.getAttribute('value') + ); + })) || + le('value', function(e, t, n) { + if (!n && 'input' === e.nodeName.toLowerCase()) + return e.defaultValue; + }), + ue(function(e) { + return null == e.getAttribute('disabled'); + }) || + le(P, function(e, t, n) { + var r; + if (!n) + return !0 === e[t] + ? t.toLowerCase() + : (r = e.getAttributeNode(t)) && r.specified + ? r.value + : null; + }), + oe + ); + })(e); + + (w.find = E), + (w.expr = E.selectors), + (w.expr[':'] = w.expr.pseudos), + (w.uniqueSort = w.unique = E.uniqueSort), + (w.text = E.getText), + (w.isXMLDoc = E.isXML), + (w.contains = E.contains), + (w.escapeSelector = E.escape); + + var k = function(e, t, n) { + var r = [], + i = void 0 !== n; + + while ((e = e[t]) && 9 !== e.nodeType) + if (1 === e.nodeType) { + if (i && w(e).is(n)) break; + r.push(e); + } + + return r; + }, + S = function(e, t) { + for (var n = []; e; e = e.nextSibling) + 1 === e.nodeType && e !== t && n.push(e); + + return n; + }, + D = w.expr.match.needsContext; + + function N(e, t) { + return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase(); + } + + var A = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; + + function j(e, t, n) { + return g(t) + ? w.grep(e, function(e, r) { + return !!t.call(e, r, e) !== n; + }) + : t.nodeType + ? w.grep(e, function(e) { + return (e === t) !== n; + }) + : 'string' != typeof t + ? w.grep(e, function(e) { + return u.call(t, e) > -1 !== n; + }) + : w.filter(t, e, n); + } + + (w.filter = function(e, t, n) { + var r = t[0]; + return ( + n && (e = ':not(' + e + ')'), + 1 === t.length && 1 === r.nodeType + ? w.find.matchesSelector(r, e) + ? [r] + : [] + : w.find.matches( + e, + w.grep(t, function(e) { + return 1 === e.nodeType; + }) + ) + ); + }), + w.fn.extend({ + find: function(e) { + var t, + n, + r = this.length, + i = this; + if ('string' != typeof e) + return this.pushStack( + w(e).filter(function() { + for (t = 0; t < r; t++) if (w.contains(i[t], this)) return !0; + }) + ); + + for (n = this.pushStack([]), t = 0; t < r; t++) w.find(e, i[t], n); + + return r > 1 ? w.uniqueSort(n) : n; + }, + filter: function(e) { + return this.pushStack(j(this, e || [], !1)); + }, + not: function(e) { + return this.pushStack(j(this, e || [], !0)); + }, + is: function(e) { + return !!j( + this, + 'string' == typeof e && D.test(e) ? w(e) : e || [], + !1 + ).length; + }, + }); + var q, + L = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; + ((w.fn.init = function(e, t, n) { + var i, o; + if (!e) return this; + + if (((n = n || q), 'string' == typeof e)) { + if ( + !(i = + '<' === e[0] && '>' === e[e.length - 1] && e.length >= 3 + ? [null, e, null] + : L.exec(e)) || + (!i[1] && t) + ) + return !t || t.jquery + ? (t || n).find(e) + : this.constructor(t).find(e); + + if (i[1]) { + if ( + ((t = t instanceof w ? t[0] : t), + w.merge( + this, + w.parseHTML( + i[1], + t && t.nodeType ? t.ownerDocument || t : r, + !0 + ) + ), + A.test(i[1]) && w.isPlainObject(t)) + ) + for (i in t) g(this[i]) ? this[i](t[i]) : this.attr(i, t[i]); + return this; + } + + return ( + (o = r.getElementById(i[2])) && ((this[0] = o), (this.length = 1)), + this + ); + } + + return e.nodeType + ? ((this[0] = e), (this.length = 1), this) + : g(e) + ? void 0 !== n.ready + ? n.ready(e) + : e(w) + : w.makeArray(e, this); + }).prototype = w.fn), + (q = w(r)); + var H = /^(?:parents|prev(?:Until|All))/, + O = { + children: !0, + contents: !0, + next: !0, + prev: !0, + }; + w.fn.extend({ + has: function(e) { + var t = w(e, this), + n = t.length; + return this.filter(function() { + for (var e = 0; e < n; e++) if (w.contains(this, t[e])) return !0; + }); + }, + closest: function(e, t) { + var n, + r = 0, + i = this.length, + o = [], + a = 'string' != typeof e && w(e); + if (!D.test(e)) + for (; r < i; r++) + for (n = this[r]; n && n !== t; n = n.parentNode) + if ( + n.nodeType < 11 && + (a + ? a.index(n) > -1 + : 1 === n.nodeType && w.find.matchesSelector(n, e)) + ) { + o.push(n); + break; + } + return this.pushStack(o.length > 1 ? w.uniqueSort(o) : o); + }, + index: function(e) { + return e + ? 'string' == typeof e + ? u.call(w(e), this[0]) + : u.call(this, e.jquery ? e[0] : e) + : this[0] && this[0].parentNode + ? this.first().prevAll().length + : -1; + }, + add: function(e, t) { + return this.pushStack(w.uniqueSort(w.merge(this.get(), w(e, t)))); + }, + addBack: function(e) { + return this.add( + null == e ? this.prevObject : this.prevObject.filter(e) + ); + }, + }); + + function P(e, t) { + while ((e = e[t]) && 1 !== e.nodeType); + + return e; + } + + w.each( + { + parent: function(e) { + var t = e.parentNode; + return t && 11 !== t.nodeType ? t : null; + }, + parents: function(e) { + return k(e, 'parentNode'); + }, + parentsUntil: function(e, t, n) { + return k(e, 'parentNode', n); + }, + next: function(e) { + return P(e, 'nextSibling'); + }, + prev: function(e) { + return P(e, 'previousSibling'); + }, + nextAll: function(e) { + return k(e, 'nextSibling'); + }, + prevAll: function(e) { + return k(e, 'previousSibling'); + }, + nextUntil: function(e, t, n) { + return k(e, 'nextSibling', n); + }, + prevUntil: function(e, t, n) { + return k(e, 'previousSibling', n); + }, + siblings: function(e) { + return S((e.parentNode || {}).firstChild, e); + }, + children: function(e) { + return S(e.firstChild); + }, + contents: function(e) { + return N(e, 'iframe') + ? e.contentDocument + : (N(e, 'template') && (e = e.content || e), + w.merge([], e.childNodes)); + }, + }, + function(e, t) { + w.fn[e] = function(n, r) { + var i = w.map(this, t, n); + return ( + 'Until' !== e.slice(-5) && (r = n), + r && 'string' == typeof r && (i = w.filter(r, i)), + this.length > 1 && + (O[e] || w.uniqueSort(i), H.test(e) && i.reverse()), + this.pushStack(i) + ); + }; + } + ); + var M = /[^\x20\t\r\n\f]+/g; + + function R(e) { + var t = {}; + return ( + w.each(e.match(M) || [], function(e, n) { + t[n] = !0; + }), + t + ); + } + + w.Callbacks = function(e) { + e = 'string' == typeof e ? R(e) : w.extend({}, e); + + var t, + n, + r, + i, + o = [], + a = [], + s = -1, + u = function() { + for (i = i || e.once, r = t = !0; a.length; s = -1) { + n = a.shift(); + + while (++s < o.length) + !1 === o[s].apply(n[0], n[1]) && + e.stopOnFalse && + ((s = o.length), (n = !1)); + } + + e.memory || (n = !1), (t = !1), i && (o = n ? [] : ''); + }, + l = { + add: function() { + return ( + o && + (n && !t && ((s = o.length - 1), a.push(n)), + (function t(n) { + w.each(n, function(n, r) { + g(r) + ? (e.unique && l.has(r)) || o.push(r) + : r && r.length && 'string' !== x(r) && t(r); + }); + })(arguments), + n && !t && u()), + this + ); + }, + remove: function() { + return ( + w.each(arguments, function(e, t) { + var n; + + while ((n = w.inArray(t, o, n)) > -1) + o.splice(n, 1), n <= s && s--; + }), + this + ); + }, + has: function(e) { + return e ? w.inArray(e, o) > -1 : o.length > 0; + }, + empty: function() { + return o && (o = []), this; + }, + disable: function() { + return (i = a = []), (o = n = ''), this; + }, + disabled: function() { + return !o; + }, + lock: function() { + return (i = a = []), n || t || (o = n = ''), this; + }, + locked: function() { + return !!i; + }, + fireWith: function(e, n) { + return ( + i || + ((n = [e, (n = n || []).slice ? n.slice() : n]), + a.push(n), + t || u()), + this + ); + }, + fire: function() { + return l.fireWith(this, arguments), this; + }, + fired: function() { + return !!r; + }, + }; + + return l; + }; + + function I(e) { + return e; + } + + function W(e) { + throw e; + } + + function $(e, t, n, r) { + var i; + + try { + e && g((i = e.promise)) + ? i + .call(e) + .done(t) + .fail(n) + : e && g((i = e.then)) + ? i.call(e, t, n) + : t.apply(void 0, [e].slice(r)); + } catch (e) { + n.apply(void 0, [e]); + } + } + + w.extend({ + Deferred: function(t) { + var n = [ + [ + 'notify', + 'progress', + w.Callbacks('memory'), + w.Callbacks('memory'), + 2, + ], + [ + 'resolve', + 'done', + w.Callbacks('once memory'), + w.Callbacks('once memory'), + 0, + 'resolved', + ], + [ + 'reject', + 'fail', + w.Callbacks('once memory'), + w.Callbacks('once memory'), + 1, + 'rejected', + ], + ], + r = 'pending', + i = { + state: function() { + return r; + }, + always: function() { + return o.done(arguments).fail(arguments), this; + }, + catch: function(e) { + return i.then(null, e); + }, + pipe: function() { + var e = arguments; + return w + .Deferred(function(t) { + w.each(n, function(n, r) { + var i = g(e[r[4]]) && e[r[4]]; + o[r[1]](function() { + var e = i && i.apply(this, arguments); + e && g(e.promise) + ? e + .promise() + .progress(t.notify) + .done(t.resolve) + .fail(t.reject) + : t[r[0] + 'With'](this, i ? [e] : arguments); + }); + }), + (e = null); + }) + .promise(); + }, + then: function(t, r, i) { + var o = 0; + + function a(t, n, r, i) { + return function() { + var s = this, + u = arguments, + l = function() { + var e, l; + + if (!(t < o)) { + if ((e = r.apply(s, u)) === n.promise()) + throw new TypeError('Thenable self-resolution'); + (l = + e && + ('object' == typeof e || 'function' == typeof e) && + e.then), + g(l) + ? i + ? l.call(e, a(o, n, I, i), a(o, n, W, i)) + : (o++, + l.call( + e, + a(o, n, I, i), + a(o, n, W, i), + a(o, n, I, n.notifyWith) + )) + : (r !== I && ((s = void 0), (u = [e])), + (i || n.resolveWith)(s, u)); + } + }, + c = i + ? l + : function() { + try { + l(); + } catch (e) { + w.Deferred.exceptionHook && + w.Deferred.exceptionHook(e, c.stackTrace), + t + 1 >= o && + (r !== W && ((s = void 0), (u = [e])), + n.rejectWith(s, u)); + } + }; + + t + ? c() + : (w.Deferred.getStackHook && + (c.stackTrace = w.Deferred.getStackHook()), + e.setTimeout(c)); + }; + } + + return w + .Deferred(function(e) { + n[0][3].add(a(0, e, g(i) ? i : I, e.notifyWith)), + n[1][3].add(a(0, e, g(t) ? t : I)), + n[2][3].add(a(0, e, g(r) ? r : W)); + }) + .promise(); + }, + promise: function(e) { + return null != e ? w.extend(e, i) : i; + }, + }, + o = {}; + return ( + w.each(n, function(e, t) { + var a = t[2], + s = t[5]; + (i[t[1]] = a.add), + s && + a.add( + function() { + r = s; + }, + n[3 - e][2].disable, + n[3 - e][3].disable, + n[0][2].lock, + n[0][3].lock + ), + a.add(t[3].fire), + (o[t[0]] = function() { + return ( + o[t[0] + 'With'](this === o ? void 0 : this, arguments), + this + ); + }), + (o[t[0] + 'With'] = a.fireWith); + }), + i.promise(o), + t && t.call(o, o), + o + ); + }, + when: function(e) { + var t = arguments.length, + n = t, + r = Array(n), + i = o.call(arguments), + a = w.Deferred(), + s = function(e) { + return function(n) { + (r[e] = this), + (i[e] = arguments.length > 1 ? o.call(arguments) : n), + --t || a.resolveWith(r, i); + }; + }; + + if ( + t <= 1 && + ($(e, a.done(s(n)).resolve, a.reject, !t), + 'pending' === a.state() || g(i[n] && i[n].then)) + ) + return a.then(); + + while (n--) $(i[n], s(n), a.reject); + + return a.promise(); + }, + }); + var B = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + (w.Deferred.exceptionHook = function(t, n) { + e.console && + e.console.warn && + t && + B.test(t.name) && + e.console.warn('jQuery.Deferred exception: ' + t.message, t.stack, n); + }), + (w.readyException = function(t) { + e.setTimeout(function() { + throw t; + }); + }); + var F = w.Deferred(); + (w.fn.ready = function(e) { + return ( + F.then(e)['catch'](function(e) { + w.readyException(e); + }), + this + ); + }), + w.extend({ + isReady: !1, + readyWait: 1, + ready: function(e) { + (!0 === e ? --w.readyWait : w.isReady) || + ((w.isReady = !0), + (!0 !== e && --w.readyWait > 0) || F.resolveWith(r, [w])); + }, + }), + (w.ready.then = F.then); + + function _() { + r.removeEventListener('DOMContentLoaded', _), + e.removeEventListener('load', _), + w.ready(); + } + + 'complete' === r.readyState || + ('loading' !== r.readyState && !r.documentElement.doScroll) + ? e.setTimeout(w.ready) + : (r.addEventListener('DOMContentLoaded', _), + e.addEventListener('load', _)); + + var z = function(e, t, n, r, i, o, a) { + var s = 0, + u = e.length, + l = null == n; + + if ('object' === x(n)) { + i = !0; + + for (s in n) z(e, t, s, n[s], !0, o, a); + } else if ( + void 0 !== r && + ((i = !0), + g(r) || (a = !0), + l && + (a + ? (t.call(e, r), (t = null)) + : ((l = t), + (t = function(e, t, n) { + return l.call(w(e), n); + }))), + t) + ) + for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n))); + + return i ? e : l ? t.call(e) : u ? t(e[0], n) : o; + }, + X = /^-ms-/, + U = /-([a-z])/g; + + function V(e, t) { + return t.toUpperCase(); + } + + function G(e) { + return e.replace(X, 'ms-').replace(U, V); + } + + var Y = function(e) { + return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType; + }; + + function Q() { + this.expando = w.expando + Q.uid++; + } + + (Q.uid = 1), + (Q.prototype = { + cache: function(e) { + var t = e[this.expando]; + return ( + t || + ((t = {}), + Y(e) && + (e.nodeType + ? (e[this.expando] = t) + : Object.defineProperty(e, this.expando, { + value: t, + configurable: !0, + }))), + t + ); + }, + set: function(e, t, n) { + var r, + i = this.cache(e); + if ('string' == typeof t) i[G(t)] = n; + else for (r in t) i[G(r)] = t[r]; + return i; + }, + get: function(e, t) { + return void 0 === t + ? this.cache(e) + : e[this.expando] && e[this.expando][G(t)]; + }, + access: function(e, t, n) { + return void 0 === t || (t && 'string' == typeof t && void 0 === n) + ? this.get(e, t) + : (this.set(e, t, n), void 0 !== n ? n : t); + }, + remove: function(e, t) { + var n, + r = e[this.expando]; + + if (void 0 !== r) { + if (void 0 !== t) { + n = (t = Array.isArray(t) + ? t.map(G) + : (t = G(t)) in r + ? [t] + : t.match(M) || []).length; + + while (n--) delete r[t[n]]; + } + + (void 0 === t || w.isEmptyObject(r)) && + (e.nodeType + ? (e[this.expando] = void 0) + : delete e[this.expando]); + } + }, + hasData: function(e) { + var t = e[this.expando]; + return void 0 !== t && !w.isEmptyObject(t); + }, + }); + var J = new Q(), + K = new Q(), + Z = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + ee = /[A-Z]/g; + + function te(e) { + return ( + 'true' === e || + ('false' !== e && + ('null' === e + ? null + : e === +e + '' + ? +e + : Z.test(e) + ? JSON.parse(e) + : e)) + ); + } + + function ne(e, t, n) { + var r; + if (void 0 === n && 1 === e.nodeType) + if ( + ((r = 'data-' + t.replace(ee, '-$&').toLowerCase()), + 'string' == typeof (n = e.getAttribute(r))) + ) { + try { + n = te(n); + } catch (e) {} + + K.set(e, t, n); + } else n = void 0; + return n; + } + + w.extend({ + hasData: function(e) { + return K.hasData(e) || J.hasData(e); + }, + data: function(e, t, n) { + return K.access(e, t, n); + }, + removeData: function(e, t) { + K.remove(e, t); + }, + _data: function(e, t, n) { + return J.access(e, t, n); + }, + _removeData: function(e, t) { + J.remove(e, t); + }, + }), + w.fn.extend({ + data: function(e, t) { + var n, + r, + i, + o = this[0], + a = o && o.attributes; + + if (void 0 === e) { + if ( + this.length && + ((i = K.get(o)), 1 === o.nodeType && !J.get(o, 'hasDataAttrs')) + ) { + n = a.length; + + while (n--) + a[n] && + 0 === (r = a[n].name).indexOf('data-') && + ((r = G(r.slice(5))), ne(o, r, i[r])); + + J.set(o, 'hasDataAttrs', !0); + } + + return i; + } + + return 'object' == typeof e + ? this.each(function() { + K.set(this, e); + }) + : z( + this, + function(t) { + var n; + + if (o && void 0 === t) { + if (void 0 !== (n = K.get(o, e))) return n; + if (void 0 !== (n = ne(o, e))) return n; + } else + this.each(function() { + K.set(this, e, t); + }); + }, + null, + t, + arguments.length > 1, + null, + !0 + ); + }, + removeData: function(e) { + return this.each(function() { + K.remove(this, e); + }); + }, + }), + w.extend({ + queue: function(e, t, n) { + var r; + if (e) + return ( + (t = (t || 'fx') + 'queue'), + (r = J.get(e, t)), + n && + (!r || Array.isArray(n) + ? (r = J.access(e, t, w.makeArray(n))) + : r.push(n)), + r || [] + ); + }, + dequeue: function(e, t) { + t = t || 'fx'; + + var n = w.queue(e, t), + r = n.length, + i = n.shift(), + o = w._queueHooks(e, t), + a = function() { + w.dequeue(e, t); + }; + + 'inprogress' === i && ((i = n.shift()), r--), + i && + ('fx' === t && n.unshift('inprogress'), + delete o.stop, + i.call(e, a, o)), + !r && o && o.empty.fire(); + }, + _queueHooks: function(e, t) { + var n = t + 'queueHooks'; + return ( + J.get(e, n) || + J.access(e, n, { + empty: w.Callbacks('once memory').add(function() { + J.remove(e, [t + 'queue', n]); + }), + }) + ); + }, + }), + w.fn.extend({ + queue: function(e, t) { + var n = 2; + return ( + 'string' != typeof e && ((t = e), (e = 'fx'), n--), + arguments.length < n + ? w.queue(this[0], e) + : void 0 === t + ? this + : this.each(function() { + var n = w.queue(this, e, t); + w._queueHooks(this, e), + 'fx' === e && 'inprogress' !== n[0] && w.dequeue(this, e); + }) + ); + }, + dequeue: function(e) { + return this.each(function() { + w.dequeue(this, e); + }); + }, + clearQueue: function(e) { + return this.queue(e || 'fx', []); + }, + promise: function(e, t) { + var n, + r = 1, + i = w.Deferred(), + o = this, + a = this.length, + s = function() { + --r || i.resolveWith(o, [o]); + }; + + 'string' != typeof e && ((t = e), (e = void 0)), (e = e || 'fx'); + + while (a--) + (n = J.get(o[a], e + 'queueHooks')) && + n.empty && + (r++, n.empty.add(s)); + + return s(), i.promise(t); + }, + }); + + var re = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + ie = new RegExp('^(?:([+-])=|)(' + re + ')([a-z%]*)$', 'i'), + oe = ['Top', 'Right', 'Bottom', 'Left'], + ae = function(e, t) { + return ( + 'none' === (e = t || e).style.display || + ('' === e.style.display && + w.contains(e.ownerDocument, e) && + 'none' === w.css(e, 'display')) + ); + }, + se = function(e, t, n, r) { + var i, + o, + a = {}; + + for (o in t) (a[o] = e.style[o]), (e.style[o] = t[o]); + + i = n.apply(e, r || []); + + for (o in t) e.style[o] = a[o]; + + return i; + }; + + function ue(e, t, n, r) { + var i, + o, + a = 20, + s = r + ? function() { + return r.cur(); + } + : function() { + return w.css(e, t, ''); + }, + u = s(), + l = (n && n[3]) || (w.cssNumber[t] ? '' : 'px'), + c = (w.cssNumber[t] || ('px' !== l && +u)) && ie.exec(w.css(e, t)); + + if (c && c[3] !== l) { + (u /= 2), (l = l || c[3]), (c = +u || 1); + + while (a--) + w.style(e, t, c + l), + (1 - o) * (1 - (o = s() / u || 0.5)) <= 0 && (a = 0), + (c /= o); + + (c *= 2), w.style(e, t, c + l), (n = n || []); + } + + return ( + n && + ((c = +c || +u || 0), + (i = n[1] ? c + (n[1] + 1) * n[2] : +n[2]), + r && ((r.unit = l), (r.start = c), (r.end = i))), + i + ); + } + + var le = {}; + + function ce(e) { + var t, + n = e.ownerDocument, + r = e.nodeName, + i = le[r]; + return ( + i || + ((t = n.body.appendChild(n.createElement(r))), + (i = w.css(t, 'display')), + t.parentNode.removeChild(t), + 'none' === i && (i = 'block'), + (le[r] = i), + i) + ); + } + + function fe(e, t) { + for (var n, r, i = [], o = 0, a = e.length; o < a; o++) + (r = e[o]).style && + ((n = r.style.display), + t + ? ('none' === n && + ((i[o] = J.get(r, 'display') || null), + i[o] || (r.style.display = '')), + '' === r.style.display && ae(r) && (i[o] = ce(r))) + : 'none' !== n && ((i[o] = 'none'), J.set(r, 'display', n))); + + for (o = 0; o < a; o++) null != i[o] && (e[o].style.display = i[o]); + + return e; + } + + w.fn.extend({ + show: function() { + return fe(this, !0); + }, + hide: function() { + return fe(this); + }, + toggle: function(e) { + return 'boolean' == typeof e + ? e + ? this.show() + : this.hide() + : this.each(function() { + ae(this) ? w(this).show() : w(this).hide(); + }); + }, + }); + var pe = /^(?:checkbox|radio)$/i, + de = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, + he = /^$|^module$|\/(?:java|ecma)script/i, + ge = { + option: [1, "<select multiple='multiple'>", '</select>'], + thead: [1, '<table>', '</table>'], + col: [2, '<table><colgroup>', '</colgroup></table>'], + tr: [2, '<table><tbody>', '</tbody></table>'], + td: [3, '<table><tbody><tr>', '</tr></tbody></table>'], + _default: [0, '', ''], + }; + (ge.optgroup = ge.option), + (ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead), + (ge.th = ge.td); + + function ye(e, t) { + var n; + return ( + (n = + 'undefined' != typeof e.getElementsByTagName + ? e.getElementsByTagName(t || '*') + : 'undefined' != typeof e.querySelectorAll + ? e.querySelectorAll(t || '*') + : []), + void 0 === t || (t && N(e, t)) ? w.merge([e], n) : n + ); + } + + function ve(e, t) { + for (var n = 0, r = e.length; n < r; n++) + J.set(e[n], 'globalEval', !t || J.get(t[n], 'globalEval')); + } + + var me = /<|&#?\w+;/; + + function xe(e, t, n, r, i) { + for ( + var o, + a, + s, + u, + l, + c, + f = t.createDocumentFragment(), + p = [], + d = 0, + h = e.length; + d < h; + d++ + ) + if ((o = e[d]) || 0 === o) + if ('object' === x(o)) w.merge(p, o.nodeType ? [o] : o); + else if (me.test(o)) { + (a = a || f.appendChild(t.createElement('div'))), + (s = (de.exec(o) || ['', ''])[1].toLowerCase()), + (u = ge[s] || ge._default), + (a.innerHTML = u[1] + w.htmlPrefilter(o) + u[2]), + (c = u[0]); + + while (c--) a = a.lastChild; + + w.merge(p, a.childNodes), ((a = f.firstChild).textContent = ''); + } else p.push(t.createTextNode(o)); + + (f.textContent = ''), (d = 0); + + while ((o = p[d++])) + if (r && w.inArray(o, r) > -1) i && i.push(o); + else if ( + ((l = w.contains(o.ownerDocument, o)), + (a = ye(f.appendChild(o), 'script')), + l && ve(a), + n) + ) { + c = 0; + + while ((o = a[c++])) he.test(o.type || '') && n.push(o); + } + + return f; + } + + !(function() { + var e = r.createDocumentFragment().appendChild(r.createElement('div')), + t = r.createElement('input'); + t.setAttribute('type', 'radio'), + t.setAttribute('checked', 'checked'), + t.setAttribute('name', 't'), + e.appendChild(t), + (h.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked), + (e.innerHTML = '<textarea>x</textarea>'), + (h.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue); + })(); + var be = r.documentElement, + we = /^key/, + Te = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + Ce = /^([^.]*)(?:\.(.+)|)/; + + function Ee() { + return !0; + } + + function ke() { + return !1; + } + + function Se() { + try { + return r.activeElement; + } catch (e) {} + } + + function De(e, t, n, r, i, o) { + var a, s; + + if ('object' == typeof t) { + 'string' != typeof n && ((r = r || n), (n = void 0)); + + for (s in t) De(e, s, n, r, t[s], o); + + return e; + } + + if ( + (null == r && null == i + ? ((i = n), (r = n = void 0)) + : null == i && + ('string' == typeof n + ? ((i = r), (r = void 0)) + : ((i = r), (r = n), (n = void 0))), + !1 === i) + ) + i = ke; + else if (!i) return e; + return ( + 1 === o && + ((a = i), + ((i = function(e) { + return w().off(e), a.apply(this, arguments); + }).guid = a.guid || (a.guid = w.guid++))), + e.each(function() { + w.event.add(this, t, i, r, n); + }) + ); + } + + (w.event = { + global: {}, + add: function(e, t, n, r, i) { + var o, + a, + s, + u, + l, + c, + f, + p, + d, + h, + g, + y = J.get(e); + + if (y) { + n.handler && ((n = (o = n).handler), (i = o.selector)), + i && w.find.matchesSelector(be, i), + n.guid || (n.guid = w.guid++), + (u = y.events) || (u = y.events = {}), + (a = y.handle) || + (a = y.handle = function(t) { + return 'undefined' != typeof w && w.event.triggered !== t.type + ? w.event.dispatch.apply(e, arguments) + : void 0; + }), + (l = (t = (t || '').match(M) || ['']).length); + + while (l--) + (d = g = (s = Ce.exec(t[l]) || [])[1]), + (h = (s[2] || '').split('.').sort()), + d && + ((f = w.event.special[d] || {}), + (d = (i ? f.delegateType : f.bindType) || d), + (f = w.event.special[d] || {}), + (c = w.extend( + { + type: d, + origType: g, + data: r, + handler: n, + guid: n.guid, + selector: i, + needsContext: i && w.expr.match.needsContext.test(i), + namespace: h.join('.'), + }, + o + )), + (p = u[d]) || + (((p = u[d] = []).delegateCount = 0), + (f.setup && !1 !== f.setup.call(e, r, h, a)) || + (e.addEventListener && e.addEventListener(d, a))), + f.add && + (f.add.call(e, c), + c.handler.guid || (c.handler.guid = n.guid)), + i ? p.splice(p.delegateCount++, 0, c) : p.push(c), + (w.event.global[d] = !0)); + } + }, + remove: function(e, t, n, r, i) { + var o, + a, + s, + u, + l, + c, + f, + p, + d, + h, + g, + y = J.hasData(e) && J.get(e); + + if (y && (u = y.events)) { + l = (t = (t || '').match(M) || ['']).length; + + while (l--) + if ( + ((s = Ce.exec(t[l]) || []), + (d = g = s[1]), + (h = (s[2] || '').split('.').sort()), + d) + ) { + (f = w.event.special[d] || {}), + (p = u[(d = (r ? f.delegateType : f.bindType) || d)] || []), + (s = + s[2] && + new RegExp( + '(^|\\.)' + h.join('\\.(?:.*\\.|)') + '(\\.|$)' + )), + (a = o = p.length); + + while (o--) + (c = p[o]), + (!i && g !== c.origType) || + (n && n.guid !== c.guid) || + (s && !s.test(c.namespace)) || + (r && r !== c.selector && ('**' !== r || !c.selector)) || + (p.splice(o, 1), + c.selector && p.delegateCount--, + f.remove && f.remove.call(e, c)); + + a && + !p.length && + ((f.teardown && !1 !== f.teardown.call(e, h, y.handle)) || + w.removeEvent(e, d, y.handle), + delete u[d]); + } else for (d in u) w.event.remove(e, d + t[l], n, r, !0); + + w.isEmptyObject(u) && J.remove(e, 'handle events'); + } + }, + dispatch: function(e) { + var t = w.event.fix(e), + n, + r, + i, + o, + a, + s, + u = new Array(arguments.length), + l = (J.get(this, 'events') || {})[t.type] || [], + c = w.event.special[t.type] || {}; + + for (u[0] = t, n = 1; n < arguments.length; n++) u[n] = arguments[n]; + + if ( + ((t.delegateTarget = this), + !c.preDispatch || !1 !== c.preDispatch.call(this, t)) + ) { + (s = w.event.handlers.call(this, t, l)), (n = 0); + + while ((o = s[n++]) && !t.isPropagationStopped()) { + (t.currentTarget = o.elem), (r = 0); + + while ( + (a = o.handlers[r++]) && + !t.isImmediatePropagationStopped() + ) + (t.rnamespace && !t.rnamespace.test(a.namespace)) || + ((t.handleObj = a), + (t.data = a.data), + void 0 !== + (i = ( + (w.event.special[a.origType] || {}).handle || a.handler + ).apply(o.elem, u)) && + !1 === (t.result = i) && + (t.preventDefault(), t.stopPropagation())); + } + + return c.postDispatch && c.postDispatch.call(this, t), t.result; + } + }, + handlers: function(e, t) { + var n, + r, + i, + o, + a, + s = [], + u = t.delegateCount, + l = e.target; + if (u && l.nodeType && !('click' === e.type && e.button >= 1)) + for (; l !== this; l = l.parentNode || this) + if ( + 1 === l.nodeType && + ('click' !== e.type || !0 !== l.disabled) + ) { + for (o = [], a = {}, n = 0; n < u; n++) + void 0 === a[(i = (r = t[n]).selector + ' ')] && + (a[i] = r.needsContext + ? w(i, this).index(l) > -1 + : w.find(i, this, null, [l]).length), + a[i] && o.push(r); + + o.length && + s.push({ + elem: l, + handlers: o, + }); + } + return ( + (l = this), + u < t.length && + s.push({ + elem: l, + handlers: t.slice(u), + }), + s + ); + }, + addProp: function(e, t) { + Object.defineProperty(w.Event.prototype, e, { + enumerable: !0, + configurable: !0, + get: g(t) + ? function() { + if (this.originalEvent) return t(this.originalEvent); + } + : function() { + if (this.originalEvent) return this.originalEvent[e]; + }, + set: function(t) { + Object.defineProperty(this, e, { + enumerable: !0, + configurable: !0, + writable: !0, + value: t, + }); + }, + }); + }, + fix: function(e) { + return e[w.expando] ? e : new w.Event(e); + }, + special: { + load: { + noBubble: !0, + }, + focus: { + trigger: function() { + if (this !== Se() && this.focus) return this.focus(), !1; + }, + delegateType: 'focusin', + }, + blur: { + trigger: function() { + if (this === Se() && this.blur) return this.blur(), !1; + }, + delegateType: 'focusout', + }, + click: { + trigger: function() { + if ('checkbox' === this.type && this.click && N(this, 'input')) + return this.click(), !1; + }, + _default: function(e) { + return N(e.target, 'a'); + }, + }, + beforeunload: { + postDispatch: function(e) { + void 0 !== e.result && + e.originalEvent && + (e.originalEvent.returnValue = e.result); + }, + }, + }, + }), + (w.removeEvent = function(e, t, n) { + e.removeEventListener && e.removeEventListener(t, n); + }), + (w.Event = function(e, t) { + if (!(this instanceof w.Event)) return new w.Event(e, t); + e && e.type + ? ((this.originalEvent = e), + (this.type = e.type), + (this.isDefaultPrevented = + e.defaultPrevented || + (void 0 === e.defaultPrevented && !1 === e.returnValue) + ? Ee + : ke), + (this.target = + e.target && 3 === e.target.nodeType + ? e.target.parentNode + : e.target), + (this.currentTarget = e.currentTarget), + (this.relatedTarget = e.relatedTarget)) + : (this.type = e), + t && w.extend(this, t), + (this.timeStamp = (e && e.timeStamp) || Date.now()), + (this[w.expando] = !0); + }), + (w.Event.prototype = { + constructor: w.Event, + isDefaultPrevented: ke, + isPropagationStopped: ke, + isImmediatePropagationStopped: ke, + isSimulated: !1, + preventDefault: function() { + var e = this.originalEvent; + (this.isDefaultPrevented = Ee), + e && !this.isSimulated && e.preventDefault(); + }, + stopPropagation: function() { + var e = this.originalEvent; + (this.isPropagationStopped = Ee), + e && !this.isSimulated && e.stopPropagation(); + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + (this.isImmediatePropagationStopped = Ee), + e && !this.isSimulated && e.stopImmediatePropagation(), + this.stopPropagation(); + }, + }), + w.each( + { + altKey: !0, + bubbles: !0, + cancelable: !0, + changedTouches: !0, + ctrlKey: !0, + detail: !0, + eventPhase: !0, + metaKey: !0, + pageX: !0, + pageY: !0, + shiftKey: !0, + view: !0, + char: !0, + charCode: !0, + key: !0, + keyCode: !0, + button: !0, + buttons: !0, + clientX: !0, + clientY: !0, + offsetX: !0, + offsetY: !0, + pointerId: !0, + pointerType: !0, + screenX: !0, + screenY: !0, + targetTouches: !0, + toElement: !0, + touches: !0, + which: function(e) { + var t = e.button; + return null == e.which && we.test(e.type) + ? null != e.charCode + ? e.charCode + : e.keyCode + : !e.which && void 0 !== t && Te.test(e.type) + ? 1 & t + ? 1 + : 2 & t + ? 3 + : 4 & t + ? 2 + : 0 + : e.which; + }, + }, + w.event.addProp + ), + w.each( + { + mouseenter: 'mouseover', + mouseleave: 'mouseout', + pointerenter: 'pointerover', + pointerleave: 'pointerout', + }, + function(e, t) { + w.event.special[e] = { + delegateType: t, + bindType: t, + handle: function(e) { + var n, + r = this, + i = e.relatedTarget, + o = e.handleObj; + return ( + (i && (i === r || w.contains(r, i))) || + ((e.type = o.origType), + (n = o.handler.apply(this, arguments)), + (e.type = t)), + n + ); + }, + }; + } + ), + w.fn.extend({ + on: function(e, t, n, r) { + return De(this, e, t, n, r); + }, + one: function(e, t, n, r) { + return De(this, e, t, n, r, 1); + }, + off: function(e, t, n) { + var r, i; + if (e && e.preventDefault && e.handleObj) + return ( + (r = e.handleObj), + w(e.delegateTarget).off( + r.namespace ? r.origType + '.' + r.namespace : r.origType, + r.selector, + r.handler + ), + this + ); + + if ('object' == typeof e) { + for (i in e) this.off(i, t, e[i]); + + return this; + } + + return ( + (!1 !== t && 'function' != typeof t) || ((n = t), (t = void 0)), + !1 === n && (n = ke), + this.each(function() { + w.event.remove(this, e, n, t); + }) + ); + }, + }); + var Ne = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + Ae = /<script|<style|<link/i, + je = /checked\s*(?:[^=]|=\s*.checked.)/i, + qe = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; + + function Le(e, t) { + return N(e, 'table') && N(11 !== t.nodeType ? t : t.firstChild, 'tr') + ? w(e).children('tbody')[0] || e + : e; + } + + function He(e) { + return (e.type = (null !== e.getAttribute('type')) + '/' + e.type), e; + } + + function Oe(e) { + return ( + 'true/' === (e.type || '').slice(0, 5) + ? (e.type = e.type.slice(5)) + : e.removeAttribute('type'), + e + ); + } + + function Pe(e, t) { + var n, r, i, o, a, s, u, l; + + if (1 === t.nodeType) { + if ( + J.hasData(e) && + ((o = J.access(e)), (a = J.set(t, o)), (l = o.events)) + ) { + delete a.handle, (a.events = {}); + + for (i in l) + for (n = 0, r = l[i].length; n < r; n++) + w.event.add(t, i, l[i][n]); + } + + K.hasData(e) && + ((s = K.access(e)), (u = w.extend({}, s)), K.set(t, u)); + } + } + + function Me(e, t) { + var n = t.nodeName.toLowerCase(); + 'input' === n && pe.test(e.type) + ? (t.checked = e.checked) + : ('input' !== n && 'textarea' !== n) || + (t.defaultValue = e.defaultValue); + } + + function Re(e, t, n, r) { + t = a.apply([], t); + var i, + o, + s, + u, + l, + c, + f = 0, + p = e.length, + d = p - 1, + y = t[0], + v = g(y); + if (v || (p > 1 && 'string' == typeof y && !h.checkClone && je.test(y))) + return e.each(function(i) { + var o = e.eq(i); + v && (t[0] = y.call(this, i, o.html())), Re(o, t, n, r); + }); + + if ( + p && + ((i = xe(t, e[0].ownerDocument, !1, e, r)), + (o = i.firstChild), + 1 === i.childNodes.length && (i = o), + o || r) + ) { + for (u = (s = w.map(ye(i, 'script'), He)).length; f < p; f++) + (l = i), + f !== d && + ((l = w.clone(l, !0, !0)), u && w.merge(s, ye(l, 'script'))), + n.call(e[f], l, f); + + if (u) + for ( + c = s[s.length - 1].ownerDocument, w.map(s, Oe), f = 0; + f < u; + f++ + ) + (l = s[f]), + he.test(l.type || '') && + !J.access(l, 'globalEval') && + w.contains(c, l) && + (l.src && 'module' !== (l.type || '').toLowerCase() + ? w._evalUrl && w._evalUrl(l.src) + : m(l.textContent.replace(qe, ''), c, l)); + } + + return e; + } + + function Ie(e, t, n) { + for (var r, i = t ? w.filter(t, e) : e, o = 0; null != (r = i[o]); o++) + n || 1 !== r.nodeType || w.cleanData(ye(r)), + r.parentNode && + (n && w.contains(r.ownerDocument, r) && ve(ye(r, 'script')), + r.parentNode.removeChild(r)); + + return e; + } + + w.extend({ + htmlPrefilter: function(e) { + return e.replace(Ne, '<$1></$2>'); + }, + clone: function(e, t, n) { + var r, + i, + o, + a, + s = e.cloneNode(!0), + u = w.contains(e.ownerDocument, e); + if ( + !( + h.noCloneChecked || + (1 !== e.nodeType && 11 !== e.nodeType) || + w.isXMLDoc(e) + ) + ) + for (a = ye(s), r = 0, i = (o = ye(e)).length; r < i; r++) + Me(o[r], a[r]); + if (t) + if (n) + for ( + o = o || ye(e), a = a || ye(s), r = 0, i = o.length; + r < i; + r++ + ) + Pe(o[r], a[r]); + else Pe(e, s); + return ( + (a = ye(s, 'script')).length > 0 && ve(a, !u && ye(e, 'script')), s + ); + }, + cleanData: function(e) { + for ( + var t, n, r, i = w.event.special, o = 0; + void 0 !== (n = e[o]); + o++ + ) + if (Y(n)) { + if ((t = n[J.expando])) { + if (t.events) + for (r in t.events) + i[r] ? w.event.remove(n, r) : w.removeEvent(n, r, t.handle); + n[J.expando] = void 0; + } + + n[K.expando] && (n[K.expando] = void 0); + } + }, + }), + w.fn.extend({ + detach: function(e) { + return Ie(this, e, !0); + }, + remove: function(e) { + return Ie(this, e); + }, + text: function(e) { + return z( + this, + function(e) { + return void 0 === e + ? w.text(this) + : this.empty().each(function() { + (1 !== this.nodeType && + 11 !== this.nodeType && + 9 !== this.nodeType) || + (this.textContent = e); + }); + }, + null, + e, + arguments.length + ); + }, + append: function() { + return Re(this, arguments, function(e) { + (1 !== this.nodeType && + 11 !== this.nodeType && + 9 !== this.nodeType) || + Le(this, e).appendChild(e); + }); + }, + prepend: function() { + return Re(this, arguments, function(e) { + if ( + 1 === this.nodeType || + 11 === this.nodeType || + 9 === this.nodeType + ) { + var t = Le(this, e); + t.insertBefore(e, t.firstChild); + } + }); + }, + before: function() { + return Re(this, arguments, function(e) { + this.parentNode && this.parentNode.insertBefore(e, this); + }); + }, + after: function() { + return Re(this, arguments, function(e) { + this.parentNode && + this.parentNode.insertBefore(e, this.nextSibling); + }); + }, + empty: function() { + for (var e, t = 0; null != (e = this[t]); t++) + 1 === e.nodeType && + (w.cleanData(ye(e, !1)), (e.textContent = '')); + + return this; + }, + clone: function(e, t) { + return ( + (e = null != e && e), + (t = null == t ? e : t), + this.map(function() { + return w.clone(this, e, t); + }) + ); + }, + html: function(e) { + return z( + this, + function(e) { + var t = this[0] || {}, + n = 0, + r = this.length; + if (void 0 === e && 1 === t.nodeType) return t.innerHTML; + + if ( + 'string' == typeof e && + !Ae.test(e) && + !ge[(de.exec(e) || ['', ''])[1].toLowerCase()] + ) { + e = w.htmlPrefilter(e); + + try { + for (; n < r; n++) + 1 === (t = this[n] || {}).nodeType && + (w.cleanData(ye(t, !1)), (t.innerHTML = e)); + + t = 0; + } catch (e) {} + } + + t && this.empty().append(e); + }, + null, + e, + arguments.length + ); + }, + replaceWith: function() { + var e = []; + return Re( + this, + arguments, + function(t) { + var n = this.parentNode; + w.inArray(this, e) < 0 && + (w.cleanData(ye(this)), n && n.replaceChild(t, this)); + }, + e + ); + }, + }), + w.each( + { + appendTo: 'append', + prependTo: 'prepend', + insertBefore: 'before', + insertAfter: 'after', + replaceAll: 'replaceWith', + }, + function(e, t) { + w.fn[e] = function(e) { + for ( + var n, r = [], i = w(e), o = i.length - 1, a = 0; + a <= o; + a++ + ) + (n = a === o ? this : this.clone(!0)), + w(i[a])[t](n), + s.apply(r, n.get()); + + return this.pushStack(r); + }; + } + ); + + var We = new RegExp('^(' + re + ')(?!px)[a-z%]+$', 'i'), + $e = function(t) { + var n = t.ownerDocument.defaultView; + return (n && n.opener) || (n = e), n.getComputedStyle(t); + }, + Be = new RegExp(oe.join('|'), 'i'); + + !(function() { + function t() { + if (c) { + (l.style.cssText = + 'position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0'), + (c.style.cssText = + 'position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%'), + be.appendChild(l).appendChild(c); + var t = e.getComputedStyle(c); + (i = '1%' !== t.top), + (u = 12 === n(t.marginLeft)), + (c.style.right = '60%'), + (s = 36 === n(t.right)), + (o = 36 === n(t.width)), + (c.style.position = 'absolute'), + (a = 36 === c.offsetWidth || 'absolute'), + be.removeChild(l), + (c = null); + } + } + + function n(e) { + return Math.round(parseFloat(e)); + } + + var i, + o, + a, + s, + u, + l = r.createElement('div'), + c = r.createElement('div'); + c.style && + ((c.style.backgroundClip = 'content-box'), + (c.cloneNode(!0).style.backgroundClip = ''), + (h.clearCloneStyle = 'content-box' === c.style.backgroundClip), + w.extend(h, { + boxSizingReliable: function() { + return t(), o; + }, + pixelBoxStyles: function() { + return t(), s; + }, + pixelPosition: function() { + return t(), i; + }, + reliableMarginLeft: function() { + return t(), u; + }, + scrollboxSize: function() { + return t(), a; + }, + })); + })(); + + function Fe(e, t, n) { + var r, + i, + o, + a, + s = e.style; + return ( + (n = n || $e(e)) && + ('' !== (a = n.getPropertyValue(t) || n[t]) || + w.contains(e.ownerDocument, e) || + (a = w.style(e, t)), + !h.pixelBoxStyles() && + We.test(a) && + Be.test(t) && + ((r = s.width), + (i = s.minWidth), + (o = s.maxWidth), + (s.minWidth = s.maxWidth = s.width = a), + (a = n.width), + (s.width = r), + (s.minWidth = i), + (s.maxWidth = o))), + void 0 !== a ? a + '' : a + ); + } + + function _e(e, t) { + return { + get: function() { + if (!e()) return (this.get = t).apply(this, arguments); + delete this.get; + }, + }; + } + + var ze = /^(none|table(?!-c[ea]).+)/, + Xe = /^--/, + Ue = { + position: 'absolute', + visibility: 'hidden', + display: 'block', + }, + Ve = { + letterSpacing: '0', + fontWeight: '400', + }, + Ge = ['Webkit', 'Moz', 'ms'], + Ye = r.createElement('div').style; + + function Qe(e) { + if (e in Ye) return e; + var t = e[0].toUpperCase() + e.slice(1), + n = Ge.length; + + while (n--) if ((e = Ge[n] + t) in Ye) return e; + } + + function Je(e) { + var t = w.cssProps[e]; + return t || (t = w.cssProps[e] = Qe(e) || e), t; + } + + function Ke(e, t, n) { + var r = ie.exec(t); + return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || 'px') : t; + } + + function Ze(e, t, n, r, i, o) { + var a = 'width' === t ? 1 : 0, + s = 0, + u = 0; + if (n === (r ? 'border' : 'content')) return 0; + + for (; a < 4; a += 2) + 'margin' === n && (u += w.css(e, n + oe[a], !0, i)), + r + ? ('content' === n && (u -= w.css(e, 'padding' + oe[a], !0, i)), + 'margin' !== n && + (u -= w.css(e, 'border' + oe[a] + 'Width', !0, i))) + : ((u += w.css(e, 'padding' + oe[a], !0, i)), + 'padding' !== n + ? (u += w.css(e, 'border' + oe[a] + 'Width', !0, i)) + : (s += w.css(e, 'border' + oe[a] + 'Width', !0, i))); + + return ( + !r && + o >= 0 && + (u += Math.max( + 0, + Math.ceil( + e['offset' + t[0].toUpperCase() + t.slice(1)] - o - u - s - 0.5 + ) + )), + u + ); + } + + function et(e, t, n) { + var r = $e(e), + i = Fe(e, t, r), + o = 'border-box' === w.css(e, 'boxSizing', !1, r), + a = o; + + if (We.test(i)) { + if (!n) return i; + i = 'auto'; + } + + return ( + (a = a && (h.boxSizingReliable() || i === e.style[t])), + ('auto' === i || + (!parseFloat(i) && 'inline' === w.css(e, 'display', !1, r))) && + ((i = e['offset' + t[0].toUpperCase() + t.slice(1)]), (a = !0)), + (i = parseFloat(i) || 0) + + Ze(e, t, n || (o ? 'border' : 'content'), a, r, i) + + 'px' + ); + } + + w.extend({ + cssHooks: { + opacity: { + get: function(e, t) { + if (t) { + var n = Fe(e, 'opacity'); + return '' === n ? '1' : n; + } + }, + }, + }, + cssNumber: { + animationIterationCount: !0, + columnCount: !0, + fillOpacity: !0, + flexGrow: !0, + flexShrink: !0, + fontWeight: !0, + lineHeight: !0, + opacity: !0, + order: !0, + orphans: !0, + widows: !0, + zIndex: !0, + zoom: !0, + }, + cssProps: {}, + style: function(e, t, n, r) { + if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { + var i, + o, + a, + s = G(t), + u = Xe.test(t), + l = e.style; + if ( + (u || (t = Je(s)), + (a = w.cssHooks[t] || w.cssHooks[s]), + void 0 === n) + ) + return a && 'get' in a && void 0 !== (i = a.get(e, !1, r)) + ? i + : l[t]; + 'string' == (o = typeof n) && + (i = ie.exec(n)) && + i[1] && + ((n = ue(e, t, i)), (o = 'number')), + null != n && + n === n && + ('number' === o && + (n += (i && i[3]) || (w.cssNumber[s] ? '' : 'px')), + h.clearCloneStyle || + '' !== n || + 0 !== t.indexOf('background') || + (l[t] = 'inherit'), + (a && 'set' in a && void 0 === (n = a.set(e, n, r))) || + (u ? l.setProperty(t, n) : (l[t] = n))); + } + }, + css: function(e, t, n, r) { + var i, + o, + a, + s = G(t); + return ( + Xe.test(t) || (t = Je(s)), + (a = w.cssHooks[t] || w.cssHooks[s]) && + 'get' in a && + (i = a.get(e, !0, n)), + void 0 === i && (i = Fe(e, t, r)), + 'normal' === i && t in Ve && (i = Ve[t]), + '' === n || n + ? ((o = parseFloat(i)), !0 === n || isFinite(o) ? o || 0 : i) + : i + ); + }, + }), + w.each(['height', 'width'], function(e, t) { + w.cssHooks[t] = { + get: function(e, n, r) { + if (n) + return !ze.test(w.css(e, 'display')) || + (e.getClientRects().length && e.getBoundingClientRect().width) + ? et(e, t, r) + : se(e, Ue, function() { + return et(e, t, r); + }); + }, + set: function(e, n, r) { + var i, + o = $e(e), + a = 'border-box' === w.css(e, 'boxSizing', !1, o), + s = r && Ze(e, t, r, a, o); + return ( + a && + h.scrollboxSize() === o.position && + (s -= Math.ceil( + e['offset' + t[0].toUpperCase() + t.slice(1)] - + parseFloat(o[t]) - + Ze(e, t, 'border', !1, o) - + 0.5 + )), + s && + (i = ie.exec(n)) && + 'px' !== (i[3] || 'px') && + ((e.style[t] = n), (n = w.css(e, t))), + Ke(e, n, s) + ); + }, + }; + }), + (w.cssHooks.marginLeft = _e(h.reliableMarginLeft, function(e, t) { + if (t) + return ( + (parseFloat(Fe(e, 'marginLeft')) || + e.getBoundingClientRect().left - + se( + e, + { + marginLeft: 0, + }, + function() { + return e.getBoundingClientRect().left; + } + )) + 'px' + ); + })), + w.each( + { + margin: '', + padding: '', + border: 'Width', + }, + function(e, t) { + (w.cssHooks[e + t] = { + expand: function(n) { + for ( + var r = 0, + i = {}, + o = 'string' == typeof n ? n.split(' ') : [n]; + r < 4; + r++ + ) + i[e + oe[r] + t] = o[r] || o[r - 2] || o[0]; + + return i; + }, + }), + 'margin' !== e && (w.cssHooks[e + t].set = Ke); + } + ), + w.fn.extend({ + css: function(e, t) { + return z( + this, + function(e, t, n) { + var r, + i, + o = {}, + a = 0; + + if (Array.isArray(t)) { + for (r = $e(e), i = t.length; a < i; a++) + o[t[a]] = w.css(e, t[a], !1, r); + + return o; + } + + return void 0 !== n ? w.style(e, t, n) : w.css(e, t); + }, + e, + t, + arguments.length > 1 + ); + }, + }); + + function tt(e, t, n, r, i) { + return new tt.prototype.init(e, t, n, r, i); + } + + (w.Tween = tt), + (tt.prototype = { + constructor: tt, + init: function(e, t, n, r, i, o) { + (this.elem = e), + (this.prop = n), + (this.easing = i || w.easing._default), + (this.options = t), + (this.start = this.now = this.cur()), + (this.end = r), + (this.unit = o || (w.cssNumber[n] ? '' : 'px')); + }, + cur: function() { + var e = tt.propHooks[this.prop]; + return e && e.get ? e.get(this) : tt.propHooks._default.get(this); + }, + run: function(e) { + var t, + n = tt.propHooks[this.prop]; + return ( + this.options.duration + ? (this.pos = t = w.easing[this.easing]( + e, + this.options.duration * e, + 0, + 1, + this.options.duration + )) + : (this.pos = t = e), + (this.now = (this.end - this.start) * t + this.start), + this.options.step && + this.options.step.call(this.elem, this.now, this), + n && n.set ? n.set(this) : tt.propHooks._default.set(this), + this + ); + }, + }), + (tt.prototype.init.prototype = tt.prototype), + (tt.propHooks = { + _default: { + get: function(e) { + var t; + return 1 !== e.elem.nodeType || + (null != e.elem[e.prop] && null == e.elem.style[e.prop]) + ? e.elem[e.prop] + : (t = w.css(e.elem, e.prop, '')) && 'auto' !== t + ? t + : 0; + }, + set: function(e) { + w.fx.step[e.prop] + ? w.fx.step[e.prop](e) + : 1 !== e.elem.nodeType || + (null == e.elem.style[w.cssProps[e.prop]] && + !w.cssHooks[e.prop]) + ? (e.elem[e.prop] = e.now) + : w.style(e.elem, e.prop, e.now + e.unit); + }, + }, + }), + (tt.propHooks.scrollTop = tt.propHooks.scrollLeft = { + set: function(e) { + e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now); + }, + }), + (w.easing = { + linear: function(e) { + return e; + }, + swing: function(e) { + return 0.5 - Math.cos(e * Math.PI) / 2; + }, + _default: 'swing', + }), + (w.fx = tt.prototype.init), + (w.fx.step = {}); + var nt, + rt, + it = /^(?:toggle|show|hide)$/, + ot = /queueHooks$/; + + function at() { + rt && + (!1 === r.hidden && e.requestAnimationFrame + ? e.requestAnimationFrame(at) + : e.setTimeout(at, w.fx.interval), + w.fx.tick()); + } + + function st() { + return ( + e.setTimeout(function() { + nt = void 0; + }), + (nt = Date.now()) + ); + } + + function ut(e, t) { + var n, + r = 0, + i = { + height: e, + }; + + for (t = t ? 1 : 0; r < 4; r += 2 - t) + i['margin' + (n = oe[r])] = i['padding' + n] = e; + + return t && (i.opacity = i.width = e), i; + } + + function lt(e, t, n) { + for ( + var r, + i = (pt.tweeners[t] || []).concat(pt.tweeners['*']), + o = 0, + a = i.length; + o < a; + o++ + ) + if ((r = i[o].call(n, t, e))) return r; + } + + function ct(e, t, n) { + var r, + i, + o, + a, + s, + u, + l, + c, + f = 'width' in t || 'height' in t, + p = this, + d = {}, + h = e.style, + g = e.nodeType && ae(e), + y = J.get(e, 'fxshow'); + n.queue || + (null == (a = w._queueHooks(e, 'fx')).unqueued && + ((a.unqueued = 0), + (s = a.empty.fire), + (a.empty.fire = function() { + a.unqueued || s(); + })), + a.unqueued++, + p.always(function() { + p.always(function() { + a.unqueued--, w.queue(e, 'fx').length || a.empty.fire(); + }); + })); + + for (r in t) + if (((i = t[r]), it.test(i))) { + if ( + (delete t[r], + (o = o || 'toggle' === i), + i === (g ? 'hide' : 'show')) + ) { + if ('show' !== i || !y || void 0 === y[r]) continue; + g = !0; + } + + d[r] = (y && y[r]) || w.style(e, r); + } + + if ((u = !w.isEmptyObject(t)) || !w.isEmptyObject(d)) { + f && + 1 === e.nodeType && + ((n.overflow = [h.overflow, h.overflowX, h.overflowY]), + null == (l = y && y.display) && (l = J.get(e, 'display')), + 'none' === (c = w.css(e, 'display')) && + (l + ? (c = l) + : (fe([e], !0), + (l = e.style.display || l), + (c = w.css(e, 'display')), + fe([e]))), + ('inline' === c || ('inline-block' === c && null != l)) && + 'none' === w.css(e, 'float') && + (u || + (p.done(function() { + h.display = l; + }), + null == l && ((c = h.display), (l = 'none' === c ? '' : c))), + (h.display = 'inline-block'))), + n.overflow && + ((h.overflow = 'hidden'), + p.always(function() { + (h.overflow = n.overflow[0]), + (h.overflowX = n.overflow[1]), + (h.overflowY = n.overflow[2]); + })), + (u = !1); + + for (r in d) + u || + (y + ? 'hidden' in y && (g = y.hidden) + : (y = J.access(e, 'fxshow', { + display: l, + })), + o && (y.hidden = !g), + g && fe([e], !0), + p.done(function() { + g || fe([e]), J.remove(e, 'fxshow'); + + for (r in d) w.style(e, r, d[r]); + })), + (u = lt(g ? y[r] : 0, r, p)), + r in y || + ((y[r] = u.start), g && ((u.end = u.start), (u.start = 0))); + } + } + + function ft(e, t) { + var n, r, i, o, a; + + for (n in e) + if ( + ((r = G(n)), + (i = t[r]), + (o = e[n]), + Array.isArray(o) && ((i = o[1]), (o = e[n] = o[0])), + n !== r && ((e[r] = o), delete e[n]), + (a = w.cssHooks[r]) && 'expand' in a) + ) { + (o = a.expand(o)), delete e[r]; + + for (n in o) n in e || ((e[n] = o[n]), (t[n] = i)); + } else t[r] = i; + } + + function pt(e, t, n) { + var r, + i, + o = 0, + a = pt.prefilters.length, + s = w.Deferred().always(function() { + delete u.elem; + }), + u = function() { + if (i) return !1; + + for ( + var t = nt || st(), + n = Math.max(0, l.startTime + l.duration - t), + r = 1 - (n / l.duration || 0), + o = 0, + a = l.tweens.length; + o < a; + o++ + ) + l.tweens[o].run(r); + + return ( + s.notifyWith(e, [l, r, n]), + r < 1 && a + ? n + : (a || s.notifyWith(e, [l, 1, 0]), s.resolveWith(e, [l]), !1) + ); + }, + l = s.promise({ + elem: e, + props: w.extend({}, t), + opts: w.extend( + !0, + { + specialEasing: {}, + easing: w.easing._default, + }, + n + ), + originalProperties: t, + originalOptions: n, + startTime: nt || st(), + duration: n.duration, + tweens: [], + createTween: function(t, n) { + var r = w.Tween( + e, + l.opts, + t, + n, + l.opts.specialEasing[t] || l.opts.easing + ); + return l.tweens.push(r), r; + }, + stop: function(t) { + var n = 0, + r = t ? l.tweens.length : 0; + if (i) return this; + + for (i = !0; n < r; n++) l.tweens[n].run(1); + + return ( + t + ? (s.notifyWith(e, [l, 1, 0]), s.resolveWith(e, [l, t])) + : s.rejectWith(e, [l, t]), + this + ); + }, + }), + c = l.props; + + for (ft(c, l.opts.specialEasing); o < a; o++) + if ((r = pt.prefilters[o].call(l, e, c, l.opts))) + return ( + g(r.stop) && + (w._queueHooks(l.elem, l.opts.queue).stop = r.stop.bind(r)), + r + ); + + return ( + w.map(c, lt, l), + g(l.opts.start) && l.opts.start.call(e, l), + l + .progress(l.opts.progress) + .done(l.opts.done, l.opts.complete) + .fail(l.opts.fail) + .always(l.opts.always), + w.fx.timer( + w.extend(u, { + elem: e, + anim: l, + queue: l.opts.queue, + }) + ), + l + ); + } + + (w.Animation = w.extend(pt, { + tweeners: { + '*': [ + function(e, t) { + var n = this.createTween(e, t); + return ue(n.elem, e, ie.exec(t), n), n; + }, + ], + }, + tweener: function(e, t) { + g(e) ? ((t = e), (e = ['*'])) : (e = e.match(M)); + + for (var n, r = 0, i = e.length; r < i; r++) + (n = e[r]), + (pt.tweeners[n] = pt.tweeners[n] || []), + pt.tweeners[n].unshift(t); + }, + prefilters: [ct], + prefilter: function(e, t) { + t ? pt.prefilters.unshift(e) : pt.prefilters.push(e); + }, + })), + (w.speed = function(e, t, n) { + var r = + e && 'object' == typeof e + ? w.extend({}, e) + : { + complete: n || (!n && t) || (g(e) && e), + duration: e, + easing: (n && t) || (t && !g(t) && t), + }; + return ( + w.fx.off + ? (r.duration = 0) + : 'number' != typeof r.duration && + (r.duration in w.fx.speeds + ? (r.duration = w.fx.speeds[r.duration]) + : (r.duration = w.fx.speeds._default)), + (null != r.queue && !0 !== r.queue) || (r.queue = 'fx'), + (r.old = r.complete), + (r.complete = function() { + g(r.old) && r.old.call(this), r.queue && w.dequeue(this, r.queue); + }), + r + ); + }), + w.fn.extend({ + fadeTo: function(e, t, n, r) { + return this.filter(ae) + .css('opacity', 0) + .show() + .end() + .animate( + { + opacity: t, + }, + e, + n, + r + ); + }, + animate: function(e, t, n, r) { + var i = w.isEmptyObject(e), + o = w.speed(t, n, r), + a = function() { + var t = pt(this, w.extend({}, e), o); + (i || J.get(this, 'finish')) && t.stop(!0); + }; + + return ( + (a.finish = a), + i || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) + ); + }, + stop: function(e, t, n) { + var r = function(e) { + var t = e.stop; + delete e.stop, t(n); + }; + + return ( + 'string' != typeof e && ((n = t), (t = e), (e = void 0)), + t && !1 !== e && this.queue(e || 'fx', []), + this.each(function() { + var t = !0, + i = null != e && e + 'queueHooks', + o = w.timers, + a = J.get(this); + if (i) a[i] && a[i].stop && r(a[i]); + else for (i in a) a[i] && a[i].stop && ot.test(i) && r(a[i]); + + for (i = o.length; i--; ) + o[i].elem !== this || + (null != e && o[i].queue !== e) || + (o[i].anim.stop(n), (t = !1), o.splice(i, 1)); + + (!t && n) || w.dequeue(this, e); + }) + ); + }, + finish: function(e) { + return ( + !1 !== e && (e = e || 'fx'), + this.each(function() { + var t, + n = J.get(this), + r = n[e + 'queue'], + i = n[e + 'queueHooks'], + o = w.timers, + a = r ? r.length : 0; + + for ( + n.finish = !0, + w.queue(this, e, []), + i && i.stop && i.stop.call(this, !0), + t = o.length; + t--; + + ) + o[t].elem === this && + o[t].queue === e && + (o[t].anim.stop(!0), o.splice(t, 1)); + + for (t = 0; t < a; t++) + r[t] && r[t].finish && r[t].finish.call(this); + + delete n.finish; + }) + ); + }, + }), + w.each(['toggle', 'show', 'hide'], function(e, t) { + var n = w.fn[t]; + + w.fn[t] = function(e, r, i) { + return null == e || 'boolean' == typeof e + ? n.apply(this, arguments) + : this.animate(ut(t, !0), e, r, i); + }; + }), + w.each( + { + slideDown: ut('show'), + slideUp: ut('hide'), + slideToggle: ut('toggle'), + fadeIn: { + opacity: 'show', + }, + fadeOut: { + opacity: 'hide', + }, + fadeToggle: { + opacity: 'toggle', + }, + }, + function(e, t) { + w.fn[e] = function(e, n, r) { + return this.animate(t, e, n, r); + }; + } + ), + (w.timers = []), + (w.fx.tick = function() { + var e, + t = 0, + n = w.timers; + + for (nt = Date.now(); t < n.length; t++) + (e = n[t])() || n[t] !== e || n.splice(t--, 1); + + n.length || w.fx.stop(), (nt = void 0); + }), + (w.fx.timer = function(e) { + w.timers.push(e), w.fx.start(); + }), + (w.fx.interval = 13), + (w.fx.start = function() { + rt || ((rt = !0), at()); + }), + (w.fx.stop = function() { + rt = null; + }), + (w.fx.speeds = { + slow: 600, + fast: 200, + _default: 400, + }), + (w.fn.delay = function(t, n) { + return ( + (t = w.fx ? w.fx.speeds[t] || t : t), + (n = n || 'fx'), + this.queue(n, function(n, r) { + var i = e.setTimeout(n, t); + + r.stop = function() { + e.clearTimeout(i); + }; + }) + ); + }), + (function() { + var e = r.createElement('input'), + t = r + .createElement('select') + .appendChild(r.createElement('option')); + (e.type = 'checkbox'), + (h.checkOn = '' !== e.value), + (h.optSelected = t.selected), + ((e = r.createElement('input')).value = 't'), + (e.type = 'radio'), + (h.radioValue = 't' === e.value); + })(); + var dt, + ht = w.expr.attrHandle; + w.fn.extend({ + attr: function(e, t) { + return z(this, w.attr, e, t, arguments.length > 1); + }, + removeAttr: function(e) { + return this.each(function() { + w.removeAttr(this, e); + }); + }, + }), + w.extend({ + attr: function(e, t, n) { + var r, + i, + o = e.nodeType; + if (3 !== o && 8 !== o && 2 !== o) + return 'undefined' == typeof e.getAttribute + ? w.prop(e, t, n) + : ((1 === o && w.isXMLDoc(e)) || + (i = + w.attrHooks[t.toLowerCase()] || + (w.expr.match.bool.test(t) ? dt : void 0)), + void 0 !== n + ? null === n + ? void w.removeAttr(e, t) + : i && 'set' in i && void 0 !== (r = i.set(e, n, t)) + ? r + : (e.setAttribute(t, n + ''), n) + : i && 'get' in i && null !== (r = i.get(e, t)) + ? r + : null == (r = w.find.attr(e, t)) + ? void 0 + : r); + }, + attrHooks: { + type: { + set: function(e, t) { + if (!h.radioValue && 'radio' === t && N(e, 'input')) { + var n = e.value; + return e.setAttribute('type', t), n && (e.value = n), t; + } + }, + }, + }, + removeAttr: function(e, t) { + var n, + r = 0, + i = t && t.match(M); + if (i && 1 === e.nodeType) + while ((n = i[r++])) e.removeAttribute(n); + }, + }), + (dt = { + set: function(e, t, n) { + return !1 === t ? w.removeAttr(e, n) : e.setAttribute(n, n), n; + }, + }), + w.each(w.expr.match.bool.source.match(/\w+/g), function(e, t) { + var n = ht[t] || w.find.attr; + + ht[t] = function(e, t, r) { + var i, + o, + a = t.toLowerCase(); + return ( + r || + ((o = ht[a]), + (ht[a] = i), + (i = null != n(e, t, r) ? a : null), + (ht[a] = o)), + i + ); + }; + }); + var gt = /^(?:input|select|textarea|button)$/i, + yt = /^(?:a|area)$/i; + w.fn.extend({ + prop: function(e, t) { + return z(this, w.prop, e, t, arguments.length > 1); + }, + removeProp: function(e) { + return this.each(function() { + delete this[w.propFix[e] || e]; + }); + }, + }), + w.extend({ + prop: function(e, t, n) { + var r, + i, + o = e.nodeType; + if (3 !== o && 8 !== o && 2 !== o) + return ( + (1 === o && w.isXMLDoc(e)) || + ((t = w.propFix[t] || t), (i = w.propHooks[t])), + void 0 !== n + ? i && 'set' in i && void 0 !== (r = i.set(e, n, t)) + ? r + : (e[t] = n) + : i && 'get' in i && null !== (r = i.get(e, t)) + ? r + : e[t] + ); + }, + propHooks: { + tabIndex: { + get: function(e) { + var t = w.find.attr(e, 'tabindex'); + return t + ? parseInt(t, 10) + : gt.test(e.nodeName) || (yt.test(e.nodeName) && e.href) + ? 0 + : -1; + }, + }, + }, + propFix: { + for: 'htmlFor', + class: 'className', + }, + }), + h.optSelected || + (w.propHooks.selected = { + get: function(e) { + var t = e.parentNode; + return t && t.parentNode && t.parentNode.selectedIndex, null; + }, + set: function(e) { + var t = e.parentNode; + t && + (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex); + }, + }), + w.each( + [ + 'tabIndex', + 'readOnly', + 'maxLength', + 'cellSpacing', + 'cellPadding', + 'rowSpan', + 'colSpan', + 'useMap', + 'frameBorder', + 'contentEditable', + ], + function() { + w.propFix[this.toLowerCase()] = this; + } + ); + + function vt(e) { + return (e.match(M) || []).join(' '); + } + + function mt(e) { + return (e.getAttribute && e.getAttribute('class')) || ''; + } + + function xt(e) { + return Array.isArray(e) + ? e + : 'string' == typeof e + ? e.match(M) || [] + : []; + } + + w.fn.extend({ + addClass: function(e) { + var t, + n, + r, + i, + o, + a, + s, + u = 0; + if (g(e)) + return this.each(function(t) { + w(this).addClass(e.call(this, t, mt(this))); + }); + if ((t = xt(e)).length) + while ((n = this[u++])) + if (((i = mt(n)), (r = 1 === n.nodeType && ' ' + vt(i) + ' '))) { + a = 0; + + while ((o = t[a++])) + r.indexOf(' ' + o + ' ') < 0 && (r += o + ' '); + + i !== (s = vt(r)) && n.setAttribute('class', s); + } + return this; + }, + removeClass: function(e) { + var t, + n, + r, + i, + o, + a, + s, + u = 0; + if (g(e)) + return this.each(function(t) { + w(this).removeClass(e.call(this, t, mt(this))); + }); + if (!arguments.length) return this.attr('class', ''); + if ((t = xt(e)).length) + while ((n = this[u++])) + if (((i = mt(n)), (r = 1 === n.nodeType && ' ' + vt(i) + ' '))) { + a = 0; + + while ((o = t[a++])) + while (r.indexOf(' ' + o + ' ') > -1) + r = r.replace(' ' + o + ' ', ' '); + + i !== (s = vt(r)) && n.setAttribute('class', s); + } + return this; + }, + toggleClass: function(e, t) { + var n = typeof e, + r = 'string' === n || Array.isArray(e); + return 'boolean' == typeof t && r + ? t + ? this.addClass(e) + : this.removeClass(e) + : g(e) + ? this.each(function(n) { + w(this).toggleClass(e.call(this, n, mt(this), t), t); + }) + : this.each(function() { + var t, i, o, a; + + if (r) { + (i = 0), (o = w(this)), (a = xt(e)); + + while ((t = a[i++])) + o.hasClass(t) ? o.removeClass(t) : o.addClass(t); + } else (void 0 !== e && 'boolean' !== n) || ((t = mt(this)) && J.set(this, '__className__', t), this.setAttribute && this.setAttribute('class', t || !1 === e ? '' : J.get(this, '__className__') || '')); + }); + }, + hasClass: function(e) { + var t, + n, + r = 0; + t = ' ' + e + ' '; + + while ((n = this[r++])) + if (1 === n.nodeType && (' ' + vt(mt(n)) + ' ').indexOf(t) > -1) + return !0; + + return !1; + }, + }); + var bt = /\r/g; + w.fn.extend({ + val: function(e) { + var t, + n, + r, + i = this[0]; + { + if (arguments.length) + return ( + (r = g(e)), + this.each(function(n) { + var i; + 1 === this.nodeType && + (null == (i = r ? e.call(this, n, w(this).val()) : e) + ? (i = '') + : 'number' == typeof i + ? (i += '') + : Array.isArray(i) && + (i = w.map(i, function(e) { + return null == e ? '' : e + ''; + })), + ((t = + w.valHooks[this.type] || + w.valHooks[this.nodeName.toLowerCase()]) && + 'set' in t && + void 0 !== t.set(this, i, 'value')) || + (this.value = i)); + }) + ); + if (i) + return (t = + w.valHooks[i.type] || w.valHooks[i.nodeName.toLowerCase()]) && + 'get' in t && + void 0 !== (n = t.get(i, 'value')) + ? n + : 'string' == typeof (n = i.value) + ? n.replace(bt, '') + : null == n + ? '' + : n; + } + }, + }), + w.extend({ + valHooks: { + option: { + get: function(e) { + var t = w.find.attr(e, 'value'); + return null != t ? t : vt(w.text(e)); + }, + }, + select: { + get: function(e) { + var t, + n, + r, + i = e.options, + o = e.selectedIndex, + a = 'select-one' === e.type, + s = a ? null : [], + u = a ? o + 1 : i.length; + + for (r = o < 0 ? u : a ? o : 0; r < u; r++) + if ( + ((n = i[r]).selected || r === o) && + !n.disabled && + (!n.parentNode.disabled || !N(n.parentNode, 'optgroup')) + ) { + if (((t = w(n).val()), a)) return t; + s.push(t); + } + + return s; + }, + set: function(e, t) { + var n, + r, + i = e.options, + o = w.makeArray(t), + a = i.length; + + while (a--) + ((r = i[a]).selected = + w.inArray(w.valHooks.option.get(r), o) > -1) && (n = !0); + + return n || (e.selectedIndex = -1), o; + }, + }, + }, + }), + w.each(['radio', 'checkbox'], function() { + (w.valHooks[this] = { + set: function(e, t) { + if (Array.isArray(t)) + return (e.checked = w.inArray(w(e).val(), t) > -1); + }, + }), + h.checkOn || + (w.valHooks[this].get = function(e) { + return null === e.getAttribute('value') ? 'on' : e.value; + }); + }), + (h.focusin = 'onfocusin' in e); + + var wt = /^(?:focusinfocus|focusoutblur)$/, + Tt = function(e) { + e.stopPropagation(); + }; + + w.extend(w.event, { + trigger: function(t, n, i, o) { + var a, + s, + u, + l, + c, + p, + d, + h, + v = [i || r], + m = f.call(t, 'type') ? t.type : t, + x = f.call(t, 'namespace') ? t.namespace.split('.') : []; + + if ( + ((s = h = u = i = i || r), + 3 !== i.nodeType && + 8 !== i.nodeType && + !wt.test(m + w.event.triggered) && + (m.indexOf('.') > -1 && + ((m = (x = m.split('.')).shift()), x.sort()), + (c = m.indexOf(':') < 0 && 'on' + m), + (t = t[w.expando] + ? t + : new w.Event(m, 'object' == typeof t && t)), + (t.isTrigger = o ? 2 : 3), + (t.namespace = x.join('.')), + (t.rnamespace = t.namespace + ? new RegExp('(^|\\.)' + x.join('\\.(?:.*\\.|)') + '(\\.|$)') + : null), + (t.result = void 0), + t.target || (t.target = i), + (n = null == n ? [t] : w.makeArray(n, [t])), + (d = w.event.special[m] || {}), + o || !d.trigger || !1 !== d.trigger.apply(i, n))) + ) { + if (!o && !d.noBubble && !y(i)) { + for ( + l = d.delegateType || m, wt.test(l + m) || (s = s.parentNode); + s; + s = s.parentNode + ) + v.push(s), (u = s); + + u === (i.ownerDocument || r) && + v.push(u.defaultView || u.parentWindow || e); + } + + a = 0; + + while ((s = v[a++]) && !t.isPropagationStopped()) + (h = s), + (t.type = a > 1 ? l : d.bindType || m), + (p = + (J.get(s, 'events') || {})[t.type] && J.get(s, 'handle')) && + p.apply(s, n), + (p = c && s[c]) && + p.apply && + Y(s) && + ((t.result = p.apply(s, n)), + !1 === t.result && t.preventDefault()); + + return ( + (t.type = m), + o || + t.isDefaultPrevented() || + (d._default && !1 !== d._default.apply(v.pop(), n)) || + !Y(i) || + (c && + g(i[m]) && + !y(i) && + ((u = i[c]) && (i[c] = null), + (w.event.triggered = m), + t.isPropagationStopped() && h.addEventListener(m, Tt), + i[m](), + t.isPropagationStopped() && h.removeEventListener(m, Tt), + (w.event.triggered = void 0), + u && (i[c] = u))), + t.result + ); + } + }, + simulate: function(e, t, n) { + var r = w.extend(new w.Event(), n, { + type: e, + isSimulated: !0, + }); + w.event.trigger(r, null, t); + }, + }), + w.fn.extend({ + trigger: function(e, t) { + return this.each(function() { + w.event.trigger(e, t, this); + }); + }, + triggerHandler: function(e, t) { + var n = this[0]; + if (n) return w.event.trigger(e, t, n, !0); + }, + }), + h.focusin || + w.each( + { + focus: 'focusin', + blur: 'focusout', + }, + function(e, t) { + var n = function(e) { + w.event.simulate(t, e.target, w.event.fix(e)); + }; + + w.event.special[t] = { + setup: function() { + var r = this.ownerDocument || this, + i = J.access(r, t); + i || r.addEventListener(e, n, !0), + J.access(r, t, (i || 0) + 1); + }, + teardown: function() { + var r = this.ownerDocument || this, + i = J.access(r, t) - 1; + i + ? J.access(r, t, i) + : (r.removeEventListener(e, n, !0), J.remove(r, t)); + }, + }; + } + ); + var Ct = e.location, + Et = Date.now(), + kt = /\?/; + + w.parseXML = function(t) { + var n; + if (!t || 'string' != typeof t) return null; + + try { + n = new e.DOMParser().parseFromString(t, 'text/xml'); + } catch (e) { + n = void 0; + } + + return ( + (n && !n.getElementsByTagName('parsererror').length) || + w.error('Invalid XML: ' + t), + n + ); + }; + + var St = /\[\]$/, + Dt = /\r?\n/g, + Nt = /^(?:submit|button|image|reset|file)$/i, + At = /^(?:input|select|textarea|keygen)/i; + + function jt(e, t, n, r) { + var i; + if (Array.isArray(t)) + w.each(t, function(t, i) { + n || St.test(e) + ? r(e, i) + : jt( + e + '[' + ('object' == typeof i && null != i ? t : '') + ']', + i, + n, + r + ); + }); + else if (n || 'object' !== x(t)) r(e, t); + else for (i in t) jt(e + '[' + i + ']', t[i], n, r); + } + + (w.param = function(e, t) { + var n, + r = [], + i = function(e, t) { + var n = g(t) ? t() : t; + r[r.length] = + encodeURIComponent(e) + + '=' + + encodeURIComponent(null == n ? '' : n); + }; + + if (Array.isArray(e) || (e.jquery && !w.isPlainObject(e))) + w.each(e, function() { + i(this.name, this.value); + }); + else for (n in e) jt(n, e[n], t, i); + return r.join('&'); + }), + w.fn.extend({ + serialize: function() { + return w.param(this.serializeArray()); + }, + serializeArray: function() { + return this.map(function() { + var e = w.prop(this, 'elements'); + return e ? w.makeArray(e) : this; + }) + .filter(function() { + var e = this.type; + return ( + this.name && + !w(this).is(':disabled') && + At.test(this.nodeName) && + !Nt.test(e) && + (this.checked || !pe.test(e)) + ); + }) + .map(function(e, t) { + var n = w(this).val(); + return null == n + ? null + : Array.isArray(n) + ? w.map(n, function(e) { + return { + name: t.name, + value: e.replace(Dt, '\r\n'), + }; + }) + : { + name: t.name, + value: n.replace(Dt, '\r\n'), + }; + }) + .get(); + }, + }); + var qt = /%20/g, + Lt = /#.*$/, + Ht = /([?&])_=[^&]*/, + Ot = /^(.*?):[ \t]*([^\r\n]*)$/gm, + Pt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + Mt = /^(?:GET|HEAD)$/, + Rt = /^\/\//, + It = {}, + Wt = {}, + $t = '*/'.concat('*'), + Bt = r.createElement('a'); + Bt.href = Ct.href; + + function Ft(e) { + return function(t, n) { + 'string' != typeof t && ((n = t), (t = '*')); + var r, + i = 0, + o = t.toLowerCase().match(M) || []; + if (g(n)) + while ((r = o[i++])) + '+' === r[0] + ? ((r = r.slice(1) || '*'), (e[r] = e[r] || []).unshift(n)) + : (e[r] = e[r] || []).push(n); + }; + } + + function _t(e, t, n, r) { + var i = {}, + o = e === Wt; + + function a(s) { + var u; + return ( + (i[s] = !0), + w.each(e[s] || [], function(e, s) { + var l = s(t, n, r); + return 'string' != typeof l || o || i[l] + ? o + ? !(u = l) + : void 0 + : (t.dataTypes.unshift(l), a(l), !1); + }), + u + ); + } + + return a(t.dataTypes[0]) || (!i['*'] && a('*')); + } + + function zt(e, t) { + var n, + r, + i = w.ajaxSettings.flatOptions || {}; + + for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = {}))[n] = t[n]); + + return r && w.extend(!0, e, r), e; + } + + function Xt(e, t, n) { + var r, + i, + o, + a, + s = e.contents, + u = e.dataTypes; + + while ('*' === u[0]) + u.shift(), + void 0 === r && + (r = e.mimeType || t.getResponseHeader('Content-Type')); + + if (r) + for (i in s) + if (s[i] && s[i].test(r)) { + u.unshift(i); + break; + } + if (u[0] in n) o = u[0]; + else { + for (i in n) { + if (!u[0] || e.converters[i + ' ' + u[0]]) { + o = i; + break; + } + + a || (a = i); + } + + o = o || a; + } + if (o) return o !== u[0] && u.unshift(o), n[o]; + } + + function Ut(e, t, n, r) { + var i, + o, + a, + s, + u, + l = {}, + c = e.dataTypes.slice(); + if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a]; + o = c.shift(); + + while (o) + if ( + (e.responseFields[o] && (n[e.responseFields[o]] = t), + !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), + (u = o), + (o = c.shift())) + ) + if ('*' === o) o = u; + else if ('*' !== u && u !== o) { + if (!(a = l[u + ' ' + o] || l['* ' + o])) + for (i in l) + if ( + (s = i.split(' '))[1] === o && + (a = l[u + ' ' + s[0]] || l['* ' + s[0]]) + ) { + !0 === a + ? (a = l[i]) + : !0 !== l[i] && ((o = s[0]), c.unshift(s[1])); + break; + } + if (!0 !== a) + if (a && e['throws']) t = a(t); + else + try { + t = a(t); + } catch (e) { + return { + state: 'parsererror', + error: a ? e : 'No conversion from ' + u + ' to ' + o, + }; + } + } + + return { + state: 'success', + data: t, + }; + } + + w.extend({ + active: 0, + lastModified: {}, + etag: {}, + ajaxSettings: { + url: Ct.href, + type: 'GET', + isLocal: Pt.test(Ct.protocol), + global: !0, + processData: !0, + async: !0, + contentType: 'application/x-www-form-urlencoded; charset=UTF-8', + accepts: { + '*': $t, + text: 'text/plain', + html: 'text/html', + xml: 'application/xml, text/xml', + json: 'application/json, text/javascript', + }, + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/, + }, + responseFields: { + xml: 'responseXML', + text: 'responseText', + json: 'responseJSON', + }, + converters: { + '* text': String, + 'text html': !0, + 'text json': JSON.parse, + 'text xml': w.parseXML, + }, + flatOptions: { + url: !0, + context: !0, + }, + }, + ajaxSetup: function(e, t) { + return t ? zt(zt(e, w.ajaxSettings), t) : zt(w.ajaxSettings, e); + }, + ajaxPrefilter: Ft(It), + ajaxTransport: Ft(Wt), + ajax: function(t, n) { + 'object' == typeof t && ((n = t), (t = void 0)), (n = n || {}); + var i, + o, + a, + s, + u, + l, + c, + f, + p, + d, + h = w.ajaxSetup({}, n), + g = h.context || h, + y = h.context && (g.nodeType || g.jquery) ? w(g) : w.event, + v = w.Deferred(), + m = w.Callbacks('once memory'), + x = h.statusCode || {}, + b = {}, + T = {}, + C = 'canceled', + E = { + readyState: 0, + getResponseHeader: function(e) { + var t; + + if (c) { + if (!s) { + s = {}; + + while ((t = Ot.exec(a))) s[t[1].toLowerCase()] = t[2]; + } + + t = s[e.toLowerCase()]; + } + + return null == t ? null : t; + }, + getAllResponseHeaders: function() { + return c ? a : null; + }, + setRequestHeader: function(e, t) { + return ( + null == c && + ((e = T[e.toLowerCase()] = T[e.toLowerCase()] || e), + (b[e] = t)), + this + ); + }, + overrideMimeType: function(e) { + return null == c && (h.mimeType = e), this; + }, + statusCode: function(e) { + var t; + if (e) + if (c) E.always(e[E.status]); + else for (t in e) x[t] = [x[t], e[t]]; + return this; + }, + abort: function(e) { + var t = e || C; + return i && i.abort(t), k(0, t), this; + }, + }; + + if ( + (v.promise(E), + (h.url = ((t || h.url || Ct.href) + '').replace( + Rt, + Ct.protocol + '//' + )), + (h.type = n.method || n.type || h.method || h.type), + (h.dataTypes = (h.dataType || '*').toLowerCase().match(M) || ['']), + null == h.crossDomain) + ) { + l = r.createElement('a'); + + try { + (l.href = h.url), + (l.href = l.href), + (h.crossDomain = + Bt.protocol + '//' + Bt.host != l.protocol + '//' + l.host); + } catch (e) { + h.crossDomain = !0; + } + } + + if ( + (h.data && + h.processData && + 'string' != typeof h.data && + (h.data = w.param(h.data, h.traditional)), + _t(It, h, n, E), + c) + ) + return E; + (f = w.event && h.global) && + 0 == w.active++ && + w.event.trigger('ajaxStart'), + (h.type = h.type.toUpperCase()), + (h.hasContent = !Mt.test(h.type)), + (o = h.url.replace(Lt, '')), + h.hasContent + ? h.data && + h.processData && + 0 === + (h.contentType || '').indexOf( + 'application/x-www-form-urlencoded' + ) && + (h.data = h.data.replace(qt, '+')) + : ((d = h.url.slice(o.length)), + h.data && + (h.processData || 'string' == typeof h.data) && + ((o += (kt.test(o) ? '&' : '?') + h.data), delete h.data), + !1 === h.cache && + ((o = o.replace(Ht, '$1')), + (d = (kt.test(o) ? '&' : '?') + '_=' + Et++ + d)), + (h.url = o + d)), + h.ifModified && + (w.lastModified[o] && + E.setRequestHeader('If-Modified-Since', w.lastModified[o]), + w.etag[o] && E.setRequestHeader('If-None-Match', w.etag[o])), + ((h.data && h.hasContent && !1 !== h.contentType) || + n.contentType) && + E.setRequestHeader('Content-Type', h.contentType), + E.setRequestHeader( + 'Accept', + h.dataTypes[0] && h.accepts[h.dataTypes[0]] + ? h.accepts[h.dataTypes[0]] + + ('*' !== h.dataTypes[0] ? ', ' + $t + '; q=0.01' : '') + : h.accepts['*'] + ); + + for (p in h.headers) E.setRequestHeader(p, h.headers[p]); + + if (h.beforeSend && (!1 === h.beforeSend.call(g, E, h) || c)) + return E.abort(); + + if ( + ((C = 'abort'), + m.add(h.complete), + E.done(h.success), + E.fail(h.error), + (i = _t(Wt, h, n, E))) + ) { + if (((E.readyState = 1), f && y.trigger('ajaxSend', [E, h]), c)) + return E; + h.async && + h.timeout > 0 && + (u = e.setTimeout(function() { + E.abort('timeout'); + }, h.timeout)); + + try { + (c = !1), i.send(b, k); + } catch (e) { + if (c) throw e; + k(-1, e); + } + } else k(-1, 'No Transport'); + + function k(t, n, r, s) { + var l, + p, + d, + b, + T, + C = n; + c || + ((c = !0), + u && e.clearTimeout(u), + (i = void 0), + (a = s || ''), + (E.readyState = t > 0 ? 4 : 0), + (l = (t >= 200 && t < 300) || 304 === t), + r && (b = Xt(h, E, r)), + (b = Ut(h, b, E, l)), + l + ? (h.ifModified && + ((T = E.getResponseHeader('Last-Modified')) && + (w.lastModified[o] = T), + (T = E.getResponseHeader('etag')) && (w.etag[o] = T)), + 204 === t || 'HEAD' === h.type + ? (C = 'nocontent') + : 304 === t + ? (C = 'notmodified') + : ((C = b.state), (p = b.data), (l = !(d = b.error)))) + : ((d = C), (!t && C) || ((C = 'error'), t < 0 && (t = 0))), + (E.status = t), + (E.statusText = (n || C) + ''), + l ? v.resolveWith(g, [p, C, E]) : v.rejectWith(g, [E, C, d]), + E.statusCode(x), + (x = void 0), + f && + y.trigger(l ? 'ajaxSuccess' : 'ajaxError', [E, h, l ? p : d]), + m.fireWith(g, [E, C]), + f && + (y.trigger('ajaxComplete', [E, h]), + --w.active || w.event.trigger('ajaxStop'))); + } + + return E; + }, + getJSON: function(e, t, n) { + return w.get(e, t, n, 'json'); + }, + getScript: function(e, t) { + return w.get(e, void 0, t, 'script'); + }, + }), + w.each(['get', 'post'], function(e, t) { + w[t] = function(e, n, r, i) { + return ( + g(n) && ((i = i || r), (r = n), (n = void 0)), + w.ajax( + w.extend( + { + url: e, + type: t, + dataType: i, + data: n, + success: r, + }, + w.isPlainObject(e) && e + ) + ) + ); + }; + }), + (w._evalUrl = function(e) { + return w.ajax({ + url: e, + type: 'GET', + dataType: 'script', + cache: !0, + async: !1, + global: !1, + throws: !0, + }); + }), + w.fn.extend({ + wrapAll: function(e) { + var t; + return ( + this[0] && + (g(e) && (e = e.call(this[0])), + (t = w(e, this[0].ownerDocument) + .eq(0) + .clone(!0)), + this[0].parentNode && t.insertBefore(this[0]), + t + .map(function() { + var e = this; + + while (e.firstElementChild) e = e.firstElementChild; + + return e; + }) + .append(this)), + this + ); + }, + wrapInner: function(e) { + return g(e) + ? this.each(function(t) { + w(this).wrapInner(e.call(this, t)); + }) + : this.each(function() { + var t = w(this), + n = t.contents(); + n.length ? n.wrapAll(e) : t.append(e); + }); + }, + wrap: function(e) { + var t = g(e); + return this.each(function(n) { + w(this).wrapAll(t ? e.call(this, n) : e); + }); + }, + unwrap: function(e) { + return ( + this.parent(e) + .not('body') + .each(function() { + w(this).replaceWith(this.childNodes); + }), + this + ); + }, + }), + (w.expr.pseudos.hidden = function(e) { + return !w.expr.pseudos.visible(e); + }), + (w.expr.pseudos.visible = function(e) { + return !!( + e.offsetWidth || + e.offsetHeight || + e.getClientRects().length + ); + }), + (w.ajaxSettings.xhr = function() { + try { + return new e.XMLHttpRequest(); + } catch (e) {} + }); + var Vt = { + 0: 200, + 1223: 204, + }, + Gt = w.ajaxSettings.xhr(); + (h.cors = !!Gt && 'withCredentials' in Gt), + (h.ajax = Gt = !!Gt), + w.ajaxTransport(function(t) { + var n, r; + if (h.cors || (Gt && !t.crossDomain)) + return { + send: function(i, o) { + var a, + s = t.xhr(); + if ( + (s.open(t.type, t.url, t.async, t.username, t.password), + t.xhrFields) + ) + for (a in t.xhrFields) s[a] = t.xhrFields[a]; + t.mimeType && + s.overrideMimeType && + s.overrideMimeType(t.mimeType), + t.crossDomain || + i['X-Requested-With'] || + (i['X-Requested-With'] = 'XMLHttpRequest'); + + for (a in i) s.setRequestHeader(a, i[a]); + + (n = function(e) { + return function() { + n && + ((n = r = s.onload = s.onerror = s.onabort = s.ontimeout = s.onreadystatechange = null), + 'abort' === e + ? s.abort() + : 'error' === e + ? 'number' != typeof s.status + ? o(0, 'error') + : o(s.status, s.statusText) + : o( + Vt[s.status] || s.status, + s.statusText, + 'text' !== (s.responseType || 'text') || + 'string' != typeof s.responseText + ? { + binary: s.response, + } + : { + text: s.responseText, + }, + s.getAllResponseHeaders() + )); + }; + }), + (s.onload = n()), + (r = s.onerror = s.ontimeout = n('error')), + void 0 !== s.onabort + ? (s.onabort = r) + : (s.onreadystatechange = function() { + 4 === s.readyState && + e.setTimeout(function() { + n && r(); + }); + }), + (n = n('abort')); + + try { + s.send((t.hasContent && t.data) || null); + } catch (e) { + if (n) throw e; + } + }, + abort: function() { + n && n(); + }, + }; + }), + w.ajaxPrefilter(function(e) { + e.crossDomain && (e.contents.script = !1); + }), + w.ajaxSetup({ + accepts: { + script: + 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript', + }, + contents: { + script: /\b(?:java|ecma)script\b/, + }, + converters: { + 'text script': function(e) { + return w.globalEval(e), e; + }, + }, + }), + w.ajaxPrefilter('script', function(e) { + void 0 === e.cache && (e.cache = !1), + e.crossDomain && (e.type = 'GET'); + }), + w.ajaxTransport('script', function(e) { + if (e.crossDomain) { + var t, n; + return { + send: function(i, o) { + (t = w('<script>') + .prop({ + charset: e.scriptCharset, + src: e.url, + }) + .on( + 'load error', + (n = function(e) { + t.remove(), + (n = null), + e && o('error' === e.type ? 404 : 200, e.type); + }) + )), + r.head.appendChild(t[0]); + }, + abort: function() { + n && n(); + }, + }; + } + }); + var Yt = [], + Qt = /(=)\?(?=&|$)|\?\?/; + w.ajaxSetup({ + jsonp: 'callback', + jsonpCallback: function() { + var e = Yt.pop() || w.expando + '_' + Et++; + return (this[e] = !0), e; + }, + }), + w.ajaxPrefilter('json jsonp', function(t, n, r) { + var i, + o, + a, + s = + !1 !== t.jsonp && + (Qt.test(t.url) + ? 'url' + : 'string' == typeof t.data && + 0 === + (t.contentType || '').indexOf( + 'application/x-www-form-urlencoded' + ) && + Qt.test(t.data) && + 'data'); + if (s || 'jsonp' === t.dataTypes[0]) + return ( + (i = t.jsonpCallback = g(t.jsonpCallback) + ? t.jsonpCallback() + : t.jsonpCallback), + s + ? (t[s] = t[s].replace(Qt, '$1' + i)) + : !1 !== t.jsonp && + (t.url += (kt.test(t.url) ? '&' : '?') + t.jsonp + '=' + i), + (t.converters['script json'] = function() { + return a || w.error(i + ' was not called'), a[0]; + }), + (t.dataTypes[0] = 'json'), + (o = e[i]), + (e[i] = function() { + a = arguments; + }), + r.always(function() { + void 0 === o ? w(e).removeProp(i) : (e[i] = o), + t[i] && ((t.jsonpCallback = n.jsonpCallback), Yt.push(i)), + a && g(o) && o(a[0]), + (a = o = void 0); + }), + 'script' + ); + }), + (h.createHTMLDocument = (function() { + var e = r.implementation.createHTMLDocument('').body; + return ( + (e.innerHTML = '<form></form><form></form>'), + 2 === e.childNodes.length + ); + })()), + (w.parseHTML = function(e, t, n) { + if ('string' != typeof e) return []; + 'boolean' == typeof t && ((n = t), (t = !1)); + var i, o, a; + return ( + t || + (h.createHTMLDocument + ? (((i = (t = r.implementation.createHTMLDocument( + '' + )).createElement('base')).href = r.location.href), + t.head.appendChild(i)) + : (t = r)), + (o = A.exec(e)), + (a = !n && []), + o + ? [t.createElement(o[1])] + : ((o = xe([e], t, a)), + a && a.length && w(a).remove(), + w.merge([], o.childNodes)) + ); + }), + (w.fn.load = function(e, t, n) { + var r, + i, + o, + a = this, + s = e.indexOf(' '); + return ( + s > -1 && ((r = vt(e.slice(s))), (e = e.slice(0, s))), + g(t) + ? ((n = t), (t = void 0)) + : t && 'object' == typeof t && (i = 'POST'), + a.length > 0 && + w + .ajax({ + url: e, + type: i || 'GET', + dataType: 'html', + data: t, + }) + .done(function(e) { + (o = arguments), + a.html( + r + ? w('<div>') + .append(w.parseHTML(e)) + .find(r) + : e + ); + }) + .always( + n && + function(e, t) { + a.each(function() { + n.apply(this, o || [e.responseText, t, e]); + }); + } + ), + this + ); + }), + w.each( + [ + 'ajaxStart', + 'ajaxStop', + 'ajaxComplete', + 'ajaxError', + 'ajaxSuccess', + 'ajaxSend', + ], + function(e, t) { + w.fn[t] = function(e) { + return this.on(t, e); + }; + } + ), + (w.expr.pseudos.animated = function(e) { + return w.grep(w.timers, function(t) { + return e === t.elem; + }).length; + }), + (w.offset = { + setOffset: function(e, t, n) { + var r, + i, + o, + a, + s, + u, + l, + c = w.css(e, 'position'), + f = w(e), + p = {}; + 'static' === c && (e.style.position = 'relative'), + (s = f.offset()), + (o = w.css(e, 'top')), + (u = w.css(e, 'left')), + (l = + ('absolute' === c || 'fixed' === c) && + (o + u).indexOf('auto') > -1) + ? ((a = (r = f.position()).top), (i = r.left)) + : ((a = parseFloat(o) || 0), (i = parseFloat(u) || 0)), + g(t) && (t = t.call(e, n, w.extend({}, s))), + null != t.top && (p.top = t.top - s.top + a), + null != t.left && (p.left = t.left - s.left + i), + 'using' in t ? t.using.call(e, p) : f.css(p); + }, + }), + w.fn.extend({ + offset: function(e) { + if (arguments.length) + return void 0 === e + ? this + : this.each(function(t) { + w.offset.setOffset(this, e, t); + }); + var t, + n, + r = this[0]; + if (r) + return r.getClientRects().length + ? ((t = r.getBoundingClientRect()), + (n = r.ownerDocument.defaultView), + { + top: t.top + n.pageYOffset, + left: t.left + n.pageXOffset, + }) + : { + top: 0, + left: 0, + }; + }, + position: function() { + if (this[0]) { + var e, + t, + n, + r = this[0], + i = { + top: 0, + left: 0, + }; + if ('fixed' === w.css(r, 'position')) + t = r.getBoundingClientRect(); + else { + (t = this.offset()), + (n = r.ownerDocument), + (e = r.offsetParent || n.documentElement); + + while ( + e && + (e === n.body || e === n.documentElement) && + 'static' === w.css(e, 'position') + ) + e = e.parentNode; + + e && + e !== r && + 1 === e.nodeType && + (((i = w(e).offset()).top += w.css(e, 'borderTopWidth', !0)), + (i.left += w.css(e, 'borderLeftWidth', !0))); + } + return { + top: t.top - i.top - w.css(r, 'marginTop', !0), + left: t.left - i.left - w.css(r, 'marginLeft', !0), + }; + } + }, + offsetParent: function() { + return this.map(function() { + var e = this.offsetParent; + + while (e && 'static' === w.css(e, 'position')) e = e.offsetParent; + + return e || be; + }); + }, + }), + w.each( + { + scrollLeft: 'pageXOffset', + scrollTop: 'pageYOffset', + }, + function(e, t) { + var n = 'pageYOffset' === t; + + w.fn[e] = function(r) { + return z( + this, + function(e, r, i) { + var o; + if ( + (y(e) ? (o = e) : 9 === e.nodeType && (o = e.defaultView), + void 0 === i) + ) + return o ? o[t] : e[r]; + o + ? o.scrollTo(n ? o.pageXOffset : i, n ? i : o.pageYOffset) + : (e[r] = i); + }, + e, + r, + arguments.length + ); + }; + } + ), + w.each(['top', 'left'], function(e, t) { + w.cssHooks[t] = _e(h.pixelPosition, function(e, n) { + if (n) + return (n = Fe(e, t)), We.test(n) ? w(e).position()[t] + 'px' : n; + }); + }), + w.each( + { + Height: 'height', + Width: 'width', + }, + function(e, t) { + w.each( + { + padding: 'inner' + e, + content: t, + '': 'outer' + e, + }, + function(n, r) { + w.fn[r] = function(i, o) { + var a = arguments.length && (n || 'boolean' != typeof i), + s = n || (!0 === i || !0 === o ? 'margin' : 'border'); + return z( + this, + function(t, n, i) { + var o; + return y(t) + ? 0 === r.indexOf('outer') + ? t['inner' + e] + : t.document.documentElement['client' + e] + : 9 === t.nodeType + ? ((o = t.documentElement), + Math.max( + t.body['scroll' + e], + o['scroll' + e], + t.body['offset' + e], + o['offset' + e], + o['client' + e] + )) + : void 0 === i + ? w.css(t, n, s) + : w.style(t, n, i, s); + }, + t, + a ? i : void 0, + a + ); + }; + } + ); + } + ), + w.each( + 'blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu'.split( + ' ' + ), + function(e, t) { + w.fn[t] = function(e, n) { + return arguments.length > 0 + ? this.on(t, null, e, n) + : this.trigger(t); + }; + } + ), + w.fn.extend({ + hover: function(e, t) { + return this.mouseenter(e).mouseleave(t || e); + }, + }), + w.fn.extend({ + bind: function(e, t, n) { + return this.on(e, null, t, n); + }, + unbind: function(e, t) { + return this.off(e, null, t); + }, + delegate: function(e, t, n, r) { + return this.on(t, e, n, r); + }, + undelegate: function(e, t, n) { + return 1 === arguments.length + ? this.off(e, '**') + : this.off(t, e || '**', n); + }, + }), + (w.proxy = function(e, t) { + var n, r, i; + if (('string' == typeof t && ((n = e[t]), (t = e), (e = n)), g(e))) + return ( + (r = o.call(arguments, 2)), + (i = function() { + return e.apply(t || this, r.concat(o.call(arguments))); + }), + (i.guid = e.guid = e.guid || w.guid++), + i + ); + }), + (w.holdReady = function(e) { + e ? w.readyWait++ : w.ready(!0); + }), + (w.isArray = Array.isArray), + (w.parseJSON = JSON.parse), + (w.nodeName = N), + (w.isFunction = g), + (w.isWindow = y), + (w.camelCase = G), + (w.type = x), + (w.now = Date.now), + (w.isNumeric = function(e) { + var t = w.type(e); + return ( + ('number' === t || 'string' === t) && !isNaN(e - parseFloat(e)) + ); + }), + 'function' == typeof undefined && + undefined.amd && + undefined('jquery', [], function() { + return w; + }); + var Jt = e.jQuery, + Kt = e.$; + return ( + (w.noConflict = function(t) { + return ( + e.$ === w && (e.$ = Kt), t && e.jQuery === w && (e.jQuery = Jt), w + ); + }), + t || (e.jQuery = e.$ = w), + w + ); + }); + }); + + // This module attempts to square cheerio with jquery + var PARSER_CLASS = 'mercury-parsing-container'; + var PARSING_NODE; + jquery_min.noConflict(); + + var $ = function $(selector, context, rootjQuery) { + var contextOverride = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + + if (contextOverride) { + if (context && typeof context === 'string') { + context = PARSING_NODE.find(context); + } else if (!context) { + context = PARSING_NODE; + } + } + + return new jquery_min.fn.init(selector, context, rootjQuery); // eslint-disable-line new-cap + }; // eslint-disable-next-line no-multi-assign + + $.fn = $.prototype = jquery_min.fn; + jquery_min.extend($, jquery_min); // copy's trim, extend etc to $ + + var removeUnusedTags = function removeUnusedTags($node) { + // remove scripts and stylesheets + $node.find('script, style, link[rel="stylesheet"]').remove(); + return $node; + }; + + $.cloneHtml = function() { + var html = removeUnusedTags($('html', null, null, false).clone()); + return html + .children() + .wrap('<div />') + .wrap('<div />'); + }; + + $.root = function() { + return $('*').first(); + }; + + $.browser = true; + + var isContainer = function isContainer($node) { + var el = $node.get(0); + + if (el && el.tagName) { + return el.tagName.toLowerCase() === 'container'; + } + + return false; + }; + + $.html = function($node) { + if ($node) { + // we never want to return a parsing container, only its children + if (isContainer($node) || isContainer($node.children('container'))) { + return $node.children('container').html() || $node.html(); + } + + return $('<div>') + .append($node.eq(0).clone()) + .html(); + } + + var $body = removeUnusedTags($('body', null, null, false).clone()); + var $head = removeUnusedTags($('head', null, null, false).clone()); + + if (PARSING_NODE && PARSING_NODE.length > 0) { + return PARSING_NODE.children().html(); + } + + var html = $('<container />') + .append($('<container>'.concat($head.html(), '</container>'))) + .append($('<container>'.concat($body.html(), '</container>'))) + .wrap('<container />') + .parent() + .html(); + return html; + }; // eslint-disable-next-line no-unused-vars + + $.load = function(html) { + var returnHtml = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!html) { + html = $.cloneHtml(); + } else { + html = $('<container />').html(html); + } + + PARSING_NODE = + PARSING_NODE || + $('<div class="'.concat(PARSER_CLASS, '" style="display:none;" />')); // Strip scripts + + html = removeUnusedTags(html); // Remove comments + + html + .find('*') + .contents() + .each(function() { + // eslint-disable-next-line no-undef + if (this.nodeType === Node.COMMENT_NODE) { + $(this).remove(); + } + }); + PARSING_NODE.html(html); + if (returnHtml) + return { + $: $, + html: html.html(), + }; + return $; + }; + + // this is a shim for the browser build; + // iconv-lite doubles build size, and we + // don't need it for already rendered text + var iconv = { + encodingExists: function encodingExists() { + return false; + }, + decode: function decode(s) { + return s; + }, + }; + + var NORMALIZE_RE = /\s{2,}/g; + function normalizeSpaces(text) { + return text.replace(NORMALIZE_RE, ' ').trim(); + } + + // Given a node type to search for, and a list of regular expressions, + // look to see if this extraction can be found in the URL. Expects + // that each expression in r_list will return group(1) as the proper + // string to be cleaned. + // Only used for date_published currently. + function extractFromUrl(url, regexList) { + var matchRe = regexList.find(function(re) { + return re.test(url); + }); + + if (matchRe) { + return matchRe.exec(url)[1]; + } + + return null; + } + + var _stringWs = + '\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'; + + var space = '[' + _stringWs + ']'; + 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 !!_stringWs[KEY]() || non[KEY]() != non; + }); + var fn = (exp[KEY] = FORCE ? exec(trim) : _stringWs[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; + }); + + var _stringTrim = exporter; + + var $parseInt = _global.parseInt; + + var $trim = _stringTrim.trim; + + var hex = /^[-+]?0[xX]/; + var _parseInt = + $parseInt(_stringWs + '08') !== 8 || $parseInt(_stringWs + '0x16') !== 22 + ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, radix >>> 0 || (hex.test(string) ? 16 : 10)); + } + : $parseInt; + + // 18.2.5 parseInt(string, radix) + + _export(_export.G + _export.F * (parseInt != _parseInt), { + parseInt: _parseInt, + }); + + var _parseInt$1 = _core.parseInt; + + var _parseInt$2 = _parseInt$1; + + // An expression that looks to try to find the page digit within a URL, if + // it exists. + // Matches: + // page=1 + // pg=1 + // p=1 + // paging=12 + // pag=7 + // pagination/1 + // paging/88 + // pa/83 + // p/11 + // + // Does not match: + // pg=102 + // page:2 + var PAGE_IN_HREF_RE = new RegExp( + '(page|paging|(p(a|g|ag)?(e|enum|ewanted|ing|ination)))?(=|/)([0-9]{1,3})', + 'i' + ); + var HAS_ALPHA_RE = /[a-z]/i; + var IS_ALPHA_RE = /^[a-z]+$/i; + var IS_DIGIT_RE = /^[0-9]+$/i; + var ENCODING_RE = /charset=([\w-]+)\b/; + var DEFAULT_ENCODING = 'utf-8'; + + function pageNumFromUrl(url) { + var matches = url.match(PAGE_IN_HREF_RE); + if (!matches) return null; + + var pageNum = _parseInt$2(matches[6], 10); // Return pageNum < 100, otherwise + // return null + + return pageNum < 100 ? pageNum : null; + } + + function removeAnchor(url) { + return url.split('#')[0].replace(/\/$/, ''); + } + + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + + _export(_export.S, 'Array', { + isArray: _isArray, + }); + + var isArray = _core.Array.isArray; + + var isArray$1 = isArray; + + function _arrayWithHoles(arr) { + if (isArray$1(arr)) return arr; + } + + var arrayWithHoles = _arrayWithHoles; + + var core_getIterator = (_core.getIterator = function(it) { + var iterFn = core_getIteratorMethod(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return _anObject(iterFn.call(it)); + }); + + var getIterator = core_getIterator; + + var getIterator$1 = getIterator; + + function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for ( + var _i = getIterator$1(arr), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i['return'] != null) _i['return'](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + var iterableToArrayLimit = _iterableToArrayLimit; + + function _nonIterableRest() { + throw new TypeError('Invalid attempt to destructure non-iterable instance'); + } + + var nonIterableRest = _nonIterableRest; + + function _slicedToArray(arr, i) { + return ( + arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest() + ); + } + + var slicedToArray = _slicedToArray; + + function isGoodSegment(segment, index, firstSegmentHasLetters) { + var goodSegment = true; // If this is purely a number, and it's the first or second + // url_segment, it's probably a page number. Remove it. + + if (index < 2 && IS_DIGIT_RE.test(segment) && segment.length < 3) { + goodSegment = true; + } // If this is the first url_segment and it's just "index", + // remove it + + if (index === 0 && segment.toLowerCase() === 'index') { + goodSegment = false; + } // If our first or second url_segment is smaller than 3 characters, + // and the first url_segment had no alphas, remove it. + + if (index < 2 && segment.length < 3 && !firstSegmentHasLetters) { + goodSegment = false; + } + + return goodSegment; + } // Take a URL, and return the article base of said URL. That is, no + // pagination data exists in it. Useful for comparing to other links + // that might have pagination data within them. + + function articleBaseUrl(url$$1, parsed) { + var parsedUrl = parsed || url.parse(url$$1); + var protocol = parsedUrl.protocol, + host = parsedUrl.host, + path = parsedUrl.path; + var firstSegmentHasLetters = false; + var cleanedSegments = path + .split('/') + .reverse() + .reduce(function(acc, rawSegment, index) { + var segment = rawSegment; // Split off and save anything that looks like a file type. + + if (segment.includes('.')) { + var _segment$split = segment.split('.'), + _segment$split2 = slicedToArray(_segment$split, 2), + possibleSegment = _segment$split2[0], + fileExt = _segment$split2[1]; + + if (IS_ALPHA_RE.test(fileExt)) { + segment = possibleSegment; + } + } // If our first or second segment has anything looking like a page + // number, remove it. + + if (PAGE_IN_HREF_RE.test(segment) && index < 2) { + segment = segment.replace(PAGE_IN_HREF_RE, ''); + } // If we're on the first segment, check to see if we have any + // characters in it. The first segment is actually the last bit of + // the URL, and this will be helpful to determine if we're on a URL + // segment that looks like "/2/" for example. + + if (index === 0) { + firstSegmentHasLetters = HAS_ALPHA_RE.test(segment); + } // If it's not marked for deletion, push it to cleaned_segments. + + if (isGoodSegment(segment, index, firstSegmentHasLetters)) { + acc.push(segment); + } + + return acc; + }, []); + return '' + .concat(protocol, '//') + .concat(host) + .concat(cleanedSegments.reverse().join('/')); + } + + // Given a string, return True if it appears to have an ending sentence + // within it, false otherwise. + var SENTENCE_END_RE = new RegExp('.( |$)'); + function hasSentenceEnd(text) { + return SENTENCE_END_RE.test(text); + } + + function excerptContent(content) { + var words = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; + return content + .trim() + .split(/\s+/) + .slice(0, words) + .join(' '); + } + + // used in our fetchResource function to + // ensure correctly encoded responses + + function getEncoding(str) { + var encoding = DEFAULT_ENCODING; + + if (ENCODING_RE.test(str)) { + var testEncode = ENCODING_RE.exec(str)[1]; + + if (iconv.encodingExists(testEncode)) { + encoding = testEncode; + } + } + + return encoding; + } + + var nextLine = function(str) { + var offset = 0; + str = str.toString(); + return iterator; + + function iterator() { + var i1 = str.indexOf('\r\n', offset); + var i2 = str.indexOf('\n', offset); + var i3 = str.indexOf('\r', offset); + var indexes = [i1, i2, i3]; + var index = indexes + .sort(function(a, b) { + if (a > b) return 1; + if (a < b) return -1; + return 0; + }) + .filter(function(index) { + return index !== -1; + })[0]; + if (index !== undefined) return extract(index, index === i1 ? 2 : 1); + var length = str.length; + if (length === offset) return null; + return extract(length, 0); + } + + function extract(index, skip) { + var line = str.substr(offset, index - offset); + offset = index + skip; + return line; + } + }; + + // RFC-2068 Start-Line definitions: + // Request-Line: Method SP Request-URI SP HTTP-Version CRLF + // Status-Line: HTTP-Version SP Status-Code SP Reason-Phrase CRLF + + var startLine = /^[A-Z_]+(\/\d\.\d)? /; + var requestLine = /^([A-Z_]+) (.+) [A-Z]+\/(\d)\.(\d)$/; + var statusLine = /^[A-Z]+\/(\d)\.(\d) (\d{3}) (.*)$/; + + var httpHeaders = function(data, onlyHeaders) { + return parse$1(normalize(data), onlyHeaders); + }; + + function parse$1(str, onlyHeaders) { + var line = firstLine(str); + var match; + + if (onlyHeaders && startLine.test(line)) { + return parseHeaders(str); + } else if ((match = line.match(requestLine)) !== null) { + return { + method: match[1], + url: match[2], + version: { + major: parseInt(match[3], 10), + minor: parseInt(match[4], 10), + }, + headers: parseHeaders(str), + }; + } else if ((match = line.match(statusLine)) !== null) { + return { + version: { + major: parseInt(match[1], 10), + minor: parseInt(match[2], 10), + }, + statusCode: parseInt(match[3], 10), + statusMessage: match[4], + headers: parseHeaders(str), + }; + } else { + return parseHeaders(str); + } + } + + function parseHeaders(str) { + var headers = {}; + var next = nextLine(str); + var line = next(); + var index, name, value; + if (startLine.test(line)) line = next(); + + while (line) { + // subsequent lines in multi-line headers start with whitespace + if (line[0] === ' ' || line[0] === '\t') { + value += ' ' + line.trim(); + line = next(); + continue; + } + + if (name) addHeaderLine(name, value, headers); + index = line.indexOf(':'); + name = line.substr(0, index); + value = line.substr(index + 1).trim(); + line = next(); + } + + if (name) addHeaderLine(name, value, headers); + return headers; + } + + function normalize(str) { + if (str && str._header) str = str._header; // extra headers from http.ServerResponse object + + if (!str || typeof str.toString !== 'function') return ''; + return str.toString().trim(); + } + + function firstLine(str) { + return str.slice(0, str.indexOf('\r\n')); + } // The following function is lifted from: + // https://github.com/nodejs/node/blob/f1294f5bfd7f02bce8029818be9c92de59749137/lib/_http_incoming.js#L116-L170 + // + // Add the given (field, value) pair to the message + // + // Per RFC2616, section 4.2 it is acceptable to join multiple instances of the + // same header with a ', ' if the header in question supports specification of + // multiple values this way. If not, we declare the first instance the winner + // and drop the second. Extended header fields (those beginning with 'x-') are + // always joined. + + function addHeaderLine(field, value, dest) { + field = field.toLowerCase(); + + switch (field) { + // Array headers: + case 'set-cookie': + if (dest[field] !== undefined) { + dest[field].push(value); + } else { + dest[field] = [value]; + } + + break; + // list is taken from: + // https://mxr.mozilla.org/mozilla/source/netwerk/protocol/http/src/nsHttpHeaderArray.cpp + + case 'content-type': + case 'content-length': + case 'user-agent': + case 'referer': + case 'host': + case 'authorization': + case 'proxy-authorization': + case 'if-modified-since': + case 'if-unmodified-since': + case 'from': + case 'location': + case 'max-forwards': + case 'retry-after': + case 'etag': + case 'last-modified': + case 'server': + case 'age': + case 'expires': + // drop duplicates + if (dest[field] === undefined) dest[field] = value; + break; + + default: + // make comma-separated list + if (typeof dest[field] === 'string') { + dest[field] += ', ' + value; + } else { + dest[field] = value; + } + } + } + + // Browser Request + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + var XHR = XMLHttpRequest; + if (!XHR) throw new Error('missing XMLHttpRequest'); + request.log = { + trace: noop, + debug: noop, + info: noop, + warn: noop, + error: noop, + }; + var DEFAULT_TIMEOUT = 3 * 60 * 1000; // 3 minutes + // + // request + // + + function request(options, callback) { + // The entry-point to the API: prep the options object and pass the real work to run_xhr. + if (typeof callback !== 'function') + throw new Error('Bad callback given: ' + callback); + if (!options) throw new Error('No options given'); + var options_onResponse = options.onResponse; // Save this for later. + + if (typeof options === 'string') + options = { + uri: options, + }; + else options = JSON.parse(JSON.stringify(options)); // Use a duplicate for mutating. + + options.onResponse = options_onResponse; // And put it back. + + if (options.verbose) request.log = getLogger(); + + if (options.url) { + options.uri = options.url; + delete options.url; + } + + if (!options.uri && options.uri !== '') + throw new Error('options.uri is a required argument'); + if (typeof options.uri != 'string') + throw new Error('options.uri must be a string'); + var unsupported_options = [ + 'proxy', + '_redirectsFollowed', + 'maxRedirects', + 'followRedirect', + ]; + + for (var i = 0; i < unsupported_options.length; i++) + if (options[unsupported_options[i]]) + throw new Error( + 'options.' + unsupported_options[i] + ' is not supported' + ); + + options.callback = callback; + options.method = options.method || 'GET'; + options.headers = options.headers || {}; + options.body = options.body || null; + options.timeout = options.timeout || request.DEFAULT_TIMEOUT; + if (options.headers.host) + throw new Error('Options.headers.host is not supported'); + + if (options.json) { + options.headers.accept = options.headers.accept || 'application/json'; + if (options.method !== 'GET') + options.headers['content-type'] = 'application/json'; + if (typeof options.json !== 'boolean') + options.body = JSON.stringify(options.json); + else if (typeof options.body !== 'string') + options.body = JSON.stringify(options.body); + } //BEGIN QS Hack + + var serialize = function(obj) { + var str = []; + + for (var p in obj) + if (obj.hasOwnProperty(p)) { + str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p])); + } + + return str.join('&'); + }; + + if (options.qs) { + var qs = + typeof options.qs == 'string' ? options.qs : serialize(options.qs); + + if (options.uri.indexOf('?') !== -1) { + //no get params + options.uri = options.uri + '&' + qs; + } else { + //existing get params + options.uri = options.uri + '?' + qs; + } + } //END QS Hack + //BEGIN FORM Hack + + var multipart = function(obj) { + //todo: support file type (useful?) + var result = {}; + result.boundry = + '-------------------------------' + + Math.floor(Math.random() * 1000000000); + var lines = []; + + for (var p in obj) { + if (obj.hasOwnProperty(p)) { + lines.push( + '--' + + result.boundry + + '\n' + + 'Content-Disposition: form-data; name="' + + p + + '"' + + '\n' + + '\n' + + obj[p] + + '\n' + ); + } + } + + lines.push('--' + result.boundry + '--'); + result.body = lines.join(''); + result.length = result.body.length; + result.type = 'multipart/form-data; boundary=' + result.boundry; + return result; + }; + + if (options.form) { + if (typeof options.form == 'string') throw 'form name unsupported'; + + if (options.method === 'POST') { + var encoding = ( + options.encoding || 'application/x-www-form-urlencoded' + ).toLowerCase(); + options.headers['content-type'] = encoding; + + switch (encoding) { + case 'application/x-www-form-urlencoded': + options.body = serialize(options.form).replace(/%20/g, '+'); + break; + + case 'multipart/form-data': + var multi = multipart(options.form); //options.headers['content-length'] = multi.length; + + options.body = multi.body; + options.headers['content-type'] = multi.type; + break; + + default: + throw new Error('unsupported encoding:' + encoding); + } + } + } //END FORM Hack + // If onResponse is boolean true, call back immediately when the response is known, + // not when the full request is complete. + + options.onResponse = options.onResponse || noop; + + if (options.onResponse === true) { + options.onResponse = callback; + options.callback = noop; + } // XXX Browsers do not like this. + //if(options.body) + // options.headers['content-length'] = options.body.length; + // HTTP basic authentication + + if (!options.headers.authorization && options.auth) + options.headers.authorization = + 'Basic ' + b64_enc(options.auth.username + ':' + options.auth.password); + return run_xhr(options); + } + + var req_seq = 0; + + function run_xhr(options) { + var xhr = new XHR(), + timed_out = false, + is_cors = is_crossDomain(options.uri), + supports_cors = 'withCredentials' in xhr; + req_seq += 1; + xhr.seq_id = req_seq; + xhr.id = req_seq + ': ' + options.method + ' ' + options.uri; + xhr._id = xhr.id; // I know I will type "_id" from habit all the time. + + if (is_cors && !supports_cors) { + var cors_err = new Error( + 'Browser does not support cross-origin request: ' + options.uri + ); + cors_err.cors = 'unsupported'; + return options.callback(cors_err, xhr); + } + + xhr.timeoutTimer = setTimeout(too_late, options.timeout); + + function too_late() { + timed_out = true; + var er = new Error('ETIMEDOUT'); + er.code = 'ETIMEDOUT'; + er.duration = options.timeout; + request.log.error('Timeout', { + id: xhr._id, + milliseconds: options.timeout, + }); + return options.callback(er, xhr); + } // Some states can be skipped over, so remember what is still incomplete. + + var did = { + response: false, + loading: false, + end: false, + }; + xhr.onreadystatechange = on_state_change; + xhr.open(options.method, options.uri, true); // asynchronous + + if (is_cors) xhr.withCredentials = !!options.withCredentials; + xhr.send(options.body); + return xhr; + + function on_state_change(event) { + if (timed_out) + return request.log.debug('Ignoring timed out state change', { + state: xhr.readyState, + id: xhr.id, + }); + request.log.debug('State change', { + state: xhr.readyState, + id: xhr.id, + timed_out: timed_out, + }); + + if (xhr.readyState === XHR.OPENED) { + request.log.debug('Request started', { + id: xhr.id, + }); + + for (var key in options.headers) + xhr.setRequestHeader(key, options.headers[key]); + } else if (xhr.readyState === XHR.HEADERS_RECEIVED) on_response(); + else if (xhr.readyState === XHR.LOADING) { + on_response(); + on_loading(); + } else if (xhr.readyState === XHR.DONE) { + on_response(); + on_loading(); + on_end(); + } + } + + function on_response() { + if (did.response) return; + did.response = true; + request.log.debug('Got response', { + id: xhr.id, + status: xhr.status, + }); + clearTimeout(xhr.timeoutTimer); + xhr.statusCode = xhr.status; // Node request compatibility + // Detect failed CORS requests. + + if (is_cors && xhr.statusCode == 0) { + var cors_err = new Error('CORS request rejected: ' + options.uri); + cors_err.cors = 'rejected'; // Do not process this request further. + + did.loading = true; + did.end = true; + return options.callback(cors_err, xhr); + } + + options.onResponse(null, xhr); + } + + function on_loading() { + if (did.loading) return; + did.loading = true; + request.log.debug('Response body loading', { + id: xhr.id, + }); // TODO: Maybe simulate "data" events by watching xhr.responseText + } + + function on_end() { + if (did.end) return; + did.end = true; + request.log.debug('Request done', { + id: xhr.id, + }); + xhr.body = xhr.responseText; + xhr.headers = httpHeaders(xhr.getAllResponseHeaders()); + + if (options.json) { + try { + xhr.body = JSON.parse(xhr.responseText); + } catch (er) { + return options.callback(er, xhr); + } + } + + options.callback(null, xhr, xhr.body); + } + } // request + + request.withCredentials = false; + request.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; // + // defaults + // + + request.defaults = function(options, requester) { + var def = function(method) { + var d = function(params, callback) { + if (typeof params === 'string') + params = { + uri: params, + }; + else { + params = JSON.parse(JSON.stringify(params)); + } + + for (var i in options) { + if (params[i] === undefined) params[i] = options[i]; + } + + return method(params, callback); + }; + + return d; + }; + + var de = def(request); + de.get = def(request.get); + de.post = def(request.post); + de.put = def(request.put); + de.head = def(request.head); + return de; + }; // + // HTTP method shortcuts + // + + var shortcuts = ['get', 'put', 'post', 'head']; + shortcuts.forEach(function(shortcut) { + var method = shortcut.toUpperCase(); + var func = shortcut.toLowerCase(); + + request[func] = function(opts) { + if (typeof opts === 'string') + opts = { + method: method, + uri: opts, + }; + else { + opts = JSON.parse(JSON.stringify(opts)); + opts.method = method; + } + var args = [opts].concat(Array.prototype.slice.apply(arguments, [1])); + return request.apply(this, args); + }; + }); // + // CouchDB shortcut + // + + request.couch = function(options, callback) { + if (typeof options === 'string') + options = { + uri: options, // Just use the request API to do JSON. + }; + options.json = true; + if (options.body) options.json = options.body; + delete options.body; + callback = callback || noop; + var xhr = request(options, couch_handler); + return xhr; + + function couch_handler(er, resp, body) { + if (er) return callback(er, resp, body); + + if ((resp.statusCode < 200 || resp.statusCode > 299) && body.error) { + // The body is a Couch JSON object indicating the error. + er = new Error( + 'CouchDB error: ' + (body.error.reason || body.error.error) + ); + + for (var key in body) er[key] = body[key]; + + return callback(er, resp, body); + } + + return callback(er, resp, body); + } + }; // + // Utility + // + + function noop() {} + + function getLogger() { + var logger = {}, + levels = ['trace', 'debug', 'info', 'warn', 'error'], + level, + i; + + for (i = 0; i < levels.length; i++) { + level = levels[i]; + logger[level] = noop; + if (typeof console !== 'undefined' && console && console[level]) + logger[level] = formatted(console, level); + } + + return logger; + } + + function formatted(obj, method) { + return formatted_logger; + + function formatted_logger(str, context) { + if (typeof context === 'object') str += ' ' + JSON.stringify(context); + return obj[method].call(obj, str); + } + } // Return whether a URL is a cross-domain request. + + function is_crossDomain(url) { + var rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/; // jQuery #8138, IE may throw an exception when accessing + // a field from window.location if document.domain has been set + + var ajaxLocation; + + try { + ajaxLocation = location.href; + } catch (e) { + // Use the href attribute of an A element since IE will modify it given document.location + ajaxLocation = document.createElement('a'); + ajaxLocation.href = ''; + ajaxLocation = ajaxLocation.href; + } + + var ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [], + parts = rurl.exec(url.toLowerCase()); + var result = !!( + parts && + (parts[1] != ajaxLocParts[1] || + parts[2] != ajaxLocParts[2] || + (parts[3] || (parts[1] === 'http:' ? 80 : 443)) != + (ajaxLocParts[3] || (ajaxLocParts[1] === 'http:' ? 80 : 443))) + ); //console.debug('is_crossDomain('+url+') -> ' + result) + + return result; + } // MIT License from http://phpjs.org/functions/base64_encode:358 + + function b64_enc(data) { + // Encodes string using MIME base64 algorithm + var b64 = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + var o1, + o2, + o3, + h1, + h2, + h3, + h4, + bits, + i = 0, + ac = 0, + enc = '', + tmp_arr = []; + + if (!data) { + return data; + } // assume utf8 data + // data = this.utf8_encode(data+''); + + do { + // pack three octets into four hexets + o1 = data.charCodeAt(i++); + o2 = data.charCodeAt(i++); + o3 = data.charCodeAt(i++); + bits = (o1 << 16) | (o2 << 8) | o3; + h1 = (bits >> 18) & 0x3f; + h2 = (bits >> 12) & 0x3f; + h3 = (bits >> 6) & 0x3f; + h4 = bits & 0x3f; // use hexets to index into b64, and append result to encoded string + + tmp_arr[ac++] = + b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); + } while (i < data.length); + + enc = tmp_arr.join(''); + + switch (data.length % 3) { + case 1: + enc = enc.slice(0, -2) + '=='; + break; + + case 2: + enc = enc.slice(0, -1) + '='; + break; + } + + return enc; + } + + var browserRequest = request; + + var _marked = + /*#__PURE__*/ + regenerator.mark(range); + + function range() { + var start, + end, + _args = arguments; + return regenerator.wrap( + function range$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + start = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1; + end = _args.length > 1 && _args[1] !== undefined ? _args[1] : 1; + + case 2: + if (!(start <= end)) { + _context.next = 7; + break; + } + + _context.next = 5; + return (start += 1); + + case 5: + _context.next = 2; + break; + + case 7: + case 'end': + return _context.stop(); + } + } + }, + _marked, + this + ); + } + + // extremely simple url validation as a first step + function validateUrl(_ref) { + var hostname = _ref.hostname; + // If this isn't a valid url, return an error message + return !!hostname; + } + + var Errors = { + badUrl: { + error: true, + messages: + 'The url parameter passed does not look like a valid URL. Please check your data and try again.', + }, + }; + + var REQUEST_HEADERS = $.browser + ? {} + : { + 'User-Agent': + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', + }; // The number of milliseconds to attempt to fetch a resource before timing out. + + var FETCH_TIMEOUT = 10000; // Content types that we do not extract content from + + var BAD_CONTENT_TYPES = [ + 'audio/mpeg', + 'image/gif', + 'image/jpeg', + 'image/jpg', + ]; + var BAD_CONTENT_TYPES_RE = new RegExp( + '^('.concat(BAD_CONTENT_TYPES.join('|'), ')$'), + 'i' + ); // Use this setting as the maximum size an article can be + // for us to attempt parsing. Defaults to 5 MB. + + var MAX_CONTENT_LENGTH = 5242880; // Turn the global proxy on or off + + function get(options) { + return new promise$1(function(resolve$$1, reject) { + browserRequest(options, function(err, response, body) { + if (err) { + reject(err); + } else { + resolve$$1({ + body: body, + response: response, + }); + } + }); + }); + } // Evaluate a response to ensure it's something we should be keeping. + // This does not validate in the sense of a response being 200 level or + // not. Validation here means that we haven't found reason to bail from + // further processing of this url. + + function validateResponse(response) { + var parseNon2xx = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + // Check if we got a valid status code + // This isn't great, but I'm requiring a statusMessage to be set + // before short circuiting b/c nock doesn't set it in tests + // statusMessage only not set in nock response, in which case + // I check statusCode, which is currently only 200 for OK responses + // in tests + if ( + (response.statusMessage && response.statusMessage !== 'OK') || + response.statusCode !== 200 + ) { + if (!response.statusCode) { + throw new Error( + 'Unable to fetch content. Original exception was '.concat( + response.error + ) + ); + } else if (!parseNon2xx) { + throw new Error( + 'Resource returned a response status code of '.concat( + response.statusCode, + ' and resource was instructed to reject non-2xx level status codes.' + ) + ); + } + } + + var _response$headers = response.headers, + contentType = _response$headers['content-type'], + contentLength = _response$headers['content-length']; // Check that the content is not in BAD_CONTENT_TYPES + + if (BAD_CONTENT_TYPES_RE.test(contentType)) { + throw new Error( + 'Content-type for this resource was '.concat( + contentType, + ' and is not allowed.' + ) + ); + } // Check that the content length is below maximum + + if (contentLength > MAX_CONTENT_LENGTH) { + throw new Error( + 'Content for this resource was too large. Maximum content length is '.concat( + MAX_CONTENT_LENGTH, + '.' + ) + ); + } + + return true; + } // Grabs the last two pieces of the URL and joins them back together + // TODO: This should gracefully handle timeouts and raise the + // proper exceptions on the many failure cases of HTTP. + // TODO: Ensure we are not fetching something enormous. Always return + // unicode content for HTML, with charset conversion. + + function fetchResource(_x, _x2) { + return _fetchResource.apply(this, arguments); + } + + function _fetchResource() { + _fetchResource = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee(url$$1, parsedUrl) { + var options, _ref2, response, body; + + return regenerator.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + parsedUrl = parsedUrl || url.parse(encodeURI(url$$1)); + options = { + url: parsedUrl.href, + headers: objectSpread({}, REQUEST_HEADERS), + timeout: FETCH_TIMEOUT, + // Accept cookies + jar: true, + // Set to null so the response returns as binary and body as buffer + // https://github.com/request/request#requestoptions-callback + encoding: null, + // Accept and decode gzip + gzip: true, + // Follow any redirect + followAllRedirects: true, + }; + _context.next = 4; + return get(options); + + case 4: + _ref2 = _context.sent; + response = _ref2.response; + body = _ref2.body; + _context.prev = 7; + validateResponse(response); + return _context.abrupt('return', { + body: body, + response: response, + }); + + case 12: + _context.prev = 12; + _context.t0 = _context['catch'](7); + return _context.abrupt('return', Errors.badUrl); + + case 15: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this, + [[7, 12]] + ); + }) + ); + return _fetchResource.apply(this, arguments); + } + + function convertMetaProp($, from, to) { + $('meta['.concat(from, ']')).each(function(_, node) { + var $node = $(node); + var value = $node.attr(from); + $node.attr(to, value); + $node.removeAttr(from); + }); + return $; + } // For ease of use in extracting from meta tags, + // replace the "content" attribute on meta tags with the + // "value" attribute. + // + // In addition, normalize 'property' attributes to 'name' for ease of + // querying later. See, e.g., og or twitter meta tags. + + function normalizeMetaTags($) { + $ = convertMetaProp($, 'content', 'value'); + $ = convertMetaProp($, 'property', 'name'); + return $; + } + + // all object keys, includes non-enumerable and symbols + + var Reflect = _global.Reflect; + + var _ownKeys = + (Reflect && Reflect.ownKeys) || + function ownKeys(it) { + var keys = _objectGopn.f(_anObject(it)); + var getSymbols = _objectGops.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + + // 26.1.11 Reflect.ownKeys(target) + + _export(_export.S, 'Reflect', { + ownKeys: _ownKeys, + }); + + var ownKeys = _core.Reflect.ownKeys; + + var ownKeys$1 = ownKeys; + + // Spacer images to be removed + var SPACER_RE = new RegExp('transparent|spacer|blank', 'i'); // The class we will use to mark elements we want to keep + // but would normally remove + + var KEEP_CLASS = 'mercury-parser-keep'; + var KEEP_SELECTORS = [ + 'iframe[src^="https://www.youtube.com"]', + 'iframe[src^="https://www.youtube-nocookie.com"]', + 'iframe[src^="http://www.youtube.com"]', + 'iframe[src^="https://player.vimeo"]', + 'iframe[src^="http://player.vimeo"]', + ]; // A list of tags to strip from the output if we encounter them. + + var STRIP_OUTPUT_TAGS = [ + 'title', + 'script', + 'noscript', + 'link', + 'style', + 'hr', + 'embed', + 'iframe', + 'object', + ]; // cleanAttributes + var WHITELIST_ATTRS = [ + 'src', + 'srcset', + 'href', + 'class', + 'id', + 'alt', + 'xlink:href', + 'width', + 'height', + ]; + var WHITELIST_ATTRS_RE = new RegExp( + '^('.concat(WHITELIST_ATTRS.join('|'), ')$'), + 'i' + ); // removeEmpty + + var CLEAN_CONDITIONALLY_TAGS = [ + 'ul', + 'ol', + 'table', + 'div', + 'button', + 'form', + ].join(','); // cleanHeaders + + var HEADER_TAGS = ['h2', 'h3', 'h4', 'h5', 'h6']; + var HEADER_TAG_LIST = HEADER_TAGS.join(','); // // CONTENT FETCHING CONSTANTS //// + // A list of strings that can be considered unlikely candidates when + // extracting content from a resource. These strings are joined together + // and then tested for existence using re:test, so may contain simple, + // non-pipe style regular expression queries if necessary. + + var UNLIKELY_CANDIDATES_BLACKLIST = [ + 'ad-break', + 'adbox', + 'advert', + 'addthis', + 'agegate', + 'aux', + 'blogger-labels', + 'combx', + 'comment', + 'conversation', + 'disqus', + 'entry-unrelated', + 'extra', + 'foot', // 'form', // This is too generic, has too many false positives + 'header', + 'hidden', + 'loader', + 'login', // Note: This can hit 'blogindex'. + 'menu', + 'meta', + 'nav', + 'outbrain', + 'pager', + 'pagination', + 'predicta', // readwriteweb inline ad box + 'presence_control_external', // lifehacker.com container full of false positives + 'popup', + 'printfriendly', + 'related', + 'remove', + 'remark', + 'rss', + 'share', + 'shoutbox', + 'sidebar', + 'sociable', + 'sponsor', + 'taboola', + 'tools', + ]; // A list of strings that can be considered LIKELY candidates when + // extracting content from a resource. Essentially, the inverse of the + // blacklist above - if something matches both blacklist and whitelist, + // it is kept. This is useful, for example, if something has a className + // of "rss-content entry-content". It matched 'rss', so it would normally + // be removed, however, it's also the entry content, so it should be left + // alone. + // + // These strings are joined together and then tested for existence using + // re:test, so may contain simple, non-pipe style regular expression queries + // if necessary. + + var UNLIKELY_CANDIDATES_WHITELIST = [ + 'and', + 'article', + 'body', + 'blogindex', + 'column', + 'content', + 'entry-content-asset', + 'format', // misuse of form + 'hfeed', + 'hentry', + 'hatom', + 'main', + 'page', + 'posts', + 'shadow', + ]; // A list of tags which, if found inside, should cause a <div /> to NOT + // be turned into a paragraph tag. Shallow div tags without these elements + // should be turned into <p /> tags. + + var DIV_TO_P_BLOCK_TAGS = [ + 'a', + 'blockquote', + 'dl', + 'div', + 'img', + 'p', + 'pre', + 'table', + ].join(','); // A list of tags that should be ignored when trying to find the top candidate + // an article container. Checked against className and id. + // + // TODO: Perhaps have these scale based on their odds of being quality? + + var POSITIVE_SCORE_HINTS = [ + 'article', + 'articlecontent', + 'instapaper_body', + 'blog', + 'body', + 'content', + 'entry-content-asset', + 'entry', + 'hentry', + 'main', + 'Normal', + 'page', + 'pagination', + 'permalink', + 'post', + 'story', + 'text', + '[-_]copy', // usatoday + '\\Bcopy', + ]; // The above list, joined into a matching regular expression + + var POSITIVE_SCORE_RE = new RegExp(POSITIVE_SCORE_HINTS.join('|'), 'i'); // Readability publisher-specific guidelines + // an article container. Checked against className and id. + // + // TODO: Perhaps have these scale based on their odds of being quality? + + var NEGATIVE_SCORE_HINTS = [ + 'adbox', + 'advert', + 'author', + 'bio', + 'bookmark', + 'bottom', + 'byline', + 'clear', + 'com-', + 'combx', + 'comment', + 'comment\\B', + 'contact', + 'copy', + 'credit', + 'crumb', + 'date', + 'deck', + 'excerpt', + 'featured', // tnr.com has a featured_content which throws us off + 'foot', + 'footer', + 'footnote', + 'graf', + 'head', + 'info', + 'infotext', // newscientist.com copyright + 'instapaper_ignore', + 'jump', + 'linebreak', + 'link', + 'masthead', + 'media', + 'meta', + 'modal', + 'outbrain', // slate.com junk + 'promo', + 'pr_', // autoblog - press release + 'related', + 'respond', + 'roundcontent', // lifehacker restricted content warning + 'scroll', + 'secondary', + 'share', + 'shopping', + 'shoutbox', + 'side', + 'sidebar', + 'sponsor', + 'stamp', + 'sub', + 'summary', + 'tags', + 'tools', + 'widget', + ]; // The above list, joined into a matching regular expression + + var NEGATIVE_SCORE_RE = new RegExp(NEGATIVE_SCORE_HINTS.join('|'), 'i'); // XPath to try to determine if a page is wordpress. Not always successful. + + var IS_WP_SELECTOR = 'meta[name=generator][value^=WordPress]'; // Match a digit. Pretty clear. + + var PAGE_RE = new RegExp('pag(e|ing|inat)', 'i'); // Match any link text/classname/id that looks like it could mean the next + // http://bit.ly/qneNIT + + var BLOCK_LEVEL_TAGS = [ + 'article', + 'aside', + 'blockquote', + 'body', + 'br', + 'button', + 'canvas', + 'caption', + 'col', + 'colgroup', + 'dd', + 'div', + 'dl', + 'dt', + 'embed', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'header', + 'hgroup', + 'hr', + 'li', + 'map', + 'object', + 'ol', + 'output', + 'p', + 'pre', + 'progress', + 'section', + 'table', + 'tbody', + 'textarea', + 'tfoot', + 'th', + 'thead', + 'tr', + 'ul', + 'video', + ]; + var BLOCK_LEVEL_TAGS_RE = new RegExp( + '^('.concat(BLOCK_LEVEL_TAGS.join('|'), ')$'), + 'i' + ); // The removal is implemented as a blacklist and whitelist, this test finds + // blacklisted elements that aren't whitelisted. We do this all in one + // expression-both because it's only one pass, and because this skips the + // serialization for whitelisted nodes. + + var candidatesBlacklist = UNLIKELY_CANDIDATES_BLACKLIST.join('|'); + var CANDIDATES_BLACKLIST = new RegExp(candidatesBlacklist, 'i'); + var candidatesWhitelist = UNLIKELY_CANDIDATES_WHITELIST.join('|'); + var CANDIDATES_WHITELIST = new RegExp(candidatesWhitelist, 'i'); + + function stripUnlikelyCandidates($) { + // Loop through the provided document and remove any non-link nodes + // that are unlikely candidates for article content. + // + // Links are ignored because there are very often links to content + // that are identified as non-body-content, but may be inside + // article-like content. + // + // :param $: a cheerio object to strip nodes from + // :return $: the cleaned cheerio object + $('*') + .not('a') + .each(function(index, node) { + var $node = $(node); + var classes = $node.attr('class'); + var id = $node.attr('id'); + if (!id && !classes) return; + var classAndId = ''.concat(classes || '', ' ').concat(id || ''); + + if (CANDIDATES_WHITELIST.test(classAndId)) { + return; + } + + if (CANDIDATES_BLACKLIST.test(classAndId)) { + $node.remove(); + } + }); + return $; + } + + // Another good candidate for refactoring/optimizing. + // Very imperative code, I don't love it. - AP + // Given cheerio object, convert consecutive <br /> tags into + // <p /> tags instead. + // + // :param $: A cheerio object + + function brsToPs$$1($) { + var collapsing = false; + $('br').each(function(index, element) { + var $element = $(element); + var nextElement = $element.next().get(0); + + if (nextElement && nextElement.tagName.toLowerCase() === 'br') { + collapsing = true; + $element.remove(); + } else if (collapsing) { + collapsing = false; // $(element).replaceWith('<p />') + + paragraphize(element, $, true); + } + }); + return $; + } + + // make sure it conforms to the constraints of a P tag (I.E. does + // not contain any other block tags.) + // + // If the node is a <br />, it treats the following inline siblings + // as if they were its children. + // + // :param node: The node to paragraphize; this is a raw node + // :param $: The cheerio object to handle dom manipulation + // :param br: Whether or not the passed node is a br + + function paragraphize(node, $) { + var br = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var $node = $(node); + + if (br) { + var sibling = node.nextSibling; + var p = $('<p></p>'); // while the next node is text or not a block level element + // append it to a new p node + + while ( + sibling && + !(sibling.tagName && BLOCK_LEVEL_TAGS_RE.test(sibling.tagName)) + ) { + var _sibling = sibling, + nextSibling = _sibling.nextSibling; + $(sibling).appendTo(p); + sibling = nextSibling; + } + + $node.replaceWith(p); + $node.remove(); + return $; + } + + return $; + } + + function convertDivs($) { + $('div').each(function(index, div) { + var $div = $(div); + var convertable = $div.children(DIV_TO_P_BLOCK_TAGS).length === 0; + + if (convertable) { + convertNodeTo$$1($div, $, 'p'); + } + }); + return $; + } + + function convertSpans($) { + $('span').each(function(index, span) { + var $span = $(span); + var convertable = $span.parents('p, div').length === 0; + + if (convertable) { + convertNodeTo$$1($span, $, 'p'); + } + }); + return $; + } // Loop through the provided doc, and convert any p-like elements to + // actual paragraph tags. + // + // Things fitting this criteria: + // * Multiple consecutive <br /> tags. + // * <div /> tags without block level elements inside of them + // * <span /> tags who are not children of <p /> or <div /> tags. + // + // :param $: A cheerio object to search + // :return cheerio object with new p elements + // (By-reference mutation, though. Returned just for convenience.) + + function convertToParagraphs$$1($) { + $ = brsToPs$$1($); + $ = convertDivs($); + $ = convertSpans($); + return $; + } + + function convertNodeTo$$1($node, $) { + var tag = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'p'; + var node = $node.get(0); + + if (!node) { + return $; + } + + var attrs = getAttrs(node) || {}; // console.log(attrs) + + var attribString = ownKeys$1(attrs) + .map(function(key) { + return ''.concat(key, '=').concat(attrs[key]); + }) + .join(' '); + + var html; + + if ($.browser) { + // In the browser, the contents of noscript tags aren't rendered, therefore + // transforms on the noscript tag (commonly used for lazy-loading) don't work + // as expected. This test case handles that + html = + node.tagName.toLowerCase() === 'noscript' ? $node.text() : $node.html(); + } else { + html = $node.contents(); + } + + $node.replaceWith( + '<' + .concat(tag, ' ') + .concat(attribString, '>') + .concat(html, '</') + .concat(tag, '>') + ); + return $; + } + + function cleanForHeight($img, $) { + var height = _parseInt$2($img.attr('height'), 10); + + var width = _parseInt$2($img.attr('width'), 10) || 20; // Remove images that explicitly have very small heights or + // widths, because they are most likely shims or icons, + // which aren't very useful for reading. + + if ((height || 20) < 10 || width < 10) { + $img.remove(); + } else if (height) { + // Don't ever specify a height on images, so that we can + // scale with respect to width without screwing up the + // aspect ratio. + $img.removeAttr('height'); + } + + return $; + } // Cleans out images where the source string matches transparent/spacer/etc + // TODO This seems very aggressive - AP + + function removeSpacers($img, $) { + if (SPACER_RE.test($img.attr('src'))) { + $img.remove(); + } + + return $; + } + + function cleanImages($article, $) { + $article.find('img').each(function(index, img) { + var $img = $(img); + cleanForHeight($img, $); + removeSpacers($img, $); + }); + return $; + } + + function _arrayWithoutHoles(arr) { + if (isArray$1(arr)) { + for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { + arr2[i] = arr[i]; + } + + return arr2; + } + } + + var arrayWithoutHoles = _arrayWithoutHoles; + + var _createProperty = function(object, index, value) { + if (index in object) _objectDp.f(object, index, _propertyDesc(0, value)); + else object[index] = value; + }; + + _export(_export.S + _export.F * !_iterDetect(function(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 = core_getIteratorMethod(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 + ? _iterCall(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; + }, + }); + + var from_1 = _core.Array.from; + + var from_1$1 = from_1; + + var ITERATOR$4 = _wks('iterator'); + + var core_isIterable = (_core.isIterable = function(it) { + var O = Object(it); + return ( + O[ITERATOR$4] !== undefined || + '@@iterator' in O || // eslint-disable-next-line no-prototype-builtins + _iterators.hasOwnProperty(_classof(O)) + ); + }); + + var isIterable = core_isIterable; + + var isIterable$1 = isIterable; + + function _iterableToArray(iter) { + if ( + isIterable$1(Object(iter)) || + Object.prototype.toString.call(iter) === '[object Arguments]' + ) + return from_1$1(iter); + } + + var iterableToArray = _iterableToArray; + + function _nonIterableSpread() { + throw new TypeError('Invalid attempt to spread non-iterable instance'); + } + + var nonIterableSpread = _nonIterableSpread; + + function _toConsumableArray(arr) { + return ( + arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread() + ); + } + + var toConsumableArray = _toConsumableArray; + + function markToKeep(article, $, url$$1) { + var tags = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + + if (tags.length === 0) { + tags = KEEP_SELECTORS; + } + + if (url$$1) { + var _URL$parse = url.parse(url$$1), + protocol = _URL$parse.protocol, + hostname = _URL$parse.hostname; + + tags = [].concat(toConsumableArray(tags), [ + 'iframe[src^="'.concat(protocol, '//').concat(hostname, '"]'), + ]); + } + + $(tags.join(','), article).addClass(KEEP_CLASS); + return $; + } + + function stripJunkTags(article, $) { + var tags = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + + if (tags.length === 0) { + tags = STRIP_OUTPUT_TAGS; + } // Remove matching elements, but ignore + // any element with a class of mercury-parser-keep + + $(tags.join(','), article) + .not('.'.concat(KEEP_CLASS)) + .remove(); + return $; + } + + // by the title extractor instead. If there's less than 3 of them (<3), + // strip them. Otherwise, turn 'em into H2s. + + function cleanHOnes$$1(article, $) { + var $hOnes = $('h1', article); + + if ($hOnes.length < 3) { + $hOnes.each(function(index, node) { + return $(node).remove(); + }); + } else { + $hOnes.each(function(index, node) { + convertNodeTo$$1($(node), $, 'h2'); + }); + } + + return $; + } + + function removeAllButWhitelist($article, $) { + $article.find('*').each(function(index, node) { + var attrs = getAttrs(node); + setAttrs( + node, + ownKeys$1(attrs).reduce(function(acc, attr) { + if (WHITELIST_ATTRS_RE.test(attr)) { + return objectSpread( + {}, + acc, + defineProperty$3({}, attr, attrs[attr]) + ); + } + + return acc; + }, {}) + ); + }); // Remove the mercury-parser-keep class from result + + $('.'.concat(KEEP_CLASS), $article).removeClass(KEEP_CLASS); + return $article; + } // function removeAttrs(article, $) { + // REMOVE_ATTRS.forEach((attr) => { + // $(`[${attr}]`, article).removeAttr(attr); + // }); + // } + // Remove attributes like style or align + + function cleanAttributes$$1($article, $) { + // Grabbing the parent because at this point + // $article will be wrapped in a div which will + // have a score set on it. + return removeAllButWhitelist( + $article.parent().length ? $article.parent() : $article, + $ + ); + } + + function removeEmpty($article, $) { + $article.find('p').each(function(index, p) { + var $p = $(p); + if ($p.find('iframe, img').length === 0 && $p.text().trim() === '') + $p.remove(); + }); + return $; + } + + // // CONTENT FETCHING CONSTANTS //// + // for a document. + + var NON_TOP_CANDIDATE_TAGS$1 = [ + 'br', + 'b', + 'i', + 'label', + 'hr', + 'area', + 'base', + 'basefont', + 'input', + 'img', + 'link', + 'meta', + ]; + var NON_TOP_CANDIDATE_TAGS_RE$1 = new RegExp( + '^('.concat(NON_TOP_CANDIDATE_TAGS$1.join('|'), ')$'), + 'i' + ); // A list of selectors that specify, very clearly, either hNews or other + // very content-specific style content, like Blogger templates. + // More examples here: http://microformats.org/wiki/blog-post-formats + + var HNEWS_CONTENT_SELECTORS$1 = [ + ['.hentry', '.entry-content'], + ['entry', '.entry-content'], + ['.entry', '.entry_content'], + ['.post', '.postbody'], + ['.post', '.post_body'], + ['.post', '.post-body'], + ]; + var PHOTO_HINTS$1 = ['figure', 'photo', 'image', 'caption']; + var PHOTO_HINTS_RE$1 = new RegExp(PHOTO_HINTS$1.join('|'), 'i'); // A list of strings that denote a positive scoring for this content as being + // an article container. Checked against className and id. + // + // TODO: Perhaps have these scale based on their odds of being quality? + + var POSITIVE_SCORE_HINTS$1 = [ + 'article', + 'articlecontent', + 'instapaper_body', + 'blog', + 'body', + 'content', + 'entry-content-asset', + 'entry', + 'hentry', + 'main', + 'Normal', + 'page', + 'pagination', + 'permalink', + 'post', + 'story', + 'text', + '[-_]copy', // usatoday + '\\Bcopy', + ]; // The above list, joined into a matching regular expression + + var POSITIVE_SCORE_RE$1 = new RegExp(POSITIVE_SCORE_HINTS$1.join('|'), 'i'); // Readability publisher-specific guidelines + + var READABILITY_ASSET$1 = new RegExp('entry-content-asset', 'i'); // A list of strings that denote a negative scoring for this content as being + // an article container. Checked against className and id. + // + // TODO: Perhaps have these scale based on their odds of being quality? + + var NEGATIVE_SCORE_HINTS$1 = [ + 'adbox', + 'advert', + 'author', + 'bio', + 'bookmark', + 'bottom', + 'byline', + 'clear', + 'com-', + 'combx', + 'comment', + 'comment\\B', + 'contact', + 'copy', + 'credit', + 'crumb', + 'date', + 'deck', + 'excerpt', + 'featured', // tnr.com has a featured_content which throws us off + 'foot', + 'footer', + 'footnote', + 'graf', + 'head', + 'info', + 'infotext', // newscientist.com copyright + 'instapaper_ignore', + 'jump', + 'linebreak', + 'link', + 'masthead', + 'media', + 'meta', + 'modal', + 'outbrain', // slate.com junk + 'promo', + 'pr_', // autoblog - press release + 'related', + 'respond', + 'roundcontent', // lifehacker restricted content warning + 'scroll', + 'secondary', + 'share', + 'shopping', + 'shoutbox', + 'side', + 'sidebar', + 'sponsor', + 'stamp', + 'sub', + 'summary', + 'tags', + 'tools', + 'widget', + ]; // The above list, joined into a matching regular expression + + var NEGATIVE_SCORE_RE$1 = new RegExp(NEGATIVE_SCORE_HINTS$1.join('|'), 'i'); // Match a digit. Pretty clear. + var PARAGRAPH_SCORE_TAGS$1 = new RegExp('^(p|li|span|pre)$', 'i'); + var CHILD_CONTENT_TAGS$1 = new RegExp('^(td|blockquote|ol|ul|dl)$', 'i'); + var BAD_TAGS$1 = new RegExp('^(address|form)$', 'i'); + + function getWeight(node) { + var classes = node.attr('class'); + var id = node.attr('id'); + var score = 0; + + if (id) { + // if id exists, try to score on both positive and negative + if (POSITIVE_SCORE_RE$1.test(id)) { + score += 25; + } + + if (NEGATIVE_SCORE_RE$1.test(id)) { + score -= 25; + } + } + + if (classes) { + if (score === 0) { + // if classes exist and id did not contribute to score + // try to score on both positive and negative + if (POSITIVE_SCORE_RE$1.test(classes)) { + score += 25; + } + + if (NEGATIVE_SCORE_RE$1.test(classes)) { + score -= 25; + } + } // even if score has been set by id, add score for + // possible photo matches + // "try to keep photos if we can" + + if (PHOTO_HINTS_RE$1.test(classes)) { + score += 10; + } // add 25 if class matches entry-content-asset, + // a class apparently instructed for use in the + // Readability publisher guidelines + // https://www.readability.com/developers/guidelines + + if (READABILITY_ASSET$1.test(classes)) { + score += 25; + } + } + + return score; + } + + var $parseFloat = _global.parseFloat; + + var $trim$1 = _stringTrim.trim; + + var _parseFloat = + 1 / $parseFloat(_stringWs + '-0') !== -Infinity + ? function parseFloat(str) { + var string = $trim$1(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } + : $parseFloat; + + // 18.2.4 parseFloat(string) + + _export(_export.G + _export.F * (parseFloat != _parseFloat), { + parseFloat: _parseFloat, + }); + + var _parseFloat$1 = _core.parseFloat; + + var _parseFloat$2 = _parseFloat$1; + + // returns the score of a node based on + // the node's score attribute + // returns null if no score set + function getScore($node) { + return _parseFloat$2($node.attr('score')) || null; + } + + // return 1 for every comma in text + function scoreCommas(text) { + return (text.match(/,/g) || []).length; + } + + var idkRe = new RegExp('^(p|pre)$', 'i'); + function scoreLength(textLength) { + var tagName = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'p'; + var chunks = textLength / 50; + + if (chunks > 0) { + var lengthBonus; // No idea why p or pre are being tamped down here + // but just following the source for now + // Not even sure why tagName is included here, + // since this is only being called from the context + // of scoreParagraph + + if (idkRe.test(tagName)) { + lengthBonus = chunks - 2; + } else { + lengthBonus = chunks - 1.25; + } + + return Math.min(Math.max(lengthBonus, 0), 3); + } + + return 0; + } + + // commas, etc. Higher is better. + + function scoreParagraph$$1(node) { + var score = 1; + var text = node.text().trim(); + var textLength = text.length; // If this paragraph is less than 25 characters, don't count it. + + if (textLength < 25) { + return 0; + } // Add points for any commas within this paragraph + + score += scoreCommas(text); // For every 50 characters in this paragraph, add another point. Up + // to 3 points. + + score += scoreLength(textLength); // Articles can end with short paragraphs when people are being clever + // but they can also end with short paragraphs setting up lists of junk + // that we strip. This negative tweaks junk setup paragraphs just below + // the cutoff threshold. + + if (text.slice(-1) === ':') { + score -= 1; + } + + return score; + } + + function setScore($node, $, score) { + $node.attr('score', score); + return $node; + } + + function addScore$$1($node, $, amount) { + try { + var score = getOrInitScore$$1($node, $) + amount; + setScore($node, $, score); + } catch (e) { + // Ignoring; error occurs in scoreNode + } + + return $node; + } + + function addToParent$$1(node, $, score) { + var parent = node.parent(); + + if (parent) { + addScore$$1(parent, $, score * 0.25); + } + + return node; + } + + // if not, initializes a score based on + // the node's tag type + + function getOrInitScore$$1($node, $) { + var weightNodes = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var score = getScore($node); + + if (score) { + return score; + } + + score = scoreNode$$1($node); + + if (weightNodes) { + score += getWeight($node); + } + + addToParent$$1($node, $, score); + return score; + } + + // just scores based on tag. + + function scoreNode$$1($node) { + var _$node$get = $node.get(0), + tagName = _$node$get.tagName; // TODO: Consider ordering by most likely. + // E.g., if divs are a more common tag on a page, + // Could save doing that regex test on every node – AP + + if (PARAGRAPH_SCORE_TAGS$1.test(tagName)) { + return scoreParagraph$$1($node); + } + + if (tagName.toLowerCase() === 'div') { + return 5; + } + + if (CHILD_CONTENT_TAGS$1.test(tagName)) { + return 3; + } + + if (BAD_TAGS$1.test(tagName)) { + return -3; + } + + if (tagName.toLowerCase() === 'th') { + return -5; + } + + return 0; + } + + function convertSpans$1($node, $) { + if ($node.get(0)) { + var _$node$get = $node.get(0), + tagName = _$node$get.tagName; + + if (tagName === 'span') { + // convert spans to divs + convertNodeTo$$1($node, $, 'div'); + } + } + } + + function addScoreTo($node, $, score) { + if ($node) { + convertSpans$1($node, $); + addScore$$1($node, $, score); + } + } + + function scorePs($, weightNodes) { + $('p, pre') + .not('[score]') + .each(function(index, node) { + // The raw score for this paragraph, before we add any parent/child + // scores. + var $node = $(node); + $node = setScore($node, $, getOrInitScore$$1($node, $, weightNodes)); + var $parent = $node.parent(); + var rawScore = scoreNode$$1($node); + addScoreTo($parent, $, rawScore, weightNodes); + + if ($parent) { + // Add half of the individual content score to the + // grandparent + addScoreTo($parent.parent(), $, rawScore / 2, weightNodes); + } + }); + return $; + } // score content. Parents get the full value of their children's + // content score, grandparents half + + function scoreContent$$1($) { + var weightNodes = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + // First, look for special hNews based selectors and give them a big + // boost, if they exist + HNEWS_CONTENT_SELECTORS$1.forEach(function(_ref) { + var _ref2 = slicedToArray(_ref, 2), + parentSelector = _ref2[0], + childSelector = _ref2[1]; + + $(''.concat(parentSelector, ' ').concat(childSelector)).each(function( + index, + node + ) { + addScore$$1($(node).parent(parentSelector), $, 80); + }); + }); // Doubling this again + // Previous solution caused a bug + // in which parents weren't retaining + // scores. This is not ideal, and + // should be fixed. + + scorePs($, weightNodes); + scorePs($, weightNodes); + return $; + } + + // it to see if any of them are decently scored. If they are, they + // may be split parts of the content (Like two divs, a preamble and + // a body.) Example: + // http://articles.latimes.com/2009/oct/14/business/fi-bigtvs14 + + function mergeSiblings($candidate, topScore, $) { + if (!$candidate.parent().length) { + return $candidate; + } + + var siblingScoreThreshold = Math.max(10, topScore * 0.25); + var wrappingDiv = $('<div></div>'); + $candidate + .parent() + .children() + .each(function(index, sibling) { + var $sibling = $(sibling); // Ignore tags like BR, HR, etc + + if (NON_TOP_CANDIDATE_TAGS_RE$1.test(sibling.tagName)) { + return null; + } + + var siblingScore = getScore($sibling); + + if (siblingScore) { + if ($sibling.get(0) === $candidate.get(0)) { + wrappingDiv.append($sibling); + } else { + var contentBonus = 0; + var density = linkDensity($sibling); // If sibling has a very low link density, + // give it a small bonus + + if (density < 0.05) { + contentBonus += 20; + } // If sibling has a high link density, + // give it a penalty + + if (density >= 0.5) { + contentBonus -= 20; + } // If sibling node has the same class as + // candidate, give it a bonus + + if ($sibling.attr('class') === $candidate.attr('class')) { + contentBonus += topScore * 0.2; + } + + var newScore = siblingScore + contentBonus; + + if (newScore >= siblingScoreThreshold) { + return wrappingDiv.append($sibling); + } + + if (sibling.tagName === 'p') { + var siblingContent = $sibling.text(); + var siblingContentLength = textLength(siblingContent); + + if (siblingContentLength > 80 && density < 0.25) { + return wrappingDiv.append($sibling); + } + + if ( + siblingContentLength <= 80 && + density === 0 && + hasSentenceEnd(siblingContent) + ) { + return wrappingDiv.append($sibling); + } + } + } + } + + return null; + }); + + if ( + wrappingDiv.children().length === 1 && + wrappingDiv + .children() + .first() + .get(0) === $candidate.get(0) + ) { + return $candidate; + } + + return wrappingDiv; + } + + // candidate nodes we found and find the one with the highest score. + + function findTopCandidate$$1($) { + var $candidate; + var topScore = 0; + $('[score]').each(function(index, node) { + // Ignore tags like BR, HR, etc + if (NON_TOP_CANDIDATE_TAGS_RE$1.test(node.tagName)) { + return; + } + + var $node = $(node); + var score = getScore($node); + + if (score > topScore) { + topScore = score; + $candidate = $node; + } + }); // If we don't have a candidate, return the body + // or whatever the first element is + + if (!$candidate) { + return $('body') || $('*').first(); + } + + $candidate = mergeSiblings($candidate, topScore, $); + return $candidate; + } + + // Scoring + + function removeUnlessContent($node, $, weight) { + // Explicitly save entry-content-asset tags, which are + // noted as valuable in the Publisher guidelines. For now + // this works everywhere. We may want to consider making + // this less of a sure-thing later. + if ($node.hasClass('entry-content-asset')) { + return; + } + + var content = normalizeSpaces($node.text()); + + if (scoreCommas(content) < 10) { + var pCount = $('p', $node).length; + var inputCount = $('input', $node).length; // Looks like a form, too many inputs. + + if (inputCount > pCount / 3) { + $node.remove(); + return; + } + + var contentLength = content.length; + var imgCount = $('img', $node).length; // Content is too short, and there are no images, so + // this is probably junk content. + + if (contentLength < 25 && imgCount === 0) { + $node.remove(); + return; + } + + var density = linkDensity($node); // Too high of link density, is probably a menu or + // something similar. + // console.log(weight, density, contentLength) + + if (weight < 25 && density > 0.2 && contentLength > 75) { + $node.remove(); + return; + } // Too high of a link density, despite the score being + // high. + + if (weight >= 25 && density > 0.5) { + // Don't remove the node if it's a list and the + // previous sibling starts with a colon though. That + // means it's probably content. + var tagName = $node.get(0).tagName.toLowerCase(); + var nodeIsList = tagName === 'ol' || tagName === 'ul'; + + if (nodeIsList) { + var previousNode = $node.prev(); + + if ( + previousNode && + normalizeSpaces(previousNode.text()).slice(-1) === ':' + ) { + return; + } + } + + $node.remove(); + return; + } + + var scriptCount = $('script', $node).length; // Too many script tags, not enough content. + + if (scriptCount > 0 && contentLength < 150) { + $node.remove(); + } + } + } // Given an article, clean it of some superfluous content specified by + // tags. Things like forms, ads, etc. + // + // Tags is an array of tag name's to search through. (like div, form, + // etc) + // + // Return this same doc. + + function cleanTags$$1($article, $) { + $(CLEAN_CONDITIONALLY_TAGS, $article).each(function(index, node) { + var $node = $(node); // If marked to keep, skip it + + if ( + $node.hasClass(KEEP_CLASS) || + $node.find('.'.concat(KEEP_CLASS)).length > 0 + ) + return; + var weight = getScore($node); + + if (!weight) { + weight = getOrInitScore$$1($node, $); + setScore($node, $, weight); + } // drop node if its weight is < 0 + + if (weight < 0) { + $node.remove(); + } else { + // deteremine if node seems like content + removeUnlessContent($node, $, weight); + } + }); + return $; + } + + function cleanHeaders($article, $) { + var title = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + $(HEADER_TAG_LIST, $article).each(function(index, header) { + var $header = $(header); // Remove any headers that appear before all other p tags in the + // document. This probably means that it was part of the title, a + // subtitle or something else extraneous like a datestamp or byline, + // all of which should be handled by other metadata handling. + + if ($($header, $article).prevAll('p').length === 0) { + return $header.remove(); + } // Remove any headers that match the title exactly. + + if (normalizeSpaces($(header).text()) === title) { + return $header.remove(); + } // If this header has a negative weight, it's probably junk. + // Get rid of it. + + if (getWeight($(header)) < 0) { + return $header.remove(); + } + + return $header; + }); + return $; + } + + // html to avoid later complications with multiple body tags. + + function rewriteTopLevel$$1(article, $) { + // I'm not using context here because + // it's problematic when converting the + // top-level/root node - AP + $ = convertNodeTo$$1($('html'), $, 'div'); + $ = convertNodeTo$$1($('body'), $, 'div'); + return $; + } + + function absolutize($, rootUrl, attr, $content) { + $('['.concat(attr, ']'), $content).each(function(_, node) { + var attrs = getAttrs(node); + var url$$1 = attrs[attr]; + + if (url$$1) { + var absoluteUrl = url.resolve(rootUrl, url$$1); + setAttr(node, attr, absoluteUrl); + } + }); + } + + function makeLinksAbsolute$$1($content, $, url$$1) { + ['href', 'src'].forEach(function(attr) { + return absolutize($, url$$1, attr, $content); + }); + return $content; + } + + function textLength(text) { + return text.trim().replace(/\s+/g, ' ').length; + } // Determines what percentage of the text + // in a node is link text + // Takes a node, returns a float + + function linkDensity($node) { + var totalTextLength = textLength($node.text()); + var linkText = $node.find('a').text(); + var linkLength = textLength(linkText); + + if (totalTextLength > 0) { + return linkLength / totalTextLength; + } + + if (totalTextLength === 0 && linkLength > 0) { + return 1; + } + + return 0; + } + + var iterator = _wksExt.f('iterator'); + + var iterator$1 = iterator; + + _wksDefine('asyncIterator'); + + _wksDefine('observable'); + + var symbol = _core.Symbol; + + var symbol$1 = symbol; + + var _typeof_1 = createCommonjsModule(function(module) { + function _typeof2(obj) { + if (typeof symbol$1 === 'function' && typeof iterator$1 === 'symbol') { + _typeof2 = function _typeof2(obj) { + return typeof obj; + }; + } else { + _typeof2 = function _typeof2(obj) { + return obj && + typeof symbol$1 === 'function' && + obj.constructor === symbol$1 && + obj !== symbol$1.prototype + ? 'symbol' + : typeof obj; + }; + } + + return _typeof2(obj); + } + + function _typeof(obj) { + if (typeof symbol$1 === 'function' && _typeof2(iterator$1) === 'symbol') { + module.exports = _typeof = function _typeof(obj) { + return _typeof2(obj); + }; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && + typeof symbol$1 === 'function' && + obj.constructor === symbol$1 && + obj !== symbol$1.prototype + ? 'symbol' + : _typeof2(obj); + }; + } + + return _typeof(obj); + } + + module.exports = _typeof; + }); + + // search for, find a meta tag associated. + + function extractFromMeta$$1($, metaNames, cachedNames) { + var cleanTags = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var foundNames = metaNames.filter(function(name) { + return cachedNames.indexOf(name) !== -1; + }); // eslint-disable-next-line no-restricted-syntax + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + var _loop = function _loop() { + var name = _step.value; + var type = 'name'; + var value = 'value'; + var nodes = $('meta['.concat(type, '="').concat(name, '"]')); // Get the unique value of every matching node, in case there + // are two meta tags with the same name and value. + // Remove empty values. + + var values = nodes + .map(function(index, node) { + return $(node).attr(value); + }) + .toArray() + .filter(function(text) { + return text !== ''; + }); // If we have more than one value for the same name, we have a + // conflict and can't trust any of them. Skip this name. If we have + // zero, that means our meta tags had no values. Skip this name + // also. + + if (values.length === 1) { + var metaValue; // Meta values that contain HTML should be stripped, as they + // weren't subject to cleaning previously. + + if (cleanTags) { + metaValue = stripTags(values[0], $); + } else { + var _values = slicedToArray(values, 1); + + metaValue = _values[0]; + } + + return { + v: metaValue, + }; + } + }; + + for ( + var _iterator = getIterator$1(foundNames), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + var _ret = _loop(); + + if (_typeof_1(_ret) === 'object') return _ret.v; + } // If nothing is found, return null + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return null; + } + + function isGoodNode($node, maxChildren) { + // If it has a number of children, it's more likely a container + // element. Skip it. + if ($node.children().length > maxChildren) { + return false; + } // If it looks to be within a comment, skip it. + + if (withinComment$$1($node)) { + return false; + } + + return true; + } // Given a a list of selectors find content that may + // be extractable from the document. This is for flat + // meta-information, like author, title, date published, etc. + + function extractFromSelectors$$1($, selectors) { + var maxChildren = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var textOnly = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + // eslint-disable-next-line no-restricted-syntax + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for ( + var _iterator = getIterator$1(selectors), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + var selector = _step.value; + var nodes = $(selector); // If we didn't get exactly one of this selector, this may be + // a list of articles or comments. Skip it. + + if (nodes.length === 1) { + var $node = $(nodes[0]); + + if (isGoodNode($node, maxChildren)) { + var content = void 0; + + if (textOnly) { + content = $node.text(); + } else { + content = $node.html(); + } + + if (content) { + return content; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return null; + } + + // strips all tags from a string of text + function stripTags(text, $) { + // Wrapping text in html element prevents errors when text + // has no html + var cleanText = $('<span>'.concat(text, '</span>')).text(); + return cleanText === '' ? text : cleanText; + } + + function withinComment$$1($node) { + var parents = $node.parents().toArray(); + var commentParent = parents.find(function(parent) { + var attrs = getAttrs(parent); + var nodeClass = attrs.class, + id = attrs.id; + var classAndId = ''.concat(nodeClass, ' ').concat(id); + return classAndId.includes('comment'); + }); + return commentParent !== undefined; + } + + // Given a node, determine if it's article-like enough to return + // param: node (a cheerio node) + // return: boolean + function nodeIsSufficient($node) { + return $node.text().trim().length >= 100; + } + + function isWordpress($) { + return $(IS_WP_SELECTOR).length > 0; + } + + function getAttrs(node) { + var attribs = node.attribs, + attributes = node.attributes; + + if (!attribs && attributes) { + var attrs = ownKeys$1(attributes).reduce(function(acc, index) { + var attr = attributes[index]; + if (!attr.name || !attr.value) return acc; + acc[attr.name] = attr.value; + return acc; + }, {}); + + return attrs; + } + + return attribs; + } + + function setAttr(node, attr, val) { + if (node.attribs) { + node.attribs[attr] = val; + } else if (node.attributes) { + node.setAttribute(attr, val); + } + + return node; + } + + function setAttrs(node, attrs) { + if (node.attribs) { + node.attribs = attrs; + } else if (node.attributes) { + while (node.attributes.length > 0) { + node.removeAttribute(node.attributes[0].name); + } + + ownKeys$1(attrs).forEach(function(key) { + node.setAttribute(key, attrs[key]); + }); + } + + return node; + } + + // DOM manipulation + + var IS_LINK = new RegExp('https?://', 'i'); + var IS_IMAGE = new RegExp('.(png|gif|jpe?g)', 'i'); + var TAGS_TO_REMOVE = ['script', 'style', 'form'].join(','); + + // lazy loaded images into normal images. + // Many sites will have img tags with no source, or an image tag with a src + // attribute that a is a placeholer. We need to be able to properly fill in + // the src attribute so the images are no longer lazy loaded. + + function convertLazyLoadedImages($) { + $('img').each(function(_, img) { + var attrs = getAttrs(img); + + ownKeys$1(attrs).forEach(function(attr) { + var value = attrs[attr]; + + if (attr !== 'src' && IS_LINK.test(value) && IS_IMAGE.test(value)) { + $(img).attr('src', value); + } + }); + }); + return $; + } + + function isComment(index, node) { + return node.type === 'comment'; + } + + function cleanComments($) { + $.root() + .find('*') + .contents() + .filter(isComment) + .remove(); + return $; + } + + function clean($) { + $(TAGS_TO_REMOVE).remove(); + $ = cleanComments($); + return $; + } + + var Resource = { + // Create a Resource. + // + // :param url: The URL for the document we should retrieve. + // :param response: If set, use as the response rather than + // attempting to fetch it ourselves. Expects a + // string. + create: function create(url, preparedResponse, parsedUrl) { + var _this = this; + + return asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee() { + var result, validResponse; + return regenerator.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + if (!preparedResponse) { + _context.next = 5; + break; + } + + validResponse = { + statusMessage: 'OK', + statusCode: 200, + headers: { + 'content-type': 'text/html', + 'content-length': 500, + }, + }; + result = { + body: preparedResponse, + response: validResponse, + }; + _context.next = 8; + break; + + case 5: + _context.next = 7; + return fetchResource(url, parsedUrl); + + case 7: + result = _context.sent; + + case 8: + if (!result.error) { + _context.next = 11; + break; + } + + result.failed = true; + return _context.abrupt('return', result); + + case 11: + return _context.abrupt('return', _this.generateDoc(result)); + + case 12: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this + ); + }) + )(); + }, + generateDoc: function generateDoc(_ref) { + var content = _ref.body, + response = _ref.response; + var contentType = response.headers['content-type']; // TODO: Implement is_text function from + // https://github.com/ReadabilityHoldings/readability/blob/8dc89613241d04741ebd42fa9fa7df1b1d746303/readability/utils/text.py#L57 + + if (!contentType.includes('html') && !contentType.includes('text')) { + throw new Error('Content does not appear to be text.'); + } + + var $$$1 = this.encodeDoc({ + content: content, + contentType: contentType, + }); + + if ($$$1.root().children().length === 0) { + throw new Error('No children, likely a bad parse.'); + } + + $$$1 = normalizeMetaTags($$$1); + $$$1 = convertLazyLoadedImages($$$1); + $$$1 = clean($$$1); + return $$$1; + }, + encodeDoc: function encodeDoc(_ref2) { + var content = _ref2.content, + contentType = _ref2.contentType; + var encoding = getEncoding(contentType); + var decodedContent = iconv.decode(content, encoding); + var $$$1 = $.load(decodedContent); // after first cheerio.load, check to see if encoding matches + + var metaContentType = $$$1('meta[http-equiv=content-type]').attr( + 'content' + ); + var properEncoding = getEncoding(metaContentType); // if encodings in the header/body dont match, use the one in the body + + if (properEncoding !== encoding) { + decodedContent = iconv.decode(content, properEncoding); + $$$1 = $.load(decodedContent); + } + + return $$$1; + }, + }; + + var merge = function merge(extractor, domains) { + return domains.reduce(function(acc, domain) { + acc[domain] = extractor; + return acc; + }, {}); + }; + + function mergeSupportedDomains(extractor) { + return extractor.supportedDomains + ? merge( + extractor, + [extractor.domain].concat( + toConsumableArray(extractor.supportedDomains) + ) + ) + : merge(extractor, [extractor.domain]); + } + + var BloggerExtractor = { + domain: 'blogspot.com', + content: { + // Blogger is insane and does not load its content + // initially in the page, but it's all there + // in noscript + selectors: ['.post-content noscript'], + // Selectors to remove from the extracted content + clean: [], + // Convert the noscript tag to a div + transforms: { + noscript: 'div', + }, + }, + author: { + selectors: ['.post-author-name'], + }, + title: { + selectors: ['.post h2.title'], + }, + date_published: { + selectors: ['span.publishdate'], + }, + }; + + var NYMagExtractor = { + domain: 'nymag.com', + content: { + // Order by most likely. Extractor will stop on first occurrence + selectors: ['div.article-content', 'section.body', 'article.article'], + // Selectors to remove from the extracted content + clean: ['.ad', '.single-related-story'], + // Object of tranformations to make on matched elements + // Each key is the selector, each value is the tag to + // transform to. + // If a function is given, it should return a string + // to convert to or nothing (in which case it will not perform + // the transformation. + transforms: { + // Convert h1s to h2s + h1: 'h2', + // Convert lazy-loaded noscript images to figures + noscript: function noscript($node, $) { + var $children = $.browser ? $($node.text()) : $node.children(); + + if ( + $children.length === 1 && + $children.get(0) !== undefined && + $children.get(0).tagName.toLowerCase() === 'img' + ) { + return 'figure'; + } + + return null; + }, + }, + }, + title: { + selectors: ['h1.lede-feature-title', 'h1.headline-primary', 'h1'], + }, + author: { + selectors: ['.by-authors', '.lede-feature-author'], + }, + dek: { + selectors: ['.lede-feature-teaser'], + }, + date_published: { + selectors: [ + ['time.article-timestamp[datetime]', 'datetime'], + 'time.article-timestamp', + ], + }, + }; + + var WikipediaExtractor = { + domain: 'wikipedia.org', + content: { + selectors: ['#mw-content-text'], + defaultCleaner: false, + // transform top infobox to an image with caption + transforms: { + '.infobox img': function infoboxImg($node) { + var $parent = $node.parents('.infobox'); // Only prepend the first image in .infobox + + if ($parent.children('img').length === 0) { + $parent.prepend($node); + } + }, + '.infobox caption': 'figcaption', + '.infobox': 'figure', + }, + // Selectors to remove from the extracted content + clean: [ + '.mw-editsection', + 'figure tr, figure td, figure tbody', + '#toc', + '.navbox', + ], + }, + author: 'Wikipedia Contributors', + title: { + selectors: ['h2.title'], + }, + date_published: { + selectors: ['#footer-info-lastmod'], + }, + }; + + var TwitterExtractor = { + domain: 'twitter.com', + content: { + transforms: { + // We're transforming essentially the whole page here. + // Twitter doesn't have nice selectors, so our initial + // selector grabs the whole page, then we're re-writing + // it to fit our needs before we clean it up. + '.permalink[role=main]': function permalinkRoleMain($node, $) { + var tweets = $node.find('.tweet'); + var $tweetContainer = $('<div id="TWEETS_GO_HERE"></div>'); + $tweetContainer.append(tweets); + $node.replaceWith($tweetContainer); + }, + // Twitter wraps @ with s, which + // renders as a strikethrough + s: 'span', + }, + selectors: ['.permalink[role=main]'], + defaultCleaner: false, + clean: ['.stream-item-footer', 'button', '.tweet-details-fixer'], + }, + author: { + selectors: ['.tweet.permalink-tweet .username'], + }, + date_published: { + selectors: [ + ['.permalink-tweet ._timestamp[data-time-ms]', 'data-time-ms'], + ], + }, + }; + + var NYTimesExtractor = { + domain: 'www.nytimes.com', + title: { + selectors: ['h1.g-headline', 'h1[itemprop="headline"]', 'h1.headline'], + }, + author: { + selectors: [['meta[name="author"]', 'value'], '.g-byline', '.byline'], + }, + content: { + selectors: ['div.g-blocks', 'article#story'], + transforms: { + 'img.g-lazy': function imgGLazy($node) { + var src = $node.attr('src'); // const widths = $node.attr('data-widths') + // .slice(1) + // .slice(0, -1) + // .split(','); + // if (widths.length) { + // width = widths.slice(-1); + // } else { + // width = '900'; + // } + + var width = 640; + src = src.replace('{{size}}', width); + $node.attr('src', src); + }, + }, + clean: [ + '.ad', + 'header#story-header', + '.story-body-1 .lede.video', + '.visually-hidden', + '#newsletter-promo', + '.promo', + '.comments-button', + '.hidden', + '.comments', + '.supplemental', + '.nocontent', + '.story-footer-links', + ], + }, + date_published: { + selectors: [['meta[name="article:published"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: null, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + var TheAtlanticExtractor = { + domain: 'www.theatlantic.com', + title: { + selectors: ['h1.hed'], + }, + author: { + selectors: ['article#article .article-cover-extra .metadata .byline a'], + }, + content: { + selectors: [ + ['.article-cover figure.lead-img', '.article-body'], + '.article-body', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.partner-box', '.callout'], + }, + date_published: { + selectors: [['time[itemProp="datePublished"]', 'datetime']], + }, + lead_image_url: null, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var NewYorkerExtractor = { + domain: 'www.newyorker.com', + title: { + selectors: ['h1.title'], + }, + author: { + selectors: ['.contributors'], + }, + content: { + selectors: ['div#articleBody', 'div.articleBody'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + date_published: { + selectors: [ + ['meta[name="article:published_time"]', 'value'], + ['time[itemProp="datePublished"]', 'content'], + ], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: ['.dek', 'h2.dek'], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var WiredExtractor = { + domain: 'www.wired.com', + title: { + selectors: ['h1.post-title'], + }, + author: { + selectors: ['a[rel="author"]'], + }, + content: { + selectors: ['article.content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.visually-hidden', 'figcaption img.photo'], + }, + date_published: { + selectors: [['meta[itemprop="datePublished"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var MSNExtractor = { + domain: 'www.msn.com', + title: { + selectors: ['h1'], + }, + author: { + selectors: ['span.authorname-txt'], + }, + content: { + selectors: ['div.richtext'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['span.caption'], + }, + date_published: { + selectors: ['span.time'], + }, + lead_image_url: { + selectors: [], + }, + dek: { + selectors: [], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var YahooExtractor = { + domain: 'www.yahoo.com', + title: { + selectors: ['header.canvas-header'], + }, + author: { + selectors: ['span.provider-name'], + }, + content: { + selectors: [ + // enter content selectors + '.content-canvas', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.figure-caption'], + }, + date_published: { + selectors: [['time.date[datetime]', 'datetime']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [ + // enter dek selectors + ], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var BuzzfeedExtractor = { + domain: 'www.buzzfeed.com', + title: { + selectors: ['h1[id="post-title"]'], + }, + author: { + selectors: ['a[data-action="user/username"]', 'byline__author'], + }, + content: { + selectors: [ + ['.longform_custom_header_media', '#buzz_sub_buzz'], + '#buzz_sub_buzz', + ], + defaultCleaner: false, + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + h2: 'b', + 'div.longform_custom_header_media': function divLongform_custom_header_media( + $node + ) { + if ($node.has('img') && $node.has('.longform_header_image_source')) { + return 'figure'; + } + + return null; + }, + 'figure.longform_custom_header_media .longform_header_image_source': + 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + '.instapaper_ignore', + '.suplist_list_hide .buzz_superlist_item .buzz_superlist_number_inline', + '.share-box', + '.print', + ], + }, + date_published: { + selectors: ['.buzz-datetime'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var WikiaExtractor = { + domain: 'fandom.wikia.com', + title: { + selectors: ['h1.entry-title'], + }, + author: { + selectors: ['.author vcard', '.fn'], + }, + content: { + selectors: ['.grid-content', '.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var LittleThingsExtractor = { + domain: 'www.littlethings.com', + title: { + selectors: ['h1.post-title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + content: { + selectors: [ + // enter content selectors + '.mainContentIntro', + '.content-wrapper', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + next_page_url: null, + excerpt: null, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var PoliticoExtractor = { + domain: 'www.politico.com', + title: { + selectors: [ + // enter title selectors + ['meta[name="og:title"]', 'value'], + ], + }, + author: { + selectors: ['.story-main-content .byline .vcard'], + }, + content: { + selectors: [ + // enter content selectors + '.story-main-content', + '.content-group', + '.story-core', + '.story-text', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: [], + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['figcaption'], + }, + date_published: { + selectors: [ + ['.story-main-content .timestamp time[datetime]', 'datetime'], + ], + }, + lead_image_url: { + selectors: [ + // enter lead_image_url selectors + ['meta[name="og:image"]', 'value'], + ], + }, + dek: { + selectors: [], + }, + next_page_url: null, + excerpt: null, + }; + + var DeadspinExtractor = { + domain: 'deadspin.com', + supportedDomains: [ + 'jezebel.com', + 'lifehacker.com', + 'kotaku.com', + 'gizmodo.com', + 'jalopnik.com', + 'kinja.com', + ], + title: { + selectors: ['h1.headline'], + }, + author: { + selectors: ['.author'], + }, + content: { + selectors: ['.post-content', '.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'iframe.lazyload[data-recommend-id^="youtube://"]': function iframeLazyloadDataRecommendIdYoutube( + $node + ) { + var youtubeId = $node.attr('id').split('youtube-')[1]; + $node.attr('src', 'https://www.youtube.com/embed/'.concat(youtubeId)); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.magnifier', '.lightbox'], + }, + date_published: { + selectors: [['time.updated[datetime]', 'datetime']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + next_page_url: { + selectors: [ + // enter selectors + ], + }, + excerpt: { + selectors: [ + // enter selectors + ], + }, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var BroadwayWorldExtractor = { + domain: 'www.broadwayworld.com', + title: { + selectors: ['h1.article-title'], + }, + author: { + selectors: ['span[itemprop=author]'], + }, + content: { + selectors: ['div[itemprop=articlebody]'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + date_published: { + selectors: [['meta[itemprop=datePublished]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [], + }, + next_page_url: { + selectors: [ + // enter selectors + ], + }, + excerpt: { + selectors: [ + // enter selectors + ], + }, + }; + + // Rename CustomExtractor + // to fit your publication + // (e.g., NYTimesExtractor) + var ApartmentTherapyExtractor = { + domain: 'www.apartmenttherapy.com', + title: { + selectors: ['h1.headline'], + }, + author: { + selectors: ['.PostByline__name'], + }, + content: { + selectors: ['div.post__content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div[data-render-react-id="images/LazyPicture"]': function divDataRenderReactIdImagesLazyPicture( + $node, + $ + ) { + var data = JSON.parse($node.attr('data-props')); + var src = data.sources[0].src; + var $img = $('<img />').attr('src', src); + $node.replaceWith($img); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + date_published: { + selectors: [['.PostByline__timestamp[datetime]', 'datetime']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [], + }, + next_page_url: { + selectors: [ + // enter selectors + ], + }, + excerpt: { + selectors: [ + // enter selectors + ], + }, + }; + + var MediumExtractor = { + domain: 'medium.com', + supportedDomains: ['trackchanges.postlight.com'], + title: { + selectors: ['h1'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + content: { + selectors: [ + ['.section-content'], + '.section-content', + 'article > div > section', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + // Re-write lazy-loaded youtube videos + iframe: function iframe($node) { + var ytRe = /https:\/\/i.embed.ly\/.+url=https:\/\/i\.ytimg\.com\/vi\/(\w+)\//; + var thumb = decodeURIComponent($node.attr('data-thumbnail')); + + if (ytRe.test(thumb)) { + var _thumb$match = thumb.match(ytRe), + _thumb$match2 = slicedToArray(_thumb$match, 2), + _ = _thumb$match2[0], + youtubeId = _thumb$match2[1]; // eslint-disable-line + + $node.attr( + 'src', + 'https://www.youtube.com/embed/'.concat(youtubeId) + ); + var $parent = $node.parents('figure'); + var $caption = $parent.find('figcaption'); + $parent.empty().append([$node, $caption]); + } + }, + // rewrite figures to pull out image and caption, remove rest + figure: function figure($node) { + // ignore if figure has an iframe + if ($node.find('iframe').length > 0) return; + var $img = $node.find('img').slice(-1)[0]; + var $caption = $node.find('figcaption'); + $node.empty().append([$img, $caption]); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + date_published: { + selectors: [['time[datetime]', 'datetime']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + next_page_url: { + selectors: [ + // enter selectors + ], + }, + excerpt: { + selectors: [ + // enter selectors + ], + }, + }; + + var WwwTmzComExtractor = { + domain: 'www.tmz.com', + title: { + selectors: ['.post-title-breadcrumb', 'h1', '.headline'], + }, + author: 'TMZ STAFF', + date_published: { + selectors: ['.article-posted-date'], + timezone: 'America/Los_Angeles', + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-content', '.all-post-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.lightbox-link'], + }, + }; + + var WwwWashingtonpostComExtractor = { + domain: 'www.washingtonpost.com', + title: { + selectors: ['h1', '#topper-headline-wrapper'], + }, + author: { + selectors: ['.pb-byline'], + }, + date_published: { + selectors: [['.pb-timestamp[itemprop="datePublished"]', 'content']], + }, + dek: { + selectors: [], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div.inline-content': function divInlineContent($node) { + if ($node.has('img,iframe,video').length > 0) { + return 'figure'; + } + + $node.remove(); + return null; + }, + '.pb-caption': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.interstitial-link', '.newsletter-inline-unit'], + }, + }; + + var WwwHuffingtonpostComExtractor = { + domain: 'www.huffingtonpost.com', + title: { + selectors: ['h1.headline__title'], + }, + author: { + selectors: ['span.author-card__details__name'], + }, + date_published: { + selectors: [ + ['meta[name="article:modified_time"]', 'value'], + ['meta[name="article:published_time"]', 'value'], + ], + }, + dek: { + selectors: ['h2.headline__subtitle'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.entry__body'], + defaultCleaner: false, + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + // 'div.top-media': ($node) => { + // const $figure = $node.children('figure'); + // $node.replaceWith($figure); + // }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + '.pull-quote', + '.tag-cloud', + '.embed-asset', + '.below-entry', + '.entry-corrections', + '#suggested-story', + ], + }, + }; + + var NewrepublicComExtractor = { + domain: 'newrepublic.com', + title: { + selectors: ['h1.article-headline', '.minutes-primary h1.minute-title'], + }, + author: { + selectors: ['div.author-list', '.minutes-primary h3.minute-byline'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + timezone: 'America/New_York', + }, + dek: { + selectors: ['h2.article-subhead'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['.article-cover', 'div.content-body'], + ['.minute-image', '.minutes-primary div.content-body'], + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['aside'], + }, + }; + + var MoneyCnnComExtractor = { + domain: 'money.cnn.com', + title: { + selectors: ['.article-title'], + }, + author: { + selectors: ['.byline a'], + }, + date_published: { + selectors: [['meta[name="date"]', 'value']], + timezone: 'GMT', + }, + dek: { + selectors: ['#storytext h2'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['#storytext'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.inStoryHeading'], + }, + }; + + var WwwThevergeComExtractor = { + domain: 'www.theverge.com', + supportedDomains: ['www.polygon.com'], + title: { + selectors: ['h1'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['h2.p-dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + // feature template multi-match + ['.c-entry-hero .e-image', '.c-entry-intro', '.c-entry-content'], // regular post multi-match + ['.e-image--hero', '.c-entry-content'], // feature template fallback + '.l-wrapper .l-feature', // regular post fallback + 'div.c-entry-content', + ], + // Transform lazy-loaded images + transforms: { + noscript: function noscript($node) { + var $children = $node.children(); + + if ($children.length === 1 && $children.get(0).tagName === 'img') { + return 'span'; + } + + return null; + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.aside', 'img.c-dynamic-image'], + }, + }; + + var WwwCnnComExtractor = { + domain: 'www.cnn.com', + title: { + selectors: ['h1.pg-headline', 'h1'], + }, + author: { + selectors: ['.metadata__byline__author'], + }, + date_published: { + selectors: [['meta[name="pubdate"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + // a more specific selector to grab the lead image and the body + ['.media__video--thumbnail', '.zn-body-text'], // a fallback for the above + '.zn-body-text', + 'div[itemprop="articleBody"]', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.zn-body__paragraph, .el__leafmedia--sourced-paragraph': function znBody__paragraphEl__leafmediaSourcedParagraph( + $node + ) { + var $text = $node.html(); + + if ($text) { + return 'p'; + } + + return null; + }, + // this transform cleans the short, all-link sections linking + // to related content but not marked as such in any way. + '.zn-body__paragraph': function znBody__paragraph($node) { + if ($node.has('a')) { + if ( + $node.text().trim() === + $node + .find('a') + .text() + .trim() + ) { + $node.remove(); + } + } + }, + '.media__video--thumbnail': 'figure', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwAolComExtractor = { + domain: 'www.aol.com', + title: { + selectors: ['h1.p-article__title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: ['.p-article__byline__date'], + timezone: 'America/New_York', + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwYoutubeComExtractor = { + domain: 'www.youtube.com', + title: { + selectors: ['.watch-title', 'h1.watch-title-container'], + }, + author: { + selectors: ['.yt-user-info'], + }, + date_published: { + selectors: [['meta[itemProp="datePublished"]', 'value']], + timezone: 'GMT', + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + defaultCleaner: false, + selectors: [['#player-api', '#eow-description']], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '#player-api': function playerApi($node, $) { + var videoId = $('meta[itemProp="videoId"]').attr('value'); + $node.html( + '\n <iframe src="https://www.youtube.com/embed/'.concat( + videoId, + '" frameborder="0" allowfullscreen></iframe>' + ) + ); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwTheguardianComExtractor = { + domain: 'www.theguardian.com', + title: { + selectors: ['.content__headline'], + }, + author: { + selectors: ['p.byline'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['.content__standfirst'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.content__article-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.hide-on-mobile', '.inline-icon'], + }, + }; + + var WwwSbnationComExtractor = { + domain: 'www.sbnation.com', + title: { + selectors: ['h1.c-page-title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['h2.c-entry-summary.p-dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.c-entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwBloombergComExtractor = { + domain: 'www.bloomberg.com', + title: { + selectors: [ + // normal articles + '.lede-headline', // /graphics/ template + 'h1.article-title', // /news/ template + 'h1.lede-text-only__hed', + ], + }, + author: { + selectors: [ + ['meta[name="parsely-author"]', 'value'], + '.byline-details__link', // /graphics/ template + '.bydek', // /news/ template + '.author', + ], + }, + date_published: { + selectors: [ + ['time.published-at', 'datetime'], + ['time[datetime]', 'datetime'], + ['meta[name="date"]', 'value'], + ['meta[name="parsely-pub-date"]', 'value'], + ], + }, + dek: { + selectors: [], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + '.article-body__content', // /graphics/ template + ['section.copy-block'], // /news/ template + '.body-copy', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.inline-newsletter', '.page-ad'], + }, + }; + + var WwwBustleComExtractor = { + domain: 'www.bustle.com', + title: { + selectors: ['h1.post-page__title'], + }, + author: { + selectors: ['div.content-meta__author'], + }, + date_published: { + selectors: [['time.content-meta__published-date[datetime]', 'datetime']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.post-page__body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwNprOrgExtractor = { + domain: 'www.npr.org', + title: { + selectors: ['h1', '.storytitle'], + }, + author: { + selectors: ['p.byline__name.byline__name--block'], + }, + date_published: { + selectors: [ + ['.dateblock time[datetime]', 'datetime'], + ['meta[name="date"]', 'value'], + ], + }, + lead_image_url: { + selectors: [ + ['meta[name="og:image"]', 'value'], + ['meta[name="twitter:image:src"]', 'value'], + ], + }, + content: { + selectors: ['.storytext'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.bucketwrap.image': 'figure', + '.bucketwrap.image .credit-caption': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['div.enlarge_measure'], + }, + }; + + var WwwRecodeNetExtractor = { + domain: 'www.recode.net', + title: { + selectors: ['h1.c-page-title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['h2.c-entry-summary.p-dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['figure.e-image--hero', '.c-entry-content'], + '.c-entry-content', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var QzComExtractor = { + domain: 'qz.com', + title: { + selectors: ['header.item-header.content-width-responsive'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: ['.timestamp'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['figure.featured-image', '.item-body'], '.item-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.article-aside', '.progressive-image-thumbnail'], + }, + }; + + var WwwDmagazineComExtractor = { + domain: 'www.dmagazine.com', + title: { + selectors: ['h1.story__title'], + }, + author: { + selectors: ['.story__info .story__info__item:first-child'], + }, + date_published: { + selectors: [ + // enter selectors + '.story__info', + ], + timezone: 'America/Chicago', + }, + dek: { + selectors: ['.story__subhead'], + }, + lead_image_url: { + selectors: [['article figure a:first-child', 'href']], + }, + content: { + selectors: ['.story__content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwReutersComExtractor = { + domain: 'www.reuters.com', + title: { + selectors: ['h1.article-headline'], + }, + author: { + selectors: ['.author'], + }, + date_published: { + selectors: [['meta[name="og:article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['#article-text'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.article-subtitle': 'h4', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['#article-byline .author'], + }, + }; + + var MashableComExtractor = { + domain: 'mashable.com', + title: { + selectors: ['h1.title'], + }, + author: { + selectors: ['span.author_name a'], + }, + date_published: { + selectors: [['meta[name="og:article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['section.article-content.blueprint'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.image-credit': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwChicagotribuneComExtractor = { + domain: 'www.chicagotribune.com', + title: { + selectors: ['h1.trb_ar_hl_t'], + }, + author: { + selectors: ['span.trb_ar_by_nm_au'], + }, + date_published: { + selectors: [['meta[itemprop="datePublished"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.trb_ar_page'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwVoxComExtractor = { + domain: 'www.vox.com', + title: { + selectors: ['h1.c-page-title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['.p-dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['figure.e-image--hero', '.c-entry-content'], + '.c-entry-content', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'figure .e-image__image noscript': function figureEImage__imageNoscript( + $node + ) { + var imgHtml = $node.html(); + $node + .parents('.e-image__image') + .find('.c-dynamic-image') + .replaceWith(imgHtml); + }, + 'figure .e-image__meta': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var NewsNationalgeographicComExtractor = { + domain: 'news.nationalgeographic.com', + title: { + selectors: ['h1', 'h1.main-title'], + }, + author: { + selectors: ['.byline-component__contributors b span'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + format: 'ddd MMM DD HH:mm:ss zz YYYY', + timezone: 'EST', + }, + dek: { + selectors: ['.article__deck'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.parsys.content', '.__image-lead__'], '.content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.parsys.content': function parsysContent($node, $) { + var $imgSrc = $node + .find('.image.parbase.section') + .find('.picturefill') + .first() + .data('platform-src'); + + if ($imgSrc) { + $node.prepend( + $('<img class="__image-lead__" src="'.concat($imgSrc, '"/>')) + ); + } + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.pull-quote.pull-quote--large'], + }, + }; + + var WwwNationalgeographicComExtractor = { + domain: 'www.nationalgeographic.com', + title: { + selectors: ['h1', 'h1.main-title'], + }, + author: { + selectors: ['.byline-component__contributors b span'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['.article__deck'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.parsys.content', '.__image-lead__'], '.content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.parsys.content': function parsysContent($node, $) { + var $imageParent = $node.children().first(); + + if ($imageParent.hasClass('imageGroup')) { + var $dataAttrContainer = $imageParent + .find('.media--medium__container') + .children() + .first(); + var imgPath1 = $dataAttrContainer.data('platform-image1-path'); + var imgPath2 = $dataAttrContainer.data('platform-image2-path'); + + if (imgPath2 && imgPath1) { + $node.prepend( + $( + '<div class="__image-lead__">\n <img src="' + .concat(imgPath1, '"/>\n <img src="') + .concat(imgPath2, '"/>\n </div>') + ) + ); + } + } else { + var $imgSrc = $node + .find('.image.parbase.section') + .find('.picturefill') + .first() + .data('platform-src'); + + if ($imgSrc) { + $node.prepend( + $('<img class="__image-lead__" src="'.concat($imgSrc, '"/>')) + ); + } + } + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.pull-quote.pull-quote--small'], + }, + }; + + var WwwLatimesComExtractor = { + domain: 'www.latimes.com', + title: { + selectors: ['.trb_ar_hl'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[itemprop="datePublished"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.trb_ar_main'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.trb_ar_la': function trb_ar_la($node) { + var $figure = $node.find('figure'); + $node.replaceWith($figure); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.trb_ar_by', '.trb_ar_cr'], + }, + }; + + var PagesixComExtractor = { + domain: 'pagesix.com', + supportedDomains: ['nypost.com'], + title: { + selectors: ['h1 a'], + }, + author: { + selectors: ['.byline'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: [['meta[name="description"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['#featured-image-wrapper', '.entry-content'], + '.entry-content', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '#featured-image-wrapper': 'figure', + '.wp-caption-text': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.modal-trigger'], + }, + }; + + var ThefederalistpapersOrgExtractor = { + domain: 'thefederalistpapers.org', + title: { + selectors: ['h1.entry-title'], + }, + author: { + selectors: ['main span.entry-author-name'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [['p[style]']], + }, + }; + + var WwwCbssportsComExtractor = { + domain: 'www.cbssports.com', + title: { + selectors: ['.article-headline'], + }, + author: { + selectors: ['.author-name'], + }, + date_published: { + selectors: [['.date-original-reading-time time', 'datetime']], + timezone: 'UTC', + }, + dek: { + selectors: ['.article-subline'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwMsnbcComExtractor = { + domain: 'www.msnbc.com', + title: { + selectors: ['h1', 'h1.is-title-pane'], + }, + author: { + selectors: ['.author'], + }, + date_published: { + selectors: [['meta[name="DC.date.issued"]', 'value']], + }, + dek: { + selectors: [['meta[name="description"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.pane-node-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.pane-node-body': function paneNodeBody($node, $) { + var _WwwMsnbcComExtractor = slicedToArray( + WwwMsnbcComExtractor.lead_image_url.selectors[0], + 2 + ), + selector = _WwwMsnbcComExtractor[0], + attr = _WwwMsnbcComExtractor[1]; + + var src = $(selector).attr(attr); + + if (src) { + $node.prepend('<img src="'.concat(src, '" />')); + } + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwThepoliticalinsiderComExtractor = { + domain: 'www.thepoliticalinsider.com', + title: { + selectors: [['meta[name="sailthru.title"]', 'value']], + }, + author: { + selectors: [['meta[name="sailthru.author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="sailthru.date"]', 'value']], + timezone: 'America/New_York', + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div#article-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwMentalflossComExtractor = { + domain: 'www.mentalfloss.com', + title: { + selectors: ['h1.title', '.title-group', '.inner'], + }, + author: { + selectors: ['.field-name-field-enhanced-authors'], + }, + date_published: { + selectors: ['.date-display-single'], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.field.field-name-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var AbcnewsGoComExtractor = { + domain: 'abcnews.go.com', + title: { + selectors: ['.article-header h1'], + }, + author: { + selectors: ['.authors'], + clean: ['.author-overlay', '.by-text'], + }, + date_published: { + selectors: ['.timestamp'], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-copy'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwNydailynewsComExtractor = { + domain: 'www.nydailynews.com', + title: { + selectors: ['h1#ra-headline'], + }, + author: { + selectors: [['meta[name="parsely-author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="sailthru.date"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['article#ra-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['dl#ra-tags', '.ra-related', 'a.ra-editor', 'dl#ra-share-bottom'], + }, + }; + + var WwwCnbcComExtractor = { + domain: 'www.cnbc.com', + title: { + selectors: ['h1.title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div#article_body.content', 'div.story'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwPopsugarComExtractor = { + domain: 'www.popsugar.com', + title: { + selectors: ['h2.post-title', 'title-text'], + }, + author: { + selectors: [['meta[name="article:author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['#content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.share-copy-title', '.post-tags', '.reactions'], + }, + }; + + var ObserverComExtractor = { + domain: 'observer.com', + title: { + selectors: ['h1.entry-title'], + }, + author: { + selectors: ['.author', '.vcard'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['h2.dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var PeopleComExtractor = { + domain: 'people.com', + title: { + selectors: [['meta[name="og:title"]', 'value']], + }, + author: { + selectors: ['a.author.url.fn'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.article-body__inner'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwUsmagazineComExtractor = { + domain: 'www.usmagazine.com', + title: { + selectors: ['header h1'], + }, + author: { + selectors: ['a.article-byline.tracked-offpage'], + }, + date_published: { + timezone: 'America/New_York', + selectors: ['time.article-published-date'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.article-body-inner'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.module-related'], + }, + }; + + var WwwRollingstoneComExtractor = { + domain: 'www.rollingstone.com', + title: { + selectors: ['h1.content-title'], + }, + author: { + selectors: ['a.content-author.tracked-offpage'], + }, + date_published: { + selectors: ['time.content-published-date'], + timezone: 'America/New_York', + }, + dek: { + selectors: ['.content-description'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.lead-container', '.article-content'], '.article-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.module-related'], + }, + }; + + var twofortysevensportsComExtractor = { + domain: '247sports.com', + title: { + selectors: ['title', 'article header h1'], + }, + author: { + selectors: ['.author'], + }, + date_published: { + selectors: [['time[data-published]', 'data-published']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['section.body.article'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var UproxxComExtractor = { + domain: 'uproxx.com', + title: { + selectors: ['div.post-top h1'], + }, + author: { + selectors: ['.post-top .authorname'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.post-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div.image': 'figure', + 'div.image .wp-media-credit': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwEonlineComExtractor = { + domain: 'www.eonline.com', + title: { + selectors: ['h1.article__title'], + }, + author: { + selectors: ['.entry-meta__author a'], + }, + date_published: { + selectors: [['meta[itemprop="datePublished"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['.post-content section, .post-content div.post-content__image'], + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div.post-content__image': 'figure', + 'div.post-content__image .image__credits': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwMiamiheraldComExtractor = { + domain: 'www.miamiherald.com', + title: { + selectors: ['h1.title'], + }, + date_published: { + selectors: ['p.published-date'], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.dateline-storybody'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwRefinery29ComExtractor = { + domain: 'www.refinery29.com', + title: { + selectors: ['h1.title'], + }, + author: { + selectors: ['.contributor'], + }, + date_published: { + selectors: [['meta[name="sailthru.date"]', 'value']], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['.full-width-opener', '.article-content'], + '.article-content', + '.body', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div.loading noscript': function divLoadingNoscript($node) { + var imgHtml = $node.html(); + $node.parents('.loading').replaceWith(imgHtml); + }, + '.section-image': 'figure', + '.section-image .content-caption': 'figcaption', + '.section-text': 'p', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.story-share'], + }, + }; + + var WwwMacrumorsComExtractor = { + domain: 'www.macrumors.com', + title: { + selectors: ['h1', 'h1.title'], + }, + author: { + selectors: ['.author-url'], + }, + date_published: { + selectors: ['.article .byline'], + // Wednesday January 18, 2017 11:44 am PST + format: 'dddd MMMM D, YYYY h:mm A zz', + timezone: 'America/Los_Angeles', + }, + dek: { + selectors: [['meta[name="description"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwAndroidcentralComExtractor = { + domain: 'www.androidcentral.com', + title: { + selectors: ['h1', 'h1.main-title'], + }, + author: { + selectors: ['.meta-by'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: [['meta[name="og:description"]', 'value']], + }, + lead_image_url: { + selectors: [['.image-large', 'src']], + }, + content: { + selectors: ['.article-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.intro', 'blockquote'], + }, + }; + + var WwwSiComExtractor = { + domain: 'www.si.com', + title: { + selectors: ['h1', 'h1.headline'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: ['.timestamp'], + timezone: 'America/New_York', + }, + dek: { + selectors: ['.quick-hit ul'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['p', '.marquee_large_2x', '.component.image']], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + noscript: function noscript($node) { + var $children = $node.children(); + + if ($children.length === 1 && $children.get(0).tagName === 'img') { + return 'figure'; + } + + return null; + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + ['.inline-thumb', '.primary-message', '.description', '.instructions'], + ], + }, + }; + + var WwwRawstoryComExtractor = { + domain: 'www.rawstory.com', + title: { + selectors: ['.blog-title'], + }, + author: { + selectors: ['.blog-author a:first-of-type'], + }, + date_published: { + selectors: ['.blog-author a:last-of-type'], + timezone: 'EST', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.blog-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwCnetComExtractor = { + domain: 'www.cnet.com', + title: { + selectors: [['meta[name="og:title"]', 'value']], + }, + author: { + selectors: ['a.author'], + }, + date_published: { + selectors: ['time'], + timezone: 'America/Los_Angeles', + }, + dek: { + selectors: ['.article-dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['img.__image-lead__', '.article-main-body'], + '.article-main-body', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'figure.image': function figureImage($node) { + var $img = $node.find('img'); + $img.attr('width', '100%'); + $img.attr('height', '100%'); + $img.addClass('__image-lead__'); + $node.remove('.imgContainer').prepend($img); + }, + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwCinemablendComExtractor = { + domain: 'www.cinemablend.com', + title: { + selectors: ['.story_title'], + }, + author: { + selectors: ['.author'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + timezone: 'EST', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div#wrap_left_content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwTodayComExtractor = { + domain: 'www.today.com', + title: { + selectors: ['h1.entry-headline'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="DC.date.issued"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-container'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.label-comment'], + }, + }; + + var WwwHowtogeekComExtractor = { + domain: 'www.howtogeek.com', + title: { + selectors: ['title'], + }, + author: { + selectors: ['#authorinfobox a'], + }, + date_published: { + selectors: ['#authorinfobox + div li'], + timezone: 'GMT', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.thecontent'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwAlComExtractor = { + domain: 'www.al.com', + title: { + selectors: [['meta[name="title"]', 'value']], + }, + author: { + selectors: [['meta[name="article_author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article_date_original"]', 'value']], + timezone: 'EST', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwThepennyhoarderComExtractor = { + domain: 'www.thepennyhoarder.com', + title: { + selectors: [['meta[name="dcterms.title"]', 'value']], + }, + author: { + selectors: [['link[rel="author"]', 'title']], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.post-img', '.post-text'], '.post-text'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwWesternjournalismComExtractor = { + domain: 'www.westernjournalism.com', + title: { + selectors: ['title', 'h1.entry-title'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="DC.date.issued"]', 'value']], + }, + dek: { + selectors: ['.subtitle'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.article-sharing.top + div'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.ad-notice-small'], + }, + }; + + var FusionNetExtractor = { + domain: 'fusion.net', + title: { + selectors: ['.post-title', '.single-title', '.headline'], + }, + author: { + selectors: ['.show-for-medium .byline'], + }, + date_published: { + selectors: [['time.local-time', 'datetime']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + ['.post-featured-media', '.article-content'], + '.article-content', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.fusion-youtube-oembed': 'figure', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwAmericanowComExtractor = { + domain: 'www.americanow.com', + title: { + selectors: ['.title', ['meta[name="title"]', 'value']], + }, + author: { + selectors: ['.byline'], + }, + date_published: { + selectors: [['meta[name="publish_date"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.article-content', '.image', '.body'], '.body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.article-video-wrapper', '.show-for-small-only'], + }, + }; + + var ScienceflyComExtractor = { + domain: 'sciencefly.com', + title: { + selectors: ['.entry-title', '.cb-entry-title', '.cb-single-title'], + }, + author: { + selectors: ['div.cb-author', 'div.cb-author-title'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['div.theiaPostSlider_slides img', 'src']], + }, + content: { + selectors: ['div.theiaPostSlider_slides'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var HellogigglesComExtractor = { + domain: 'hellogiggles.com', + title: { + selectors: ['.title'], + }, + author: { + selectors: ['.author-link'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var ThoughtcatalogComExtractor = { + domain: 'thoughtcatalog.com', + title: { + selectors: ['h1.title', ['meta[name="og:title"]', 'value']], + }, + author: { + selectors: [ + 'div.col-xs-12.article_header div.writer-container.writer-container-inline.writer-no-avatar h4.writer-name', + 'h1.writer-name', + ], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry.post'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.tc_mark'], + }, + }; + + var WwwNjComExtractor = { + domain: 'www.nj.com', + title: { + selectors: [['meta[name="title"]', 'value']], + }, + author: { + selectors: [['meta[name="article_author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="article_date_original"]', 'value']], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwInquisitrComExtractor = { + domain: 'www.inquisitr.com', + title: { + selectors: ['h1.entry-title.story--header--title'], + }, + author: { + selectors: ['div.story--header--author'], + }, + date_published: { + selectors: [['meta[name="datePublished"]', 'value']], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['article.story', '.entry-content.'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + '.post-category', + '.story--header--socials', + '.story--header--content', + ], + }, + }; + + var WwwNbcnewsComExtractor = { + domain: 'www.nbcnews.com', + title: { + selectors: ['div.article-hed h1'], + }, + author: { + selectors: ['span.byline_author'], + }, + date_published: { + selectors: [ + ['.flag_article-wrapper time.timestamp_article[datetime]', 'datetime'], + '.flag_article-wrapper time', + ], + timezone: 'America/New_York', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['div.article-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var FortuneComExtractor = { + domain: 'fortune.com', + title: { + selectors: ['h1'], + }, + author: { + selectors: [['meta[name="author"]', 'value']], + }, + date_published: { + selectors: ['.MblGHNMJ'], + timezone: 'UTC', + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['picture', 'article.row'], 'article.row'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var WwwLinkedinComExtractor = { + domain: 'www.linkedin.com', + title: { + selectors: ['.article-title', 'h1'], + }, + author: { + selectors: [ + ['meta[name="article:author"]', 'value'], + '.entity-name a[rel=author]', + ], + }, + date_published: { + selectors: [['time[itemprop="datePublished"]', 'datetime']], + timezone: 'America/Los_Angeles', + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['header figure', '.prose'], '.prose'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.entity-image'], + }, + }; + + var ObamawhitehouseArchivesGovExtractor = { + domain: 'obamawhitehouse.archives.gov', + supportedDomains: ['whitehouse.gov'], + title: { + selectors: ['h1', '.pane-node-title'], + }, + author: { + selectors: ['.blog-author-link', '.node-person-name-link'], + }, + date_published: { + selectors: [['meta[name="article:published_time"]', 'value']], + }, + dek: { + selectors: ['.field-name-field-forall-summary'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + defaultCleaner: false, + selectors: ['div#content-start', '.pane-node-field-forall-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.pane-node-title', '.pane-custom.pane-1'], + }, + }; + + var WwwOpposingviewsComExtractor = { + domain: 'www.opposingviews.com', + title: { + selectors: ['h1.title'], + }, + author: { + selectors: ['div.date span span a'], + }, + date_published: { + selectors: [['meta[name="publish_date"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.show-for-small-only'], + }, + }; + + var WwwProspectmagazineCoUkExtractor = { + domain: 'www.prospectmagazine.co.uk', + title: { + selectors: ['.page-title'], + }, + author: { + selectors: ['.aside_author .title'], + }, + date_published: { + selectors: ['.post-info'], + timezone: 'Europe/London', + }, + dek: { + selectors: ['.page-subtitle'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [ + // ['article.type-post div.post_content p'], + 'article .post_content', + ], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var ForwardComExtractor = { + domain: 'forward.com', + title: { + selectors: [['meta[name="og:title"]', 'value']], + }, + author: { + selectors: ['.author-name', ['meta[name="sailthru.author"]', 'value']], + }, + date_published: { + selectors: [['meta[name="date"]', 'value']], + }, + dek: { + selectors: [ + // enter selectors + ], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.post-item-media-wrap', '.post-item p']], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.donate-box', '.message', '.subtitle'], + }, + }; + + var WwwQdailyComExtractor = { + domain: 'www.qdaily.com', + title: { + selectors: ['h2', 'h2.title'], + }, + author: { + selectors: ['.name'], + }, + date_published: { + selectors: [['.date.smart-date', 'data-origindate']], + }, + dek: { + selectors: ['.excerpt'], + }, + lead_image_url: { + selectors: [['.article-detail-hd img', 'src']], + }, + content: { + selectors: ['.detail'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['.lazyload', '.lazylad', '.lazylood'], + }, + }; + + var GothamistComExtractor = { + domain: 'gothamist.com', + supportedDomains: [ + 'chicagoist.com', + 'laist.com', + 'sfist.com', + 'shanghaiist.com', + 'dcist.com', + ], + title: { + selectors: ['h1', '.entry-header h1'], + }, + author: { + selectors: ['.author'], + }, + date_published: { + selectors: ['abbr', 'abbr.published'], + timezone: 'America/New_York', + }, + dek: { + selectors: [null], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.entry-body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + 'div.image-none': 'figure', + '.image-none i': 'figcaption', + 'div.image-left': 'figure', + '.image-left i': 'figcaption', + 'div.image-right': 'figure', + '.image-right i': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + '.image-none br', + '.image-left br', + '.image-right br', + '.galleryEase', + ], + }, + }; + + var WwwFoolComExtractor = { + domain: 'www.fool.com', + title: { + selectors: ['h1'], + }, + author: { + selectors: ['.author-inline .author-name'], + }, + date_published: { + selectors: [['meta[name="date"]', 'value']], + }, + dek: { + selectors: ['header h2'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.article-content'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: { + '.caption img': function captionImg($node) { + var src = $node.attr('src'); + $node + .parent() + .replaceWith('<figure><img src="'.concat(src, '"/></figure>')); + }, + '.caption': 'figcaption', + }, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: ['#pitch'], + }, + }; + + var WwwSlateComExtractor = { + domain: 'www.slate.com', + title: { + selectors: ['.hed', 'h1'], + }, + author: { + selectors: ['a[rel=author]'], + }, + date_published: { + selectors: ['.pub-date'], + timezone: 'America/New_York', + }, + dek: { + selectors: ['.dek'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: ['.body'], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [ + '.about-the-author', + '.pullquote', + '.newsletter-signup-component', + '.top-comment', + ], + }, + }; + + var IciRadioCanadaCaExtractor = { + domain: 'ici.radio-canada.ca', + title: { + selectors: ['h1'], + }, + author: { + selectors: [['meta[name="dc.creator"]', 'value']], + }, + date_published: { + selectors: [['meta[name="dc.date.created"]', 'value']], + timezone: 'America/New_York', + }, + dek: { + selectors: ['.bunker-component.lead'], + }, + lead_image_url: { + selectors: [['meta[name="og:image"]', 'value']], + }, + content: { + selectors: [['.main-multimedia-item', '.news-story-content']], + // Is there anything in the content you selected that needs transformed + // before it's consumable content? E.g., unusual lazy loaded images + transforms: {}, + // Is there anything that is in the result that shouldn't be? + // The clean selectors will remove anything that matches from + // the result + clean: [], + }, + }; + + var CustomExtractors = /*#__PURE__*/ Object.freeze({ + BloggerExtractor: BloggerExtractor, + NYMagExtractor: NYMagExtractor, + WikipediaExtractor: WikipediaExtractor, + TwitterExtractor: TwitterExtractor, + NYTimesExtractor: NYTimesExtractor, + TheAtlanticExtractor: TheAtlanticExtractor, + NewYorkerExtractor: NewYorkerExtractor, + WiredExtractor: WiredExtractor, + MSNExtractor: MSNExtractor, + YahooExtractor: YahooExtractor, + BuzzfeedExtractor: BuzzfeedExtractor, + WikiaExtractor: WikiaExtractor, + LittleThingsExtractor: LittleThingsExtractor, + PoliticoExtractor: PoliticoExtractor, + DeadspinExtractor: DeadspinExtractor, + BroadwayWorldExtractor: BroadwayWorldExtractor, + ApartmentTherapyExtractor: ApartmentTherapyExtractor, + MediumExtractor: MediumExtractor, + WwwTmzComExtractor: WwwTmzComExtractor, + WwwWashingtonpostComExtractor: WwwWashingtonpostComExtractor, + WwwHuffingtonpostComExtractor: WwwHuffingtonpostComExtractor, + NewrepublicComExtractor: NewrepublicComExtractor, + MoneyCnnComExtractor: MoneyCnnComExtractor, + WwwThevergeComExtractor: WwwThevergeComExtractor, + WwwCnnComExtractor: WwwCnnComExtractor, + WwwAolComExtractor: WwwAolComExtractor, + WwwYoutubeComExtractor: WwwYoutubeComExtractor, + WwwTheguardianComExtractor: WwwTheguardianComExtractor, + WwwSbnationComExtractor: WwwSbnationComExtractor, + WwwBloombergComExtractor: WwwBloombergComExtractor, + WwwBustleComExtractor: WwwBustleComExtractor, + WwwNprOrgExtractor: WwwNprOrgExtractor, + WwwRecodeNetExtractor: WwwRecodeNetExtractor, + QzComExtractor: QzComExtractor, + WwwDmagazineComExtractor: WwwDmagazineComExtractor, + WwwReutersComExtractor: WwwReutersComExtractor, + MashableComExtractor: MashableComExtractor, + WwwChicagotribuneComExtractor: WwwChicagotribuneComExtractor, + WwwVoxComExtractor: WwwVoxComExtractor, + NewsNationalgeographicComExtractor: NewsNationalgeographicComExtractor, + WwwNationalgeographicComExtractor: WwwNationalgeographicComExtractor, + WwwLatimesComExtractor: WwwLatimesComExtractor, + PagesixComExtractor: PagesixComExtractor, + ThefederalistpapersOrgExtractor: ThefederalistpapersOrgExtractor, + WwwCbssportsComExtractor: WwwCbssportsComExtractor, + WwwMsnbcComExtractor: WwwMsnbcComExtractor, + WwwThepoliticalinsiderComExtractor: WwwThepoliticalinsiderComExtractor, + WwwMentalflossComExtractor: WwwMentalflossComExtractor, + AbcnewsGoComExtractor: AbcnewsGoComExtractor, + WwwNydailynewsComExtractor: WwwNydailynewsComExtractor, + WwwCnbcComExtractor: WwwCnbcComExtractor, + WwwPopsugarComExtractor: WwwPopsugarComExtractor, + ObserverComExtractor: ObserverComExtractor, + PeopleComExtractor: PeopleComExtractor, + WwwUsmagazineComExtractor: WwwUsmagazineComExtractor, + WwwRollingstoneComExtractor: WwwRollingstoneComExtractor, + twofortysevensportsComExtractor: twofortysevensportsComExtractor, + UproxxComExtractor: UproxxComExtractor, + WwwEonlineComExtractor: WwwEonlineComExtractor, + WwwMiamiheraldComExtractor: WwwMiamiheraldComExtractor, + WwwRefinery29ComExtractor: WwwRefinery29ComExtractor, + WwwMacrumorsComExtractor: WwwMacrumorsComExtractor, + WwwAndroidcentralComExtractor: WwwAndroidcentralComExtractor, + WwwSiComExtractor: WwwSiComExtractor, + WwwRawstoryComExtractor: WwwRawstoryComExtractor, + WwwCnetComExtractor: WwwCnetComExtractor, + WwwCinemablendComExtractor: WwwCinemablendComExtractor, + WwwTodayComExtractor: WwwTodayComExtractor, + WwwHowtogeekComExtractor: WwwHowtogeekComExtractor, + WwwAlComExtractor: WwwAlComExtractor, + WwwThepennyhoarderComExtractor: WwwThepennyhoarderComExtractor, + WwwWesternjournalismComExtractor: WwwWesternjournalismComExtractor, + FusionNetExtractor: FusionNetExtractor, + WwwAmericanowComExtractor: WwwAmericanowComExtractor, + ScienceflyComExtractor: ScienceflyComExtractor, + HellogigglesComExtractor: HellogigglesComExtractor, + ThoughtcatalogComExtractor: ThoughtcatalogComExtractor, + WwwNjComExtractor: WwwNjComExtractor, + WwwInquisitrComExtractor: WwwInquisitrComExtractor, + WwwNbcnewsComExtractor: WwwNbcnewsComExtractor, + FortuneComExtractor: FortuneComExtractor, + WwwLinkedinComExtractor: WwwLinkedinComExtractor, + ObamawhitehouseArchivesGovExtractor: ObamawhitehouseArchivesGovExtractor, + WwwOpposingviewsComExtractor: WwwOpposingviewsComExtractor, + WwwProspectmagazineCoUkExtractor: WwwProspectmagazineCoUkExtractor, + ForwardComExtractor: ForwardComExtractor, + WwwQdailyComExtractor: WwwQdailyComExtractor, + GothamistComExtractor: GothamistComExtractor, + WwwFoolComExtractor: WwwFoolComExtractor, + WwwSlateComExtractor: WwwSlateComExtractor, + IciRadioCanadaCaExtractor: IciRadioCanadaCaExtractor, + }); + + var Extractors = keys$1(CustomExtractors).reduce(function(acc, key) { + var extractor = CustomExtractors[key]; + return objectSpread({}, acc, mergeSupportedDomains(extractor)); + }, {}); + + var stringDirection = createCommonjsModule(function(module, exports) { + (function() { + var LTR_MARK = '\u200e', + RTL_MARK = '\u200f', + LTR = 'ltr', + // Left to right direction content + RTL = 'rtl', + // Right to left direction content + BIDI = 'bidi', + // Both directions - any and all directions will not be ok + NODI = ''; // No direction - any and all directions are ok + + var rtlSciriptRanges = { + Hebrew: ['0590', '05FF'], + Arabic: ['0600', '06FF'], + NKo: ['07C0', '07FF'], + Syriac: ['0700', '074F'], + Thaana: ['0780', '07BF'], + Tifinagh: ['2D30', '2D7F'], + }; + /* + * Gets string direction + * @param {string} - String to check for direction + * @returns {string} - 'ltr' if given string is left-to-right, + * 'rtl' if it's right-to-left and 'bidi' if it has both types of characters + */ + + function getDirection(string) { + if (typeof string === 'undefined') + throw new Error('TypeError missing argument'); + if (typeof string !== 'string') + throw new Error('TypeError getDirection expects strings'); + if (string === '') return NODI; + if (string.indexOf(LTR_MARK) > -1 && string.indexOf(RTL_MARK) > -1) + return BIDI; + if (string.indexOf(LTR_MARK) > -1) return LTR; + if (string.indexOf(RTL_MARK) > -1) return RTL; + var hasRtl = hasDirectionCharacters(string, RTL); + var hasLtr = hasDirectionCharacters(string, LTR); + if (hasRtl && hasLtr) return BIDI; + if (hasLtr) return LTR; + if (hasRtl) return RTL; + return NODI; + } + /** + * Determine if a string has characters in right-to-left or left-to-right Unicode blocks + * @param {string} string - String to check for characters + * @param {string} direction - Direction to check. Either 'ltr' or 'rtl' string + * @returns {boolean} - True if given string has direction specific characters, False otherwise + */ + + function hasDirectionCharacters(string, direction) { + var i, + char, + range, + charIsRtl, + hasRtl = false, + hasLtr = false, + hasDigit = false; + hasDigit = string.search(/[0-9]/) > -1; // Remove white space and non directional characters + + string = string.replace(/[\s\n\0\f\t\v\'\"\-0-9\+\?\!]+/gm, ''); // Loop through each character + + for (i = 0; i < string.length; i++) { + char = string.charAt(i); // Assume character is not rtl + + charIsRtl = false; // Test each character against all ltr script ranges + + for (range in rtlSciriptRanges) { + if (rtlSciriptRanges.hasOwnProperty(range)) { + if ( + isInScriptRange( + char, + rtlSciriptRanges[range][0], + rtlSciriptRanges[range][1] + ) + ) { + // If character is rtl, set rtl flag (hasRtl) for string to true + hasRtl = true; // Set rtl flag for this character to true + + charIsRtl = true; + } + } + } // If this character is *not* rtl then it is ltr and string has + // ltr characters + + if (charIsRtl === false) { + hasLtr = true; + } + } + + if (direction === RTL) return hasRtl; + if (direction === LTR) return hasLtr || (!hasRtl && hasDigit); + } + /** + * Checks if a a character is in a Unicode block range + * @param {string} char - The character to check. An string with only one character + * @param {string} from - Starting Unicode code of block in hexadecimal. Example: "2D30" + * @param {string} to - Ending Unicode code of block in hexadecimal. Example: "2F30" + * @returns {boolean} - true if char is in range. + */ + + function isInScriptRange(char, from, to) { + var charCode = char.charCodeAt(0), + fromCode = parseInt(from, 16), + toCode = parseInt(to, 16); + return charCode > fromCode && charCode < toCode; + } + /** + * Monkey-patch String global object to expose getDirection method + */ + + function patchStringPrototype() { + String.prototype.getDirection = function() { + return getDirection(this.valueOf()); + }; + } // TODO make it AMD friendly + + { + exports.getDirection = getDirection; + exports.patch = patchStringPrototype; + } + }.call(this)); + }); + var stringDirection_1 = stringDirection.getDirection; + var stringDirection_2 = stringDirection.patch; + + // CLEAN AUTHOR CONSTANTS + var CLEAN_AUTHOR_RE = /^\s*(posted |written )?by\s*:?\s*(.*)/i; // author = re.sub(r'^\s*(posted |written )?by\s*:?\s*(.*)(?i)', + // CLEAN DEK CONSTANTS + + var TEXT_LINK_RE = new RegExp('http(s)?://', 'i'); // An ordered list of meta tag names that denote likely article deks. + + var MS_DATE_STRING = /^\d{13}$/i; + var SEC_DATE_STRING = /^\d{10}$/i; + var CLEAN_DATE_STRING_RE = /^\s*published\s*:?\s*(.*)/i; + var TIME_MERIDIAN_SPACE_RE = /(.*\d)(am|pm)(.*)/i; + var TIME_MERIDIAN_DOTS_RE = /\.m\./i; + var months = [ + 'jan', + 'feb', + 'mar', + 'apr', + 'may', + 'jun', + 'jul', + 'aug', + 'sep', + 'oct', + 'nov', + 'dec', + ]; + var allMonths = months.join('|'); + var timestamp1 = '[0-9]{1,2}:[0-9]{2,2}( ?[ap].?m.?)?'; + var timestamp2 = '[0-9]{1,2}[/-][0-9]{1,2}[/-][0-9]{2,4}'; + var timestamp3 = '-[0-9]{3,4}$'; + var SPLIT_DATE_STRING = new RegExp( + '(' + .concat(timestamp1, ')|(') + .concat(timestamp2, ')|(') + .concat(timestamp3, ')|([0-9]{1,4})|(') + .concat(allMonths, ')'), + 'ig' + ); // 2016-11-22T08:57-500 + // Check if datetime string has an offset at the end + + var TIME_WITH_OFFSET_RE = /-\d{3,4}$/; // CLEAN TITLE CONSTANTS + // A regular expression that will match separating characters on a + // title, that usually denote breadcrumbs or something similar. + + var TITLE_SPLITTERS_RE = /(: | - | \| )/g; + var DOMAIN_ENDINGS_RE = new RegExp('.com$|.net$|.org$|.co.uk$', 'g'); + + // just the name(s): 'David Smith'. + + function cleanAuthor(author) { + return normalizeSpaces(author.replace(CLEAN_AUTHOR_RE, '$2').trim()); + } + + var validUrl = createCommonjsModule(function(module) { + (function(module) { + module.exports.is_uri = is_iri; + module.exports.is_http_uri = is_http_iri; + module.exports.is_https_uri = is_https_iri; + module.exports.is_web_uri = is_web_iri; // Create aliases + + module.exports.isUri = is_iri; + module.exports.isHttpUri = is_http_iri; + module.exports.isHttpsUri = is_https_iri; + module.exports.isWebUri = is_web_iri; // private function + // internal URI spitter method - direct from RFC 3986 + + var splitUri = function(uri) { + var splitted = uri.match( + /(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/ + ); + return splitted; + }; + + function is_iri(value) { + if (!value) { + return; + } // check for illegal characters + + if ( + /[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(value) + ) + return; // check for hex escapes that aren't complete + + if (/%[^0-9a-f]/i.test(value)) return; + if (/%[0-9a-f](:?[^0-9a-f]|$)/i.test(value)) return; + var splitted = []; + var scheme = ''; + var authority = ''; + var path = ''; + var query = ''; + var fragment = ''; + var out = ''; // from RFC 3986 + + splitted = splitUri(value); + scheme = splitted[1]; + authority = splitted[2]; + path = splitted[3]; + query = splitted[4]; + fragment = splitted[5]; // scheme and path are required, though the path can be empty + + if (!(scheme && scheme.length && path.length >= 0)) return; // if authority is present, the path must be empty or begin with a / + + if (authority && authority.length) { + if (!(path.length === 0 || /^\//.test(path))) return; + } else { + // if authority is not present, the path must not start with // + if (/^\/\//.test(path)) return; + } // scheme must begin with a letter, then consist of letters, digits, +, ., or - + + if (!/^[a-z][a-z0-9\+\-\.]*$/.test(scheme.toLowerCase())) return; // re-assemble the URL per section 5.3 in RFC 3986 + + out += scheme + ':'; + + if (authority && authority.length) { + out += '//' + authority; + } + + out += path; + + if (query && query.length) { + out += '?' + query; + } + + if (fragment && fragment.length) { + out += '#' + fragment; + } + + return out; + } + + function is_http_iri(value, allowHttps) { + if (!is_iri(value)) { + return; + } + + var splitted = []; + var scheme = ''; + var authority = ''; + var path = ''; + var port = ''; + var query = ''; + var fragment = ''; + var out = ''; // from RFC 3986 + + splitted = splitUri(value); + scheme = splitted[1]; + authority = splitted[2]; + path = splitted[3]; + query = splitted[4]; + fragment = splitted[5]; + if (!scheme) return; + + if (allowHttps) { + if (scheme.toLowerCase() != 'https') return; + } else { + if (scheme.toLowerCase() != 'http') return; + } // fully-qualified URIs must have an authority section that is + // a valid host + + if (!authority) { + return; + } // enable port component + + if (/:(\d+)$/.test(authority)) { + port = authority.match(/:(\d+)$/)[0]; + authority = authority.replace(/:\d+$/, ''); + } + + out += scheme + ':'; + out += '//' + authority; + + if (port) { + out += port; + } + + out += path; + + if (query && query.length) { + out += '?' + query; + } + + if (fragment && fragment.length) { + out += '#' + fragment; + } + + return out; + } + + function is_https_iri(value) { + return is_http_iri(value, true); + } + + function is_web_iri(value) { + return is_http_iri(value) || is_https_iri(value); + } + })(module); + }); + + function clean$1(leadImageUrl) { + leadImageUrl = leadImageUrl.trim(); + + if (validUrl.isWebUri(leadImageUrl)) { + return leadImageUrl; + } + + return null; + } + + // Return None if the dek wasn't good enough. + + function cleanDek(dek, _ref) { + var $ = _ref.$, + excerpt = _ref.excerpt; + // Sanity check that we didn't get too short or long of a dek. + if (dek.length > 1000 || dek.length < 5) return null; // Check that dek isn't the same as excerpt + + if (excerpt && excerptContent(excerpt, 10) === excerptContent(dek, 10)) + return null; + var dekText = stripTags(dek, $); // Plain text links shouldn't exist in the dek. If we have some, it's + // not a good dek - bail. + + if (TEXT_LINK_RE.test(dekText)) return null; + return normalizeSpaces(dekText.trim()); + } + + var moment = createCommonjsModule(function(module, exports) { + (function(global, factory) { + module.exports = factory(); + })(this, function() { + var hookCallback; + + function hooks() { + return hookCallback.apply(null, arguments); + } // This is done to register the method called with moment() + // without creating circular dependencies. + + function setHookCallback(callback) { + hookCallback = callback; + } + + function isArray(input) { + return ( + input instanceof Array || + Object.prototype.toString.call(input) === '[object Array]' + ); + } + + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return ( + input != null && + Object.prototype.toString.call(input) === '[object Object]' + ); + } + + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + + for (k in obj) { + if (obj.hasOwnProperty(k)) { + return false; + } + } + + return true; + } + } + + function isUndefined(input) { + return input === void 0; + } + + function isNumber(input) { + return ( + typeof input === 'number' || + Object.prototype.toString.call(input) === '[object Number]' + ); + } + + function isDate(input) { + return ( + input instanceof Date || + Object.prototype.toString.call(input) === '[object Date]' + ); + } + + function map(arr, fn) { + var res = [], + i; + + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); + } + + return res; + } + + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + + if (hasOwnProp(b, 'toString')) { + a.toString = b.toString; + } + + if (hasOwnProp(b, 'valueOf')) { + a.valueOf = b.valueOf; + } + + return a; + } + + function createUTC(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function defaultParsingFlags() { + // We need to deep clone this object. + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + meridiem: null, + rfc2822: false, + weekdayMismatch: false, + }; + } + + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + + return m._pf; + } + + var some; + + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function(fun) { + var t = Object(this); + var len = t.length >>> 0; + + for (var i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m); + var parsedParts = some.call(flags.parsedDateParts, function(i) { + return i != null; + }); + var isNowValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = + isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + + var momentProperties = (hooks.momentProperties = []); + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + + if (!isUndefined(from._i)) { + to._i = from._i; + } + + if (!isUndefined(from._f)) { + to._f = from._f; + } + + if (!isUndefined(from._l)) { + to._l = from._l; + } + + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + var updateInProgress = false; // Moment prototype object + + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + + if (!this.isValid()) { + this._d = new Date(NaN); + } // Prevent infinite loop in case updateOffset creates new moment + // objects. + + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return ( + obj instanceof Moment || (obj != null && obj._isAMomentObject != null) + ); + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } // compare two arrays, return the number of differences + + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + + return diffs + lengthDiff; + } + + function warn(msg) { + if ( + hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + return extend(function() { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + + if (firstTime) { + var args = []; + var arg; + + for (var i = 0; i < arguments.length; i++) { + arg = ''; + + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + + args.push(arg); + } + + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(args).join('') + + '\n' + + new Error().stack + ); + firstTime = false; + } + + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return ( + input instanceof Function || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + function set(config) { + var prop, i; + + for (i in config) { + prop = config[i]; + + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + + this._config = config; // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + ); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + + for (prop in parentConfig) { + if ( + hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop]) + ) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function(obj) { + var i, + res = []; + + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper.replace( + /MMMM|MM|DD|dddd/g, + function(val) { + return val.slice(1); + } + ); + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d'; + var defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) + ? format(output) + : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[ + shorthand + ] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' + ? aliases[units] || aliases[units.toLowerCase()] + : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + + for (var u in unitsObj) { + units.push({ + unit: u, + priority: priorities[u], + }); + } + + units.sort(function(a, b) { + return a.priority - b.priority; + }); + return units; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)) + .toString() + .substr(1) + + absNumber + ); + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + var formatFunctions = {}; + var formatTokenFunctions = {}; // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + + if (typeof callback === 'string') { + func = function() { + return this[callback](); + }; + } + + if (token) { + formatTokenFunctions[token] = func; + } + + if (padded) { + formatTokenFunctions[padded[0]] = function() { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + + if (ordinal) { + formatTokenFunctions[ordinal] = function() { + return this.localeData().ordinal( + func.apply(this, arguments), + token + ); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function(mom) { + var output = '', + i; + + for (i = 0; i < length; i++) { + output += isFunction(array[i]) + ? array[i].call(mom, format) + : array[i]; + } + + return output; + }; + } // format date using native date object + + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = + formatFunctions[format] || makeFormatFunction(format); + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var match1 = /\d/; // 0 - 9 + + var match2 = /\d\d/; // 00 - 99 + + var match3 = /\d{3}/; // 000 - 999 + + var match4 = /\d{4}/; // 0000 - 9999 + + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + + var match1to2 = /\d\d?/; // 0 - 99 + + var match3to4 = /\d\d\d\d?/; // 999 - 9999 + + var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 + + var match1to3 = /\d{1,3}/; // 0 - 999 + + var match1to4 = /\d{1,4}/; // 0 - 9999 + + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + + var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + var regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function(isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function( + matched, + p1, + p2, + p3, + p4 + ) { + return p1 || p2 || p3 || p4; + }) + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + + if (typeof token === 'string') { + token = [token]; + } + + if (isNumber(callback)) { + func = function(input, array) { + array[callback] = toInt(input); + }; + } + + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function(input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + var WEEK = 7; + var WEEKDAY = 8; // FORMATTING + + addFormatToken('Y', 0, 0, function() { + var y = this.year(); + return y <= 9999 ? '' + y : '+' + y; + }); + addFormatToken(0, ['YY', 2], 0, function() { + return this.year() % 100; + }); + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES + + addUnitAlias('year', 'y'); // PRIORITIES + + addUnitPriority('year', 1); // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function(input, array) { + array[YEAR] = + input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function(input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function(input, array) { + array[YEAR] = parseInt(input, 10); + }); // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } // HOOKS + + hooks.parseTwoDigitYear = function(input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function makeGetSet(unit, keepTime) { + return function(value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() + ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() + : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if ( + unit === 'FullYear' && + isLeapYear(mom.year()) && + mom.month() === 1 && + mom.date() === 29 + ) { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } // MOMENTS + + function stringGet(units) { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](); + } + + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + + if (isFunction(this[units])) { + return this[units](value); + } + } + + return this; + } + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function(o) { + // I know + var i; + + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 + ? isLeapYear(year) + ? 29 + : 28 + : 31 - ((modMonth % 7) % 2); + } // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function() { + return this.month() + 1; + }); + addFormatToken('MMM', 0, 0, function(format) { + return this.localeData().monthsShort(this, format); + }); + addFormatToken('MMMM', 0, 0, function(format) { + return this.localeData().months(this, format); + }); // ALIASES + + addUnitAlias('month', 'M'); // PRIORITY + + addUnitPriority('month', 8); // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function(isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function(isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + addParseToken(['M', 'MM'], function(input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(['MMM', 'MMMM'], function(input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. + + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); // LOCALES + + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ); + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) + ? this._months + : this._months['standalone']; + } + + return isArray(this._months) + ? this._months[m.month()] + : this._months[ + (this._months.isFormat || MONTHS_IN_FORMAT).test(format) + ? 'format' + : 'standalone' + ][m.month()]; + } + + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ); + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) + ? this._monthsShort + : this._monthsShort['standalone']; + } + + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[ + MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' + ][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + '' + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + '^' + this.months(mom, '').replace('.', '') + '$', + 'i' + ); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i' + ); + } + + if (!strict && !this._monthsParse[i]) { + regex = + '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + if ( + strict && + format === 'MMMM' && + this._longMonthsParse[i].test(monthName) + ) { + return i; + } else if ( + strict && + format === 'MMM' && + this._shortMonthsParse[i].test(monthName) + ) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); // TODO: Another silent failure? + + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + var defaultMonthsShortRegex = matchWord; + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + var defaultMonthsRegex = matchWord; + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + + return this._monthsStrictRegex && isStrict + ? this._monthsStrictRegex + : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._monthsShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date = new Date(y, m, d, h, M, s, ms); // the date constructor remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { + date.setFullYear(y); + } + + return date; + } + + function createUTCDate(y) { + var date = new Date(Date.UTC.apply(null, arguments)); // the Date.UTC function remaps years 0-99 to 1900-1999 + + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + + return date; + } // start-of-first-week - start-of-year + + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + addWeekParseToken(['w', 'ww', 'W', 'WW'], function( + input, + week, + config, + token + ) { + week[token.substr(0, 1)] = toInt(input); + }); // HELPERS + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + addFormatToken('dd', 0, 0, function(format) { + return this.localeData().weekdaysMin(this, format); + }); + addFormatToken('ddd', 0, 0, function(format) { + return this.localeData().weekdaysShort(this, format); + }); + addFormatToken('dddd', 0, 0, function(format) { + return this.localeData().weekdays(this, format); + }); + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); // PRIORITY + + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function(isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function(isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function(isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + addWeekParseToken(['dd', 'ddd', 'dddd'], function( + input, + week, + config, + token + ) { + var weekday = config._locale.weekdaysParse( + input, + token, + config._strict + ); // if we didn't get a weekday name, mark the date as invalid + + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(['d', 'e', 'E'], function(input, week, config, token) { + week[token] = toInt(input); + }); // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + + return isNaN(input) ? null : input; + } // LOCALES + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ); + + function localeWeekdays(m, format) { + if (!m) { + return isArray(this._weekdays) + ? this._weekdays + : this._weekdays['standalone']; + } + + return isArray(this._weekdays) + ? this._weekdays[m.day()] + : this._weekdays[ + this._weekdays.isFormat.test(format) ? 'format' : 'standalone' + ][m.day()]; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + + function localeWeekdaysShort(m) { + return m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + + function localeWeekdaysMin(m) { + return m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + '' + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + '' + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._weekdaysParse, llc); + + if (ii !== -1) { + return ii; + } + + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + } + + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } // test the regex + + if ( + strict && + format === 'dddd' && + this._fullWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'ddd' && + this._shortWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'dd' && + this._minWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + + return this._weekdaysStrictRegex && isStrict + ? this._weekdaysStrictRegex + : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp( + '^(' + mixedPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + this._weekdaysMinStrictRegex = new RegExp( + '^(' + minPieces.join('|') + ')', + 'i' + ); + } // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + addFormatToken('hmm', 0, 0, function() { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken('hmmss', 0, 0, function() { + return ( + '' + + hFormat.apply(this) + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + addFormatToken('Hmm', 0, 0, function() { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken('Hmmss', 0, 0, function() { + return ( + '' + + this.hours() + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function() { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + + meridiem('a', true); + meridiem('A', false); // ALIASES + + addUnitAlias('hour', 'h'); // PRIORITY + + addUnitPriority('hour', 13); // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function(input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function(input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function(input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function(input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function(input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function(input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function(input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } // MOMENTS + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + + var getSetHour = makeGetSet('Hours', true); + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse, + }; // internal storage for locale config files + + var locales = {}; + var localeFamilies = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + + if (locale) { + return locale; + } + + if ( + next && + next.length >= j && + compareArrays(split, next, true) >= j - 1 + ) { + //the next array item is better than a shallower substring of this one + break; + } + + j--; + } + + i++; + } + + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node + + if ( + !locales[name] && + 'object' !== 'undefined' && + module && + module.exports + ) { + try { + oldLocale = globalLocale._abbr; + var aliasedRequire = commonjsRequire; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) {} + } + + return locales[name]; + } // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + + function getSetGlobalLocale(key, values) { + var data; + + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn( + 'Locale ' + key + ' not found. Did you forget to load it?' + ); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + + localeFamilies[config.parentLocale].push({ + name: name, + config: config, + }); + return null; + } + } + } + + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function(x) { + defineLocale(x.name, x.config); + }); + } // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + + getSetGlobalLocale(name); + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; // MERGE + + tmpLocale = loadLocale(name); + + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; // backwards compat for now: also set the locale + + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + + return locales[name]; + } // returns locale data + + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + + if (locale) { + return locale; + } + + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && + (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if ( + getParsingFlags(m)._overflowDayOfYear && + (overflow < YEAR || overflow > DATE) + ) { + overflow = DATE; + } + + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } // Pick the first defined of two or three arguments. + + function defaults(a, b, c) { + if (a != null) { + return a; + } + + if (b != null) { + return b; + } + + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate(), + ]; + } + + return [ + nowValue.getFullYear(), + nowValue.getMonth(), + nowValue.getDate(), + ]; + } // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays + + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } //if the day of the year is set, figure out what it is + + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if ( + config._dayOfYear > daysInYear(yearToUse) || + config._dayOfYear === 0 + ) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } // Zero out whatever was not defaulted, including time + + for (; i < 7; i++) { + config._a[i] = input[i] = + config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } // Check for 24:00:00.000 + + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC + ? config._d.getUTCDay() + : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } // check for mismatching day of week + + if ( + config._w && + typeof config._w.d !== 'undefined' && + config._w.d !== expectedWeekday + ) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; + w = config._w; + + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + var curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. + + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ]; // iso time formats and regexes + + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ]; + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format + + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + + if (dateFormat == null) { + config._isValid = false; + return; + } + + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + + if (timeFormat == null) { + config._isValid = false; + return; + } + } + + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; + + function extractFromRFC2822Strings( + yearStr, + monthStr, + dayStr, + hourStr, + minuteStr, + secondStr + ) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10), + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + + return true; + } + + var obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + }; + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10); + var m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } // date and time from ref 2822 format + + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)); + + if (match) { + var parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } // date from iso format or fallback + + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } // Final attempt, use Input Fallback + + hooks.createFromInputFallback(config); + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function(config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); // constant that refers to the ISO standard + + hooks.ISO_8601 = function() {}; // constant that refers to the RFC 2822 form + + hooks.RFC_2822 = function() {}; // date from string and format string + + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + + config._a = []; + getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` + + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0; + tokens = + expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || + [])[0]; // console.log('token', token, 'parsedInput', parsedInput, + // 'regex', getParseRegexForToken(token, config)); + + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } // don't parse if it's not a known token + + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } // add remaining unparsed input length to the string + + getParsingFlags(config).charsLeftOver = + stringLength - totalParsedInputLength; + + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } // clear _12h flag if hour is <= 12 + + if ( + config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0 + ) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; // handle meridiem + + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + + if (isPm && hour < 12) { + hour += 12; + } + + if (!isPm && hour === 12) { + hour = 0; + } + + return hour; + } else { + // this is not supposed to happen + return hour; + } + } // date from string and array of format strings + + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + tempConfig = copyConfig({}, config); + + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (!isValid(tempConfig)) { + continue; + } // if there is any input that was not parsed add a penalty for that format + + currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens + + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + + if (scoreToBeat == null || currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i); + config._a = map( + [ + i.year, + i.month, + i.day || i.date, + i.hour, + i.minute, + i.second, + i.millisecond, + ], + function(obj) { + return obj && parseInt(obj, 10); + } + ); + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({ + nullInput: true, + }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function(obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ( + (isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0) + ) { + input = undefined; + } // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function() { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ); + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function() { + var other = createLocal.apply(null, arguments); + + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + + function pickBy(fn, moments) { + var res, i; + + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + + if (!moments.length) { + return createLocal(); + } + + res = moments[0]; + + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + + return res; + } // TODO: Use [].sort instead? + + function min() { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + return pickBy('isAfter', args); + } + + var now = function() { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond', + ]; + + function isDurationValid(m) { + for (var key in m) { + if ( + !( + indexOf.call(ordering, key) !== -1 && + (m[key] == null || !isNaN(m[key])) + ) + ) { + return false; + } + } + + var unitHasDecimal = false; + + for (var i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove + + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + + this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + + this._months = +months + quarters * 3 + years * 12; + this._data = {}; + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function() { + var offset = this.utcOffset(); + var sign = '+'; + + if (offset < 0) { + offset = -offset; + sign = '-'; + } + + return ( + sign + + zeroFill(~~(offset / 60), 2) + + separator + + zeroFill(~~offset % 60, 2) + ); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function(input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); // HELPERS + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher); + + if (matches === null) { + return null; + } + + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } // Return a moment from input, that is local/utc/zone equivalent to model. + + function cloneWithOffset(input, model) { + var res, diff; + + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) + ? input.valueOf() + : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. + + res._d.setTime(res._d.valueOf() + diff); + + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; + } // HOOKS + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + + hooks.updateOffset = function() {}; // MOMENTS + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + + if (!this.isValid()) { + return input != null ? this : NaN; + } + + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + + this._offset = input; + this._isUTC = true; + + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > + this.clone() + .month(0) + .utcOffset() || + this.utcOffset() > + this.clone() + .month(5) + .utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}; + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = + this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } // ASP.NET json date format regex + + var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + + var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (isNumber(input)) { + duration = {}; + + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } else if (!!(match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match + }; + } else if (!!(match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if ( + typeof duration === 'object' && + ('from' in duration || 'to' in duration) + ) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it + + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = { + milliseconds: 0, + months: 0, + }; + res.months = + other.month() - base.month() + (other.year() - base.year()) * 12; + + if ( + base + .clone() + .add(res.months, 'M') + .isAfter(other) + ) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + return res; + } + + function momentsDifference(base, other) { + var res; + + if (!(base.isValid() && other.isValid())) { + return { + milliseconds: 0, + months: 0, + }; + } + + other = cloneWithOffset(other, base); + + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } // TODO: remove 'name' arg after deprecation is removed + + function createAdder(direction, name) { + return function(val, period) { + var dur, tmp; //invert the arguments, but complain about it + + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ); + tmp = val; + val = period; + period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'); + var subtract = createAdder(-1, 'subtract'); + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + } + + function calendar$1(time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse'; + var output = + formats && + (isFunction(formats[format]) + ? formats[format].call(this, now) + : formats[format]); + return this.format( + output || this.localeData().calendar(format, this, createLocal(now)) + ); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return ( + localInput.valueOf() < + this.clone() + .startOf(units) + .valueOf() + ); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return ( + this.clone() + .endOf(units) + .valueOf() < localInput.valueOf() + ); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' + ? this.isAfter(localFrom, units) + : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' + ? this.isBefore(localTo, units) + : !this.isAfter(localTo, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + + if (!(this.isValid() && localInput.isValid())) { + return false; + } + + units = normalizeUnits(units) || 'millisecond'; + + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone() + .startOf(units) + .valueOf() <= inputMs && + inputMs <= + this.clone() + .endOf(units) + .valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + + case 'month': + output = monthDiff(this, that); + break; + + case 'quarter': + output = monthDiff(this, that) / 3; + break; + + case 'second': + output = (this - that) / 1e3; + break; + // 1000 + + case 'minute': + output = (this - that) / 6e4; + break; + // 1000 * 60 + + case 'hour': + output = (this - that) / 36e5; + break; + // 1000 * 60 * 60 + + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; + // 1000 * 60 * 60 * 24, negate dst + + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; + // 1000 * 60 * 60 * 24 * 7, negate dst + + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + // difference in months + var wholeMonthDiff = + (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month + + adjust = (b - anchor) / (anchor2 - anchor); + } //check for negative zero, return zero if negative zero + + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone() + .locale('en') + .format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + + var utc = keepOffset !== true; + var m = utc ? this.clone().utc() : this; + + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) + .toISOString() + .replace('Z', formatMoment(m, 'Z')); + } + } + + return formatMoment( + m, + utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + + var func = 'moment'; + var zone = ''; + + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + + var prefix = '[' + func + '("]'; + var year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + var datetime = '-MM-DD[T]HH:mm:ss.SSS'; + var suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? hooks.defaultFormatUtc + : hooks.defaultFormat; + } + + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ + to: this, + from: time, + }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ + from: this, + to: time, + }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + + if (newLocaleData != null) { + this._locale = newLocaleData; + } + + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function(key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData() { + return this._locale; + } + + function startOf(units) { + units = normalizeUnits(units); // the following switch intentionally omits break keywords + // to utilize falling through the cases. + + switch (units) { + case 'year': + this.month(0); + + /* falls through */ + + case 'quarter': + case 'month': + this.date(1); + + /* falls through */ + + case 'week': + case 'isoWeek': + case 'day': + case 'date': + this.hours(0); + + /* falls through */ + + case 'hour': + this.minutes(0); + + /* falls through */ + + case 'minute': + this.seconds(0); + + /* falls through */ + + case 'second': + this.milliseconds(0); + } // weeks are a special case + + if (units === 'week') { + this.weekday(0); + } + + if (units === 'isoWeek') { + this.isoWeekday(1); + } // quarters are also special + + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); + } + + return this; + } + + function endOf(units) { + units = normalizeUnits(units); + + if (units === undefined || units === 'millisecond') { + return this; + } // 'date' is an alias for 'day', so it should be considered as such. + + if (units === 'date') { + units = 'day'; + } + + return this.startOf(units) + .add(1, units === 'isoWeek' ? 'week' : units) + .subtract(1, 'ms'); + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond(), + ]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function() { + return this.weekYear() % 100; + }); + addFormatToken(0, ['GG', 2], 0, function() { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function( + input, + week, + config, + token + ) { + week[token.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(['gg', 'GG'], function(input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + + if (week > weeksTarget) { + week = weeksTarget; + } + + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks( + weekYear, + week, + weekday, + dow, + doy + ), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES + + addUnitAlias('quarter', 'Q'); // PRIORITY + + addUnitPriority('quarter', 7); // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function(input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES + + addUnitAlias('date', 'D'); // PRIORITY + + addUnitPriority('date', 9); // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function(isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict + ? locale._dayOfMonthOrdinalParse || locale._ordinalParse + : locale._dayOfMonthOrdinalParseLenient; + }); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function(input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); // PRIORITY + + addUnitPriority('dayOfYear', 4); // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function(input, array, config) { + config._dayOfYear = toInt(input); + }); // HELPERS + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES + + addUnitAlias('minute', 'm'); // PRIORITY + + addUnitPriority('minute', 14); // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES + + addUnitAlias('second', 's'); // PRIORITY + + addUnitPriority('second', 15); // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); // FORMATTING + + addFormatToken('S', 0, 0, function() { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ['SS', 2], 0, function() { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function() { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function() { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function() { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function() { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function() { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function() { + return this.millisecond() * 1000000; + }); // ALIASES + + addUnitAlias('millisecond', 'ms'); // PRIORITY + + addUnitPriority('millisecond', 16); // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + var token; + + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth + ); + proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth + ); + proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear + ); + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone + ); + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted + ); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(); + var utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i; + var out = []; + + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + + return out; + } // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + var i; + var out = []; + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function(number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); // Side effect imports + + hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + getSetGlobalLocale + ); + hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + getLocale + ); + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } // supports only 2.0-style add(1, 's') or add(duration) + + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } // supports only 2.0-style subtract(1, 's') or subtract(duration) + + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } // The following code bubbles up values, see the tests for + // examples of what that means. + + data.milliseconds = milliseconds % 1000; + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + hours = absFloor(minutes / 60); + data.hours = hours % 24; + days += absFloor(hours / 24); // convert days to months + + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; + data.days = days; + data.months = months; + data.years = years; + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + + var days; + var months; + var milliseconds = this._milliseconds; + units = normalizeUnits(units); + + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + + case 'day': + return days + milliseconds / 864e5; + + case 'hour': + return days * 24 + milliseconds / 36e5; + + case 'minute': + return days * 1440 + milliseconds / 6e4; + + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + + default: + throw new Error('Unknown unit ' + units); + } + } + } // TODO: Use this.as('ms')? + + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function() { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function() { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round; + var thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month + M: 11, // months to year + }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + + function substituteTimeAgo( + string, + number, + withoutSuffix, + isFuture, + locale + ) { + return locale.relativeTime( + number || 1, + !!withoutSuffix, + string, + isFuture + ); + } + + function relativeTime$1(posNegDuration, withoutSuffix, locale) { + var duration = createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + var a = (seconds <= thresholds.ss && ['s', seconds]) || + (seconds < thresholds.s && ['ss', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]) || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } // This function allows you to set the rounding function for relative time strings + + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + + return false; + } // This function allows you to set a threshold for relative time strings + + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + + if (limit === undefined) { + return thresholds[threshold]; + } + + thresholds[threshold] = limit; + + if (threshold === 's') { + thresholds.ss = limit - 1; + } + + return true; + } + + function humanize(withSuffix) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var locale = this.localeData(); + var output = relativeTime$1(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000; + var days = abs$1(this._days); + var months = abs$1(this._months); + var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour + + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; // 12 months -> 1 year + + years = absFloor(months / 12); + months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + + var Y = years; + var M = months; + var D = days; + var h = hours; + var m = minutes; + var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + var totalSign = total < 0 ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + return ( + totalSign + + 'P' + + (Y ? ymSign + Y + 'Y' : '') + + (M ? ymSign + M + 'M' : '') + + (D ? daysSign + D + 'D' : '') + + (h || m || s ? 'T' : '') + + (h ? hmsSign + h + 'H' : '') + + (m ? hmsSign + m + 'M' : '') + + (s ? hmsSign + s + 'S' : '') + ); + } + + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1 + ); + proto$2.lang = lang; // Side effect imports + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function(input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function(input, array, config) { + config._d = new Date(toInt(input)); + }); // Side effect imports + + hooks.version = '2.23.0'; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats + + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + // <input type="datetime-local" /> + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + // <input type="datetime-local" step="1" /> + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + // <input type="datetime-local" step="0.001" /> + DATE: 'YYYY-MM-DD', + // <input type="date" /> + TIME: 'HH:mm', + // <input type="time" /> + TIME_SECONDS: 'HH:mm:ss', + // <input type="time" step="1" /> + TIME_MS: 'HH:mm:ss.SSS', + // <input type="time" step="0.001" /> + WEEK: 'GGGG-[W]WW', + // <input type="week" /> + MONTH: 'YYYY-MM', // <input type="month" /> + }; + return hooks; + }); + }); + + var momentTimezoneWithData20122022_min = createCommonjsModule(function( + module + ) { + !(function(a, i) { + module.exports ? (module.exports = i(moment)) : i(a.moment); + })(this, function(A) { + var i, + c = {}, + n = {}, + s = {}, + u = {}; + (A && 'string' == typeof A.version) || + N( + 'Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/' + ); + var a = A.version.split('.'), + e = +a[0], + r = +a[1]; + + function t(a) { + return 96 < a ? a - 87 : 64 < a ? a - 29 : a - 48; + } + + function o(a) { + var i = 0, + e = a.split('.'), + r = e[0], + o = e[1] || '', + A = 1, + c = 0, + n = 1; + + for (45 === a.charCodeAt(0) && (n = -(i = 1)); i < r.length; i++) + c = 60 * c + t(r.charCodeAt(i)); + + for (i = 0; i < o.length; i++) (A /= 60), (c += t(o.charCodeAt(i)) * A); + + return c * n; + } + + function m(a) { + for (var i = 0; i < a.length; i++) a[i] = o(a[i]); + } + + function f(a, i) { + var e, + r = []; + + for (e = 0; e < i.length; e++) r[e] = a[i[e]]; + + return r; + } + + function l(a) { + var i = a.split('|'), + e = i[2].split(' '), + r = i[3].split(''), + o = i[4].split(' '); + return ( + m(e), + m(r), + m(o), + (function(a, i) { + for (var e = 0; e < i; e++) + a[e] = Math.round((a[e - 1] || 0) + 6e4 * a[e]); + + a[i - 1] = 1 / 0; + })(o, r.length), + { + name: i[0], + abbrs: f(i[1].split(' '), r), + offsets: f(e, r), + untils: o, + population: 0 | i[5], + } + ); + } + + function p(a) { + a && this._set(l(a)); + } + + function b(a) { + var i = a.toTimeString(), + e = i.match(/\([a-z ]+\)/i); + 'GMT' === + (e = + e && e[0] + ? (e = e[0].match(/[A-Z]/g)) + ? e.join('') + : void 0 + : (e = i.match(/[A-Z]{3,5}/g)) + ? e[0] + : void 0) && (e = void 0), + (this.at = +a), + (this.abbr = e), + (this.offset = a.getTimezoneOffset()); + } + + function M(a) { + (this.zone = a), (this.offsetScore = 0), (this.abbrScore = 0); + } + + function d(a, i) { + for (var e, r; (r = 6e4 * (((i.at - a.at) / 12e4) | 0)); ) + (e = new b(new Date(a.at + r))).offset === a.offset + ? (a = e) + : (i = e); + + return a; + } + + function h(a, i) { + return a.offsetScore !== i.offsetScore + ? a.offsetScore - i.offsetScore + : a.abbrScore !== i.abbrScore + ? a.abbrScore - i.abbrScore + : i.zone.population - a.zone.population; + } + + function z(a, i) { + var e, r; + + for (m(i), e = 0; e < i.length; e++) + (r = i[e]), (u[r] = u[r] || {}), (u[r][a] = !0); + } + + function E() { + try { + var a = Intl.DateTimeFormat().resolvedOptions().timeZone; + + if (a && 3 < a.length) { + var i = s[g(a)]; + if (i) return i; + N( + 'Moment Timezone found ' + + a + + ' from the Intl api, but did not have that data loaded.' + ); + } + } catch (a) {} + + var e, + r, + o, + A = (function() { + var a, + i, + e, + r = new Date().getFullYear() - 2, + o = new b(new Date(r, 0, 1)), + A = [o]; + + for (e = 1; e < 48; e++) + (i = new b(new Date(r, e, 1))).offset !== o.offset && + ((a = d(o, i)), A.push(a), A.push(new b(new Date(a.at + 6e4)))), + (o = i); + + for (e = 0; e < 4; e++) + A.push(new b(new Date(r + e, 0, 1))), + A.push(new b(new Date(r + e, 6, 1))); + + return A; + })(), + c = A.length, + n = (function(a) { + var i, + e, + r, + o = a.length, + A = {}, + c = []; + + for (i = 0; i < o; i++) + for (e in (r = u[a[i].offset] || {})) + r.hasOwnProperty(e) && (A[e] = !0); + + for (i in A) A.hasOwnProperty(i) && c.push(s[i]); + + return c; + })(A), + t = []; + + for (r = 0; r < n.length; r++) { + for (e = new M(P(n[r]), c), o = 0; o < c; o++) e.scoreOffsetAt(A[o]); + + t.push(e); + } + + return t.sort(h), 0 < t.length ? t[0].zone.name : void 0; + } + + function g(a) { + return (a || '').toLowerCase().replace(/\//g, '_'); + } + + function T(a) { + var i, e, r, o; + + for ('string' == typeof a && (a = [a]), i = 0; i < a.length; i++) + (o = g((e = (r = a[i].split('|'))[0]))), + (c[o] = a[i]), + (s[o] = e), + z(o, r[2].split(' ')); + } + + function P(a, i) { + a = g(a); + var e, + r = c[a]; + return r instanceof p + ? r + : 'string' == typeof r + ? ((r = new p(r)), (c[a] = r)) + : n[a] && i !== P && (e = P(n[a], P)) + ? ((r = c[a] = new p())._set(e), (r.name = s[a]), r) + : null; + } + + function S(a) { + var i, e, r, o; + + for ('string' == typeof a && (a = [a]), i = 0; i < a.length; i++) + (r = g((e = a[i].split('|'))[0])), + (o = g(e[1])), + (n[r] = o), + (s[r] = e[0]), + (n[o] = r), + (s[o] = e[1]); + } + + function _(a) { + T(a.zones), S(a.links), (C.dataVersion = a.version); + } + + function k(a) { + var i = 'X' === a._f || 'x' === a._f; + return !(!a._a || void 0 !== a._tzm || i); + } + + function N(a) { + 'undefined' != typeof console && + 'function' == typeof console.error && + console.error(a); + } + + function C(a) { + var i = Array.prototype.slice.call(arguments, 0, -1), + e = arguments[arguments.length - 1], + r = P(e), + o = A.utc.apply(null, i); + return ( + r && !A.isMoment(a) && k(o) && o.add(r.parse(o), 'minutes'), + o.tz(e), + o + ); + } + + (e < 2 || (2 === e && r < 6)) && + N( + 'Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + + A.version + + '. See momentjs.com' + ), + (p.prototype = { + _set: function(a) { + (this.name = a.name), + (this.abbrs = a.abbrs), + (this.untils = a.untils), + (this.offsets = a.offsets), + (this.population = a.population); + }, + _index: function(a) { + var i, + e = +a, + r = this.untils; + + for (i = 0; i < r.length; i++) if (e < r[i]) return i; + }, + parse: function(a) { + var i, + e, + r, + o, + A = +a, + c = this.offsets, + n = this.untils, + t = n.length - 1; + + for (o = 0; o < t; o++) + if ( + ((i = c[o]), + (e = c[o + 1]), + (r = c[o ? o - 1 : o]), + i < e && C.moveAmbiguousForward + ? (i = e) + : r < i && C.moveInvalidForward && (i = r), + A < n[o] - 6e4 * i) + ) + return c[o]; + + return c[t]; + }, + abbr: function(a) { + return this.abbrs[this._index(a)]; + }, + offset: function(a) { + return ( + N('zone.offset has been deprecated in favor of zone.utcOffset'), + this.offsets[this._index(a)] + ); + }, + utcOffset: function(a) { + return this.offsets[this._index(a)]; + }, + }), + (M.prototype.scoreOffsetAt = function(a) { + (this.offsetScore += Math.abs(this.zone.utcOffset(a.at) - a.offset)), + this.zone.abbr(a.at).replace(/[^A-Z]/g, '') !== a.abbr && + this.abbrScore++; + }), + (C.version = '0.5.23'), + (C.dataVersion = ''), + (C._zones = c), + (C._links = n), + (C._names = s), + (C.add = T), + (C.link = S), + (C.load = _), + (C.zone = P), + (C.zoneExists = function a(i) { + return ( + a.didShowError || + ((a.didShowError = !0), + N( + "moment.tz.zoneExists('" + + i + + "') has been deprecated in favor of !moment.tz.zone('" + + i + + "')" + )), + !!P(i) + ); + }), + (C.guess = function(a) { + return (i && !a) || (i = E()), i; + }), + (C.names = function() { + var a, + i = []; + + for (a in s) + s.hasOwnProperty(a) && (c[a] || c[n[a]]) && s[a] && i.push(s[a]); + + return i.sort(); + }), + (C.Zone = p), + (C.unpack = l), + (C.unpackBase60 = o), + (C.needsOffset = k), + (C.moveInvalidForward = !0), + (C.moveAmbiguousForward = !1); + var B, + O = A.fn; + + function G(a) { + return function() { + return this._z ? this._z.abbr(this) : a.call(this); + }; + } + + (A.tz = C), + (A.defaultZone = null), + (A.updateOffset = function(a, i) { + var e, + r = A.defaultZone; + void 0 === a._z && + (r && + k(a) && + !a._isUTC && + ((a._d = A.utc(a._a)._d), a.utc().add(r.parse(a), 'minutes')), + (a._z = r)), + a._z && + ((e = a._z.utcOffset(a)), + Math.abs(e) < 16 && (e /= 60), + void 0 !== a.utcOffset ? a.utcOffset(-e, i) : a.zone(e, i)); + }), + (O.tz = function(a, i) { + if (a) { + if ('string' != typeof a) + throw new Error( + 'Time zone name must be a string, got ' + + a + + ' [' + + typeof a + + ']' + ); + return ( + (this._z = P(a)), + this._z + ? A.updateOffset(this, i) + : N( + 'Moment Timezone has no data for ' + + a + + '. See http://momentjs.com/timezone/docs/#/data-loading/.' + ), + this + ); + } + + if (this._z) return this._z.name; + }), + (O.zoneName = G(O.zoneName)), + (O.zoneAbbr = G(O.zoneAbbr)), + (O.utc = ((B = O.utc), + function() { + return (this._z = null), B.apply(this, arguments); + })), + (A.tz.setDefault = function(a) { + return ( + (e < 2 || (2 === e && r < 9)) && + N( + 'Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + + A.version + + '.' + ), + (A.defaultZone = a ? P(a) : null), + A + ); + }); + var D = A.momentProperties; + return ( + '[object Array]' === Object.prototype.toString.call(D) + ? (D.push('_z'), D.push('_a')) + : D && (D._z = null), + _({ + version: '2018g', + zones: [ + 'Africa/Abidjan|GMT|0|0||48e5', + 'Africa/Nairobi|EAT|-30|0||47e5', + 'Africa/Algiers|CET|-10|0||26e5', + 'Africa/Lagos|WAT|-10|0||17e6', + 'Africa/Maputo|CAT|-20|0||26e5', + 'Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6', + 'Africa/Casablanca|+00 +01|0 -10|0101010101010101010101010101|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00|32e5', + 'Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6', + 'Africa/Johannesburg|SAST|-20|0||84e5', + 'Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5', + 'Africa/Sao_Tome|GMT WAT|0 -10|01|1UQN0', + 'Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5', + 'Africa/Windhoek|CAT WAT|-20 -10|0101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4', + 'America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326', + 'America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4', + 'America/Santo_Domingo|AST|40|0||29e5', + 'America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4', + 'America/Fortaleza|-03|30|0||34e5', + 'America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5', + 'America/Panama|EST|50|0||15e5', + 'America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6', + 'America/Bahia|-02 -03|20 30|01|1GCq0|27e5', + 'America/Managua|CST|60|0||22e5', + 'America/La_Paz|-04|40|0||19e5', + 'America/Lima|-05|50|0||11e6', + 'America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5', + 'America/Campo_Grande|-03 -04|30 40|01010101010101010101010|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0|77e4', + 'America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4', + 'America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5', + 'America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5', + 'America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4', + 'America/Phoenix|MST|70|0||42e5', + 'America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6', + 'America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6', + 'America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4', + 'America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2', + 'America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4', + 'America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3', + 'America/Grand_Turk|EST EDT AST|50 40 40|0101010121010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|37e2', + 'America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5', + 'America/Metlakatla|PST AKST AKDT|80 90 80|0121212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2', + 'America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2', + 'America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5', + 'America/Noronha|-02|20|0||30e2', + 'America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5', + 'Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40', + 'America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|62e5', + 'America/Sao_Paulo|-02 -03|20 30|01010101010101010101010|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0|20e6', + 'Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4', + 'America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4', + 'Antarctica/Casey|+11 +08|-b0 -80|0101|1GAF0 blz0 3m10|10', + 'Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70', + 'Pacific/Port_Moresby|+10|-a0|0||25e4', + 'Pacific/Guadalcanal|+11|-b0|0||11e4', + 'Asia/Tashkent|+05|-50|0||23e5', + 'Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5', + 'Asia/Baghdad|+03|-30|0||66e5', + 'Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40', + 'Asia/Dhaka|+06|-60|0||16e6', + 'Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5', + 'Asia/Kamchatka|+12|-c0|0||18e4', + 'Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5', + 'Asia/Bangkok|+07|-70|0||15e6', + 'Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0', + 'Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5', + 'Asia/Kuala_Lumpur|+08|-80|0||71e5', + 'Asia/Kolkata|IST|-5u|0||15e6', + 'Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4', + 'Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5', + 'Asia/Shanghai|CST|-80|0||23e6', + 'Asia/Colombo|+0530|-5u|0||22e5', + 'Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5', + 'Asia/Dili|+09|-90|0||19e4', + 'Asia/Dubai|+04|-40|0||39e5', + 'Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101201010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0', + 'Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0|18e5', + 'Asia/Hong_Kong|HKT|-80|0||73e5', + 'Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3', + 'Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4', + 'Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6', + 'Asia/Jakarta|WIB|-70|0||31e6', + 'Asia/Jayapura|WIT|-90|0||26e4', + 'Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4', + 'Asia/Kabul|+0430|-4u|0||46e5', + 'Asia/Karachi|PKT|-50|0||24e6', + 'Asia/Kathmandu|+0545|-5J|0||12e5', + 'Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4', + 'Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5', + 'Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3', + 'Asia/Makassar|WITA|-80|0||15e5', + 'Asia/Manila|PST|-80|0||24e6', + 'Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5', + 'Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5', + 'Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5', + 'Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5', + 'Asia/Rangoon|+0630|-6u|0||48e5', + 'Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4', + 'Asia/Seoul|KST|-90|0||23e6', + 'Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2', + 'Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6', + 'Asia/Tokyo|JST|-90|0||38e6', + 'Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5', + 'Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4', + 'Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5', + 'Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5', + 'Atlantic/Cape_Verde|-01|10|0||50e4', + 'Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5', + 'Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5', + 'Australia/Brisbane|AEST|-a0|0||20e5', + 'Australia/Darwin|ACST|-9u|0||12e4', + 'Australia/Eucla|+0845|-8J|0||368', + 'Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347', + 'Australia/Perth|AWST|-80|0||18e5', + 'Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|30e2', + 'Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5', + 'Etc/GMT-1|+01|-10|0|', + 'Pacific/Fakaofo|+13|-d0|0||483', + 'Pacific/Kiritimati|+14|-e0|0||51e2', + 'Etc/GMT-2|+02|-20|0|', + 'Pacific/Tahiti|-10|a0|0||18e4', + 'Pacific/Niue|-11|b0|0||12e2', + 'Etc/GMT+12|-12|c0|0|', + 'Pacific/Galapagos|-06|60|0||25e3', + 'Etc/GMT+7|-07|70|0|', + 'Pacific/Pitcairn|-08|80|0||56', + 'Pacific/Gambier|-09|90|0||125', + 'Etc/UCT|UCT|0|0|', + 'Etc/UTC|UTC|0|0|', + 'Europe/Ulyanovsk|+04 +03|-40 -30|010|1N7y0 3rd0|13e5', + 'Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6', + 'Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4', + 'Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4', + 'Europe/Kirov|+04 +03|-40 -30|01|1N7y0|48e4', + 'Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6', + 'Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810', + 'Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4', + 'Europe/Volgograd|+04 +03|-40 -30|010|1N7y0 9Jd0|10e5', + 'Pacific/Honolulu|HST|a0|0||37e4', + 'MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0', + 'Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600', + 'Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3', + 'Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4', + 'Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4', + 'Pacific/Guam|ChST|-a0|0||17e4', + 'Pacific/Marquesas|-0930|9u|0||86e2', + 'Pacific/Pago_Pago|SST|b0|0||37e2', + 'Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4', + 'Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3', + ], + links: [ + 'Africa/Abidjan|Africa/Accra', + 'Africa/Abidjan|Africa/Bamako', + 'Africa/Abidjan|Africa/Banjul', + 'Africa/Abidjan|Africa/Bissau', + 'Africa/Abidjan|Africa/Conakry', + 'Africa/Abidjan|Africa/Dakar', + 'Africa/Abidjan|Africa/Freetown', + 'Africa/Abidjan|Africa/Lome', + 'Africa/Abidjan|Africa/Monrovia', + 'Africa/Abidjan|Africa/Nouakchott', + 'Africa/Abidjan|Africa/Ouagadougou', + 'Africa/Abidjan|Africa/Timbuktu', + 'Africa/Abidjan|America/Danmarkshavn', + 'Africa/Abidjan|Atlantic/Reykjavik', + 'Africa/Abidjan|Atlantic/St_Helena', + 'Africa/Abidjan|Etc/GMT', + 'Africa/Abidjan|Etc/GMT+0', + 'Africa/Abidjan|Etc/GMT-0', + 'Africa/Abidjan|Etc/GMT0', + 'Africa/Abidjan|Etc/Greenwich', + 'Africa/Abidjan|GMT', + 'Africa/Abidjan|GMT+0', + 'Africa/Abidjan|GMT-0', + 'Africa/Abidjan|GMT0', + 'Africa/Abidjan|Greenwich', + 'Africa/Abidjan|Iceland', + 'Africa/Algiers|Africa/Tunis', + 'Africa/Cairo|Egypt', + 'Africa/Casablanca|Africa/El_Aaiun', + 'Africa/Johannesburg|Africa/Maseru', + 'Africa/Johannesburg|Africa/Mbabane', + 'Africa/Lagos|Africa/Bangui', + 'Africa/Lagos|Africa/Brazzaville', + 'Africa/Lagos|Africa/Douala', + 'Africa/Lagos|Africa/Kinshasa', + 'Africa/Lagos|Africa/Libreville', + 'Africa/Lagos|Africa/Luanda', + 'Africa/Lagos|Africa/Malabo', + 'Africa/Lagos|Africa/Ndjamena', + 'Africa/Lagos|Africa/Niamey', + 'Africa/Lagos|Africa/Porto-Novo', + 'Africa/Maputo|Africa/Blantyre', + 'Africa/Maputo|Africa/Bujumbura', + 'Africa/Maputo|Africa/Gaborone', + 'Africa/Maputo|Africa/Harare', + 'Africa/Maputo|Africa/Kigali', + 'Africa/Maputo|Africa/Lubumbashi', + 'Africa/Maputo|Africa/Lusaka', + 'Africa/Nairobi|Africa/Addis_Ababa', + 'Africa/Nairobi|Africa/Asmara', + 'Africa/Nairobi|Africa/Asmera', + 'Africa/Nairobi|Africa/Dar_es_Salaam', + 'Africa/Nairobi|Africa/Djibouti', + 'Africa/Nairobi|Africa/Juba', + 'Africa/Nairobi|Africa/Kampala', + 'Africa/Nairobi|Africa/Mogadishu', + 'Africa/Nairobi|Indian/Antananarivo', + 'Africa/Nairobi|Indian/Comoro', + 'Africa/Nairobi|Indian/Mayotte', + 'Africa/Tripoli|Libya', + 'America/Adak|America/Atka', + 'America/Adak|US/Aleutian', + 'America/Anchorage|America/Juneau', + 'America/Anchorage|America/Nome', + 'America/Anchorage|America/Sitka', + 'America/Anchorage|America/Yakutat', + 'America/Anchorage|US/Alaska', + 'America/Campo_Grande|America/Cuiaba', + 'America/Chicago|America/Indiana/Knox', + 'America/Chicago|America/Indiana/Tell_City', + 'America/Chicago|America/Knox_IN', + 'America/Chicago|America/Matamoros', + 'America/Chicago|America/Menominee', + 'America/Chicago|America/North_Dakota/Beulah', + 'America/Chicago|America/North_Dakota/Center', + 'America/Chicago|America/North_Dakota/New_Salem', + 'America/Chicago|America/Rainy_River', + 'America/Chicago|America/Rankin_Inlet', + 'America/Chicago|America/Resolute', + 'America/Chicago|America/Winnipeg', + 'America/Chicago|CST6CDT', + 'America/Chicago|Canada/Central', + 'America/Chicago|US/Central', + 'America/Chicago|US/Indiana-Starke', + 'America/Chihuahua|America/Mazatlan', + 'America/Chihuahua|Mexico/BajaSur', + 'America/Denver|America/Boise', + 'America/Denver|America/Cambridge_Bay', + 'America/Denver|America/Edmonton', + 'America/Denver|America/Inuvik', + 'America/Denver|America/Ojinaga', + 'America/Denver|America/Shiprock', + 'America/Denver|America/Yellowknife', + 'America/Denver|Canada/Mountain', + 'America/Denver|MST7MDT', + 'America/Denver|Navajo', + 'America/Denver|US/Mountain', + 'America/Fortaleza|America/Argentina/Buenos_Aires', + 'America/Fortaleza|America/Argentina/Catamarca', + 'America/Fortaleza|America/Argentina/ComodRivadavia', + 'America/Fortaleza|America/Argentina/Cordoba', + 'America/Fortaleza|America/Argentina/Jujuy', + 'America/Fortaleza|America/Argentina/La_Rioja', + 'America/Fortaleza|America/Argentina/Mendoza', + 'America/Fortaleza|America/Argentina/Rio_Gallegos', + 'America/Fortaleza|America/Argentina/Salta', + 'America/Fortaleza|America/Argentina/San_Juan', + 'America/Fortaleza|America/Argentina/San_Luis', + 'America/Fortaleza|America/Argentina/Tucuman', + 'America/Fortaleza|America/Argentina/Ushuaia', + 'America/Fortaleza|America/Belem', + 'America/Fortaleza|America/Buenos_Aires', + 'America/Fortaleza|America/Catamarca', + 'America/Fortaleza|America/Cayenne', + 'America/Fortaleza|America/Cordoba', + 'America/Fortaleza|America/Jujuy', + 'America/Fortaleza|America/Maceio', + 'America/Fortaleza|America/Mendoza', + 'America/Fortaleza|America/Paramaribo', + 'America/Fortaleza|America/Recife', + 'America/Fortaleza|America/Rosario', + 'America/Fortaleza|America/Santarem', + 'America/Fortaleza|Antarctica/Rothera', + 'America/Fortaleza|Atlantic/Stanley', + 'America/Fortaleza|Etc/GMT+3', + 'America/Halifax|America/Glace_Bay', + 'America/Halifax|America/Goose_Bay', + 'America/Halifax|America/Moncton', + 'America/Halifax|America/Thule', + 'America/Halifax|Atlantic/Bermuda', + 'America/Halifax|Canada/Atlantic', + 'America/Havana|Cuba', + 'America/La_Paz|America/Boa_Vista', + 'America/La_Paz|America/Guyana', + 'America/La_Paz|America/Manaus', + 'America/La_Paz|America/Porto_Velho', + 'America/La_Paz|Brazil/West', + 'America/La_Paz|Etc/GMT+4', + 'America/Lima|America/Bogota', + 'America/Lima|America/Guayaquil', + 'America/Lima|Etc/GMT+5', + 'America/Los_Angeles|America/Dawson', + 'America/Los_Angeles|America/Ensenada', + 'America/Los_Angeles|America/Santa_Isabel', + 'America/Los_Angeles|America/Tijuana', + 'America/Los_Angeles|America/Vancouver', + 'America/Los_Angeles|America/Whitehorse', + 'America/Los_Angeles|Canada/Pacific', + 'America/Los_Angeles|Canada/Yukon', + 'America/Los_Angeles|Mexico/BajaNorte', + 'America/Los_Angeles|PST8PDT', + 'America/Los_Angeles|US/Pacific', + 'America/Los_Angeles|US/Pacific-New', + 'America/Managua|America/Belize', + 'America/Managua|America/Costa_Rica', + 'America/Managua|America/El_Salvador', + 'America/Managua|America/Guatemala', + 'America/Managua|America/Regina', + 'America/Managua|America/Swift_Current', + 'America/Managua|America/Tegucigalpa', + 'America/Managua|Canada/Saskatchewan', + 'America/Mexico_City|America/Bahia_Banderas', + 'America/Mexico_City|America/Merida', + 'America/Mexico_City|America/Monterrey', + 'America/Mexico_City|Mexico/General', + 'America/New_York|America/Detroit', + 'America/New_York|America/Fort_Wayne', + 'America/New_York|America/Indiana/Indianapolis', + 'America/New_York|America/Indiana/Marengo', + 'America/New_York|America/Indiana/Petersburg', + 'America/New_York|America/Indiana/Vevay', + 'America/New_York|America/Indiana/Vincennes', + 'America/New_York|America/Indiana/Winamac', + 'America/New_York|America/Indianapolis', + 'America/New_York|America/Iqaluit', + 'America/New_York|America/Kentucky/Louisville', + 'America/New_York|America/Kentucky/Monticello', + 'America/New_York|America/Louisville', + 'America/New_York|America/Montreal', + 'America/New_York|America/Nassau', + 'America/New_York|America/Nipigon', + 'America/New_York|America/Pangnirtung', + 'America/New_York|America/Thunder_Bay', + 'America/New_York|America/Toronto', + 'America/New_York|Canada/Eastern', + 'America/New_York|EST5EDT', + 'America/New_York|US/East-Indiana', + 'America/New_York|US/Eastern', + 'America/New_York|US/Michigan', + 'America/Noronha|Atlantic/South_Georgia', + 'America/Noronha|Brazil/DeNoronha', + 'America/Noronha|Etc/GMT+2', + 'America/Panama|America/Atikokan', + 'America/Panama|America/Cayman', + 'America/Panama|America/Coral_Harbour', + 'America/Panama|America/Jamaica', + 'America/Panama|EST', + 'America/Panama|Jamaica', + 'America/Phoenix|America/Creston', + 'America/Phoenix|America/Dawson_Creek', + 'America/Phoenix|America/Hermosillo', + 'America/Phoenix|MST', + 'America/Phoenix|US/Arizona', + 'America/Rio_Branco|America/Eirunepe', + 'America/Rio_Branco|America/Porto_Acre', + 'America/Rio_Branco|Brazil/Acre', + 'America/Santiago|Chile/Continental', + 'America/Santo_Domingo|America/Anguilla', + 'America/Santo_Domingo|America/Antigua', + 'America/Santo_Domingo|America/Aruba', + 'America/Santo_Domingo|America/Barbados', + 'America/Santo_Domingo|America/Blanc-Sablon', + 'America/Santo_Domingo|America/Curacao', + 'America/Santo_Domingo|America/Dominica', + 'America/Santo_Domingo|America/Grenada', + 'America/Santo_Domingo|America/Guadeloupe', + 'America/Santo_Domingo|America/Kralendijk', + 'America/Santo_Domingo|America/Lower_Princes', + 'America/Santo_Domingo|America/Marigot', + 'America/Santo_Domingo|America/Martinique', + 'America/Santo_Domingo|America/Montserrat', + 'America/Santo_Domingo|America/Port_of_Spain', + 'America/Santo_Domingo|America/Puerto_Rico', + 'America/Santo_Domingo|America/St_Barthelemy', + 'America/Santo_Domingo|America/St_Kitts', + 'America/Santo_Domingo|America/St_Lucia', + 'America/Santo_Domingo|America/St_Thomas', + 'America/Santo_Domingo|America/St_Vincent', + 'America/Santo_Domingo|America/Tortola', + 'America/Santo_Domingo|America/Virgin', + 'America/Sao_Paulo|Brazil/East', + 'America/St_Johns|Canada/Newfoundland', + 'Antarctica/Palmer|America/Punta_Arenas', + 'Asia/Baghdad|Antarctica/Syowa', + 'Asia/Baghdad|Asia/Aden', + 'Asia/Baghdad|Asia/Bahrain', + 'Asia/Baghdad|Asia/Kuwait', + 'Asia/Baghdad|Asia/Qatar', + 'Asia/Baghdad|Asia/Riyadh', + 'Asia/Baghdad|Etc/GMT-3', + 'Asia/Baghdad|Europe/Minsk', + 'Asia/Bangkok|Asia/Ho_Chi_Minh', + 'Asia/Bangkok|Asia/Novokuznetsk', + 'Asia/Bangkok|Asia/Phnom_Penh', + 'Asia/Bangkok|Asia/Saigon', + 'Asia/Bangkok|Asia/Vientiane', + 'Asia/Bangkok|Etc/GMT-7', + 'Asia/Bangkok|Indian/Christmas', + 'Asia/Dhaka|Antarctica/Vostok', + 'Asia/Dhaka|Asia/Almaty', + 'Asia/Dhaka|Asia/Bishkek', + 'Asia/Dhaka|Asia/Dacca', + 'Asia/Dhaka|Asia/Kashgar', + 'Asia/Dhaka|Asia/Qyzylorda', + 'Asia/Dhaka|Asia/Thimbu', + 'Asia/Dhaka|Asia/Thimphu', + 'Asia/Dhaka|Asia/Urumqi', + 'Asia/Dhaka|Etc/GMT-6', + 'Asia/Dhaka|Indian/Chagos', + 'Asia/Dili|Etc/GMT-9', + 'Asia/Dili|Pacific/Palau', + 'Asia/Dubai|Asia/Muscat', + 'Asia/Dubai|Asia/Tbilisi', + 'Asia/Dubai|Asia/Yerevan', + 'Asia/Dubai|Etc/GMT-4', + 'Asia/Dubai|Europe/Samara', + 'Asia/Dubai|Indian/Mahe', + 'Asia/Dubai|Indian/Mauritius', + 'Asia/Dubai|Indian/Reunion', + 'Asia/Gaza|Asia/Hebron', + 'Asia/Hong_Kong|Hongkong', + 'Asia/Jakarta|Asia/Pontianak', + 'Asia/Jerusalem|Asia/Tel_Aviv', + 'Asia/Jerusalem|Israel', + 'Asia/Kamchatka|Asia/Anadyr', + 'Asia/Kamchatka|Etc/GMT-12', + 'Asia/Kamchatka|Kwajalein', + 'Asia/Kamchatka|Pacific/Funafuti', + 'Asia/Kamchatka|Pacific/Kwajalein', + 'Asia/Kamchatka|Pacific/Majuro', + 'Asia/Kamchatka|Pacific/Nauru', + 'Asia/Kamchatka|Pacific/Tarawa', + 'Asia/Kamchatka|Pacific/Wake', + 'Asia/Kamchatka|Pacific/Wallis', + 'Asia/Kathmandu|Asia/Katmandu', + 'Asia/Kolkata|Asia/Calcutta', + 'Asia/Kuala_Lumpur|Asia/Brunei', + 'Asia/Kuala_Lumpur|Asia/Kuching', + 'Asia/Kuala_Lumpur|Asia/Singapore', + 'Asia/Kuala_Lumpur|Etc/GMT-8', + 'Asia/Kuala_Lumpur|Singapore', + 'Asia/Makassar|Asia/Ujung_Pandang', + 'Asia/Rangoon|Asia/Yangon', + 'Asia/Rangoon|Indian/Cocos', + 'Asia/Seoul|ROK', + 'Asia/Shanghai|Asia/Chongqing', + 'Asia/Shanghai|Asia/Chungking', + 'Asia/Shanghai|Asia/Harbin', + 'Asia/Shanghai|Asia/Macao', + 'Asia/Shanghai|Asia/Macau', + 'Asia/Shanghai|Asia/Taipei', + 'Asia/Shanghai|PRC', + 'Asia/Shanghai|ROC', + 'Asia/Tashkent|Antarctica/Mawson', + 'Asia/Tashkent|Asia/Aqtau', + 'Asia/Tashkent|Asia/Aqtobe', + 'Asia/Tashkent|Asia/Ashgabat', + 'Asia/Tashkent|Asia/Ashkhabad', + 'Asia/Tashkent|Asia/Atyrau', + 'Asia/Tashkent|Asia/Dushanbe', + 'Asia/Tashkent|Asia/Oral', + 'Asia/Tashkent|Asia/Samarkand', + 'Asia/Tashkent|Etc/GMT-5', + 'Asia/Tashkent|Indian/Kerguelen', + 'Asia/Tashkent|Indian/Maldives', + 'Asia/Tehran|Iran', + 'Asia/Tokyo|Japan', + 'Asia/Ulaanbaatar|Asia/Choibalsan', + 'Asia/Ulaanbaatar|Asia/Ulan_Bator', + 'Asia/Vladivostok|Asia/Ust-Nera', + 'Asia/Yakutsk|Asia/Khandyga', + 'Atlantic/Azores|America/Scoresbysund', + 'Atlantic/Cape_Verde|Etc/GMT+1', + 'Australia/Adelaide|Australia/Broken_Hill', + 'Australia/Adelaide|Australia/South', + 'Australia/Adelaide|Australia/Yancowinna', + 'Australia/Brisbane|Australia/Lindeman', + 'Australia/Brisbane|Australia/Queensland', + 'Australia/Darwin|Australia/North', + 'Australia/Lord_Howe|Australia/LHI', + 'Australia/Perth|Australia/West', + 'Australia/Sydney|Australia/ACT', + 'Australia/Sydney|Australia/Canberra', + 'Australia/Sydney|Australia/Currie', + 'Australia/Sydney|Australia/Hobart', + 'Australia/Sydney|Australia/Melbourne', + 'Australia/Sydney|Australia/NSW', + 'Australia/Sydney|Australia/Tasmania', + 'Australia/Sydney|Australia/Victoria', + 'Etc/UCT|UCT', + 'Etc/UTC|Etc/Universal', + 'Etc/UTC|Etc/Zulu', + 'Etc/UTC|UTC', + 'Etc/UTC|Universal', + 'Etc/UTC|Zulu', + 'Europe/Athens|Asia/Nicosia', + 'Europe/Athens|EET', + 'Europe/Athens|Europe/Bucharest', + 'Europe/Athens|Europe/Helsinki', + 'Europe/Athens|Europe/Kiev', + 'Europe/Athens|Europe/Mariehamn', + 'Europe/Athens|Europe/Nicosia', + 'Europe/Athens|Europe/Riga', + 'Europe/Athens|Europe/Sofia', + 'Europe/Athens|Europe/Tallinn', + 'Europe/Athens|Europe/Uzhgorod', + 'Europe/Athens|Europe/Vilnius', + 'Europe/Athens|Europe/Zaporozhye', + 'Europe/Chisinau|Europe/Tiraspol', + 'Europe/Dublin|Eire', + 'Europe/Istanbul|Asia/Istanbul', + 'Europe/Istanbul|Turkey', + 'Europe/Lisbon|Atlantic/Canary', + 'Europe/Lisbon|Atlantic/Faeroe', + 'Europe/Lisbon|Atlantic/Faroe', + 'Europe/Lisbon|Atlantic/Madeira', + 'Europe/Lisbon|Portugal', + 'Europe/Lisbon|WET', + 'Europe/London|Europe/Belfast', + 'Europe/London|Europe/Guernsey', + 'Europe/London|Europe/Isle_of_Man', + 'Europe/London|Europe/Jersey', + 'Europe/London|GB', + 'Europe/London|GB-Eire', + 'Europe/Moscow|W-SU', + 'Europe/Paris|Africa/Ceuta', + 'Europe/Paris|Arctic/Longyearbyen', + 'Europe/Paris|Atlantic/Jan_Mayen', + 'Europe/Paris|CET', + 'Europe/Paris|Europe/Amsterdam', + 'Europe/Paris|Europe/Andorra', + 'Europe/Paris|Europe/Belgrade', + 'Europe/Paris|Europe/Berlin', + 'Europe/Paris|Europe/Bratislava', + 'Europe/Paris|Europe/Brussels', + 'Europe/Paris|Europe/Budapest', + 'Europe/Paris|Europe/Busingen', + 'Europe/Paris|Europe/Copenhagen', + 'Europe/Paris|Europe/Gibraltar', + 'Europe/Paris|Europe/Ljubljana', + 'Europe/Paris|Europe/Luxembourg', + 'Europe/Paris|Europe/Madrid', + 'Europe/Paris|Europe/Malta', + 'Europe/Paris|Europe/Monaco', + 'Europe/Paris|Europe/Oslo', + 'Europe/Paris|Europe/Podgorica', + 'Europe/Paris|Europe/Prague', + 'Europe/Paris|Europe/Rome', + 'Europe/Paris|Europe/San_Marino', + 'Europe/Paris|Europe/Sarajevo', + 'Europe/Paris|Europe/Skopje', + 'Europe/Paris|Europe/Stockholm', + 'Europe/Paris|Europe/Tirane', + 'Europe/Paris|Europe/Vaduz', + 'Europe/Paris|Europe/Vatican', + 'Europe/Paris|Europe/Vienna', + 'Europe/Paris|Europe/Warsaw', + 'Europe/Paris|Europe/Zagreb', + 'Europe/Paris|Europe/Zurich', + 'Europe/Paris|Poland', + 'Europe/Ulyanovsk|Europe/Astrakhan', + 'Pacific/Auckland|Antarctica/McMurdo', + 'Pacific/Auckland|Antarctica/South_Pole', + 'Pacific/Auckland|NZ', + 'Pacific/Chatham|NZ-CHAT', + 'Pacific/Easter|Chile/EasterIsland', + 'Pacific/Fakaofo|Etc/GMT-13', + 'Pacific/Fakaofo|Pacific/Enderbury', + 'Pacific/Galapagos|Etc/GMT+6', + 'Pacific/Gambier|Etc/GMT+9', + 'Pacific/Guadalcanal|Antarctica/Macquarie', + 'Pacific/Guadalcanal|Etc/GMT-11', + 'Pacific/Guadalcanal|Pacific/Efate', + 'Pacific/Guadalcanal|Pacific/Kosrae', + 'Pacific/Guadalcanal|Pacific/Noumea', + 'Pacific/Guadalcanal|Pacific/Pohnpei', + 'Pacific/Guadalcanal|Pacific/Ponape', + 'Pacific/Guam|Pacific/Saipan', + 'Pacific/Honolulu|HST', + 'Pacific/Honolulu|Pacific/Johnston', + 'Pacific/Honolulu|US/Hawaii', + 'Pacific/Kiritimati|Etc/GMT-14', + 'Pacific/Niue|Etc/GMT+11', + 'Pacific/Pago_Pago|Pacific/Midway', + 'Pacific/Pago_Pago|Pacific/Samoa', + 'Pacific/Pago_Pago|US/Samoa', + 'Pacific/Pitcairn|Etc/GMT+8', + 'Pacific/Port_Moresby|Antarctica/DumontDUrville', + 'Pacific/Port_Moresby|Etc/GMT-10', + 'Pacific/Port_Moresby|Pacific/Chuuk', + 'Pacific/Port_Moresby|Pacific/Truk', + 'Pacific/Port_Moresby|Pacific/Yap', + 'Pacific/Tahiti|Etc/GMT+10', + 'Pacific/Tahiti|Pacific/Rarotonga', + ], + }), + A + ); + }); + }); + + var parseformat = parseFormat; + var dayNames = [ + 'Sunday', + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + ]; + var abbreviatedDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var shortestDayNames = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; + var monthNames = [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + ]; + var abbreviatedMonthNames = [ + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec', + ]; + var regexDayNames = new RegExp(dayNames.join('|'), 'i'); + var regexAbbreviatedDayNames = new RegExp(abbreviatedDayNames.join('|'), 'i'); + var regexShortestDayNames = new RegExp( + '\\b(' + shortestDayNames.join('|') + ')\\b', + 'i' + ); + var regexMonthNames = new RegExp(monthNames.join('|'), 'i'); + var regexAbbreviatedMonthNames = new RegExp( + abbreviatedMonthNames.join('|'), + 'i' + ); + var regexFirstSecondThirdFourth = /(\d+)(st|nd|rd|th)\b/i; + var regexEndian = /(\d{1,4})([/.-])(\d{1,2})[/.-](\d{1,4})/; + var regexTimezone = /((\+|-)\d\d:?\d\d)$/; + var amOrPm = '(' + ['AM?', 'PM?'].join('|') + ')'; + var regexHoursWithLeadingZeroDigitMinutesSecondsAmPm = new RegExp( + '0\\d\\:\\d{1,2}\\:\\d{1,2}(\\s*)' + amOrPm, + 'i' + ); + var regexHoursWithLeadingZeroDigitMinutesAmPm = new RegExp( + '0\\d\\:\\d{1,2}(\\s*)' + amOrPm, + 'i' + ); + var regexHoursWithLeadingZeroDigitAmPm = new RegExp( + '0\\d(\\s*)' + amOrPm, + 'i' + ); + var regexHoursMinutesSecondsAmPm = new RegExp( + '\\d{1,2}\\:\\d{1,2}\\:\\d{1,2}(\\s*)' + amOrPm, + 'i' + ); + var regexHoursMinutesAmPm = new RegExp( + '\\d{1,2}\\:\\d{1,2}(\\s*)' + amOrPm, + 'i' + ); + var regexHoursAmPm = new RegExp('\\d{1,2}(\\s*)' + amOrPm, 'i'); + var regexISO8601HoursWithLeadingZeroMinutesSecondsMilliseconds = /\d{2}:\d{2}:\d{2}\.\d{3}/; + var regexISO8601HoursWithLeadingZeroMinutesSecondsCentiSeconds = /\d{2}:\d{2}:\d{2}\.\d{2}/; + var regexISO8601HoursWithLeadingZeroMinutesSecondsDeciSeconds = /\d{2}:\d{2}:\d{2}\.\d{1}/; + var regexHoursWithLeadingZeroMinutesSeconds = /0\d:\d{2}:\d{2}/; + var regexHoursWithLeadingZeroMinutes = /0\d:\d{2}/; + var regexHoursMinutesSeconds = /\d{1,2}:\d{2}:\d{2}/; + var regexHoursMinutesSecondsMilliseconds = /\d{1,2}:\d{2}:\d{2}\.\d{3}/; + var regexHoursMinutesSecondsCentiSeconds = /\d{1,2}:\d{2}:\d{2}\.\d{2}/; + var regexHoursMinutesSecondsDeciSeconds = /\d{1,2}:\d{2}:\d{2}\.\d{1}/; + var regexHoursMinutes = /\d{1,2}:\d{2}/; + var regexYearLong = /\d{4}/; + var regexDayLeadingZero = /0\d/; + var regexDay = /\d{1,2}/; + var regexYearShort = /\d{2}/; + var regexDayShortMonthShort = /^([1-9])\/([1-9]|0[1-9])$/; + var regexDayShortMonth = /^([1-9])\/(1[012])$/; + var regexDayMonthShort = /^(0[1-9]|[12][0-9]|3[01])\/([1-9])$/; + var regexDayMonth = /^(0[1-9]|[12][0-9]|3[01])\/(1[012]|0[1-9])$/; + var regexMonthShortYearShort = /^([1-9])\/([1-9][0-9])$/; + var regexMonthYearShort = /^(0[1-9]|1[012])\/([1-9][0-9])$/; + var formatIncludesMonth = /([/][M]|[M][/]|[MM]|[MMMM])/; + var regexFillingWords = /\b(at)\b/i; + var regexUnixMillisecondTimestamp = /\d{13}/; + var regexUnixTimestamp = /\d{10}/; // option defaults + + var defaultOrder = { + '/': 'MDY', + '.': 'DMY', + '-': 'YMD', + }; + + function parseFormat(dateString, options) { + var format = dateString.toString(); // default options + + options = options || {}; + options.preferredOrder = options.preferredOrder || defaultOrder; // Unix Millisecond Timestamp ☛ x + + format = format.replace(regexUnixMillisecondTimestamp, 'x'); // Unix Timestamp ☛ X + + format = format.replace(regexUnixTimestamp, 'X'); // escape filling words + + format = format.replace(regexFillingWords, '[$1]'); // DAYS + // Monday ☛ dddd + + format = format.replace(regexDayNames, 'dddd'); // Mon ☛ ddd + + format = format.replace(regexAbbreviatedDayNames, 'ddd'); // Mo ☛ dd + + format = format.replace(regexShortestDayNames, 'dd'); // 1st, 2nd, 23rd ☛ do + + format = format.replace(regexFirstSecondThirdFourth, 'Do'); // MONTHS + // January ☛ MMMM + + format = format.replace(regexMonthNames, 'MMMM'); // Jan ☛ MMM + + format = format.replace(regexAbbreviatedMonthNames, 'MMM'); // replace endians, like 8/20/2010, 20.8.2010 or 2010-8-20 + + format = format.replace(regexEndian, replaceEndian.bind(null, options)); // TIME + // timezone +02:00 ☛ Z + + format = format.replace(regexTimezone, 'Z'); // 23:39:43.331 ☛ 'HH:mm:ss.SSS' + + format = format.replace( + regexISO8601HoursWithLeadingZeroMinutesSecondsMilliseconds, + 'HH:mm:ss.SSS' + ); // 23:39:43.33 ☛ 'HH:mm:ss.SS' + + format = format.replace( + regexISO8601HoursWithLeadingZeroMinutesSecondsCentiSeconds, + 'HH:mm:ss.SS' + ); // 23:39:43.3 ☛ 'HH:mm:ss.S' + + format = format.replace( + regexISO8601HoursWithLeadingZeroMinutesSecondsDeciSeconds, + 'HH:mm:ss.S' + ); + + function replaceWithAmPm(timeFormat) { + return function(match, whitespace, amPm) { + return ( + timeFormat + + whitespace + + (amPm[0].toUpperCase() === amPm[0] ? 'A' : 'a') + ); + }; + } // 05:30:20pm ☛ hh:mm:ssa + + format = format.replace( + regexHoursWithLeadingZeroDigitMinutesSecondsAmPm, + replaceWithAmPm('hh:mm:ss') + ); // 10:30:20pm ☛ h:mm:ssa + + format = format.replace( + regexHoursMinutesSecondsAmPm, + replaceWithAmPm('h:mm:ss') + ); // 05:30pm ☛ hh:mma + + format = format.replace( + regexHoursWithLeadingZeroDigitMinutesAmPm, + replaceWithAmPm('hh:mm') + ); // 10:30pm ☛ h:mma + + format = format.replace(regexHoursMinutesAmPm, replaceWithAmPm('h:mm')); // 05pm ☛ hha + + format = format.replace( + regexHoursWithLeadingZeroDigitAmPm, + replaceWithAmPm('hh') + ); // 10pm ☛ ha + + format = format.replace(regexHoursAmPm, replaceWithAmPm('h')); // 05:30:20 ☛ HH:mm:ss + + format = format.replace( + regexHoursWithLeadingZeroMinutesSeconds, + 'HH:mm:ss' + ); // 5:30:20.222 ☛ H:mm:ss.SSS + + format = format.replace( + regexHoursMinutesSecondsMilliseconds, + 'H:mm:ss.SSS' + ); // 5:30:20.22 ☛ H:mm:ss.SS + + format = format.replace(regexHoursMinutesSecondsCentiSeconds, 'H:mm:ss.SS'); // 5:30:20.2 ☛ H:mm:ss.S + + format = format.replace(regexHoursMinutesSecondsDeciSeconds, 'H:mm:ss.S'); // 10:30:20 ☛ H:mm:ss + + format = format.replace(regexHoursMinutesSeconds, 'H:mm:ss'); // 05:30 ☛ H:mm + + format = format.replace(regexHoursWithLeadingZeroMinutes, 'HH:mm'); // 10:30 ☛ HH:mm + + format = format.replace(regexHoursMinutes, 'H:mm'); // do we still have numbers left? + // Lets check for 4 digits first, these are years for sure + + format = format.replace(regexYearLong, 'YYYY'); // check if both numbers are < 13, then it must be D/M + + format = format.replace(regexDayShortMonthShort, 'D/M'); // check if first number is < 10 && last < 13, then it must be D/MM + + format = format.replace(regexDayShortMonth, 'D/MM'); // check if last number is < 32 && last < 10, then it must be DD/M + + format = format.replace(regexDayMonthShort, 'DD/M'); // check if both numbers are > 10, but first < 32 && last < 13, then it must be DD/MM + + format = format.replace(regexDayMonth, 'DD/MM'); // check if first < 10 && last > 12, then it must be M/YY + + format = format.replace(regexMonthShortYearShort, 'M/YY'); // check if first < 13 && last > 12, then it must be MM/YY + + format = format.replace(regexMonthYearShort, 'MM/YY'); // to prevent 9.20 gets formated to D.Y, we format the complete date first, then go for the time + + if (format.match(formatIncludesMonth)) { + var regexHoursDotWithLeadingZeroOrDoubleDigitMinutes = /0\d.\d{2}|\d{2}.\d{2}/; + var regexHoursDotMinutes = /\d{1}.\d{2}/; + format = format.replace( + regexHoursDotWithLeadingZeroOrDoubleDigitMinutes, + 'H.mm' + ); + format = format.replace(regexHoursDotMinutes, 'h.mm'); + } // now, the next number, if existing, must be a day + + format = format.replace(regexDayLeadingZero, 'DD'); + format = format.replace(regexDay, 'D'); // last but not least, there could still be a year left + + format = format.replace(regexYearShort, 'YY'); + + if (format.length < 1) { + format = undefined; + } + + return format; + } // if we can't find an endian based on the separator, but + // there still is a short date with day, month & year, + // we try to make a smart decision to identify the order + + function replaceEndian( + options, + matchedPart, + first, + separator, + second, + third + ) { + var parts; + var hasSingleDigit = + Math.min(first.length, second.length, third.length) === 1; + var hasQuadDigit = + Math.max(first.length, second.length, third.length) === 4; + var preferredOrder = + typeof options.preferredOrder === 'string' + ? options.preferredOrder + : options.preferredOrder[separator]; + first = parseInt(first, 10); + second = parseInt(second, 10); + third = parseInt(third, 10); + parts = [first, second, third]; + preferredOrder = preferredOrder.toUpperCase(); // If first is a year, order will always be Year-Month-Day + + if (first > 31) { + parts[0] = hasQuadDigit ? 'YYYY' : 'YY'; + parts[1] = hasSingleDigit ? 'M' : 'MM'; + parts[2] = hasSingleDigit ? 'D' : 'DD'; + return parts.join(separator); + } // Second will never be the year. And if it is a day, + // the order will always be Month-Day-Year + + if (second > 12) { + parts[0] = hasSingleDigit ? 'M' : 'MM'; + parts[1] = hasSingleDigit ? 'D' : 'DD'; + parts[2] = hasQuadDigit ? 'YYYY' : 'YY'; + return parts.join(separator); + } // if third is a year ... + + if (third > 31) { + parts[2] = hasQuadDigit ? 'YYYY' : 'YY'; // ... try to find day in first and second. + // If found, the remaining part is the month. + + if (preferredOrder[0] === 'M' && first < 13) { + parts[0] = hasSingleDigit ? 'M' : 'MM'; + parts[1] = hasSingleDigit ? 'D' : 'DD'; + return parts.join(separator); + } + + parts[0] = hasSingleDigit ? 'D' : 'DD'; + parts[1] = hasSingleDigit ? 'M' : 'MM'; + return parts.join(separator); + } // if we had no luck until here, we use the preferred order + + parts[preferredOrder.indexOf('D')] = hasSingleDigit ? 'D' : 'DD'; + parts[preferredOrder.indexOf('M')] = hasSingleDigit ? 'M' : 'MM'; + parts[preferredOrder.indexOf('Y')] = hasQuadDigit ? 'YYYY' : 'YY'; + return parts.join(separator); + } + + var momentParseformat = parseformat; + /* istanbul ignore next */ + + if (typeof window !== 'undefined' && window.moment) { + window.moment.parseFormat = parseformat; + } + + function cleanDateString(dateString) { + return (dateString.match(SPLIT_DATE_STRING) || []) + .join(' ') + .replace(TIME_MERIDIAN_DOTS_RE, 'm') + .replace(TIME_MERIDIAN_SPACE_RE, '$1 $2 $3') + .replace(CLEAN_DATE_STRING_RE, '$1') + .trim(); + } + function createDate(dateString, timezone, format) { + if (TIME_WITH_OFFSET_RE.test(dateString)) { + return momentTimezoneWithData20122022_min(new Date(dateString)); + } + + return timezone + ? momentTimezoneWithData20122022_min.tz( + dateString, + format || momentParseformat(dateString), + timezone + ) + : momentTimezoneWithData20122022_min( + dateString, + format || momentParseformat(dateString) + ); + } // Take a date published string, and hopefully return a date out of + // it. Return none if we fail. + + function cleanDatePublished(dateString) { + var _ref = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + timezone = _ref.timezone, + format = _ref.format; + + // If string is in milliseconds or seconds, convert to int and return + if (MS_DATE_STRING.test(dateString) || SEC_DATE_STRING.test(dateString)) { + return new Date(_parseInt$2(dateString, 10)).toISOString(); + } + + var date = createDate(dateString, timezone, format); + + if (!date.isValid()) { + dateString = cleanDateString(dateString); + date = createDate(dateString, timezone, format); + } + + return date.isValid() ? date.toISOString() : null; + } + + function extractCleanNode(article, _ref) { + var $ = _ref.$, + _ref$cleanConditional = _ref.cleanConditionally, + cleanConditionally = + _ref$cleanConditional === void 0 ? true : _ref$cleanConditional, + _ref$title = _ref.title, + title = _ref$title === void 0 ? '' : _ref$title, + _ref$url = _ref.url, + url = _ref$url === void 0 ? '' : _ref$url, + _ref$defaultCleaner = _ref.defaultCleaner, + defaultCleaner = + _ref$defaultCleaner === void 0 ? true : _ref$defaultCleaner; + // Rewrite the tag name to div if it's a top level node like body or + // html to avoid later complications with multiple body tags. + rewriteTopLevel$$1(article, $); // Drop small images and spacer images + // Only do this is defaultCleaner is set to true; + // this can sometimes be too aggressive. + + if (defaultCleaner) cleanImages(article, $); // Make links absolute + + makeLinksAbsolute$$1(article, $, url); // Mark elements to keep that would normally be removed. + // E.g., stripJunkTags will remove iframes, so we're going to mark + // YouTube/Vimeo videos as elements we want to keep. + + markToKeep(article, $, url); // Drop certain tags like <title>, etc + // This is -mostly- for cleanliness, not security. + + stripJunkTags(article, $); // H1 tags are typically the article title, which should be extracted + // by the title extractor instead. If there's less than 3 of them (<3), + // strip them. Otherwise, turn 'em into H2s. + + cleanHOnes$$1(article, $); // Clean headers + + cleanHeaders(article, $, title); // We used to clean UL's and OL's here, but it was leading to + // too many in-article lists being removed. Consider a better + // way to detect menus particularly and remove them. + // Also optionally running, since it can be overly aggressive. + + if (defaultCleaner) cleanTags$$1(article, $, cleanConditionally); // Remove empty paragraph nodes + + removeEmpty(article, $); // Remove unnecessary attributes + + cleanAttributes$$1(article, $); + return article; + } + + function cleanTitle$$1(title, _ref) { + var url = _ref.url, + $ = _ref.$; + + // If title has |, :, or - in it, see if + // we can clean it up. + if (TITLE_SPLITTERS_RE.test(title)) { + title = resolveSplitTitle(title, url); + } // Final sanity check that we didn't get a crazy title. + // if (title.length > 150 || title.length < 15) { + + if (title.length > 150) { + // If we did, return h1 from the document if it exists + var h1 = $('h1'); + + if (h1.length === 1) { + title = h1.text(); + } + } // strip any html tags in the title text + + return normalizeSpaces(stripTags(title, $).trim()); + } + + var global$1 = + typeof global !== 'undefined' + ? global + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : {}; + + var lodash = createCommonjsModule(function(module, exports) { + (function() { + /** Used as a safe reference for `undefined` in pre ES5 environments */ + var undefined; + /** Used to pool arrays and objects used internally */ + + var arrayPool = [], + objectPool = []; + /** Used to generate unique IDs */ + + var idCounter = 0; + /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */ + + var keyPrefix = +new Date() + ''; + /** Used as the size when optimizations are enabled for large arrays */ + + var largeArraySize = 75; + /** Used as the max size of the `arrayPool` and `objectPool` */ + + var maxPoolSize = 40; + /** Used to detect and test whitespace */ + + var whitespace = // whitespace + ' \t\x0B\f\xA0\ufeff' + // line terminators + '\n\r\u2028\u2029' + // unicode category "Zs" space separators + '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; + /** Used to match empty string literals in compiled template source */ + + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + /** + * Used to match ES6 template delimiters + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals + */ + + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + /** Used to match regexp flags from their coerced string values */ + + var reFlags = /\w*$/; + /** Used to detected named functions */ + + var reFuncName = /^\s*function[ \n\r\t]+\w/; + /** Used to match "interpolate" template delimiters */ + + var reInterpolate = /<%=([\s\S]+?)%>/g; + /** Used to match leading whitespace and zeros to be removed */ + + var reLeadingSpacesAndZeros = RegExp('^[' + whitespace + ']*0+(?=.$)'); + /** Used to ensure capturing order of template delimiters */ + + var reNoMatch = /($^)/; + /** Used to detect functions containing a `this` reference */ + + var reThis = /\bthis\b/; + /** Used to match unescaped characters in compiled string literals */ + + var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; + /** Used to assign default `context` object properties */ + + var contextProps = [ + 'Array', + 'Boolean', + 'Date', + 'Function', + 'Math', + 'Number', + 'Object', + 'RegExp', + 'String', + '_', + 'attachEvent', + 'clearTimeout', + 'isFinite', + 'isNaN', + 'parseInt', + 'setTimeout', + ]; + /** Used to make template sourceURLs easier to identify */ + + var templateCounter = 0; + /** `Object#toString` result shortcuts */ + + var argsClass = '[object Arguments]', + arrayClass = '[object Array]', + boolClass = '[object Boolean]', + dateClass = '[object Date]', + funcClass = '[object Function]', + numberClass = '[object Number]', + objectClass = '[object Object]', + regexpClass = '[object RegExp]', + stringClass = '[object String]'; + /** Used to identify object classifications that `_.clone` supports */ + + var cloneableClasses = {}; + cloneableClasses[funcClass] = false; + cloneableClasses[argsClass] = cloneableClasses[ + arrayClass + ] = cloneableClasses[boolClass] = cloneableClasses[ + dateClass + ] = cloneableClasses[numberClass] = cloneableClasses[ + objectClass + ] = cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; + /** Used as an internal `_.debounce` options object */ + + var debounceOptions = { + leading: false, + maxWait: 0, + trailing: false, + }; + /** Used as the property descriptor for `__bindData__` */ + + var descriptor = { + configurable: false, + enumerable: false, + value: null, + writable: false, + }; + /** Used to determine if values are of the language type Object */ + + var objectTypes = { + boolean: false, + function: true, + object: true, + number: false, + string: false, + undefined: false, + }; + /** Used to escape characters for inclusion in compiled string literals */ + + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\t': 't', + '\u2028': 'u2028', + '\u2029': 'u2029', + }; + /** Used as a reference to the global object */ + + var root = (objectTypes[typeof window] && window) || this; + /** Detect free variable `exports` */ + + var freeExports = exports && !exports.nodeType && exports; + /** Detect free variable `module` */ + + var freeModule = module && !module.nodeType && module; + /** Detect the popular CommonJS extension `module.exports` */ + + var moduleExports = + freeModule && freeModule.exports === freeExports && freeExports; + /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */ + + var freeGlobal = objectTypes[typeof global$1] && global$1; + + if ( + freeGlobal && + (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) + ) { + root = freeGlobal; + } + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.indexOf` without support for binary searches + * or `fromIndex` constraints. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + */ + + function baseIndexOf(array, value, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + + return -1; + } + /** + * An implementation of `_.contains` for cache objects that mimics the return + * signature of `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache object to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + + function cacheIndexOf(cache, value) { + var type = typeof value; + cache = cache.cache; + + if (type == 'boolean' || value == null) { + return cache[value] ? 0 : -1; + } + + if (type != 'number' && type != 'string') { + type = 'object'; + } + + var key = type == 'number' ? value : keyPrefix + value; + cache = (cache = cache[type]) && cache[key]; + return type == 'object' + ? cache && baseIndexOf(cache, value) > -1 + ? 0 + : -1 + : cache + ? 0 + : -1; + } + /** + * Adds a given value to the corresponding cache object. + * + * @private + * @param {*} value The value to add to the cache. + */ + + function cachePush(value) { + var cache = this.cache, + type = typeof value; + + if (type == 'boolean' || value == null) { + cache[value] = true; + } else { + if (type != 'number' && type != 'string') { + type = 'object'; + } + + var key = type == 'number' ? value : keyPrefix + value, + typeCache = cache[type] || (cache[type] = {}); + + if (type == 'object') { + (typeCache[key] || (typeCache[key] = [])).push(value); + } else { + typeCache[key] = true; + } + } + } + /** + * Used by `_.max` and `_.min` as the default callback when a given + * collection is a string value. + * + * @private + * @param {string} value The character to inspect. + * @returns {number} Returns the code unit of given character. + */ + + function charAtCallback(value) { + return value.charCodeAt(0); + } + /** + * Used by `sortBy` to compare transformed `collection` elements, stable sorting + * them in ascending order. + * + * @private + * @param {Object} a The object to compare to `b`. + * @param {Object} b The object to compare to `a`. + * @returns {number} Returns the sort order indicator of `1` or `-1`. + */ + + function compareAscending(a, b) { + var ac = a.criteria, + bc = b.criteria, + index = -1, + length = ac.length; + + while (++index < length) { + var value = ac[index], + other = bc[index]; + + if (value !== other) { + if (value > other || typeof value == 'undefined') { + return 1; + } + + if (value < other || typeof other == 'undefined') { + return -1; + } + } + } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to return the same value for + // `a` and `b`. See https://github.com/jashkenas/underscore/pull/1247 + // + // This also ensures a stable sort in V8 and other engines. + // See http://code.google.com/p/v8/issues/detail?id=90 + + return a.index - b.index; + } + /** + * Creates a cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [array=[]] The array to search. + * @returns {null|Object} Returns the cache object or `null` if caching should not be used. + */ + + function createCache(array) { + var index = -1, + length = array.length, + first = array[0], + mid = array[(length / 2) | 0], + last = array[length - 1]; + + if ( + first && + typeof first == 'object' && + mid && + typeof mid == 'object' && + last && + typeof last == 'object' + ) { + return false; + } + + var cache = getObject(); + cache['false'] = cache['null'] = cache['true'] = cache[ + 'undefined' + ] = false; + var result = getObject(); + result.array = array; + result.cache = cache; + result.push = cachePush; + + while (++index < length) { + result.push(array[index]); + } + + return result; + } + /** + * Used by `template` to escape characters for inclusion in compiled + * string literals. + * + * @private + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. + */ + + function escapeStringChar(match) { + return '\\' + stringEscapes[match]; + } + /** + * Gets an array from the array pool or creates a new one if the pool is empty. + * + * @private + * @returns {Array} The array from the pool. + */ + + function getArray() { + return arrayPool.pop() || []; + } + /** + * Gets an object from the object pool or creates a new one if the pool is empty. + * + * @private + * @returns {Object} The object from the pool. + */ + + function getObject() { + return ( + objectPool.pop() || { + array: null, + cache: null, + criteria: null, + false: false, + index: 0, + null: false, + number: null, + object: null, + push: null, + string: null, + true: false, + undefined: false, + value: null, + } + ); + } + /** + * Releases the given array back to the array pool. + * + * @private + * @param {Array} [array] The array to release. + */ + + function releaseArray(array) { + array.length = 0; + + if (arrayPool.length < maxPoolSize) { + arrayPool.push(array); + } + } + /** + * Releases the given object back to the object pool. + * + * @private + * @param {Object} [object] The object to release. + */ + + function releaseObject(object) { + var cache = object.cache; + + if (cache) { + releaseObject(cache); + } + + object.array = object.cache = object.criteria = object.object = object.number = object.string = object.value = null; + + if (objectPool.length < maxPoolSize) { + objectPool.push(object); + } + } + /** + * Slices the `collection` from the `start` index up to, but not including, + * the `end` index. + * + * Note: This function is used instead of `Array#slice` to support node lists + * in IE < 9 and to ensure dense arrays are returned. + * + * @private + * @param {Array|Object|string} collection The collection to slice. + * @param {number} start The start index. + * @param {number} end The end index. + * @returns {Array} Returns the new array. + */ + + function slice(array, start, end) { + start || (start = 0); + + if (typeof end == 'undefined') { + end = array ? array.length : 0; + } + + var index = -1, + length = end - start || 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = array[start + index]; + } + + return result; + } + /*--------------------------------------------------------------------------*/ + + /** + * Create a new `lodash` function using the given context object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} [context=root] The context object. + * @returns {Function} Returns the `lodash` function. + */ + + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See http://es5.github.io/#x11.1.5. + context = context + ? _.defaults(root.Object(), context, _.pick(root, contextProps)) + : root; + /** Native constructor references */ + + var Array = context.Array, + Boolean = context.Boolean, + Date = context.Date, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + /** + * Used for `Array` method references. + * + * Normally `Array.prototype` would suffice, however, using an array literal + * avoids issues in Narwhal. + */ + + var arrayRef = []; + /** Used for native method references */ + + var objectProto = Object.prototype; + /** Used to restore the original `_` reference in `noConflict` */ + + var oldDash = context._; + /** Used to resolve the internal [[Class]] of values */ + + var toString = objectProto.toString; + /** Used to detect if a method is native */ + + var reNative = RegExp( + '^' + + String(toString) + .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + .replace(/toString| for [^\]]+/g, '.*?') + + '$' + ); + /** Native method shortcuts */ + + var ceil = Math.ceil, + clearTimeout = context.clearTimeout, + floor = Math.floor, + fnToString = Function.prototype.toString, + getPrototypeOf = + isNative((getPrototypeOf = Object.getPrototypeOf)) && + getPrototypeOf, + hasOwnProperty = objectProto.hasOwnProperty, + push = arrayRef.push, + setTimeout = context.setTimeout, + splice = arrayRef.splice, + unshift = arrayRef.unshift; + /** Used to set meta data on functions */ + + var defineProperty = (function() { + // IE 8 only accepts DOM elements + try { + var o = {}, + func = isNative((func = Object.defineProperty)) && func, + result = func(o, o, o) && func; + } catch (e) {} + + return result; + })(); + /* Native method shortcuts for methods with the same name as other `lodash` methods */ + + var nativeCreate = + isNative((nativeCreate = Object.create)) && nativeCreate, + nativeIsArray = + isNative((nativeIsArray = Array.isArray)) && nativeIsArray, + nativeIsFinite = context.isFinite, + nativeIsNaN = context.isNaN, + nativeKeys = isNative((nativeKeys = Object.keys)) && nativeKeys, + nativeMax = Math.max, + nativeMin = Math.min, + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + /** Used to lookup a built-in constructor by [[Class]] */ + + var ctorByClass = {}; + ctorByClass[arrayClass] = Array; + ctorByClass[boolClass] = Boolean; + ctorByClass[dateClass] = Date; + ctorByClass[funcClass] = Function; + ctorByClass[objectClass] = Object; + ctorByClass[numberClass] = Number; + ctorByClass[regexpClass] = RegExp; + ctorByClass[stringClass] = String; + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps the given value to enable intuitive + * method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, + * and `unshift` + * + * Chaining is supported in custom builds as long as the `value` method is + * implicitly or explicitly included in the build. + * + * The chainable wrapper functions are: + * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, + * `compose`, `concat`, `countBy`, `create`, `createCallback`, `curry`, + * `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`, `flatten`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, + * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `pull`, `push`, + * `range`, `reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, + * `sortBy`, `splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, + * `union`, `uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, + * and `zip` + * + * The non-chainable wrapper functions are: + * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`, `identity`, + * `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, `isNull`, `isNumber`, + * `isObject`, `isPlainObject`, `isRegExp`, `isString`, `isUndefined`, `join`, + * `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `result`, `shift`, `size`, `some`, `sortedIndex`, `runInContext`, + * `template`, `unescape`, `uniqueId`, and `value` + * + * The wrapper functions `first` and `last` return wrapped values when `n` is + * provided, otherwise they return unwrapped values. + * + * Explicit chaining can be enabled by using the `_.chain` method. + * + * @name _ + * @constructor + * @category Chaining + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns a `lodash` instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(num) { + * return num * num; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + + function lodash(value) { + // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor + return value && + typeof value == 'object' && + !isArray(value) && + hasOwnProperty.call(value, '__wrapped__') + ? value + : new lodashWrapper(value); + } + /** + * A fast path for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap in a `lodash` instance. + * @param {boolean} chainAll A flag to enable chaining for all methods + * @returns {Object} Returns a `lodash` instance. + */ + + function lodashWrapper(value, chainAll) { + this.__chain__ = !!chainAll; + this.__wrapped__ = value; + } // ensure `new lodashWrapper` is an instance of `lodash` + + lodashWrapper.prototype = lodash.prototype; + /** + * An object used to flag environments features. + * + * @static + * @memberOf _ + * @type Object + */ + + var support = (lodash.support = {}); + /** + * Detect if functions can be decompiled by `Function#toString` + * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps). + * + * @memberOf _.support + * @type boolean + */ + + support.funcDecomp = + !isNative(context.WinRTError) && reThis.test(runInContext); + /** + * Detect if `Function#name` is supported (all but IE). + * + * @memberOf _.support + * @type boolean + */ + + support.funcNames = typeof Function.name == 'string'; + /** + * By default, the template delimiters used by Lo-Dash are similar to those in + * embedded Ruby (ERB). Change the following template settings to use alternative + * delimiters. + * + * @static + * @memberOf _ + * @type Object + */ + + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type RegExp + */ + escape: /<%-([\s\S]+?)%>/g, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type RegExp + */ + evaluate: /<%([\s\S]+?)%>/g, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type RegExp + */ + interpolate: reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type string + */ + variable: '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type Object + */ + imports: { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type Function + */ + _: lodash, + }, + }; + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `_.bind` that creates the bound function and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new bound function. + */ + + function baseBind(bindData) { + var func = bindData[0], + partialArgs = bindData[2], + thisArg = bindData[4]; + + function bound() { + // `Function#bind` spec + // http://es5.github.io/#x15.3.4.5 + if (partialArgs) { + // avoid `arguments` object deoptimizations by using `slice` instead + // of `Array.prototype.slice.call` and not assigning `arguments` to a + // variable as a ternary expression + var args = slice(partialArgs); + push.apply(args, arguments); + } // mimic the constructor's `return` behavior + // http://es5.github.io/#x13.2.2 + + if (this instanceof bound) { + // ensure `new bound` is an instance of `func` + var thisBinding = baseCreate(func.prototype), + result = func.apply(thisBinding, args || arguments); + return isObject(result) ? result : thisBinding; + } + + return func.apply(thisArg, args || arguments); + } + + setBindData(bound, bindData); + return bound; + } + /** + * The base implementation of `_.clone` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + + function baseClone(value, isDeep, callback, stackA, stackB) { + if (callback) { + var result = callback(value); + + if (typeof result != 'undefined') { + return result; + } + } // inspect [[Class]] + + var isObj = isObject(value); + + if (isObj) { + var className = toString.call(value); + + if (!cloneableClasses[className]) { + return value; + } + + var ctor = ctorByClass[className]; + + switch (className) { + case boolClass: + case dateClass: + return new ctor(+value); + + case numberClass: + case stringClass: + return new ctor(value); + + case regexpClass: + result = ctor(value.source, reFlags.exec(value)); + result.lastIndex = value.lastIndex; + return result; + } + } else { + return value; + } + + var isArr = isArray(value); + + if (isDeep) { + // check for circular references and return corresponding clone + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + var length = stackA.length; + + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + + result = isArr ? ctor(value.length) : {}; + } else { + result = isArr ? slice(value) : assign({}, value); + } // add array properties assigned by `RegExp#exec` + + if (isArr) { + if (hasOwnProperty.call(value, 'index')) { + result.index = value.index; + } + + if (hasOwnProperty.call(value, 'input')) { + result.input = value.input; + } + } // exit for shallow clone + + if (!isDeep) { + return result; + } // add the source value to the stack of traversed objects + // and associate it with its clone + + stackA.push(value); + stackB.push(result); // recursively populate clone (susceptible to call stack limits) + + (isArr ? forEach : forOwn)(value, function(objValue, key) { + result[key] = baseClone(objValue, isDeep, callback, stackA, stackB); + }); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + + return result; + } + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} prototype The object to inherit from. + * @returns {Object} Returns the new object. + */ + + function baseCreate(prototype, properties) { + return isObject(prototype) ? nativeCreate(prototype) : {}; + } // fallback for browsers without `Object.create` + + if (!nativeCreate) { + baseCreate = (function() { + function Object() {} + + return function(prototype) { + if (isObject(prototype)) { + Object.prototype = prototype; + var result = new Object(); + Object.prototype = null; + } + + return result || context.Object(); + }; + })(); + } + /** + * The base implementation of `_.createCallback` without support for creating + * "_.pluck" or "_.where" style callbacks. + * + * @private + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + */ + + function baseCreateCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } // exit early for no `thisArg` or already bound by `Function#bind` + + if (typeof thisArg == 'undefined' || !('prototype' in func)) { + return func; + } + + var bindData = func.__bindData__; + + if (typeof bindData == 'undefined') { + if (support.funcNames) { + bindData = !func.name; + } + + bindData = bindData || !support.funcDecomp; + + if (!bindData) { + var source = fnToString.call(func); + + if (!support.funcNames) { + bindData = !reFuncName.test(source); + } + + if (!bindData) { + // checks if `func` references the `this` keyword and stores the result + bindData = reThis.test(source); + setBindData(func, bindData); + } + } + } // exit early if there are no `this` references or `func` is bound + + if (bindData === false || (bindData !== true && bindData[1] & 1)) { + return func; + } + + switch (argCount) { + case 1: + return function(value) { + return func.call(thisArg, value); + }; + + case 2: + return function(a, b) { + return func.call(thisArg, a, b); + }; + + case 3: + return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + + case 4: + return function(accumulator, value, index, collection) { + return func.call( + thisArg, + accumulator, + value, + index, + collection + ); + }; + } + + return bind(func, thisArg); + } + /** + * The base implementation of `createWrapper` that creates the wrapper and + * sets its meta data. + * + * @private + * @param {Array} bindData The bind data array. + * @returns {Function} Returns the new function. + */ + + function baseCreateWrapper(bindData) { + var func = bindData[0], + bitmask = bindData[1], + partialArgs = bindData[2], + partialRightArgs = bindData[3], + thisArg = bindData[4], + arity = bindData[5]; + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isCurryBound = bitmask & 8, + key = func; + + function bound() { + var thisBinding = isBind ? thisArg : this; + + if (partialArgs) { + var args = slice(partialArgs); + push.apply(args, arguments); + } + + if (partialRightArgs || isCurry) { + args || (args = slice(arguments)); + + if (partialRightArgs) { + push.apply(args, partialRightArgs); + } + + if (isCurry && args.length < arity) { + bitmask |= 16 & ~32; + return baseCreateWrapper([ + func, + isCurryBound ? bitmask : bitmask & ~3, + args, + null, + thisArg, + arity, + ]); + } + } + + args || (args = arguments); + + if (isBindKey) { + func = thisBinding[key]; + } + + if (this instanceof bound) { + thisBinding = baseCreate(func.prototype); + var result = func.apply(thisBinding, args); + return isObject(result) ? result : thisBinding; + } + + return func.apply(thisBinding, args); + } + + setBindData(bound, bindData); + return bound; + } + /** + * The base implementation of `_.difference` that accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to process. + * @param {Array} [values] The array of values to exclude. + * @returns {Array} Returns a new array of filtered values. + */ + + function baseDifference(array, values) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + isLarge = length >= largeArraySize && indexOf === baseIndexOf, + result = []; + + if (isLarge) { + var cache = createCache(values); + + if (cache) { + indexOf = cacheIndexOf; + values = cache; + } else { + isLarge = false; + } + } + + while (++index < length) { + var value = array[index]; + + if (indexOf(values, value) < 0) { + result.push(value); + } + } + + if (isLarge) { + releaseObject(values); + } + + return result; + } + /** + * The base implementation of `_.flatten` without support for callback + * shorthands or `thisArg` binding. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {boolean} [isStrict=false] A flag to restrict flattening to arrays and `arguments` objects. + * @param {number} [fromIndex=0] The index to start from. + * @returns {Array} Returns a new flattened array. + */ + + function baseFlatten(array, isShallow, isStrict, fromIndex) { + var index = (fromIndex || 0) - 1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if ( + value && + typeof value == 'object' && + typeof value.length == 'number' && + (isArray(value) || isArguments(value)) + ) { + // recursively flatten arrays (susceptible to call stack limits) + if (!isShallow) { + value = baseFlatten(value, isShallow, isStrict); + } + + var valIndex = -1, + valLength = value.length, + resIndex = result.length; + result.length += valLength; + + while (++valIndex < valLength) { + result[resIndex++] = value[valIndex]; + } + } else if (!isStrict) { + result.push(value); + } + } + + return result; + } + /** + * The base implementation of `_.isEqual`, without support for `thisArg` binding, + * that allows partial "_.where" style comparisons. + * + * @private + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `a` objects. + * @param {Array} [stackB=[]] Tracks traversed `b` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + + function baseIsEqual(a, b, callback, isWhere, stackA, stackB) { + // used to indicate that when comparing objects, `a` has at least the properties of `b` + if (callback) { + var result = callback(a, b); + + if (typeof result != 'undefined') { + return !!result; + } + } // exit early for identical values + + if (a === b) { + // treat `+0` vs. `-0` as not equal + return a !== 0 || 1 / a == 1 / b; + } + + var type = typeof a, + otherType = typeof b; // exit early for unlike primitive values + + if ( + a === a && + !(a && objectTypes[type]) && + !(b && objectTypes[otherType]) + ) { + return false; + } // exit early for `null` and `undefined` avoiding ES3's Function#call behavior + // http://es5.github.io/#x15.3.4.4 + + if (a == null || b == null) { + return a === b; + } // compare [[Class]] names + + var className = toString.call(a), + otherClass = toString.call(b); + + if (className == argsClass) { + className = objectClass; + } + + if (otherClass == argsClass) { + otherClass = objectClass; + } + + if (className != otherClass) { + return false; + } + + switch (className) { + case boolClass: + case dateClass: + // coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal + return +a == +b; + + case numberClass: + // treat `NaN` vs. `NaN` as equal + return a != +a + ? b != +b // but treat `+0` vs. `-0` as not equal + : a == 0 + ? 1 / a == 1 / b + : a == +b; + + case regexpClass: + case stringClass: + // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) + // treat string primitives and their corresponding object instances as equal + return a == String(b); + } + + var isArr = className == arrayClass; + + if (!isArr) { + // unwrap any `lodash` wrapped values + var aWrapped = hasOwnProperty.call(a, '__wrapped__'), + bWrapped = hasOwnProperty.call(b, '__wrapped__'); + + if (aWrapped || bWrapped) { + return baseIsEqual( + aWrapped ? a.__wrapped__ : a, + bWrapped ? b.__wrapped__ : b, + callback, + isWhere, + stackA, + stackB + ); + } // exit for functions and DOM nodes + + if (className != objectClass) { + return false; + } // in older versions of Opera, `arguments` objects have `Array` constructors + + var ctorA = a.constructor, + ctorB = b.constructor; // non `Object` object instances with different constructors are not equal + + if ( + ctorA != ctorB && + !( + isFunction(ctorA) && + ctorA instanceof ctorA && + isFunction(ctorB) && + ctorB instanceof ctorB + ) && + 'constructor' in a && + 'constructor' in b + ) { + return false; + } + } // assume cyclic structures are equal + // the algorithm for detecting cyclic structures is adapted from ES 5.1 + // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) + + var initedStack = !stackA; + stackA || (stackA = getArray()); + stackB || (stackB = getArray()); + var length = stackA.length; + + while (length--) { + if (stackA[length] == a) { + return stackB[length] == b; + } + } + + var size = 0; + result = true; // add `a` and `b` to the stack of traversed objects + + stackA.push(a); + stackB.push(b); // recursively compare objects and arrays (susceptible to call stack limits) + + if (isArr) { + // compare lengths to determine if a deep comparison is necessary + length = a.length; + size = b.length; + result = size == length; + + if (result || isWhere) { + // deep compare the contents, ignoring non-numeric properties + while (size--) { + var index = length, + value = b[size]; + + if (isWhere) { + while (index--) { + if ( + (result = baseIsEqual( + a[index], + value, + callback, + isWhere, + stackA, + stackB + )) + ) { + break; + } + } + } else if ( + !(result = baseIsEqual( + a[size], + value, + callback, + isWhere, + stackA, + stackB + )) + ) { + break; + } + } + } + } else { + // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` + // which, in this case, is more costly + forIn(b, function(value, key, b) { + if (hasOwnProperty.call(b, key)) { + // count the number of properties. + size++; // deep compare each property value. + + return (result = + hasOwnProperty.call(a, key) && + baseIsEqual( + a[key], + value, + callback, + isWhere, + stackA, + stackB + )); + } + }); + + if (result && !isWhere) { + // ensure both objects have the same number of properties + forIn(a, function(value, key, a) { + if (hasOwnProperty.call(a, key)) { + // `size` will be `-1` if `a` has more properties than `b` + return (result = --size > -1); + } + }); + } + } + + stackA.pop(); + stackB.pop(); + + if (initedStack) { + releaseArray(stackA); + releaseArray(stackB); + } + + return result; + } + /** + * The base implementation of `_.merge` without argument juggling or support + * for `thisArg` binding. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [callback] The function to customize merging properties. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + */ + + function baseMerge(object, source, callback, stackA, stackB) { + (isArray(source) ? forEach : forOwn)(source, function(source, key) { + var found, + isArr, + result = source, + value = object[key]; + + if ( + source && + ((isArr = isArray(source)) || isPlainObject(source)) + ) { + // avoid merging previously merged cyclic sources + var stackLength = stackA.length; + + while (stackLength--) { + if ((found = stackA[stackLength] == source)) { + value = stackB[stackLength]; + break; + } + } + + if (!found) { + var isShallow; + + if (callback) { + result = callback(value, source); + + if ((isShallow = typeof result != 'undefined')) { + value = result; + } + } + + if (!isShallow) { + value = isArr + ? isArray(value) + ? value + : [] + : isPlainObject(value) + ? value + : {}; + } // add `source` and associated `value` to the stack of traversed objects + + stackA.push(source); + stackB.push(value); // recursively merge objects and arrays (susceptible to call stack limits) + + if (!isShallow) { + baseMerge(value, source, callback, stackA, stackB); + } + } + } else { + if (callback) { + result = callback(value, source); + + if (typeof result == 'undefined') { + result = source; + } + } + + if (typeof result != 'undefined') { + value = result; + } + } + + object[key] = value; + }); + } + /** + * The base implementation of `_.random` without argument juggling or support + * for returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns a random number. + */ + + function baseRandom(min, max) { + return min + floor(nativeRandom() * (max - min + 1)); + } + /** + * The base implementation of `_.uniq` without support for callback shorthands + * or `thisArg` binding. + * + * @private + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function} [callback] The function called per iteration. + * @returns {Array} Returns a duplicate-value-free array. + */ + + function baseUniq(array, isSorted, callback) { + var index = -1, + indexOf = getIndexOf(), + length = array ? array.length : 0, + result = []; + var isLarge = + !isSorted && length >= largeArraySize && indexOf === baseIndexOf, + seen = callback || isLarge ? getArray() : result; + + if (isLarge) { + var cache = createCache(seen); + indexOf = cacheIndexOf; + seen = cache; + } + + while (++index < length) { + var value = array[index], + computed = callback ? callback(value, index, array) : value; + + if ( + isSorted + ? !index || seen[seen.length - 1] !== computed + : indexOf(seen, computed) < 0 + ) { + if (callback || isLarge) { + seen.push(computed); + } + + result.push(value); + } + } + + if (isLarge) { + releaseArray(seen.array); + releaseObject(seen); + } else if (callback) { + releaseArray(seen); + } + + return result; + } + /** + * Creates a function that aggregates a collection, creating an object composed + * of keys generated from the results of running each element of the collection + * through a callback. The given `setter` function sets the keys and values + * of the composed object. + * + * @private + * @param {Function} setter The setter function. + * @returns {Function} Returns the new aggregator function. + */ + + function createAggregator(setter) { + return function(collection, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + setter( + result, + value, + callback(value, index, collection), + collection + ); + } + } else { + forOwn(collection, function(value, key, collection) { + setter( + result, + value, + callback(value, key, collection), + collection + ); + }); + } + + return result; + }; + } + /** + * Creates a function that, when called, either curries or invokes `func` + * with an optional `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of method flags to compose. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` + * 8 - `_.curry` (bound) + * 16 - `_.partial` + * 32 - `_.partialRight` + * @param {Array} [partialArgs] An array of arguments to prepend to those + * provided to the new function. + * @param {Array} [partialRightArgs] An array of arguments to append to those + * provided to the new function. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new function. + */ + + function createWrapper( + func, + bitmask, + partialArgs, + partialRightArgs, + thisArg, + arity + ) { + var isBind = bitmask & 1, + isBindKey = bitmask & 2, + isCurry = bitmask & 4, + isPartial = bitmask & 16, + isPartialRight = bitmask & 32; + + if (!isBindKey && !isFunction(func)) { + throw new TypeError(); + } + + if (isPartial && !partialArgs.length) { + bitmask &= ~16; + isPartial = partialArgs = false; + } + + if (isPartialRight && !partialRightArgs.length) { + bitmask &= ~32; + isPartialRight = partialRightArgs = false; + } + + var bindData = func && func.__bindData__; + + if (bindData && bindData !== true) { + // clone `bindData` + bindData = slice(bindData); + + if (bindData[2]) { + bindData[2] = slice(bindData[2]); + } + + if (bindData[3]) { + bindData[3] = slice(bindData[3]); + } // set `thisBinding` is not previously bound + + if (isBind && !(bindData[1] & 1)) { + bindData[4] = thisArg; + } // set if previously bound but not currently (subsequent curried functions) + + if (!isBind && bindData[1] & 1) { + bitmask |= 8; + } // set curried arity if not yet set + + if (isCurry && !(bindData[1] & 4)) { + bindData[5] = arity; + } // append partial left arguments + + if (isPartial) { + push.apply(bindData[2] || (bindData[2] = []), partialArgs); + } // append partial right arguments + + if (isPartialRight) { + unshift.apply( + bindData[3] || (bindData[3] = []), + partialRightArgs + ); + } // merge flags + + bindData[1] |= bitmask; + return createWrapper.apply(null, bindData); + } // fast path for `_.bind` + + var creater = + bitmask == 1 || bitmask === 17 ? baseBind : baseCreateWrapper; + return creater([ + func, + bitmask, + partialArgs, + partialRightArgs, + thisArg, + arity, + ]); + } + /** + * Used by `escape` to convert characters to HTML entities. + * + * @private + * @param {string} match The matched character to escape. + * @returns {string} Returns the escaped character. + */ + + function escapeHtmlChar(match) { + return htmlEscapes[match]; + } + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized, this method returns the custom method, otherwise it returns + * the `baseIndexOf` function. + * + * @private + * @returns {Function} Returns the "indexOf" function. + */ + + function getIndexOf() { + var result = + (result = lodash.indexOf) === indexOf ? baseIndexOf : result; + return result; + } + /** + * Checks if `value` is a native function. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. + */ + + function isNative(value) { + return typeof value == 'function' && reNative.test(value); + } + /** + * Sets `this` binding data on a given function. + * + * @private + * @param {Function} func The function to set data on. + * @param {Array} value The data array to set. + */ + + var setBindData = !defineProperty + ? noop + : function(func, value) { + descriptor.value = value; + defineProperty(func, '__bindData__', descriptor); + descriptor.value = null; + }; + /** + * A fallback implementation of `isPlainObject` which checks if a given value + * is an object created by the `Object` constructor, assuming objects created + * by the `Object` constructor have no inherited enumerable properties and that + * there are no `Object.prototype` extensions. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + */ + + function shimIsPlainObject(value) { + var ctor, result; // avoid non Object objects, `arguments` objects, and DOM elements + + if ( + !(value && toString.call(value) == objectClass) || + ((ctor = value.constructor), + isFunction(ctor) && !(ctor instanceof ctor)) + ) { + return false; + } // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + + forIn(value, function(value, key) { + result = key; + }); + return ( + typeof result == 'undefined' || hasOwnProperty.call(value, result) + ); + } + /** + * Used by `unescape` to convert HTML entities to characters. + * + * @private + * @param {string} match The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + + function unescapeHtmlChar(match) { + return htmlUnescapes[match]; + } + /*--------------------------------------------------------------------------*/ + + /** + * Checks if `value` is an `arguments` object. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an `arguments` object, else `false`. + * @example + * + * (function() { return _.isArguments(arguments); })(1, 2, 3); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + + function isArguments(value) { + return ( + (value && + typeof value == 'object' && + typeof value.length == 'number' && + toString.call(value) == argsClass) || + false + ); + } + /** + * Checks if `value` is an array. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an array, else `false`. + * @example + * + * (function() { return _.isArray(arguments); })(); + * // => false + * + * _.isArray([1, 2, 3]); + * // => true + */ + + var isArray = + nativeIsArray || + function(value) { + return ( + (value && + typeof value == 'object' && + typeof value.length == 'number' && + toString.call(value) == arrayClass) || + false + ); + }; + /** + * A fallback implementation of `Object.keys` which produces an array of the + * given object's own enumerable property names. + * + * @private + * @type Function + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + */ + + var shimKeys = function(object) { + var index, + iterable = object, + result = []; + if (!iterable) return result; + if (!objectTypes[typeof object]) return result; + + for (index in iterable) { + if (hasOwnProperty.call(iterable, index)) { + result.push(index); + } + } + + return result; + }; + /** + * Creates an array composed of the own enumerable property names of an object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names. + * @example + * + * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); + * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) + */ + + var keys = !nativeKeys + ? shimKeys + : function(object) { + if (!isObject(object)) { + return []; + } + + return nativeKeys(object); + }; + /** + * Used to convert characters to HTML entities: + * + * Though the `>` character is escaped for symmetry, characters like `>` and `/` + * don't require escaping in HTML and have no special meaning unless they're part + * of a tag or an unquoted attribute value. + * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") + */ + + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + /** Used to convert HTML entities to characters */ + + var htmlUnescapes = invert(htmlEscapes); + /** Used to match HTML entities and HTML characters */ + + var reEscapedHtml = RegExp( + '(' + keys(htmlUnescapes).join('|') + ')', + 'g' + ), + reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); + /*--------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources will overwrite property assignments of previous + * sources. If a callback is provided it will be executed to produce the + * assigned values. The callback is bound to `thisArg` and invoked with two + * arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @type Function + * @alias extend + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize assigning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * _.assign({ 'name': 'fred' }, { 'employer': 'slate' }); + * // => { 'name': 'fred', 'employer': 'slate' } + * + * var defaults = _.partialRight(_.assign, function(a, b) { + * return typeof a == 'undefined' ? b : a; + * }); + * + * var object = { 'name': 'barney' }; + * defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + + var assign = function(object, source, guard) { + var index, + iterable = object, + result = iterable; + if (!iterable) return result; + var args = arguments, + argsIndex = 0, + argsLength = typeof guard == 'number' ? 2 : args.length; + + if (argsLength > 3 && typeof args[argsLength - 2] == 'function') { + var callback = baseCreateCallback( + args[--argsLength - 1], + args[argsLength--], + 2 + ); + } else if ( + argsLength > 2 && + typeof args[argsLength - 1] == 'function' + ) { + callback = args[--argsLength]; + } + + while (++argsIndex < argsLength) { + iterable = args[argsIndex]; + + if (iterable && objectTypes[typeof iterable]) { + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + result[index] = callback + ? callback(result[index], iterable[index]) + : iterable[index]; + } + } + } + + return result; + }; + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects will also + * be cloned, otherwise they will be assigned by reference. If a callback + * is provided it will be executed to produce the cloned values. If the + * callback returns `undefined` cloning will be handled by the method instead. + * The callback is bound to `thisArg` and invoked with one argument; (value). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to clone. + * @param {boolean} [isDeep=false] Specify a deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var shallow = _.clone(characters); + * shallow[0] === characters[0]; + * // => true + * + * var deep = _.clone(characters, true); + * deep[0] === characters[0]; + * // => false + * + * _.mixin({ + * 'clone': _.partialRight(_.clone, function(value) { + * return _.isElement(value) ? value.cloneNode(false) : undefined; + * }) + * }); + * + * var clone = _.clone(document.body); + * clone.childNodes.length; + * // => 0 + */ + + function clone(value, isDeep, callback, thisArg) { + // allows working with "Collections" methods without using their `index` + // and `collection` arguments for `isDeep` and `callback` + if (typeof isDeep != 'boolean' && isDeep != null) { + thisArg = callback; + callback = isDeep; + isDeep = false; + } + + return baseClone( + value, + isDeep, + typeof callback == 'function' && + baseCreateCallback(callback, thisArg, 1) + ); + } + /** + * Creates a deep clone of `value`. If a callback is provided it will be + * executed to produce the cloned values. If the callback returns `undefined` + * cloning will be handled by the method instead. The callback is bound to + * `thisArg` and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions + * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and + * objects created by constructors other than `Object` are cloned to plain `Object` objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to deep clone. + * @param {Function} [callback] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * var deep = _.cloneDeep(characters); + * deep[0] === characters[0]; + * // => false + * + * var view = { + * 'label': 'docs', + * 'node': element + * }; + * + * var clone = _.cloneDeep(view, function(value) { + * return _.isElement(value) ? value.cloneNode(true) : undefined; + * }); + * + * clone.node == view.node; + * // => false + */ + + function cloneDeep(value, callback, thisArg) { + return baseClone( + value, + true, + typeof callback == 'function' && + baseCreateCallback(callback, thisArg, 1) + ); + } + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { 'constructor': Circle }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties ? assign(result, properties) : result; + } + /** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional defaults of the same property will be ignored. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param- {Object} [guard] Allows working with `_.reduce` without using its + * `key` and `object` arguments as sources. + * @returns {Object} Returns the destination object. + * @example + * + * var object = { 'name': 'barney' }; + * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); + * // => { 'name': 'barney', 'employer': 'slate' } + */ + + var defaults = function(object, source, guard) { + var index, + iterable = object, + result = iterable; + if (!iterable) return result; + var args = arguments, + argsIndex = 0, + argsLength = typeof guard == 'number' ? 2 : args.length; + + while (++argsIndex < argsLength) { + iterable = args[argsIndex]; + + if (iterable && objectTypes[typeof iterable]) { + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + if (typeof result[index] == 'undefined') + result[index] = iterable[index]; + } + } + } + + return result; + }; + /** + * This method is like `_.findIndex` except that it returns the key of the + * first element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': false }, + * 'fred': { 'age': 40, 'blocked': true }, + * 'pebbles': { 'age': 1, 'blocked': false } + * }; + * + * _.findKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (property order is not guaranteed across environments) + * + * // using "_.where" callback shorthand + * _.findKey(characters, { 'age': 1 }); + * // => 'pebbles' + * + * // using "_.pluck" callback shorthand + * _.findKey(characters, 'blocked'); + * // => 'fred' + */ + + function findKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + /** + * This method is like `_.findKey` except that it iterates over elements + * of a `collection` in the opposite order. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to search. + * @param {Function|Object|string} [callback=identity] The function called per + * iteration. If a property name or object is provided it will be used to + * create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {string|undefined} Returns the key of the found element, else `undefined`. + * @example + * + * var characters = { + * 'barney': { 'age': 36, 'blocked': true }, + * 'fred': { 'age': 40, 'blocked': false }, + * 'pebbles': { 'age': 1, 'blocked': true } + * }; + * + * _.findLastKey(characters, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles`, assuming `_.findKey` returns `barney` + * + * // using "_.where" callback shorthand + * _.findLastKey(characters, { 'age': 40 }); + * // => 'fred' + * + * // using "_.pluck" callback shorthand + * _.findLastKey(characters, 'blocked'); + * // => 'pebbles' + */ + + function findLastKey(object, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forOwnRight(object, function(value, key, object) { + if (callback(value, key, object)) { + result = key; + return false; + } + }); + return result; + } + /** + * Iterates over own and inherited enumerable properties of an object, + * executing the callback for each property. The callback is bound to `thisArg` + * and invoked with three arguments; (value, key, object). Callbacks may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forIn(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments) + */ + + var forIn = function(collection, callback, thisArg) { + var index, + iterable = collection, + result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + callback = + callback && typeof thisArg == 'undefined' + ? callback + : baseCreateCallback(callback, thisArg, 3); + + for (index in iterable) { + if (callback(iterable[index], index, collection) === false) + return result; + } + + return result; + }; + /** + * This method is like `_.forIn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * Shape.prototype.move = function(x, y) { + * this.x += x; + * this.y += y; + * }; + * + * _.forInRight(new Shape, function(value, key) { + * console.log(key); + * }); + * // => logs 'move', 'y', and 'x' assuming `_.forIn ` logs 'x', 'y', and 'move' + */ + + function forInRight(object, callback, thisArg) { + var pairs = []; + forIn(object, function(value, key) { + pairs.push(key, value); + }); + var length = pairs.length; + callback = baseCreateCallback(callback, thisArg, 3); + + while (length--) { + if (callback(pairs[length--], pairs[length], object) === false) { + break; + } + } + + return object; + } + /** + * Iterates over own enumerable properties of an object, executing the callback + * for each property. The callback is bound to `thisArg` and invoked with three + * arguments; (value, key, object). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * @static + * @memberOf _ + * @type Function + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs '0', '1', and 'length' (property order is not guaranteed across environments) + */ + + var forOwn = function(collection, callback, thisArg) { + var index, + iterable = collection, + result = iterable; + if (!iterable) return result; + if (!objectTypes[typeof iterable]) return result; + callback = + callback && typeof thisArg == 'undefined' + ? callback + : baseCreateCallback(callback, thisArg, 3); + var ownIndex = -1, + ownProps = objectTypes[typeof iterable] && keys(iterable), + length = ownProps ? ownProps.length : 0; + + while (++ownIndex < length) { + index = ownProps[ownIndex]; + if (callback(iterable[index], index, collection) === false) + return result; + } + + return result; + }; + /** + * This method is like `_.forOwn` except that it iterates over elements + * of a `collection` in the opposite order. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns `object`. + * @example + * + * _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { + * console.log(key); + * }); + * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length' + */ + + function forOwnRight(object, callback, thisArg) { + var props = keys(object), + length = props.length; + callback = baseCreateCallback(callback, thisArg, 3); + + while (length--) { + var key = props[length]; + + if (callback(object[key], key, object) === false) { + break; + } + } + + return object; + } + /** + * Creates a sorted array of property names of all enumerable properties, + * own and inherited, of `object` that have function values. + * + * @static + * @memberOf _ + * @alias methods + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property names that have function values. + * @example + * + * _.functions(_); + * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] + */ + + function functions(object) { + var result = []; + forIn(object, function(value, key) { + if (isFunction(value)) { + result.push(key); + } + }); + return result.sort(); + } + /** + * Checks if the specified property name exists as a direct property of `object`, + * instead of an inherited property. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to check. + * @returns {boolean} Returns `true` if key is a direct property, else `false`. + * @example + * + * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); + * // => true + */ + + function has(object, key) { + return object ? hasOwnProperty.call(object, key) : false; + } + /** + * Creates an object composed of the inverted keys and values of the given object. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to invert. + * @returns {Object} Returns the created inverted object. + * @example + * + * _.invert({ 'first': 'fred', 'second': 'barney' }); + * // => { 'fred': 'first', 'barney': 'second' } + */ + + function invert(object) { + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + result[object[key]] = key; + } + + return result; + } + /** + * Checks if `value` is a boolean value. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a boolean value, else `false`. + * @example + * + * _.isBoolean(null); + * // => false + */ + + function isBoolean(value) { + return ( + value === true || + value === false || + (value && + typeof value == 'object' && + toString.call(value) == boolClass) || + false + ); + } + /** + * Checks if `value` is a date. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a date, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + */ + + function isDate(value) { + return ( + (value && + typeof value == 'object' && + toString.call(value) == dateClass) || + false + ); + } + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + */ + + function isElement(value) { + return (value && value.nodeType === 1) || false; + } + /** + * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a + * length of `0` and objects with no own enumerable properties are considered + * "empty". + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if the `value` is empty, else `false`. + * @example + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({}); + * // => true + * + * _.isEmpty(''); + * // => true + */ + + function isEmpty(value) { + var result = true; + + if (!value) { + return result; + } + + var className = toString.call(value), + length = value.length; + + if ( + className == arrayClass || + className == stringClass || + className == argsClass || + (className == objectClass && + typeof length == 'number' && + isFunction(value.splice)) + ) { + return !length; + } + + forOwn(value, function() { + return (result = false); + }); + return result; + } + /** + * Performs a deep comparison between two values to determine if they are + * equivalent to each other. If a callback is provided it will be executed + * to compare values. If the callback returns `undefined` comparisons will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (a, b). + * + * @static + * @memberOf _ + * @category Objects + * @param {*} a The value to compare. + * @param {*} b The other value to compare. + * @param {Function} [callback] The function to customize comparing values. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'name': 'fred' }; + * var copy = { 'name': 'fred' }; + * + * object == copy; + * // => false + * + * _.isEqual(object, copy); + * // => true + * + * var words = ['hello', 'goodbye']; + * var otherWords = ['hi', 'goodbye']; + * + * _.isEqual(words, otherWords, function(a, b) { + * var reGreet = /^(?:hello|hi)$/i, + * aGreet = _.isString(a) && reGreet.test(a), + * bGreet = _.isString(b) && reGreet.test(b); + * + * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; + * }); + * // => true + */ + + function isEqual(a, b, callback, thisArg) { + return baseIsEqual( + a, + b, + typeof callback == 'function' && + baseCreateCallback(callback, thisArg, 2) + ); + } + /** + * Checks if `value` is, or can be coerced to, a finite number. + * + * Note: This is not the same as native `isFinite` which will return true for + * booleans and empty strings. See http://es5.github.io/#x15.1.2.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is finite, else `false`. + * @example + * + * _.isFinite(-101); + * // => true + * + * _.isFinite('10'); + * // => true + * + * _.isFinite(true); + * // => false + * + * _.isFinite(''); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + + function isFinite(value) { + return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); + } + /** + * Checks if `value` is a function. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + */ + + function isFunction(value) { + return typeof value == 'function'; + } + /** + * Checks if `value` is the language type of Object. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + + function isObject(value) { + // check if the value is the ECMAScript language type of Object + // http://es5.github.io/#x8 + // and avoid a V8 bug + // http://code.google.com/p/v8/issues/detail?id=2291 + return !!(value && objectTypes[typeof value]); + } + /** + * Checks if `value` is `NaN`. + * + * Note: This is not the same as native `isNaN` which will return `true` for + * `undefined` and other non-numeric values. See http://es5.github.io/#x15.1.2.4. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + + function isNaN(value) { + // `NaN` as a primitive is the only value that is not equal to itself + // (perform the [[Class]] check first to avoid errors with some host objects in IE) + return isNumber(value) && value != +value; + } + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(undefined); + * // => false + */ + + function isNull(value) { + return value === null; + } + /** + * Checks if `value` is a number. + * + * Note: `NaN` is considered a number. See http://es5.github.io/#x8.5. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a number, else `false`. + * @example + * + * _.isNumber(8.4 * 5); + * // => true + */ + + function isNumber(value) { + return ( + typeof value == 'number' || + (value && + typeof value == 'object' && + toString.call(value) == numberClass) || + false + ); + } + /** + * Checks if `value` is an object created by the `Object` constructor. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * _.isPlainObject(new Shape); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + */ + + var isPlainObject = !getPrototypeOf + ? shimIsPlainObject + : function(value) { + if (!(value && toString.call(value) == objectClass)) { + return false; + } + + var valueOf = value.valueOf, + objProto = + isNative(valueOf) && + (objProto = getPrototypeOf(valueOf)) && + getPrototypeOf(objProto); + return objProto + ? value == objProto || getPrototypeOf(value) == objProto + : shimIsPlainObject(value); + }; + /** + * Checks if `value` is a regular expression. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a regular expression, else `false`. + * @example + * + * _.isRegExp(/fred/); + * // => true + */ + + function isRegExp(value) { + return ( + (value && + typeof value == 'object' && + toString.call(value) == regexpClass) || + false + ); + } + /** + * Checks if `value` is a string. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is a string, else `false`. + * @example + * + * _.isString('fred'); + * // => true + */ + + function isString(value) { + return ( + typeof value == 'string' || + (value && + typeof value == 'object' && + toString.call(value) == stringClass) || + false + ); + } + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Objects + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if the `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + */ + + function isUndefined(value) { + return typeof value == 'undefined'; + } + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new object with values of the results of each `callback` execution. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + * + * var characters = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // using "_.pluck" callback shorthand + * _.mapValues(characters, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } + */ + + function mapValues(object, callback, thisArg) { + var result = {}; + callback = lodash.createCallback(callback, thisArg, 3); + forOwn(object, function(value, key, object) { + result[key] = callback(value, key, object); + }); + return result; + } + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * will overwrite property assignments of previous sources. If a callback is + * provided it will be executed to produce the merged values of the destination + * and source properties. If the callback returns `undefined` merging will + * be handled by the method instead. The callback is bound to `thisArg` and + * invoked with two arguments; (objectValue, sourceValue). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The destination object. + * @param {...Object} [source] The source objects. + * @param {Function} [callback] The function to customize merging properties. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the destination object. + * @example + * + * var names = { + * 'characters': [ + * { 'name': 'barney' }, + * { 'name': 'fred' } + * ] + * }; + * + * var ages = { + * 'characters': [ + * { 'age': 36 }, + * { 'age': 40 } + * ] + * }; + * + * _.merge(names, ages); + * // => { 'characters': [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] } + * + * var food = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var otherFood = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(food, otherFood, function(a, b) { + * return _.isArray(a) ? a.concat(b) : undefined; + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } + */ + + function merge(object) { + var args = arguments, + length = 2; + + if (!isObject(object)) { + return object; + } // allows working with `_.reduce` and `_.reduceRight` without using + // their `index` and `collection` arguments + + if (typeof args[2] != 'number') { + length = args.length; + } + + if (length > 3 && typeof args[length - 2] == 'function') { + var callback = baseCreateCallback( + args[--length - 1], + args[length--], + 2 + ); + } else if (length > 2 && typeof args[length - 1] == 'function') { + callback = args[--length]; + } + + var sources = slice(arguments, 1, length), + index = -1, + stackA = getArray(), + stackB = getArray(); + + while (++index < length) { + baseMerge(object, sources[index], callback, stackA, stackB); + } + + releaseArray(stackA); + releaseArray(stackB); + return object; + } + /** + * Creates a shallow clone of `object` excluding the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` omitting the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The properties to omit or the + * function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object without the omitted properties. + * @example + * + * _.omit({ 'name': 'fred', 'age': 40 }, 'age'); + * // => { 'name': 'fred' } + * + * _.omit({ 'name': 'fred', 'age': 40 }, function(value) { + * return typeof value == 'number'; + * }); + * // => { 'name': 'fred' } + */ + + function omit(object, callback, thisArg) { + var result = {}; + + if (typeof callback != 'function') { + var props = []; + forIn(object, function(value, key) { + props.push(key); + }); + props = baseDifference( + props, + baseFlatten(arguments, true, false, 1) + ); + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + result[key] = object[key]; + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (!callback(value, key, object)) { + result[key] = value; + } + }); + } + + return result; + } + /** + * Creates a two dimensional array of an object's key-value pairs, + * i.e. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (property order is not guaranteed across environments) + */ + + function pairs(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + + return result; + } + /** + * Creates a shallow clone of `object` composed of the specified properties. + * Property names may be specified as individual arguments or as arrays of + * property names. If a callback is provided it will be executed for each + * property of `object` picking the properties the callback returns truey + * for. The callback is bound to `thisArg` and invoked with three arguments; + * (value, key, object). + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The source object. + * @param {Function|...string|string[]} [callback] The function called per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns an object composed of the picked properties. + * @example + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, 'name'); + * // => { 'name': 'fred' } + * + * _.pick({ 'name': 'fred', '_userid': 'fred1' }, function(value, key) { + * return key.charAt(0) != '_'; + * }); + * // => { 'name': 'fred' } + */ + + function pick(object, callback, thisArg) { + var result = {}; + + if (typeof callback != 'function') { + var index = -1, + props = baseFlatten(arguments, true, false, 1), + length = isObject(object) ? props.length : 0; + + while (++index < length) { + var key = props[index]; + + if (key in object) { + result[key] = object[key]; + } + } + } else { + callback = lodash.createCallback(callback, thisArg, 3); + forIn(object, function(value, key, object) { + if (callback(value, key, object)) { + result[key] = value; + } + }); + } + + return result; + } + /** + * An alternative to `_.reduce` this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable properties through a callback, with each callback execution + * potentially mutating the `accumulator` object. The callback is bound to + * `thisArg` and invoked with four arguments; (accumulator, value, key, object). + * Callbacks may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Array|Object} object The object to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var squares = _.transform([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], function(result, num) { + * num *= num; + * if (num % 2) { + * return result.push(num) < 3; + * } + * }); + * // => [1, 9, 25] + * + * var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * }); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + + function transform(object, callback, accumulator, thisArg) { + var isArr = isArray(object); + + if (accumulator == null) { + if (isArr) { + accumulator = []; + } else { + var ctor = object && object.constructor, + proto = ctor && ctor.prototype; + accumulator = baseCreate(proto); + } + } + + if (callback) { + callback = lodash.createCallback(callback, thisArg, 4); + (isArr ? forEach : forOwn)(object, function(value, index, object) { + return callback(accumulator, value, index, object); + }); + } + + return accumulator; + } + /** + * Creates an array composed of the own enumerable property values of `object`. + * + * @static + * @memberOf _ + * @category Objects + * @param {Object} object The object to inspect. + * @returns {Array} Returns an array of property values. + * @example + * + * _.values({ 'one': 1, 'two': 2, 'three': 3 }); + * // => [1, 2, 3] (property order is not guaranteed across environments) + */ + + function values(object) { + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + + return result; + } + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array of elements from the specified indexes, or keys, of the + * `collection`. Indexes may be specified as individual arguments or as arrays + * of indexes. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [index] The indexes of `collection` + * to retrieve, specified as individual indexes or arrays of indexes. + * @returns {Array} Returns a new array of elements corresponding to the + * provided indexes. + * @example + * + * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); + * // => ['a', 'c', 'e'] + * + * _.at(['fred', 'barney', 'pebbles'], 0, 2); + * // => ['fred', 'pebbles'] + */ + + function at(collection) { + var args = arguments, + index = -1, + props = baseFlatten(args, true, false, 1), + length = + args[2] && args[2][args[1]] === collection ? 1 : props.length, + result = Array(length); + + while (++index < length) { + result[index] = collection[props[index]]; + } + + return result; + } + /** + * Checks if a given value is present in a collection using strict equality + * for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the + * offset from the end of the collection. + * + * @static + * @memberOf _ + * @alias include + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {*} target The value to check for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {boolean} Returns `true` if the `target` element is found, else `false`. + * @example + * + * _.contains([1, 2, 3], 1); + * // => true + * + * _.contains([1, 2, 3], 1, 2); + * // => false + * + * _.contains({ 'name': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.contains('pebbles', 'eb'); + * // => true + */ + + function contains(collection, target, fromIndex) { + var index = -1, + indexOf = getIndexOf(), + length = collection ? collection.length : 0, + result = false; + fromIndex = + (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; + + if (isArray(collection)) { + result = indexOf(collection, target, fromIndex) > -1; + } else if (typeof length == 'number') { + result = + (isString(collection) + ? collection.indexOf(target, fromIndex) + : indexOf(collection, target, fromIndex)) > -1; + } else { + forOwn(collection, function(value) { + if (++index >= fromIndex) { + return !(result = value === target); + } + }); + } + + return result; + } + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through the callback. The corresponding value + * of each key is the number of times the key was returned by the callback. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + + var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? result[key]++ : (result[key] = 1); + }); + /** + * Checks if the given callback returns truey value for **all** elements of + * a collection. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if all elements passed the callback check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes']); + * // => false + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.every(characters, 'age'); + * // => true + * + * // using "_.where" callback shorthand + * _.every(characters, { 'age': 36 }); + * // => false + */ + + function every(collection, callback, thisArg) { + var result = true; + callback = lodash.createCallback(callback, thisArg, 3); + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + if ( + !(result = !!callback(collection[index], index, collection)) + ) { + break; + } + } + } else { + forOwn(collection, function(value, index, collection) { + return (result = !!callback(value, index, collection)); + }); + } + + return result; + } + /** + * Iterates over elements of a collection, returning an array of all elements + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that passed the callback check. + * @example + * + * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [2, 4, 6] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.filter(characters, 'blocked'); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + * + * // using "_.where" callback shorthand + * _.filter(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + */ + + function filter(collection, callback, thisArg) { + var result = []; + callback = lodash.createCallback(callback, thisArg, 3); + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + + if (callback(value, index, collection)) { + result.push(value); + } + } + } else { + forOwn(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result.push(value); + } + }); + } + + return result; + } + /** + * Iterates over elements of a collection, returning the first element that + * the callback returns truey for. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias detect, findWhere + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.find(characters, function(chr) { + * return chr.age < 40; + * }); + * // => { 'name': 'barney', 'age': 36, 'blocked': false } + * + * // using "_.where" callback shorthand + * _.find(characters, { 'age': 1 }); + * // => { 'name': 'pebbles', 'age': 1, 'blocked': false } + * + * // using "_.pluck" callback shorthand + * _.find(characters, 'blocked'); + * // => { 'name': 'fred', 'age': 40, 'blocked': true } + */ + + function find(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + var value = collection[index]; + + if (callback(value, index, collection)) { + return value; + } + } + } else { + var result; + forOwn(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + } + /** + * This method is like `_.find` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the found element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(num) { + * return num % 2 == 1; + * }); + * // => 3 + */ + + function findLast(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + forEachRight(collection, function(value, index, collection) { + if (callback(value, index, collection)) { + result = value; + return false; + } + }); + return result; + } + /** + * Iterates over elements of a collection, executing the callback for each + * element. The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). Callbacks may exit iteration early by + * explicitly returning `false`. + * + * Note: As with other "Collections" methods, objects with a `length` property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(','); + * // => logs each number and returns '1,2,3' + * + * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); }); + * // => logs each number and returns the object (property order is not guaranteed across environments) + */ + + function forEach(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0; + callback = + callback && typeof thisArg == 'undefined' + ? callback + : baseCreateCallback(callback, thisArg, 3); + + if (typeof length == 'number') { + while (++index < length) { + if (callback(collection[index], index, collection) === false) { + break; + } + } + } else { + forOwn(collection, callback); + } + + return collection; + } + /** + * This method is like `_.forEach` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2, 3]).forEachRight(function(num) { console.log(num); }).join(','); + * // => logs each number from right to left and returns '3,2,1' + */ + + function forEachRight(collection, callback, thisArg) { + var length = collection ? collection.length : 0; + callback = + callback && typeof thisArg == 'undefined' + ? callback + : baseCreateCallback(callback, thisArg, 3); + + if (typeof length == 'number') { + while (length--) { + if (callback(collection[length], length, collection) === false) { + break; + } + } + } else { + var props = keys(collection); + length = props.length; + forOwn(collection, function(value, key, collection) { + key = props ? props[--length] : --length; + return callback(collection[key], key, collection); + }); + } + + return collection; + } + /** + * Creates an object composed of keys generated from the results of running + * each element of a collection through the callback. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false` + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using "_.pluck" callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + + var groupBy = createAggregator(function(result, value, key) { + (hasOwnProperty.call(result, key) + ? result[key] + : (result[key] = []) + ).push(value); + }); + /** + * Creates an object composed of keys generated from the results of running + * each element of the collection through the given callback. The corresponding + * value of each key is the last element responsible for generating the key. + * The callback is bound to `thisArg` and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keys = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keys, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keys, function(key) { return String.fromCharCode(key.code); }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(characters, function(key) { this.fromCharCode(key.code); }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + /** + * Invokes the method named by `methodName` on each element in the `collection` + * returning an array of the results of each invoked method. Additional arguments + * will be provided to each invoked method. If `methodName` is a function it + * will be invoked for, and `this` bound to, each element in the `collection`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|string} methodName The name of the method to invoke or + * the function invoked per iteration. + * @param {...*} [arg] Arguments to invoke the method with. + * @returns {Array} Returns a new array of the results of each invoked method. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + + function invoke(collection, methodName) { + var args = slice(arguments, 2), + index = -1, + isFunc = typeof methodName == 'function', + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + forEach(collection, function(value) { + result[++index] = (isFunc ? methodName : value[methodName]).apply( + value, + args + ); + }); + return result; + } + /** + * Creates an array of values by running each element in the collection + * through the callback. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias collect + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of the results of each `callback` execution. + * @example + * + * _.map([1, 2, 3], function(num) { return num * 3; }); + * // => [3, 6, 9] + * + * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); + * // => [3, 6, 9] (property order is not guaranteed across environments) + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(characters, 'name'); + * // => ['barney', 'fred'] + */ + + function map(collection, callback, thisArg) { + var index = -1, + length = collection ? collection.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + + if (typeof length == 'number') { + var result = Array(length); + + while (++index < length) { + result[index] = callback(collection[index], index, collection); + } + } else { + result = []; + forOwn(collection, function(value, key, collection) { + result[++index] = callback(value, key, collection); + }); + } + + return result; + } + /** + * Retrieves the maximum value of a collection. If the collection is empty or + * falsey `-Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.max(characters, function(chr) { return chr.age; }); + * // => { 'name': 'fred', 'age': 40 }; + * + * // using "_.pluck" callback shorthand + * _.max(characters, 'age'); + * // => { 'name': 'fred', 'age': 40 }; + */ + + function max(collection, callback, thisArg) { + var computed = -Infinity, + result = computed; // allows working with functions like `_.map` without using + // their `index` argument as a callback + + if ( + typeof callback != 'function' && + thisArg && + thisArg[callback] === collection + ) { + callback = null; + } + + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + + if (value > result) { + result = value; + } + } + } else { + callback = + callback == null && isString(collection) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + forEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + + if (current > computed) { + computed = current; + result = value; + } + }); + } + + return result; + } + /** + * Retrieves the minimum value of a collection. If the collection is empty or + * falsey `Infinity` is returned. If a callback is provided it will be executed + * for each value in the collection to generate the criterion by which the value + * is ranked. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.min(characters, function(chr) { return chr.age; }); + * // => { 'name': 'barney', 'age': 36 }; + * + * // using "_.pluck" callback shorthand + * _.min(characters, 'age'); + * // => { 'name': 'barney', 'age': 36 }; + */ + + function min(collection, callback, thisArg) { + var computed = Infinity, + result = computed; // allows working with functions like `_.map` without using + // their `index` argument as a callback + + if ( + typeof callback != 'function' && + thisArg && + thisArg[callback] === collection + ) { + callback = null; + } + + if (callback == null && isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + + if (value < result) { + result = value; + } + } + } else { + callback = + callback == null && isString(collection) + ? charAtCallback + : lodash.createCallback(callback, thisArg, 3); + forEach(collection, function(value, index, collection) { + var current = callback(value, index, collection); + + if (current < computed) { + computed = current; + result = value; + } + }); + } + + return result; + } + /** + * Retrieves the value of a specified property from all elements in the collection. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {string} property The name of the property to pluck. + * @returns {Array} Returns a new array of property values. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * _.pluck(characters, 'name'); + * // => ['barney', 'fred'] + */ + + var pluck = map; + /** + * Reduces a collection to a value which is the accumulated result of running + * each element in the collection through the callback, where each successive + * callback execution consumes the return value of the previous execution. If + * `accumulator` is not provided the first element of the collection will be + * used as the initial `accumulator` value. The callback is bound to `thisArg` + * and invoked with four arguments; (accumulator, value, index|key, collection). + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var sum = _.reduce([1, 2, 3], function(sum, num) { + * return sum + num; + * }); + * // => 6 + * + * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { + * result[key] = num * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6, 'c': 9 } + */ + + function reduce(collection, callback, accumulator, thisArg) { + if (!collection) return accumulator; + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + var index = -1, + length = collection.length; + + if (typeof length == 'number') { + if (noaccum) { + accumulator = collection[++index]; + } + + while (++index < length) { + accumulator = callback( + accumulator, + collection[index], + index, + collection + ); + } + } else { + forOwn(collection, function(value, index, collection) { + accumulator = noaccum + ? ((noaccum = false), value) + : callback(accumulator, value, index, collection); + }); + } + + return accumulator; + } + /** + * This method is like `_.reduce` except that it iterates over elements + * of a `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [callback=identity] The function called per iteration. + * @param {*} [accumulator] Initial value of the accumulator. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the accumulated value. + * @example + * + * var list = [[0, 1], [2, 3], [4, 5]]; + * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + + function reduceRight(collection, callback, accumulator, thisArg) { + var noaccum = arguments.length < 3; + callback = lodash.createCallback(callback, thisArg, 4); + forEachRight(collection, function(value, index, collection) { + accumulator = noaccum + ? ((noaccum = false), value) + : callback(accumulator, value, index, collection); + }); + return accumulator; + } + /** + * The opposite of `_.filter` this method returns the elements of a + * collection that the callback does **not** return truey for. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of elements that failed the callback check. + * @example + * + * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); + * // => [1, 3, 5] + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.reject(characters, 'blocked'); + * // => [{ 'name': 'barney', 'age': 36, 'blocked': false }] + * + * // using "_.where" callback shorthand + * _.reject(characters, { 'age': 36 }); + * // => [{ 'name': 'fred', 'age': 40, 'blocked': true }] + */ + + function reject(collection, callback, thisArg) { + callback = lodash.createCallback(callback, thisArg, 3); + return filter(collection, function(value, index, collection) { + return !callback(value, index, collection); + }); + } + /** + * Retrieves a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Allows working with functions like `_.map` + * without using their `index` arguments as `n`. + * @returns {Array} Returns the random sample(s) of `collection`. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + + function sample(collection, n, guard) { + if (collection && typeof collection.length != 'number') { + collection = values(collection); + } + + if (n == null || guard) { + return collection + ? collection[baseRandom(0, collection.length - 1)] + : undefined; + } + + var result = shuffle(collection); + result.length = nativeMin(nativeMax(0, n), result.length); + return result; + } + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates + * shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns a new shuffled collection. + * @example + * + * _.shuffle([1, 2, 3, 4, 5, 6]); + * // => [4, 1, 6, 3, 5, 2] + */ + + function shuffle(collection) { + var index = -1, + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + forEach(collection, function(value) { + var rand = baseRandom(0, ++index); + result[index] = result[rand]; + result[rand] = value; + }); + return result; + } + /** + * Gets the size of the `collection` by returning `collection.length` for arrays + * and array-like objects or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns `collection.length` or number of own enumerable properties. + * @example + * + * _.size([1, 2]); + * // => 2 + * + * _.size({ 'one': 1, 'two': 2, 'three': 3 }); + * // => 3 + * + * _.size('pebbles'); + * // => 7 + */ + + function size(collection) { + var length = collection ? collection.length : 0; + return typeof length == 'number' ? length : keys(collection).length; + } + /** + * Checks if the callback returns a truey value for **any** element of a + * collection. The function returns as soon as it finds a passing value and + * does not iterate over the entire collection. The callback is bound to + * `thisArg` and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {boolean} Returns `true` if any element passed the callback check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true } + * ]; + * + * // using "_.pluck" callback shorthand + * _.some(characters, 'blocked'); + * // => true + * + * // using "_.where" callback shorthand + * _.some(characters, { 'age': 1 }); + * // => false + */ + + function some(collection, callback, thisArg) { + var result; + callback = lodash.createCallback(callback, thisArg, 3); + var index = -1, + length = collection ? collection.length : 0; + + if (typeof length == 'number') { + while (++index < length) { + if ((result = callback(collection[index], index, collection))) { + break; + } + } + } else { + forOwn(collection, function(value, index, collection) { + return !(result = callback(value, index, collection)); + }); + } + + return !!result; + } + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through the callback. This method + * performs a stable sort, that is, it will preserve the original sort order + * of equal elements. The callback is bound to `thisArg` and invoked with + * three arguments; (value, index|key, collection). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an array of property names is provided for `callback` the collection + * will be sorted by each property value. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of sorted elements. + * @example + * + * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); + * // => [3, 1, 2] + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 26 }, + * { 'name': 'fred', 'age': 30 } + * ]; + * + * // using "_.pluck" callback shorthand + * _.map(_.sortBy(characters, 'age'), _.values); + * // => [['barney', 26], ['fred', 30], ['barney', 36], ['fred', 40]] + * + * // sorting by multiple properties + * _.map(_.sortBy(characters, ['name', 'age']), _.values); + * // = > [['barney', 26], ['barney', 36], ['fred', 30], ['fred', 40]] + */ + + function sortBy(collection, callback, thisArg) { + var index = -1, + isArr = isArray(callback), + length = collection ? collection.length : 0, + result = Array(typeof length == 'number' ? length : 0); + + if (!isArr) { + callback = lodash.createCallback(callback, thisArg, 3); + } + + forEach(collection, function(value, key, collection) { + var object = (result[++index] = getObject()); + + if (isArr) { + object.criteria = map(callback, function(key) { + return value[key]; + }); + } else { + (object.criteria = getArray())[0] = callback( + value, + key, + collection + ); + } + + object.index = index; + object.value = value; + }); + length = result.length; + result.sort(compareAscending); + + while (length--) { + var object = result[length]; + result[length] = object.value; + + if (!isArr) { + releaseArray(object.criteria); + } + + releaseObject(object); + } + + return result; + } + /** + * Converts the `collection` to an array. + * + * @static + * @memberOf _ + * @category Collections + * @param {Array|Object|string} collection The collection to convert. + * @returns {Array} Returns the new converted array. + * @example + * + * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); + * // => [2, 3, 4] + */ + + function toArray(collection) { + if (collection && typeof collection.length == 'number') { + return slice(collection); + } + + return values(collection); + } + /** + * Performs a deep comparison of each element in a `collection` to the given + * `properties` object, returning an array of all elements that have equivalent + * property values. + * + * @static + * @memberOf _ + * @type Function + * @category Collections + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Object} props The object of property values to filter by. + * @returns {Array} Returns a new array of elements that have the given properties. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.where(characters, { 'age': 36 }); + * // => [{ 'name': 'barney', 'age': 36, 'pets': ['hoppy'] }] + * + * _.where(characters, { 'pets': ['dino'] }); + * // => [{ 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] }] + */ + + var where = filter; + /*--------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are all falsey. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to compact. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + + function compact(array) { + var index = -1, + length = array ? array.length : 0, + result = []; + + while (++index < length) { + var value = array[index]; + + if (value) { + result.push(value); + } + } + + return result; + } + /** + * Creates an array excluding all values of the provided arrays using strict + * equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to process. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); + * // => [1, 3, 4] + */ + + function difference(array) { + return baseDifference(array, baseFlatten(arguments, true, true, 1)); + } + /** + * This method is like `_.find` except that it returns the index of the first + * element that passes the callback check, instead of the element itself. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': false }, + * { 'name': 'fred', 'age': 40, 'blocked': true }, + * { 'name': 'pebbles', 'age': 1, 'blocked': false } + * ]; + * + * _.findIndex(characters, function(chr) { + * return chr.age < 20; + * }); + * // => 2 + * + * // using "_.where" callback shorthand + * _.findIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findIndex(characters, 'blocked'); + * // => 1 + */ + + function findIndex(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + + while (++index < length) { + if (callback(array[index], index, array)) { + return index; + } + } + + return -1; + } + /** + * This method is like `_.findIndex` except that it iterates over elements + * of a `collection` from right to left. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36, 'blocked': true }, + * { 'name': 'fred', 'age': 40, 'blocked': false }, + * { 'name': 'pebbles', 'age': 1, 'blocked': true } + * ]; + * + * _.findLastIndex(characters, function(chr) { + * return chr.age > 30; + * }); + * // => 1 + * + * // using "_.where" callback shorthand + * _.findLastIndex(characters, { 'age': 36 }); + * // => 0 + * + * // using "_.pluck" callback shorthand + * _.findLastIndex(characters, 'blocked'); + * // => 2 + */ + + function findLastIndex(array, callback, thisArg) { + var length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + + while (length--) { + if (callback(array[length], length, array)) { + return length; + } + } + + return -1; + } + /** + * Gets the first element or first `n` elements of an array. If a callback + * is provided elements at the beginning of the array are returned as long + * as the callback returns truey. The callback is bound to `thisArg` and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias head, take + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the first element(s) of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([1, 2, 3], 2); + * // => [1, 2] + * + * _.first([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [1, 2] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.first(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': true, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.first(characters, { 'employer': 'slate' }), 'name'); + * // => ['barney', 'fred'] + */ + + function first(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = -1; + callback = lodash.createCallback(callback, thisArg, 3); + + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + + if (n == null || thisArg) { + return array ? array[0] : undefined; + } + } + + return slice(array, 0, nativeMin(nativeMax(0, n), length)); + } + /** + * Flattens a nested array (the nesting can be to any depth). If `isShallow` + * is truey, the array will only be flattened a single level. If a callback + * is provided each element of the array is passed through the callback before + * flattening. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to flatten. + * @param {boolean} [isShallow=false] A flag to restrict flattening to a single level. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new flattened array. + * @example + * + * _.flatten([1, [2], [3, [[4]]]]); + * // => [1, 2, 3, 4]; + * + * _.flatten([1, [2], [3, [[4]]]], true); + * // => [1, 2, 3, [[4]]]; + * + * var characters = [ + * { 'name': 'barney', 'age': 30, 'pets': ['hoppy'] }, + * { 'name': 'fred', 'age': 40, 'pets': ['baby puss', 'dino'] } + * ]; + * + * // using "_.pluck" callback shorthand + * _.flatten(characters, 'pets'); + * // => ['hoppy', 'baby puss', 'dino'] + */ + + function flatten(array, isShallow, callback, thisArg) { + // juggle arguments + if (typeof isShallow != 'boolean' && isShallow != null) { + thisArg = callback; + callback = + typeof isShallow != 'function' && + thisArg && + thisArg[isShallow] === array + ? null + : isShallow; + isShallow = false; + } + + if (callback != null) { + array = map(array, callback, thisArg); + } + + return baseFlatten(array, isShallow); + } + /** + * Gets the index at which the first occurrence of `value` is found using + * strict equality for comparisons, i.e. `===`. If the array is already sorted + * providing `true` for `fromIndex` will run a faster binary search. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2); + * // => 1 + * + * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 4 + * + * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); + * // => 2 + */ + + function indexOf(array, value, fromIndex) { + if (typeof fromIndex == 'number') { + var length = array ? array.length : 0; + fromIndex = + fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0; + } else if (fromIndex) { + var index = sortedIndex(array, value); + return array[index] === value ? index : -1; + } + + return baseIndexOf(array, value, fromIndex); + } + /** + * Gets all but the last element or last `n` elements of an array. If a + * callback is provided elements at the end of the array are excluded from + * the result as long as the callback returns truey. The callback is bound + * to `thisArg` and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + * + * _.initial([1, 2, 3], 2); + * // => [1] + * + * _.initial([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [1] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.initial(characters, 'blocked'); + * // => [{ 'name': 'barney', 'blocked': false, 'employer': 'slate' }] + * + * // using "_.where" callback shorthand + * _.pluck(_.initial(characters, { 'employer': 'na' }), 'name'); + * // => ['barney', 'fred'] + */ + + function initial(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback == null || thisArg ? 1 : callback || n; + } + + return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); + } + /** + * Creates an array of unique values present in all provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of shared values. + * @example + * + * _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2] + */ + + function intersection() { + var args = [], + argsIndex = -1, + argsLength = arguments.length, + caches = getArray(), + indexOf = getIndexOf(), + trustIndexOf = indexOf === baseIndexOf, + seen = getArray(); + + while (++argsIndex < argsLength) { + var value = arguments[argsIndex]; + + if (isArray(value) || isArguments(value)) { + args.push(value); + caches.push( + trustIndexOf && + value.length >= largeArraySize && + createCache(argsIndex ? args[argsIndex] : seen) + ); + } + } + + var array = args[0], + index = -1, + length = array ? array.length : 0, + result = []; + + outer: while (++index < length) { + var cache = caches[0]; + value = array[index]; + + if ( + (cache ? cacheIndexOf(cache, value) : indexOf(seen, value)) < 0 + ) { + argsIndex = argsLength; + (cache || seen).push(value); + + while (--argsIndex) { + cache = caches[argsIndex]; + + if ( + (cache + ? cacheIndexOf(cache, value) + : indexOf(args[argsIndex], value)) < 0 + ) { + continue outer; + } + } + + result.push(value); + } + } + + while (argsLength--) { + cache = caches[argsLength]; + + if (cache) { + releaseObject(cache); + } + } + + releaseArray(caches); + releaseArray(seen); + return result; + } + /** + * Gets the last element or last `n` elements of an array. If a callback is + * provided elements at the end of the array are returned as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback] The function called + * per element or the number of elements to return. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {*} Returns the last element(s) of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + * + * _.last([1, 2, 3], 2); + * // => [2, 3] + * + * _.last([1, 2, 3], function(num) { + * return num > 1; + * }); + * // => [2, 3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.last(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.last(characters, { 'employer': 'na' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + + function last(array, callback, thisArg) { + var n = 0, + length = array ? array.length : 0; + + if (typeof callback != 'number' && callback != null) { + var index = length; + callback = lodash.createCallback(callback, thisArg, 3); + + while (index-- && callback(array[index], index, array)) { + n++; + } + } else { + n = callback; + + if (n == null || thisArg) { + return array ? array[length - 1] : undefined; + } + } + + return slice(array, nativeMax(0, length - n)); + } + /** + * Gets the index at which the last occurrence of `value` is found using strict + * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used + * as the offset from the end of the collection. + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value or `-1`. + * @example + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); + * // => 4 + * + * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); + * // => 1 + */ + + function lastIndexOf(array, value, fromIndex) { + var index = array ? array.length : 0; + + if (typeof fromIndex == 'number') { + index = + (fromIndex < 0 + ? nativeMax(0, index + fromIndex) + : nativeMin(fromIndex, index - 1)) + 1; + } + + while (index--) { + if (array[index] === value) { + return index; + } + } + + return -1; + } + /** + * Removes all provided values from the given array using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {...*} [value] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + + function pull(array) { + var args = arguments, + argsIndex = 0, + argsLength = args.length, + length = array ? array.length : 0; + + while (++argsIndex < argsLength) { + var index = -1, + value = args[argsIndex]; + + while (++index < length) { + if (array[index] === value) { + splice.call(array, index--, 1); + length--; + } + } + } + + return array; + } + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to but not including `end`. If `start` is less than `stop` a + * zero-length range is created unless a negative `step` is specified. + * + * @static + * @memberOf _ + * @category Arrays + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns a new range array. + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + + function range(start, end, step) { + start = +start || 0; + step = typeof step == 'number' ? step : +step || 1; + + if (end == null) { + end = start; + start = 0; + } // use `Array(length)` so engines like Chakra and V8 avoid slower modes + // http://youtu.be/XAqIpGU8ZZk#t=17m25s + + var index = -1, + length = nativeMax(0, ceil((end - start) / (step || 1))), + result = Array(length); + + while (++index < length) { + result[index] = start; + start += step; + } + + return result; + } + /** + * Removes all elements from an array that the callback returns truey for + * and returns an array of removed elements. The callback is bound to `thisArg` + * and invoked with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to modify. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4, 5, 6]; + * var evens = _.remove(array, function(num) { return num % 2 == 0; }); + * + * console.log(array); + * // => [1, 3, 5] + * + * console.log(evens); + * // => [2, 4, 6] + */ + + function remove(array, callback, thisArg) { + var index = -1, + length = array ? array.length : 0, + result = []; + callback = lodash.createCallback(callback, thisArg, 3); + + while (++index < length) { + var value = array[index]; + + if (callback(value, index, array)) { + result.push(value); + splice.call(array, index--, 1); + length--; + } + } + + return result; + } + /** + * The opposite of `_.initial` this method gets all but the first element or + * first `n` elements of an array. If a callback function is provided elements + * at the beginning of the array are excluded from the result as long as the + * callback returns truey. The callback is bound to `thisArg` and invoked + * with three arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias drop, tail + * @category Arrays + * @param {Array} array The array to query. + * @param {Function|Object|number|string} [callback=1] The function called + * per element or the number of elements to exclude. If a property name or + * object is provided it will be used to create a "_.pluck" or "_.where" + * style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + * + * _.rest([1, 2, 3], 2); + * // => [3] + * + * _.rest([1, 2, 3], function(num) { + * return num < 3; + * }); + * // => [3] + * + * var characters = [ + * { 'name': 'barney', 'blocked': true, 'employer': 'slate' }, + * { 'name': 'fred', 'blocked': false, 'employer': 'slate' }, + * { 'name': 'pebbles', 'blocked': true, 'employer': 'na' } + * ]; + * + * // using "_.pluck" callback shorthand + * _.pluck(_.rest(characters, 'blocked'), 'name'); + * // => ['fred', 'pebbles'] + * + * // using "_.where" callback shorthand + * _.rest(characters, { 'employer': 'slate' }); + * // => [{ 'name': 'pebbles', 'blocked': true, 'employer': 'na' }] + */ + + function rest(array, callback, thisArg) { + if (typeof callback != 'number' && callback != null) { + var n = 0, + index = -1, + length = array ? array.length : 0; + callback = lodash.createCallback(callback, thisArg, 3); + + while (++index < length && callback(array[index], index, array)) { + n++; + } + } else { + n = callback == null || thisArg ? 1 : nativeMax(0, callback); + } + + return slice(array, n); + } + /** + * Uses a binary search to determine the smallest index at which a value + * should be inserted into a given sorted array in order to maintain the sort + * order of the array. If a callback is provided it will be executed for + * `value` and each element of `array` to compute their sort ranking. The + * callback is bound to `thisArg` and invoked with one argument; (value). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([20, 30, 50], 40); + * // => 2 + * + * // using "_.pluck" callback shorthand + * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 2 + * + * var dict = { + * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } + * }; + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return dict.wordToNumber[word]; + * }); + * // => 2 + * + * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { + * return this.wordToNumber[word]; + * }, dict); + * // => 2 + */ + + function sortedIndex(array, value, callback, thisArg) { + var low = 0, + high = array ? array.length : low; // explicitly reference `identity` for better inlining in Firefox + + callback = callback + ? lodash.createCallback(callback, thisArg, 1) + : identity; + value = callback(value); + + while (low < high) { + var mid = (low + high) >>> 1; + callback(array[mid]) < value ? (low = mid + 1) : (high = mid); + } + + return low; + } + /** + * Creates an array of unique values, in order, of the provided arrays using + * strict equality for comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of combined values. + * @example + * + * _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]); + * // => [1, 2, 3, 5, 4] + */ + + function union() { + return baseUniq(baseFlatten(arguments, true, true)); + } + /** + * Creates a duplicate-value-free version of an array using strict equality + * for comparisons, i.e. `===`. If the array is sorted, providing + * `true` for `isSorted` will use a faster algorithm. If a callback is provided + * each element of `array` is passed through the callback before uniqueness + * is computed. The callback is bound to `thisArg` and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for `callback` the created "_.pluck" style + * callback will return the property value of the given element. + * + * If an object is provided for `callback` the created "_.where" style callback + * will return `true` for elements that have the properties of the given object, + * else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Arrays + * @param {Array} array The array to process. + * @param {boolean} [isSorted=false] A flag to indicate that `array` is sorted. + * @param {Function|Object|string} [callback=identity] The function called + * per iteration. If a property name or object is provided it will be used + * to create a "_.pluck" or "_.where" style callback, respectively. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns a duplicate-value-free array. + * @example + * + * _.uniq([1, 2, 1, 3, 1]); + * // => [1, 2, 3] + * + * _.uniq([1, 1, 2, 2, 3], true); + * // => [1, 2, 3] + * + * _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); }); + * // => ['A', 'b', 'C'] + * + * _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math); + * // => [1, 2.5, 3] + * + * // using "_.pluck" callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + + function uniq(array, isSorted, callback, thisArg) { + // juggle arguments + if (typeof isSorted != 'boolean' && isSorted != null) { + thisArg = callback; + callback = + typeof isSorted != 'function' && + thisArg && + thisArg[isSorted] === array + ? null + : isSorted; + isSorted = false; + } + + if (callback != null) { + callback = lodash.createCallback(callback, thisArg, 3); + } + + return baseUniq(array, isSorted, callback); + } + /** + * Creates an array excluding all provided values using strict equality for + * comparisons, i.e. `===`. + * + * @static + * @memberOf _ + * @category Arrays + * @param {Array} array The array to filter. + * @param {...*} [value] The values to exclude. + * @returns {Array} Returns a new array of filtered values. + * @example + * + * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); + * // => [2, 3, 4] + */ + + function without(array) { + return baseDifference(array, slice(arguments, 1)); + } + /** + * Creates an array that is the symmetric difference of the provided arrays. + * See http://en.wikipedia.org/wiki/Symmetric_difference. + * + * @static + * @memberOf _ + * @category Arrays + * @param {...Array} [array] The arrays to inspect. + * @returns {Array} Returns an array of values. + * @example + * + * _.xor([1, 2, 3], [5, 2, 1, 4]); + * // => [3, 5, 4] + * + * _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]); + * // => [1, 4, 5] + */ + + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + + if (isArray(array) || isArguments(array)) { + var result = result + ? baseUniq( + baseDifference(result, array).concat( + baseDifference(array, result) + ) + ) + : array; + } + } + + return result || []; + } + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second + * elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @alias unzip + * @category Arrays + * @param {...Array} [array] Arrays to process. + * @returns {Array} Returns a new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + + function zip() { + var array = arguments.length > 1 ? arguments : arguments[0], + index = -1, + length = array ? max(pluck(array, 'length')) : 0, + result = Array(length < 0 ? 0 : length); + + while (++index < length) { + result[index] = pluck(array, index); + } + + return result; + } + /** + * Creates an object composed from arrays of `keys` and `values`. Provide + * either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]` + * or two arrays, one of `keys` and one of corresponding `values`. + * + * @static + * @memberOf _ + * @alias object + * @category Arrays + * @param {Array} keys The array of keys. + * @param {Array} [values=[]] The array of values. + * @returns {Object} Returns an object composed of the given keys and + * corresponding values. + * @example + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + + function zipObject(keys, values) { + var index = -1, + length = keys ? keys.length : 0, + result = {}; + + if (!values && length && !isArray(keys[0])) { + values = []; + } + + while (++index < length) { + var key = keys[index]; + + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + + return result; + } + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that executes `func`, with the `this` binding and + * arguments of the created function, only after being called `n` times. + * + * @static + * @memberOf _ + * @category Functions + * @param {number} n The number of times the function must be called before + * `func` is executed. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('Done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'Done saving!', after all saves have completed + */ + + function after(n, func) { + if (!isFunction(func)) { + throw new TypeError(); + } + + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + /** + * Creates a function that, when called, invokes `func` with the `this` + * binding of `thisArg` and prepends any additional `bind` arguments to those + * provided to the bound function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var func = function(greeting) { + * return greeting + ' ' + this.name; + * }; + * + * func = _.bind(func, { 'name': 'fred' }, 'hi'); + * func(); + * // => 'hi fred' + */ + + function bind(func, thisArg) { + return arguments.length > 2 + ? createWrapper(func, 17, slice(arguments, 2), null, thisArg) + : createWrapper(func, 1, null, null, thisArg); + } + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all the function properties + * of `object` will be bound. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...string} [methodName] The object method names to + * bind, specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { console.log('clicked ' + this.label); } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs', when the button is clicked + */ + + function bindAll(object) { + var funcs = + arguments.length > 1 + ? baseFlatten(arguments, true, false, 1) + : functions(object), + index = -1, + length = funcs.length; + + while (++index < length) { + var key = funcs[index]; + object[key] = createWrapper(object[key], 1, null, null, object); + } + + return object; + } + /** + * Creates a function that, when called, invokes the method at `object[key]` + * and prepends any additional `bindKey` arguments to those provided to the bound + * function. This method differs from `_.bind` by allowing bound functions to + * reference methods that will be redefined or don't yet exist. + * See http://michaux.ca/articles/lazy-function-definition-pattern. + * + * @static + * @memberOf _ + * @category Functions + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'name': 'fred', + * 'greet': function(greeting) { + * return greeting + ' ' + this.name; + * } + * }; + * + * var func = _.bindKey(object, 'greet', 'hi'); + * func(); + * // => 'hi fred' + * + * object.greet = function(greeting) { + * return greeting + 'ya ' + this.name + '!'; + * }; + * + * func(); + * // => 'hiya fred!' + */ + + function bindKey(object, key) { + return arguments.length > 2 + ? createWrapper(key, 19, slice(arguments, 2), null, object) + : createWrapper(key, 3, null, null, object); + } + /** + * Creates a function that is the composition of the provided functions, + * where each function consumes the return value of the function that follows. + * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. + * Each function is executed with the `this` binding of the composed function. + * + * @static + * @memberOf _ + * @category Functions + * @param {...Function} [func] Functions to compose. + * @returns {Function} Returns the new composed function. + * @example + * + * var realNameMap = { + * 'pebbles': 'penelope' + * }; + * + * var format = function(name) { + * name = realNameMap[name.toLowerCase()] || name; + * return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); + * }; + * + * var greet = function(formatted) { + * return 'Hiya ' + formatted + '!'; + * }; + * + * var welcome = _.compose(greet, format); + * welcome('pebbles'); + * // => 'Hiya Penelope!' + */ + + function compose() { + var funcs = arguments, + length = funcs.length; + + while (length--) { + if (!isFunction(funcs[length])) { + throw new TypeError(); + } + } + + return function() { + var args = arguments, + length = funcs.length; + + while (length--) { + args = [funcs[length].apply(this, args)]; + } + + return args[0]; + }; + } + /** + * Creates a function which accepts one or more arguments of `func` that when + * invoked either executes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` can be specified + * if `func.length` is not sufficient. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @returns {Function} Returns the new curried function. + * @example + * + * var curried = _.curry(function(a, b, c) { + * console.log(a + b + c); + * }); + * + * curried(1)(2)(3); + * // => 6 + * + * curried(1, 2)(3); + * // => 6 + * + * curried(1, 2, 3); + * // => 6 + */ + + function curry(func, arity) { + arity = typeof arity == 'number' ? arity : +arity || func.length; + return createWrapper(func, 4, null, null, null, arity); + } + /** + * Creates a function that will delay the execution of `func` until after + * `wait` milliseconds have elapsed since the last time it was invoked. + * Provide an options object to indicate that `func` should be invoked on + * the leading and/or trailing edge of the `wait` timeout. Subsequent calls + * to the debounced function will return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to debounce. + * @param {number} wait The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * var lazyLayout = _.debounce(calculateLayout, 150); + * jQuery(window).on('resize', lazyLayout); + * + * // execute `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * }); + * + * // ensure `batchLog` is executed once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * source.addEventListener('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * }, false); + */ + + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError(); + } + + wait = nativeMax(0, wait) || 0; + + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = options.leading; + maxWait = + 'maxWait' in options && (nativeMax(wait, options.maxWait) || 0); + trailing = 'trailing' in options ? options.trailing : trailing; + } + + var delayed = function() { + var remaining = wait - (now() - stamp); + + if (remaining <= 0) { + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + + var isCalled = trailingCall; + maxTimeoutId = timeoutId = trailingCall = undefined; + + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + } else { + timeoutId = setTimeout(delayed, remaining); + } + }; + + var maxDelayed = function() { + if (timeoutId) { + clearTimeout(timeoutId); + } + + maxTimeoutId = timeoutId = trailingCall = undefined; + + if (trailing || maxWait !== wait) { + lastCalled = now(); + result = func.apply(thisArg, args); + + if (!timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + } + }; + + return function() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + + lastCalled = stamp; + result = func.apply(thisArg, args); + } else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = null; + } + + return result; + }; + } + /** + * Defers executing the `func` function until the current call stack has cleared. + * Additional arguments will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to defer. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { console.log(text); }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + + function defer(func) { + if (!isFunction(func)) { + throw new TypeError(); + } + + var args = slice(arguments, 1); + return setTimeout(function() { + func.apply(undefined, args); + }, 1); + } + /** + * Executes the `func` function after `wait` milliseconds. Additional arguments + * will be provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay execution. + * @param {...*} [arg] Arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { console.log(text); }, 1000, 'later'); + * // => logs 'later' after one second + */ + + function delay(func, wait) { + if (!isFunction(func)) { + throw new TypeError(); + } + + var args = slice(arguments, 2); + return setTimeout(function() { + func.apply(undefined, args); + }, wait); + } + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it will be used to determine the cache key for storing the result + * based on the arguments provided to the memoized function. By default, the + * first argument provided to the memoized function is used as the cache key. + * The `func` is executed with the `this` binding of the memoized function. + * The result cache is exposed as the `cache` property on the memoized function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] A function used to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var fibonacci = _.memoize(function(n) { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * + * fibonacci(9) + * // => 34 + * + * var data = { + * 'fred': { 'name': 'fred', 'age': 40 }, + * 'pebbles': { 'name': 'pebbles', 'age': 1 } + * }; + * + * // modifying the result cache + * var get = _.memoize(function(name) { return data[name]; }, _.identity); + * get('pebbles'); + * // => { 'name': 'pebbles', 'age': 1 } + * + * get.cache.pebbles.name = 'penelope'; + * get('pebbles'); + * // => { 'name': 'penelope', 'age': 1 } + */ + + function memoize(func, resolver) { + if (!isFunction(func)) { + throw new TypeError(); + } + + var memoized = function() { + var cache = memoized.cache, + key = resolver + ? resolver.apply(this, arguments) + : keyPrefix + arguments[0]; + return hasOwnProperty.call(cache, key) + ? cache[key] + : (cache[key] = func.apply(this, arguments)); + }; + + memoized.cache = {}; + return memoized; + } + /** + * Creates a function that is restricted to execute `func` once. Repeat calls to + * the function will return the value of the first call. The `func` is executed + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` executes `createApplication` once + */ + + function once(func) { + var ran, result; + + if (!isFunction(func)) { + throw new TypeError(); + } + + return function() { + if (ran) { + return result; + } + + ran = true; + result = func.apply(this, arguments); // clear the `func` variable so the function may be garbage collected + + func = null; + return result; + }; + } + /** + * Creates a function that, when called, invokes `func` with any additional + * `partial` arguments prepended to those provided to the new function. This + * method is similar to `_.bind` except it does **not** alter the `this` binding. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { return greeting + ' ' + name; }; + * var hi = _.partial(greet, 'hi'); + * hi('fred'); + * // => 'hi fred' + */ + + function partial(func) { + return createWrapper(func, 16, slice(arguments, 1)); + } + /** + * This method is like `_.partial` except that `partial` arguments are + * appended to those provided to the new function. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [arg] Arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var defaultsDeep = _.partialRight(_.merge, _.defaults); + * + * var options = { + * 'variable': 'data', + * 'imports': { 'jq': $ } + * }; + * + * defaultsDeep(options, _.templateSettings); + * + * options.variable + * // => 'data' + * + * options.imports + * // => { '_': _, 'jq': $ } + */ + + function partialRight(func) { + return createWrapper(func, 32, null, slice(arguments, 1)); + } + /** + * Creates a function that, when executed, will only call the `func` function + * at most once per every `wait` milliseconds. Provide an options object to + * indicate that `func` should be invoked on the leading and/or trailing edge + * of the `wait` timeout. Subsequent calls to the throttled function will + * return the result of the last `func` call. + * + * Note: If `leading` and `trailing` options are `true` `func` will be called + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * @static + * @memberOf _ + * @category Functions + * @param {Function} func The function to throttle. + * @param {number} wait The number of milliseconds to throttle executions to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * var throttled = _.throttle(updatePosition, 100); + * jQuery(window).on('scroll', throttled); + * + * // execute `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + */ + + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (!isFunction(func)) { + throw new TypeError(); + } + + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? options.leading : leading; + trailing = 'trailing' in options ? options.trailing : trailing; + } + + debounceOptions.leading = leading; + debounceOptions.maxWait = wait; + debounceOptions.trailing = trailing; + return debounce(func, wait, debounceOptions); + } + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Additional arguments provided to the function are appended + * to those provided to the wrapper function. The wrapper is executed with + * the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Functions + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('Fred, Wilma, & Pebbles'); + * // => '<p>Fred, Wilma, & Pebbles</p>' + */ + + function wrap(value, wrapper) { + return createWrapper(wrapper, 16, [value]); + } + /*--------------------------------------------------------------------------*/ + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new function. + * @example + * + * var object = { 'name': 'fred' }; + * var getter = _.constant(object); + * getter() === object; + * // => true + */ + + function constant(value) { + return function() { + return value; + }; + } + /** + * Produces a callback bound to an optional `thisArg`. If `func` is a property + * name the created callback will return the property value for a given element. + * If `func` is an object the created callback will return `true` for elements + * that contain the equivalent object properties, otherwise it will return `false`. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} [func=identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of the created callback. + * @param {number} [argCount] The number of arguments the callback accepts. + * @returns {Function} Returns a callback function. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // wrap to create custom callback shorthands + * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { + * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); + * return !match ? func(callback, thisArg) : function(object) { + * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; + * }; + * }); + * + * _.filter(characters, 'age__gt38'); + * // => [{ 'name': 'fred', 'age': 40 }] + */ + + function createCallback(func, thisArg, argCount) { + var type = typeof func; + + if (func == null || type == 'function') { + return baseCreateCallback(func, thisArg, argCount); + } // handle "_.pluck" style callback shorthands + + if (type != 'object') { + return property(func); + } + + var props = keys(func), + key = props[0], + a = func[key]; // handle "_.where" style callback shorthands + + if (props.length == 1 && a === a && !isObject(a)) { + // fast path the common case of providing an object with a single + // property containing a primitive value + return function(object) { + var b = object[key]; + return a === b && (a !== 0 || 1 / a == 1 / b); + }; + } + + return function(object) { + var length = props.length, + result = false; + + while (length--) { + if ( + !(result = baseIsEqual( + object[props[length]], + func[props[length]], + null, + true + )) + ) { + break; + } + } + + return result; + }; + } + /** + * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their + * corresponding HTML entities. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} string The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('Fred, Wilma, & Pebbles'); + * // => 'Fred, Wilma, & Pebbles' + */ + + function escape(string) { + return string == null + ? '' + : String(string).replace(reUnescapedHtml, escapeHtmlChar); + } + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'name': 'fred' }; + * _.identity(object) === object; + * // => true + */ + + function identity(value) { + return value; + } + /** + * Adds function properties of a source object to the destination object. + * If `object` is a function methods will be added to its prototype as well. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Function|Object} [object=lodash] object The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options] The options object. + * @param {boolean} [options.chain=true] Specify whether the functions added are chainable. + * @example + * + * function capitalize(string) { + * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); + * } + * + * _.mixin({ 'capitalize': capitalize }); + * _.capitalize('fred'); + * // => 'Fred' + * + * _('fred').capitalize().value(); + * // => 'Fred' + * + * _.mixin({ 'capitalize': capitalize }, { 'chain': false }); + * _('fred').capitalize(); + * // => 'Fred' + */ + + function mixin(object, source, options) { + var chain = true, + methodNames = source && functions(source); + + if (!source || (!options && !methodNames.length)) { + if (options == null) { + options = source; + } + + ctor = lodashWrapper; + source = object; + object = lodash; + methodNames = functions(source); + } + + if (options === false) { + chain = false; + } else if (isObject(options) && 'chain' in options) { + chain = options.chain; + } + + var ctor = object, + isFunc = isFunction(ctor); + forEach(methodNames, function(methodName) { + var func = (object[methodName] = source[methodName]); + + if (isFunc) { + ctor.prototype[methodName] = function() { + var chainAll = this.__chain__, + value = this.__wrapped__, + args = [value]; + push.apply(args, arguments); + var result = func.apply(object, args); + + if (chain || chainAll) { + if (value === result && isObject(result)) { + return this; + } + + result = new ctor(result); + result.__chain__ = chainAll; + } + + return result; + }; + } + }); + } + /** + * Reverts the '_' variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @memberOf _ + * @category Utilities + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + + function noConflict() { + context._ = oldDash; + return this; + } + /** + * A no-operation function. + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var object = { 'name': 'fred' }; + * _.noop(object) === undefined; + * // => true + */ + + function noop() {} // no operation performed + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Utilities + * @example + * + * var stamp = _.now(); + * _.defer(function() { console.log(_.now() - stamp); }); + * // => logs the number of milliseconds it took for the deferred function to be called + */ + + var now = + (isNative((now = Date.now)) && now) || + function() { + return new Date().getTime(); + }; + /** + * Converts the given value into an integer of the specified radix. + * If `radix` is `undefined` or `0` a `radix` of `10` is used unless the + * `value` is a hexadecimal, in which case a `radix` of `16` is used. + * + * Note: This method avoids differences in native ES3 and ES5 `parseInt` + * implementations. See http://es5.github.io/#E. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} value The value to parse. + * @param {number} [radix] The radix used to interpret the value to parse. + * @returns {number} Returns the new integer value. + * @example + * + * _.parseInt('08'); + * // => 8 + */ + + var parseInt = + nativeParseInt(whitespace + '08') == 8 + ? nativeParseInt + : function(value, radix) { + // Firefox < 21 and Opera < 15 follow the ES3 specified implementation of `parseInt` + return nativeParseInt( + isString(value) + ? value.replace(reLeadingSpacesAndZeros, '') + : value, + radix || 0 + ); + }; + /** + * Creates a "_.pluck" style function, which returns the `key` value of a + * given object. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} key The name of the property to retrieve. + * @returns {Function} Returns the new function. + * @example + * + * var characters = [ + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'barney', 'age': 36 } + * ]; + * + * var getName = _.property('name'); + * + * _.map(characters, getName); + * // => ['barney', 'fred'] + * + * _.sortBy(characters, getName); + * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }] + */ + + function property(key) { + return function(object) { + return object[key]; + }; + } + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number will be + * returned. If `floating` is truey or either `min` or `max` are floats a + * floating-point number will be returned instead of an integer. + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating=false] Specify returning a floating-point number. + * @returns {number} Returns a random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + + function random(min, max, floating) { + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (typeof min == 'boolean' && noMax) { + floating = min; + min = 1; + } else if (!noMax && typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + + if (noMin && noMax) { + max = 1; + } + + min = +min || 0; + + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin( + min + + rand * + (max - min + parseFloat('1e-' + ((rand + '').length - 1))), + max + ); + } + + return baseRandom(min, max); + } + /** + * Resolves the value of property `key` on `object`. If `key` is a function + * it will be invoked with the `this` binding of `object` and its result returned, + * else the property value is returned. If `object` is falsey then `undefined` + * is returned. + * + * @static + * @memberOf _ + * @category Utilities + * @param {Object} object The object to inspect. + * @param {string} key The name of the property to resolve. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { + * 'cheese': 'crumpets', + * 'stuff': function() { + * return 'nonsense'; + * } + * }; + * + * _.result(object, 'cheese'); + * // => 'crumpets' + * + * _.result(object, 'stuff'); + * // => 'nonsense' + */ + + function result(object, key) { + if (object) { + var value = object[key]; + return isFunction(value) ? object[key]() : value; + } + } + /** + * A micro-templating method that handles arbitrary delimiters, preserves + * whitespace, and correctly escapes quotes within interpolated code. + * + * Note: In the development build, `_.template` utilizes sourceURLs for easier + * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl + * + * For more information on precompiling templates see: + * https://lodash.com/custom-builds + * + * For more information on Chrome extension sandboxes see: + * http://developer.chrome.com/stable/extensions/sandboxingEval.html + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} text The template text. + * @param {Object} data The data object used to populate the text. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as local variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [sourceURL] The sourceURL of the template's compiled source. + * @param {string} [variable] The data object variable name. + * @returns {Function|string} Returns a compiled function when no `data` object + * is given, else it returns the interpolated text. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= name %>'); + * compiled({ 'name': 'fred' }); + * // => 'hello fred' + * + * // using the "escape" delimiter to escape HTML in data property values + * _.template('<b><%- value %></b>', { 'value': '<script>' }); + * // => '<b><script></b>' + * + * // using the "evaluate" delimiter to generate HTML + * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>'; + * _.template(list, { 'people': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter + * _.template('hello ${ name }', { 'name': 'pebbles' }); + * // => 'hello pebbles' + * + * // using the internal `print` function in "evaluate" delimiters + * _.template('<% print("hello " + name); %>!', { 'name': 'barney' }); + * // => 'hello barney!' + * + * // using a custom template delimiters + * _.templateSettings = { + * 'interpolate': /{{([\s\S]+?)}}/g + * }; + * + * _.template('hello {{ name }}!', { 'name': 'mustache' }); + * // => 'hello mustache!' + * + * // using the `imports` option to import jQuery + * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>'; + * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } }); + * // => '<li>fred</li><li>barney</li>' + * + * // using the `sourceURL` option to specify a custom sourceURL for the template + * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector + * + * // using the `variable` option to ensure a with-statement isn't used in the compiled template + * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * var __t, __p = '', __e = _.escape; + * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!'; + * return __p; + * } + * + * // using the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and a stack trace + * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + + function template(text, data, options) { + // based on John Resig's `tmpl` implementation + // http://ejohn.org/blog/javascript-micro-templating/ + // and Laura Doktorova's doT.js + // https://github.com/olado/doT + var settings = lodash.templateSettings; + text = String(text || ''); // avoid missing dependencies when `iteratorTemplate` is not defined + + options = defaults({}, options, settings); + var imports = defaults({}, options.imports, settings.imports), + importsKeys = keys(imports), + importsValues = values(imports); + var isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; // compile the regexp to match each delimiter + + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + + '|' + + interpolate.source + + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch) + .source + + '|' + + (options.evaluate || reNoMatch).source + + '|$', + 'g' + ); + text.replace(reDelimiters, function( + match, + escapeValue, + interpolateValue, + esTemplateValue, + evaluateValue, + offset + ) { + interpolateValue || (interpolateValue = esTemplateValue); // escape characters that cannot be included in string literals + + source += text + .slice(index, offset) + .replace(reUnescapedString, escapeStringChar); // replace delimiters with snippets + + if (escapeValue) { + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + + if (interpolateValue) { + source += + "' +\n((__t = (" + + interpolateValue + + ")) == null ? '' : __t) +\n'"; + } + + index = offset + match.length; // the JS engine embedded in Adobe products requires returning the `match` + // string in order to produce the correct `offset` value + + return match; + }); + source += "';\n"; // if `variable` is not specified, wrap a with-statement around the generated + // code to add the data object to the top of the scope chain + + var variable = options.variable, + hasVariable = variable; + + if (!hasVariable) { + variable = 'obj'; + source = 'with (' + variable + ') {\n' + source + '\n}\n'; + } // cleanup code by stripping empty strings + + source = (isEvaluating + ? source.replace(reEmptyStringLeading, '') + : source + ) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); // frame code as the function body + + source = + 'function(' + + variable + + ') {\n' + + (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') + + "var __t, __p = '', __e = _.escape" + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n') + + source + + 'return __p\n}'; // Use a sourceURL for easier debugging. + // http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl + + var sourceURL = + '\n/*\n//# sourceURL=' + + (options.sourceURL || + '/lodash/template/source[' + templateCounter++ + ']') + + '\n*/'; + + try { + var result = Function( + importsKeys, + 'return ' + source + sourceURL + ).apply(undefined, importsValues); + } catch (e) { + e.source = source; + throw e; + } + + if (data) { + return result(data); + } // provide the compiled function's source by its `toString` method, in + // supported environments, or the `source` property as a convenience for + // inlining compiled templates during the build process + + result.source = source; + return result; + } + /** + * Executes the callback `n` times, returning an array of the results + * of each callback execution. The callback is bound to `thisArg` and invoked + * with one argument; (index). + * + * @static + * @memberOf _ + * @category Utilities + * @param {number} n The number of times to execute the callback. + * @param {Function} callback The function called per iteration. + * @param {*} [thisArg] The `this` binding of `callback`. + * @returns {Array} Returns an array of the results of each `callback` execution. + * @example + * + * var diceRolls = _.times(3, _.partial(_.random, 1, 6)); + * // => [3, 6, 4] + * + * _.times(3, function(n) { mage.castSpell(n); }); + * // => calls `mage.castSpell(n)` three times, passing `n` of `0`, `1`, and `2` respectively + * + * _.times(3, function(n) { this.cast(n); }, mage); + * // => also calls `mage.castSpell(n)` three times + */ + + function times(n, callback, thisArg) { + n = (n = +n) > -1 ? n : 0; + var index = -1, + result = Array(n); + callback = baseCreateCallback(callback, thisArg, 1); + + while (++index < n) { + result[index] = callback(index); + } + + return result; + } + /** + * The inverse of `_.escape` this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to their + * corresponding characters. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} string The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('Fred, Barney & Pebbles'); + * // => 'Fred, Barney & Pebbles' + */ + + function unescape(string) { + return string == null + ? '' + : String(string).replace(reEscapedHtml, unescapeHtmlChar); + } + /** + * Generates a unique ID. If `prefix` is provided the ID will be appended to it. + * + * @static + * @memberOf _ + * @category Utilities + * @param {string} [prefix] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + + function uniqueId(prefix) { + var id = ++idCounter; + return String(prefix == null ? '' : prefix) + id; + } + /*--------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object that wraps the given value with explicit + * method chaining enabled. + * + * @static + * @memberOf _ + * @category Chaining + * @param {*} value The value to wrap. + * @returns {Object} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 }, + * { 'name': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(characters) + * .sortBy('age') + * .map(function(chr) { return chr.name + ' is ' + chr.age; }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ + + function chain(value) { + value = new lodashWrapper(value); + value.__chain__ = true; + return value; + } + /** + * Invokes `interceptor` with the `value` as the first argument and then + * returns `value`. The purpose of this method is to "tap into" a method + * chain in order to perform operations on intermediate results within + * the chain. + * + * @static + * @memberOf _ + * @category Chaining + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3, 4]) + * .tap(function(array) { array.pop(); }) + * .reverse() + * .value(); + * // => [3, 2, 1] + */ + + function tap(value, interceptor) { + interceptor(value); + return value; + } + /** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chaining + * @returns {*} Returns the wrapper object. + * @example + * + * var characters = [ + * { 'name': 'barney', 'age': 36 }, + * { 'name': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(characters).first(); + * // => { 'name': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(characters).chain() + * .first() + * .pick('age') + * .value(); + * // => { 'age': 36 } + */ + + function wrapperChain() { + this.__chain__ = true; + return this; + } + /** + * Produces the `toString` result of the wrapped value. + * + * @name toString + * @memberOf _ + * @category Chaining + * @returns {string} Returns the string result. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ + + function wrapperToString() { + return String(this.__wrapped__); + } + /** + * Extracts the wrapped value. + * + * @name valueOf + * @memberOf _ + * @alias value + * @category Chaining + * @returns {*} Returns the wrapped value. + * @example + * + * _([1, 2, 3]).valueOf(); + * // => [1, 2, 3] + */ + + function wrapperValueOf() { + return this.__wrapped__; + } + /*--------------------------------------------------------------------------*/ + // add functions that return wrapped values when chaining + + lodash.after = after; + lodash.assign = assign; + lodash.at = at; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.chain = chain; + lodash.compact = compact; + lodash.compose = compose; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.createCallback = createCallback; + lodash.curry = curry; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.functions = functions; + lodash.groupBy = groupBy; + lodash.indexBy = indexBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.invert = invert; + lodash.invoke = invoke; + lodash.keys = keys; + lodash.map = map; + lodash.mapValues = mapValues; + lodash.max = max; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.min = min; + lodash.omit = omit; + lodash.once = once; + lodash.pairs = pairs; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.pick = pick; + lodash.pluck = pluck; + lodash.property = property; + lodash.pull = pull; + lodash.range = range; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.shuffle = shuffle; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.times = times; + lodash.toArray = toArray; + lodash.transform = transform; + lodash.union = union; + lodash.uniq = uniq; + lodash.values = values; + lodash.where = where; + lodash.without = without; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.zip = zip; + lodash.zipObject = zipObject; // add aliases + + lodash.collect = map; + lodash.drop = rest; + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.extend = assign; + lodash.methods = functions; + lodash.object = zipObject; + lodash.select = filter; + lodash.tail = rest; + lodash.unique = uniq; + lodash.unzip = zip; // add functions to `lodash.prototype` + + mixin(lodash); + /*--------------------------------------------------------------------------*/ + // add functions that return unwrapped values when chaining + + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.contains = contains; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.has = has; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.lastIndexOf = lastIndexOf; + lodash.mixin = mixin; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.result = result; + lodash.runInContext = runInContext; + lodash.size = size; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.template = template; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; // add aliases + + lodash.all = every; + lodash.any = some; + lodash.detect = find; + lodash.findWhere = find; + lodash.foldl = reduce; + lodash.foldr = reduceRight; + lodash.include = contains; + lodash.inject = reduce; + mixin( + (function() { + var source = {}; + forOwn(lodash, function(func, methodName) { + if (!lodash.prototype[methodName]) { + source[methodName] = func; + } + }); + return source; + })(), + false + ); + /*--------------------------------------------------------------------------*/ + // add functions capable of returning wrapped and unwrapped values when chaining + + lodash.first = first; + lodash.last = last; + lodash.sample = sample; // add aliases + + lodash.take = first; + lodash.head = first; + forOwn(lodash, function(func, methodName) { + var callbackable = methodName !== 'sample'; + + if (!lodash.prototype[methodName]) { + lodash.prototype[methodName] = function(n, guard) { + var chainAll = this.__chain__, + result = func(this.__wrapped__, n, guard); + return !chainAll && + (n == null || + (guard && !(callbackable && typeof n == 'function'))) + ? result + : new lodashWrapper(result, chainAll); + }; + } + }); + /*--------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type string + */ + + lodash.VERSION = '2.4.2'; // add "Chaining" functions to the wrapper + + lodash.prototype.chain = wrapperChain; + lodash.prototype.toString = wrapperToString; + lodash.prototype.value = wrapperValueOf; + lodash.prototype.valueOf = wrapperValueOf; // add `Array` functions that return unwrapped values + + forEach(['join', 'pop', 'shift'], function(methodName) { + var func = arrayRef[methodName]; + + lodash.prototype[methodName] = function() { + var chainAll = this.__chain__, + result = func.apply(this.__wrapped__, arguments); + return chainAll ? new lodashWrapper(result, chainAll) : result; + }; + }); // add `Array` functions that return the existing wrapped value + + forEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) { + var func = arrayRef[methodName]; + + lodash.prototype[methodName] = function() { + func.apply(this.__wrapped__, arguments); + return this; + }; + }); // add `Array` functions that return new wrapped values + + forEach(['concat', 'slice', 'splice'], function(methodName) { + var func = arrayRef[methodName]; + + lodash.prototype[methodName] = function() { + return new lodashWrapper( + func.apply(this.__wrapped__, arguments), + this.__chain__ + ); + }; + }); + return lodash; + } + /*--------------------------------------------------------------------------*/ + // expose Lo-Dash + + var _ = runInContext(); // some AMD build optimizers like r.js check for condition patterns like the following: + + if (freeExports && freeModule) { + // in Node.js or RingoJS + if (moduleExports) { + (freeModule.exports = _)._ = _; + } // in Narwhal or Rhino -require + else { + freeExports._ = _; + } + } else { + // in a browser or Rhino + root._ = _; + } + }.call(this)); + }); + + function sum(arr) { + return arr.reduce(function(p, c, i, a) { + return p + c; + }); + } + + function ensureArr(arr) { + if (Array.isArray(arr)) { + return arr; + } else if (typeof arr === 'string') { + return arr.split(''); + } else { + throw Error('Parameter must be a string or array.'); + } + } + /** + * Computes the jaro-winkler distance for two given arrays. + * + * NOTE: this implementation is based on the one found in the + * Lucene Java library. + * + * h3 Examples: + * + * wuzzy.jarowinkler( + * ['D', 'W', 'A', 'Y', 'N', 'E'], + * ['D', 'U', 'A', 'N', 'E'] + * ); + * // -> 0.840 + * + * wuzzy.jarowinkler( + * 'DWAYNE', + * 'DUANE' + * ); + * // -> 0.840 + * + * @param {String/Array} a - the first string/array to compare + * @param {String/Array} b - the second string/array to compare + * @param {Number} t - the threshold for adding + * the winkler bonus (defaults to 0.7) + * @return {Number} returns the jaro-winkler distance for + * the two provided arrays. + */ + + var jarowinkler = function(a, b, t) { + a = ensureArr(a); + b = ensureArr(b); + var max, min; + + if (a.length > b.length) { + max = a; + min = b; + } else { + max = b; + min = a; + } + + var threshold = t ? t : 0.7; + var weight = 0.1; + var range = Math.floor(Math.max(max.length / 2 - 1, 0)); + var mIdx = []; + var mFlg = []; + var mi, xi, xn, c1; + var matches = 0; + + for (mi = 0; mi < min.length; mi++) { + c1 = min[mi]; + + for ( + xi = Math.max(mi - range, 0), xn = Math.min(mi + range + 1, max.length); + xi < xn; + xi++ + ) { + if (!mFlg[xi] && c1 === max[xi]) { + mIdx[mi] = xi; + mFlg[xi] = true; + matches++; + break; + } + } + } + + var ma = []; + var mb = []; + var i, si; + var trans = 0; + var prefix = 0; + + for (i = 0, si = 0; i < min.length; i++) { + if (mIdx[i] > -1) { + ma[si] = min[i]; + si++; + } + } + + for (i = 0, si = 0; i < max.length; i++) { + if (mFlg[i]) { + mb[si] = max[i]; + si++; + } + } + + for (mi = 0; mi < ma.length; mi++) { + if (ma[mi] !== mb[mi]) { + trans++; + } + } + + for (mi = 0; mi < min.length; mi++) { + if (a[mi] === b[mi]) { + prefix++; + } else { + break; + } + } + + var m = matches; + var t = trans / 2; + + if (!m) { + return 0; + } else { + var j = (m / a.length + m / b.length + (m - t) / m) / 3; + var jw = + j < threshold + ? j + : j + Math.min(weight, 1 / max.length) * prefix * (1 - j); + return jw; + } + }; + /** + * Calculates the levenshtein distance for the + * two provided arrays and returns the normalized + * distance. + * + * h3 Examples: + * + * wuzzy.levenshtein( + * ['D', 'W', 'A', 'Y', 'N', 'E'], + * ['D', 'U', 'A', 'N', 'E'] + * ); + * // -> 0.66666667 + * + * or + * + * wuzzy.levenshtein( + * 'DWAYNE', + * 'DUANE' + * ); + * // -> 0.66666667 + * + * @param {String/Array} a - the first string/array to compare + * @param {String/Array} b - the second string/array to compare + * @param {Object} w - (optional) a set of key/value pairs + * definining weights for the deletion (key: d), insertion + * (key: i), and substitution (key: s). default values are + * 1 for all operations. + * @return {Number} returns the levenshtein distance for + * the two provided arrays. + */ + + var levenshtein = function(a, b, w) { + a = ensureArr(a); + b = ensureArr(b); + + if (a.length === 0) { + return b.length; + } + + if (b.length === 0) { + return a.length; + } + + var weights = w + ? w + : { + d: 1, + i: 1, + s: 1, + }; + var v0 = []; + var v1 = []; + var vlen = b.length + 1; + var i, j; + var cost; + var mlen; + + for (i = 0; i < vlen; i++) { + v0[i] = i; + } + + for (i = 0; i < a.length; i++) { + v1[0] = i + 1; + + for (j = 0; j < b.length; j++) { + cost = a[i] === b[j] ? 0 : weights.s; + v1[j + 1] = Math.min( + v1[j] + weights.d, + v0[j + 1] + weights.i, + v0[j] + cost + ); + } + + for (j = 0; j < vlen; j++) { + v0[j] = v1[j]; + } + } + + mlen = Math.max(a.length, b.length); + return (mlen - v1[b.length]) / mlen; + }; + /** + * Computes the n-gram edit distance for any n (defaults to 2). + * + * NOTE: this implementation is based on the one found in the + * Lucene Java library. + * + * h3 Examples: + * + * wuzzy.ngram( + * ['D', 'W', 'A', 'Y', 'N', 'E'], + * ['D', 'U', 'A', 'N', 'E'] + * ); + * // -> 0.583 + * + * or + * + * wuzzy.ngram( + * 'DWAYNE', + * 'DUANE' + * ); + * // -> 0.583 + * + * @param {String/Array} a - the first string/array to compare + * @param {String/Array} b - the second string/array to compare + * @param {Number} ng - (optional) the n-gram size to work with (defaults to 2) + * @return {Number} returns the ngram distance for + * the two provided arrays. + */ + + var ngram = function(a, b, ng) { + a = ensureArr(a); + b = ensureArr(b); + var al = a.length; + var bl = b.length; + var n = ng ? ng : 2; + var cost; + var i, j, ni, ti, tn, ec; + var sa = []; + var p = []; + var d = []; + var _d = []; + var t_j = []; + + if (al === 0 || bl === 0) { + if (al === bl) { + return 1; + } else { + return 0; + } + } // smaller than n situation + + cost = 0; + + if (al < n || bl < n) { + for (i = 0, ni = Math.min(al, bl); i < ni; i++) { + if (a[i] === b[i]) { + cost++; + } + } + + return cost / Math.max(al, bl); + } + + for (i = 0; i < al + n - 1; i++) { + if (i < n - 1) { + sa[i] = 0; + } else { + sa[i] = a[i - n + 1]; + } + } + + for (i = 0; i <= al; i++) { + p[i] = i; + } + + for (j = 1; j <= bl; j++) { + if (j < n) { + for (ti = 0; ti < n - j; ti++) { + t_j[ti] = 0; + } + + for (ti = n - j; ti < n; ti++) { + t_j[ti] = b[ti - (n - j)]; + } + } else { + t_j = b.slice(j - n, j); + } + + d[0] = j; + + for (i = 1; i <= al; i++) { + cost = 0; + tn = n; + + for (ni = 0; ni < n; ni++) { + if (sa[i - 1 + ni] !== t_j[ni]) { + cost++; + } else if (sa[i - 1 + ni] === 0) { + tn--; + } + } + + ec = cost / tn; + d[i] = Math.min(Math.min(d[i - 1] + 1, p[i] + 1), p[i - 1] + ec); + } + + _d = p; + p = d; + d = _d; + } + + return 1.0 - p[al] / Math.max(al, bl); + }; + /** + * Calculates a pearson correlation score for two given + * objects (compares values of similar keys). + * + * h3 Examples: + * + * wuzzy.pearson( + * {a: 2.5, b: 3.5, c: 3.0, d: 3.5, e: 2.5, f: 3.0}, + * {a: 3.0, b: 3.5, c: 1.5, d: 5.0, e: 3.5, f: 3.0, g: 5.0} + * ); + * // -> 0.396 + * + * or + * + * wuzzy.pearson( + * {a: 2.5, b: 1}, + * {o: 3.5, e: 6.0} + * ); + * // -> 1.0 + * + * @param {Object} a - the first object to compare + * @param {Object} b - the second object to compare + * @return {Number} returns the pearson correlation for + * the two provided arrays. + */ + + var pearson = function(a, b) { + var sk = []; + Object.keys(a).forEach(function(k) { + if (b[k]) { + sk.push(k); + } + }); + var n = sk.length; + + if (n === 0) { + return 0; + } + + var sa = sum( + sk.map(function(k) { + return a[k]; + }) + ); + var sb = sum( + sk.map(function(k) { + return b[k]; + }) + ); + var sas = sum( + sk.map(function(k) { + return Math.pow(a[k], 2); + }) + ); + var sbs = sum( + sk.map(function(k) { + return Math.pow(b[k], 2); + }) + ); + var sp = sum( + sk.map(function(k) { + return a[k] * b[k]; + }) + ); + var num = sp - (sa * sb) / n; + var den = Math.sqrt( + (sas - Math.pow(sa, 2) / n) * (sbs - Math.pow(sb, 2) / n) + ); + + if (den === 0) { + return 0; + } else { + return num / den; + } + }; + /** + * Calculates the jaccard index for the two + * provided arrays. + * + * h3 Examples: + * + * wuzzy.jaccard( + * ['a', 'b', 'c', 'd', 'e', 'f'], + * ['a', 'e', 'f'] + * ); + * // -> 0.5 + * + * or + * + * wuzzy.jaccard( + * 'abcdef', + * 'aef' + * ); + * // -> 0.5 + * + * or + * + * wuzzy.jaccard( + * ['abe', 'babe', 'cabe', 'dabe', 'eabe', 'fabe'], + * ['babe'] + * ); + * // -> 0.16666667 + * + * @param {String/Array} a - the first string/array to compare + * @param {String/Array} b - the second string/array to compare + * @return {Number} returns the jaccard index for + * the two provided arrays. + */ + + var jaccard = function(a, b) { + a = ensureArr(a); + b = ensureArr(b); + return lodash.intersection(a, b).length / lodash.union(a, b).length; + }; + /** + * Calculates the tanimoto distance (weighted jaccard index). + * + * h3 Examples: + * + * wuzzy.tanimoto( + * ['a', 'b', 'c', 'd', 'd', 'e', 'f', 'f'], + * ['a', 'e', 'f'] + * ); + * // -> 0.375 + * + * or + * + * wuzzy.tanimoto( + * 'abcddeff', + * 'aef' + * ); + * // -> 0.375 + * + * or + * + * wuzzy.tanimoto( + * ['abe', 'babe', 'cabe', 'dabe', 'eabe', 'fabe', 'fabe'], + * ['babe'] + * ); + * // -> 0.14285714 + * + * @param {String/Array} a - the first string/array to compare + * @param {String/Array} b - the second string/array to compare + * @return {Number} returns the tanimoto distance for + * the two provided arrays. + */ + + var tanimoto = function(a, b) { + a = ensureArr(a); + b = ensureArr(b); + + var both = lodash.intersection(a, b).length; + + return both / (a.length + b.length - both); + }; + + var wuzzy = { + jarowinkler: jarowinkler, + levenshtein: levenshtein, + ngram: ngram, + pearson: pearson, + jaccard: jaccard, + tanimoto: tanimoto, + }; + + function extractBreadcrumbTitle(splitTitle, text) { + // This must be a very breadcrumbed title, like: + // The Best Gadgets on Earth : Bits : Blogs : NYTimes.com + // NYTimes - Blogs - Bits - The Best Gadgets on Earth + if (splitTitle.length >= 6) { + // Look to see if we can find a breadcrumb splitter that happens + // more than once. If we can, we'll be able to better pull out + // the title. + var termCounts = splitTitle.reduce(function(acc, titleText) { + acc[titleText] = acc[titleText] ? acc[titleText] + 1 : 1; + return acc; + }, {}); + + var _Reflect$ownKeys$redu = ownKeys$1(termCounts).reduce( + function(acc, key) { + if (acc[1] < termCounts[key]) { + return [key, termCounts[key]]; + } + + return acc; + }, + [0, 0] + ), + _Reflect$ownKeys$redu2 = slicedToArray(_Reflect$ownKeys$redu, 2), + maxTerm = _Reflect$ownKeys$redu2[0], + termCount = _Reflect$ownKeys$redu2[1]; // We found a splitter that was used more than once, so it + // is probably the breadcrumber. Split our title on that instead. + // Note: max_term should be <= 4 characters, so that " >> " + // will match, but nothing longer than that. + + if (termCount >= 2 && maxTerm.length <= 4) { + splitTitle = text.split(maxTerm); + } + + var splitEnds = [splitTitle[0], splitTitle.slice(-1)]; + var longestEnd = splitEnds.reduce(function(acc, end) { + return acc.length > end.length ? acc : end; + }, ''); + + if (longestEnd.length > 10) { + return longestEnd; + } + + return text; + } + + return null; + } + + function cleanDomainFromTitle(splitTitle, url$$1) { + // Search the ends of the title, looking for bits that fuzzy match + // the URL too closely. If one is found, discard it and return the + // rest. + // + // Strip out the big TLDs - it just makes the matching a bit more + // accurate. Not the end of the world if it doesn't strip right. + var _URL$parse = url.parse(url$$1), + host = _URL$parse.host; + + var nakedDomain = host.replace(DOMAIN_ENDINGS_RE, ''); + var startSlug = splitTitle[0].toLowerCase().replace(' ', ''); + var startSlugRatio = wuzzy.levenshtein(startSlug, nakedDomain); + + if (startSlugRatio > 0.4 && startSlug.length > 5) { + return splitTitle.slice(2).join(''); + } + + var endSlug = splitTitle + .slice(-1)[0] + .toLowerCase() + .replace(' ', ''); + var endSlugRatio = wuzzy.levenshtein(endSlug, nakedDomain); + + if (endSlugRatio > 0.4 && endSlug.length >= 5) { + return splitTitle.slice(0, -2).join(''); + } + + return null; + } // Given a title with separators in it (colons, dashes, etc), + // resolve whether any of the segments should be removed. + + function resolveSplitTitle(title) { + var url$$1 = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + // Splits while preserving splitters, like: + // ['The New New York', ' - ', 'The Washington Post'] + var splitTitle = title.split(TITLE_SPLITTERS_RE); + + if (splitTitle.length === 1) { + return title; + } + + var newTitle = extractBreadcrumbTitle(splitTitle, title); + if (newTitle) return newTitle; + newTitle = cleanDomainFromTitle(splitTitle, url$$1); + if (newTitle) return newTitle; // Fuzzy ratio didn't find anything, so this title is probably legit. + // Just return it all. + + return title; + } + + var Cleaners = { + author: cleanAuthor, + lead_image_url: clean$1, + dek: cleanDek, + date_published: cleanDatePublished, + content: extractCleanNode, + title: cleanTitle$$1, + }; + + // likely to be article text. + // + // If strip_unlikely_candidates is True, remove any elements that + // match certain criteria first. (Like, does this element have a + // classname of "comment") + // + // If weight_nodes is True, use classNames and IDs to determine the + // worthiness of nodes. + // + // Returns a cheerio object $ + + function extractBestNode($, opts) { + // clone the node so we can get back to our + // initial parsed state if needed + // TODO Do I need this? – AP + // let $root = $.root().clone() + if (opts.stripUnlikelyCandidates) { + $ = stripUnlikelyCandidates($); + } + + $ = convertToParagraphs$$1($); + $ = scoreContent$$1($, opts.weightNodes); + var $topCandidate = findTopCandidate$$1($); + return $topCandidate; + } + + var GenericContentExtractor = { + defaultOpts: { + stripUnlikelyCandidates: true, + weightNodes: true, + cleanConditionally: true, + }, + // Extract the content for this resource - initially, pass in our + // most restrictive opts which will return the highest quality + // content. On each failure, retry with slightly more lax opts. + // + // :param return_type: string. If "node", should return the content + // as a cheerio node rather than as an HTML string. + // + // Opts: + // stripUnlikelyCandidates: Remove any elements that match + // non-article-like criteria first.(Like, does this element + // have a classname of "comment") + // + // weightNodes: Modify an elements score based on whether it has + // certain classNames or IDs. Examples: Subtract if a node has + // a className of 'comment', Add if a node has an ID of + // 'entry-content'. + // + // cleanConditionally: Clean the node to return of some + // superfluous content. Things like forms, ads, etc. + extract: function extract(_ref, opts) { + var $$$1 = _ref.$, + html = _ref.html, + title = _ref.title, + url = _ref.url; + opts = objectSpread({}, this.defaultOpts, opts); + $$$1 = $$$1 || $.load(html); // Cascade through our extraction-specific opts in an ordered fashion, + // turning them off as we try to extract content. + + var node = this.getContentNode($$$1, title, url, opts); + + if (nodeIsSufficient(node)) { + return this.cleanAndReturnNode(node, $$$1); + } // We didn't succeed on first pass, one by one disable our + // extraction opts and try again. + // eslint-disable-next-line no-restricted-syntax + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for ( + var _iterator = getIterator$1( + ownKeys$1(opts).filter(function(k) { + return opts[k] === true; + }) + ), + _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + var key = _step.value; + opts[key] = false; + $$$1 = $.load(html); + node = this.getContentNode($$$1, title, url, opts); + + if (nodeIsSufficient(node)) { + break; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return this.cleanAndReturnNode(node, $$$1); + }, + // Get node given current options + getContentNode: function getContentNode($$$1, title, url, opts) { + return extractCleanNode(extractBestNode($$$1, opts), { + $: $$$1, + cleanConditionally: opts.cleanConditionally, + title: title, + url: url, + }); + }, + // Once we got here, either we're at our last-resort node, or + // we broke early. Make sure we at least have -something- before we + // move forward. + cleanAndReturnNode: function cleanAndReturnNode(node, $$$1) { + if (!node) { + return null; + } + + return normalizeSpaces($$$1.html(node)); // if return_type == "html": + // return normalize_spaces(node_to_html(node)) + // else: + // return node + }, + }; + + // TODO: It would be great if we could merge the meta and selector lists into + // a list of objects, because we could then rank them better. For example, + // .hentry .entry-title is far better suited than <meta title>. + // An ordered list of meta tag names that denote likely article titles. All + // attributes should be lowercase for faster case-insensitive matching. From + // most distinct to least distinct. + var STRONG_TITLE_META_TAGS = [ + 'tweetmeme-title', + 'dc.title', + 'rbtitle', + 'headline', + 'title', + ]; // og:title is weak because it typically contains context that we don't like, + // for example the source site's name. Gotta get that brand into facebook! + + var WEAK_TITLE_META_TAGS = ['og:title']; // An ordered list of XPath Selectors to find likely article titles. From + // most explicit to least explicit. + // + // Note - this does not use classes like CSS. This checks to see if the string + // exists in the className, which is not as accurate as .className (which + // splits on spaces/endlines), but for our purposes it's close enough. The + // speed tradeoff is worth the accuracy hit. + + var STRONG_TITLE_SELECTORS = [ + '.hentry .entry-title', + 'h1#articleHeader', + 'h1.articleHeader', + 'h1.article', + '.instapaper_title', + '#meebo-title', + ]; + var WEAK_TITLE_SELECTORS = [ + 'article h1', + '#entry-title', + '.entry-title', + '#entryTitle', + '#entrytitle', + '.entryTitle', + '.entrytitle', + '#articleTitle', + '.articleTitle', + 'post post-title', + 'h1.title', + 'h2.article', + 'h1', + 'html head title', + 'title', + ]; + + var GenericTitleExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + url = _ref.url, + metaCache = _ref.metaCache; + // First, check to see if we have a matching meta tag that we can make + // use of that is strongly associated with the headline. + var title; + title = extractFromMeta$$1($, STRONG_TITLE_META_TAGS, metaCache); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Second, look through our content selectors for the most likely + // article title that is strongly associated with the headline. + + title = extractFromSelectors$$1($, STRONG_TITLE_SELECTORS); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Third, check for weaker meta tags that may match. + + title = extractFromMeta$$1($, WEAK_TITLE_META_TAGS, metaCache); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // Last, look for weaker selector tags that may match. + + title = extractFromSelectors$$1($, WEAK_TITLE_SELECTORS); + if (title) + return cleanTitle$$1(title, { + url: url, + $: $, + }); // If no matches, return an empty string + + return ''; + }, + }; + + // An ordered list of meta tag names that denote likely article authors. All + // attributes should be lowercase for faster case-insensitive matching. From + // most distinct to least distinct. + // + // Note: "author" is too often the -developer- of the page, so it is not + // added here. + var AUTHOR_META_TAGS = [ + 'byl', + 'clmst', + 'dc.author', + 'dcsext.author', + 'dc.creator', + 'rbauthors', + 'authors', + ]; + var AUTHOR_MAX_LENGTH = 300; // An ordered list of XPath Selectors to find likely article authors. From + // most explicit to least explicit. + // + // Note - this does not use classes like CSS. This checks to see if the string + // exists in the className, which is not as accurate as .className (which + // splits on spaces/endlines), but for our purposes it's close enough. The + // speed tradeoff is worth the accuracy hit. + + var AUTHOR_SELECTORS = [ + '.entry .entry-author', + '.author.vcard .fn', + '.author .vcard .fn', + '.byline.vcard .fn', + '.byline .vcard .fn', + '.byline .by .author', + '.byline .by', + '.byline .author', + '.post-author.vcard', + '.post-author .vcard', + 'a[rel=author]', + '#by_author', + '.by_author', + '#entryAuthor', + '.entryAuthor', + '.byline a[href*=author]', + '#author .authorname', + '.author .authorname', + '#author', + '.author', + '.articleauthor', + '.ArticleAuthor', + '.byline', + ]; // An ordered list of Selectors to find likely article authors, with + // regular expression for content. + + var bylineRe = /^[\n\s]*By/i; + var BYLINE_SELECTORS_RE = [['#byline', bylineRe], ['.byline', bylineRe]]; + + var GenericAuthorExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + metaCache = _ref.metaCache; + var author; // First, check to see if we have a matching + // meta tag that we can make use of. + + author = extractFromMeta$$1($, AUTHOR_META_TAGS, metaCache); + + if (author && author.length < AUTHOR_MAX_LENGTH) { + return cleanAuthor(author); + } // Second, look through our selectors looking for potential authors. + + author = extractFromSelectors$$1($, AUTHOR_SELECTORS, 2); + + if (author && author.length < AUTHOR_MAX_LENGTH) { + return cleanAuthor(author); + } // Last, use our looser regular-expression based selectors for + // potential authors. + // eslint-disable-next-line no-restricted-syntax + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for ( + var _iterator = getIterator$1(BYLINE_SELECTORS_RE), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + var _ref4 = _step.value; + + var _ref3 = slicedToArray(_ref4, 2); + + var selector = _ref3[0]; + var regex = _ref3[1]; + var node = $(selector); + + if (node.length === 1) { + var text = node.text(); + + if (regex.test(text)) { + return cleanAuthor(text); + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return null; + }, + }; + + // An ordered list of meta tag names that denote + // likely date published dates. All attributes + // should be lowercase for faster case-insensitive matching. + // From most distinct to least distinct. + var DATE_PUBLISHED_META_TAGS = [ + 'article:published_time', + 'displaydate', + 'dc.date', + 'dc.date.issued', + 'rbpubdate', + 'publish_date', + 'pub_date', + 'pagedate', + 'pubdate', + 'revision_date', + 'doc_date', + 'date_created', + 'content_create_date', + 'lastmodified', + 'created', + 'date', + ]; // An ordered list of XPath Selectors to find + // likely date published dates. From most explicit + // to least explicit. + + var DATE_PUBLISHED_SELECTORS = [ + '.hentry .dtstamp.published', + '.hentry .published', + '.hentry .dtstamp.updated', + '.hentry .updated', + '.single .published', + '.meta .published', + '.meta .postDate', + '.entry-date', + '.byline .date', + '.postmetadata .date', + '.article_datetime', + '.date-header', + '.story-date', + '.dateStamp', + '#story .datetime', + '.dateline', + '.pubdate', + ]; // An ordered list of compiled regular expressions to find likely date + // published dates from the URL. These should always have the first + // reference be a date string that is parseable by dateutil.parser.parse + + var abbrevMonthsStr = '(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)'; + var DATE_PUBLISHED_URL_RES = [ + // /2012/01/27/ but not /2012/01/293 + new RegExp('/(20\\d{2}/\\d{2}/\\d{2})/', 'i'), // 20120127 or 20120127T but not 2012012733 or 8201201733 + // /[^0-9](20\d{2}[01]\d[0-3]\d)([^0-9]|$)/i, + // 2012-01-27 + new RegExp('(20\\d{2}-[01]\\d-[0-3]\\d)', 'i'), // /2012/jan/27/ + new RegExp('/(20\\d{2}/'.concat(abbrevMonthsStr, '/[0-3]\\d)/'), 'i'), + ]; + + var GenericDatePublishedExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + url = _ref.url, + metaCache = _ref.metaCache; + var datePublished; // First, check to see if we have a matching meta tag + // that we can make use of. + // Don't try cleaning tags from this string + + datePublished = extractFromMeta$$1( + $, + DATE_PUBLISHED_META_TAGS, + metaCache, + false + ); + if (datePublished) return cleanDatePublished(datePublished); // Second, look through our selectors looking for potential + // date_published's. + + datePublished = extractFromSelectors$$1($, DATE_PUBLISHED_SELECTORS); + if (datePublished) return cleanDatePublished(datePublished); // Lastly, look to see if a dately string exists in the URL + + datePublished = extractFromUrl(url, DATE_PUBLISHED_URL_RES); + if (datePublished) return cleanDatePublished(datePublished); + return null; + }, + }; + + // import { + // DEK_META_TAGS, + // DEK_SELECTORS, + // DEK_URL_RES, + // } from './constants'; + // import { cleanDek } from 'cleaners'; + // import { + // extractFromMeta, + // extractFromSelectors, + // } from 'utils/dom'; + // Currently there is only one selector for + // deks. We should simply return null here + // until we have a more robust generic option. + // Below is the original source for this, for reference. + var GenericDekExtractor = { + // extract({ $, content, metaCache }) { + extract: function extract() { + return null; + }, + }; + // # First, check to see if we have a matching meta tag that we can make + // # use of. + // dek = self.extract_from_meta('dek', constants.DEK_META_TAGS) + // if not dek: + // # Second, look through our CSS/XPath selectors. This may return + // # an HTML fragment. + // dek = self.extract_from_selectors('dek', + // constants.DEK_SELECTORS, + // text_only=False) + // + // if dek: + // # Make sure our dek isn't in the first few thousand characters + // # of the content, otherwise it's just the start of the article + // # and not a true dek. + // content = self.extract_content() + // content_chunk = normalize_spaces(strip_tags(content[:2000])) + // dek_chunk = normalize_spaces(dek[:100]) # Already has no tags. + // + // # 80% or greater similarity means the dek was very similar to some + // # of the starting content, so we skip it. + // if fuzz.partial_ratio(content_chunk, dek_chunk) < 80: + // return dek + // + // return None + + // An ordered list of meta tag names that denote likely article leading images. + // All attributes should be lowercase for faster case-insensitive matching. + // From most distinct to least distinct. + var LEAD_IMAGE_URL_META_TAGS = ['og:image', 'twitter:image', 'image_src']; + var LEAD_IMAGE_URL_SELECTORS = ['link[rel=image_src]']; + var POSITIVE_LEAD_IMAGE_URL_HINTS = [ + 'upload', + 'wp-content', + 'large', + 'photo', + 'wp-image', + ]; + var POSITIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp( + POSITIVE_LEAD_IMAGE_URL_HINTS.join('|'), + 'i' + ); + var NEGATIVE_LEAD_IMAGE_URL_HINTS = [ + 'spacer', + 'sprite', + 'blank', + 'throbber', + 'gradient', + 'tile', + 'bg', + 'background', + 'icon', + 'social', + 'header', + 'hdr', + 'advert', + 'spinner', + 'loader', + 'loading', + 'default', + 'rating', + 'share', + 'facebook', + 'twitter', + 'theme', + 'promo', + 'ads', + 'wp-includes', + ]; + var NEGATIVE_LEAD_IMAGE_URL_HINTS_RE = new RegExp( + NEGATIVE_LEAD_IMAGE_URL_HINTS.join('|'), + 'i' + ); + var GIF_RE = /\.gif(\?.*)?$/i; + var JPG_RE = /\.jpe?g(\?.*)?$/i; + + function getSig($node) { + return '' + .concat($node.attr('class') || '', ' ') + .concat($node.attr('id') || ''); + } // Scores image urls based on a variety of heuristics. + + function scoreImageUrl(url) { + url = url.trim(); + var score = 0; + + if (POSITIVE_LEAD_IMAGE_URL_HINTS_RE.test(url)) { + score += 20; + } + + if (NEGATIVE_LEAD_IMAGE_URL_HINTS_RE.test(url)) { + score -= 20; + } // TODO: We might want to consider removing this as + // gifs are much more common/popular than they once were + + if (GIF_RE.test(url)) { + score -= 10; + } + + if (JPG_RE.test(url)) { + score += 10; + } // PNGs are neutral. + + return score; + } // Alt attribute usually means non-presentational image. + + function scoreAttr($img) { + if ($img.attr('alt')) { + return 5; + } + + return 0; + } // Look through our parent and grandparent for figure-like + // container elements, give a bonus if we find them + + function scoreByParents($img) { + var score = 0; + var $figParent = $img.parents('figure').first(); + + if ($figParent.length === 1) { + score += 25; + } + + var $parent = $img.parent(); + var $gParent; + + if ($parent.length === 1) { + $gParent = $parent.parent(); + } + + [$parent, $gParent].forEach(function($node) { + if (PHOTO_HINTS_RE$1.test(getSig($node))) { + score += 15; + } + }); + return score; + } // Look at our immediate sibling and see if it looks like it's a + // caption. Bonus if so. + + function scoreBySibling($img) { + var score = 0; + var $sibling = $img.next(); + var sibling = $sibling.get(0); + + if (sibling && sibling.tagName.toLowerCase() === 'figcaption') { + score += 25; + } + + if (PHOTO_HINTS_RE$1.test(getSig($sibling))) { + score += 15; + } + + return score; + } + function scoreByDimensions($img) { + var score = 0; + + var width = _parseFloat$2($img.attr('width')); + + var height = _parseFloat$2($img.attr('height')); + + var src = $img.attr('src'); // Penalty for skinny images + + if (width && width <= 50) { + score -= 50; + } // Penalty for short images + + if (height && height <= 50) { + score -= 50; + } + + if (width && height && !src.includes('sprite')) { + var area = width * height; + + if (area < 5000) { + // Smaller than 50 x 100 + score -= 100; + } else { + score += Math.round(area / 1000); + } + } + + return score; + } + function scoreByPosition($imgs, index) { + return $imgs.length / 2 - index; + } + + // it. Like content and next page extraction, uses a scoring system + // to determine what the most likely image may be. Short circuits + // on really probable things like og:image meta tags. + // + // Potential signals to still take advantage of: + // * domain + // * weird aspect ratio + + var GenericLeadImageUrlExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + content = _ref.content, + metaCache = _ref.metaCache, + html = _ref.html; + var cleanUrl; + + if (!$.browser && $('head').length === 0) { + $('*') + .first() + .prepend(html); + } // Check to see if we have a matching meta tag that we can make use of. + // Moving this higher because common practice is now to use large + // images on things like Open Graph or Twitter cards. + // images usually have for things like Open Graph. + + var imageUrl = extractFromMeta$$1( + $, + LEAD_IMAGE_URL_META_TAGS, + metaCache, + false + ); + + if (imageUrl) { + cleanUrl = clean$1(imageUrl); + if (cleanUrl) return cleanUrl; + } // Next, try to find the "best" image via the content. + // We'd rather not have to fetch each image and check dimensions, + // so try to do some analysis and determine them instead. + + var $content = $(content); + var imgs = $('img', $content).toArray(); + var imgScores = {}; + imgs.forEach(function(img, index) { + var $img = $(img); + var src = $img.attr('src'); + if (!src) return; + var score = scoreImageUrl(src); + score += scoreAttr($img); + score += scoreByParents($img); + score += scoreBySibling($img); + score += scoreByDimensions($img); + score += scoreByPosition(imgs, index); + imgScores[src] = score; + }); + + var _Reflect$ownKeys$redu = ownKeys$1(imgScores).reduce( + function(acc, key) { + return imgScores[key] > acc[1] ? [key, imgScores[key]] : acc; + }, + [null, 0] + ), + _Reflect$ownKeys$redu2 = slicedToArray(_Reflect$ownKeys$redu, 2), + topUrl = _Reflect$ownKeys$redu2[0], + topScore = _Reflect$ownKeys$redu2[1]; + + if (topScore > 0) { + cleanUrl = clean$1(topUrl); + if (cleanUrl) return cleanUrl; + } // If nothing else worked, check to see if there are any really + // probable nodes in the doc, like <link rel="image_src" />. + // eslint-disable-next-line no-restricted-syntax + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for ( + var _iterator = getIterator$1(LEAD_IMAGE_URL_SELECTORS), _step; + !(_iteratorNormalCompletion = (_step = _iterator.next()).done); + _iteratorNormalCompletion = true + ) { + var selector = _step.value; + var $node = $(selector).first(); + var src = $node.attr('src'); + + if (src) { + cleanUrl = clean$1(src); + if (cleanUrl) return cleanUrl; + } + + var href = $node.attr('href'); + + if (href) { + cleanUrl = clean$1(href); + if (cleanUrl) return cleanUrl; + } + + var value = $node.attr('value'); + + if (value) { + cleanUrl = clean$1(value); + if (cleanUrl) return cleanUrl; + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + return null; + }, + }; + // """ + // # First, try to find the "best" image via the content. + // # We'd rather not have to fetch each image and check dimensions, + // # so try to do some analysis and determine them instead. + // content = self.extractor.extract_content(return_type="node") + // imgs = content.xpath('.//img') + // img_scores = defaultdict(int) + // logger.debug('Scoring %d images from content', len(imgs)) + // for (i, img) in enumerate(imgs): + // img_score = 0 + // + // if not 'src' in img.attrib: + // logger.debug('No src attribute found') + // continue + // + // try: + // parsed_img = urlparse(img.attrib['src']) + // img_path = parsed_img.path.lower() + // except ValueError: + // logger.debug('ValueError getting img path.') + // continue + // logger.debug('Image path is %s', img_path) + // + // if constants.POSITIVE_LEAD_IMAGE_URL_HINTS_RE.match(img_path): + // logger.debug('Positive URL hints match. Adding 20.') + // img_score += 20 + // + // if constants.NEGATIVE_LEAD_IMAGE_URL_HINTS_RE.match(img_path): + // logger.debug('Negative URL hints match. Subtracting 20.') + // img_score -= 20 + // + // # Gifs are more often structure than photos + // if img_path.endswith('gif'): + // logger.debug('gif found. Subtracting 10.') + // img_score -= 10 + // + // # JPGs are more often photographs + // if img_path.endswith('jpg'): + // logger.debug('jpg found. Adding 10.') + // img_score += 10 + // + // # PNGs are neutral. + // + // # Alt attribute usually means non-presentational image. + // if 'alt' in img.attrib and len(img.attrib['alt']) > 5: + // logger.debug('alt attribute found. Adding 5.') + // img_score += 5 + // + // # Look through our parent and grandparent for figure-like + // # container elements, give a bonus if we find them + // parents = [img.getparent()] + // if parents[0] is not None and parents[0].getparent() is not None: + // parents.append(parents[0].getparent()) + // for p in parents: + // if p.tag == 'figure': + // logger.debug('Parent with <figure> tag found. Adding 25.') + // img_score += 25 + // + // p_sig = ' '.join([p.get('id', ''), p.get('class', '')]) + // if constants.PHOTO_HINTS_RE.search(p_sig): + // logger.debug('Photo hints regex match. Adding 15.') + // img_score += 15 + // + // # Look at our immediate sibling and see if it looks like it's a + // # caption. Bonus if so. + // sibling = img.getnext() + // if sibling is not None: + // if sibling.tag == 'figcaption': + // img_score += 25 + // + // sib_sig = ' '.join([sibling.get('id', ''), + // sibling.get('class', '')]).lower() + // if 'caption' in sib_sig: + // img_score += 15 + // + // # Pull out width/height if they were set. + // img_width = None + // img_height = None + // if 'width' in img.attrib: + // try: + // img_width = float(img.get('width')) + // except ValueError: + // pass + // if 'height' in img.attrib: + // try: + // img_height = float(img.get('height')) + // except ValueError: + // pass + // + // # Penalty for skinny images + // if img_width and img_width <= 50: + // logger.debug('Skinny image found. Subtracting 50.') + // img_score -= 50 + // + // # Penalty for short images + // if img_height and img_height <= 50: + // # Wide, short images are more common than narrow, tall ones + // logger.debug('Short image found. Subtracting 25.') + // img_score -= 25 + // + // if img_width and img_height and not 'sprite' in img_path: + // area = img_width * img_height + // + // if area < 5000: # Smaller than 50x100 + // logger.debug('Image with small area found. Subtracting 100.') + // img_score -= 100 + // else: + // img_score += round(area/1000.0) + // + // # If the image is higher on the page than other images, + // # it gets a bonus. Penalty if lower. + // logger.debug('Adding page placement bonus of %d.', len(imgs)/2 - i) + // img_score += len(imgs)/2 - i + // + // # Use the raw src here because we munged img_path for case + // # insensitivity + // logger.debug('Final score is %d.', img_score) + // img_scores[img.attrib['src']] += img_score + // + // top_score = 0 + // top_url = None + // for (url, score) in img_scores.items(): + // if score > top_score: + // top_url = url + // top_score = score + // + // if top_score > 0: + // logger.debug('Using top score image from content. Score was %d', top_score) + // return top_url + // + // + // # If nothing else worked, check to see if there are any really + // # probable nodes in the doc, like <link rel="image_src" />. + // logger.debug('Trying to find lead image in probable nodes') + // for selector in constants.LEAD_IMAGE_URL_SELECTORS: + // nodes = self.resource.extract_by_selector(selector) + // for node in nodes: + // clean_value = None + // if node.attrib.get('src'): + // clean_value = self.clean(node.attrib['src']) + // + // if not clean_value and node.attrib.get('href'): + // clean_value = self.clean(node.attrib['href']) + // + // if not clean_value and node.attrib.get('value'): + // clean_value = self.clean(node.attrib['value']) + // + // if clean_value: + // logger.debug('Found lead image in probable nodes.') + // logger.debug('Node was: %s', node) + // return clean_value + // + // return None + + var heap = createCommonjsModule(function(module, exports) { + // Generated by CoffeeScript 1.8.0 + (function() { + var Heap, + defaultCmp, + floor, + heapify, + heappop, + heappush, + heappushpop, + heapreplace, + insort, + min, + nlargest, + nsmallest, + updateItem, + _siftdown, + _siftup; + + (floor = Math.floor), (min = Math.min); + /* + Default comparison function to be used + */ + + defaultCmp = function(x, y) { + if (x < y) { + return -1; + } + + if (x > y) { + return 1; + } + + return 0; + }; + /* + Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the right of the rightmost x. + + Optional args lo (default 0) and hi (default a.length) bound the slice + of a to be searched. + */ + + insort = function(a, x, lo, hi, cmp) { + var mid; + + if (lo == null) { + lo = 0; + } + + if (cmp == null) { + cmp = defaultCmp; + } + + if (lo < 0) { + throw new Error('lo must be non-negative'); + } + + if (hi == null) { + hi = a.length; + } + + while (lo < hi) { + mid = floor((lo + hi) / 2); + + if (cmp(x, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + + return [].splice.apply(a, [lo, lo - lo].concat(x)), x; + }; + /* + Push item onto heap, maintaining the heap invariant. + */ + + heappush = function(array, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + + array.push(item); + return _siftdown(array, 0, array.length - 1, cmp); + }; + /* + Pop the smallest item off the heap, maintaining the heap invariant. + */ + + heappop = function(array, cmp) { + var lastelt, returnitem; + + if (cmp == null) { + cmp = defaultCmp; + } + + lastelt = array.pop(); + + if (array.length) { + returnitem = array[0]; + array[0] = lastelt; + + _siftup(array, 0, cmp); + } else { + returnitem = lastelt; + } + + return returnitem; + }; + /* + Pop and return the current smallest value, and add the new item. + + This is more efficient than heappop() followed by heappush(), and can be + more appropriate when using a fixed size heap. Note that the value + returned may be larger than item! That constrains reasonable use of + this routine unless written as part of a conditional replacement: + if item > array[0] + item = heapreplace(array, item) + */ + + heapreplace = function(array, item, cmp) { + var returnitem; + + if (cmp == null) { + cmp = defaultCmp; + } + + returnitem = array[0]; + array[0] = item; + + _siftup(array, 0, cmp); + + return returnitem; + }; + /* + Fast version of a heappush followed by a heappop. + */ + + heappushpop = function(array, item, cmp) { + var _ref; + + if (cmp == null) { + cmp = defaultCmp; + } + + if (array.length && cmp(array[0], item) < 0) { + (_ref = [array[0], item]), (item = _ref[0]), (array[0] = _ref[1]); + + _siftup(array, 0, cmp); + } + + return item; + }; + /* + Transform list into a heap, in-place, in O(array.length) time. + */ + + heapify = function(array, cmp) { + var i, _i, _len, _ref1, _results, _results1; + + if (cmp == null) { + cmp = defaultCmp; + } + + _ref1 = function() { + _results1 = []; + + for ( + var _j = 0, _ref = floor(array.length / 2); + 0 <= _ref ? _j < _ref : _j > _ref; + 0 <= _ref ? _j++ : _j-- + ) { + _results1.push(_j); + } + + return _results1; + } + .apply(this) + .reverse(); + + _results = []; + + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i = _ref1[_i]; + + _results.push(_siftup(array, i, cmp)); + } + + return _results; + }; + /* + Update the position of the given item in the heap. + This function should be called every time the item is being modified. + */ + + updateItem = function(array, item, cmp) { + var pos; + + if (cmp == null) { + cmp = defaultCmp; + } + + pos = array.indexOf(item); + + if (pos === -1) { + return; + } + + _siftdown(array, 0, pos, cmp); + + return _siftup(array, pos, cmp); + }; + /* + Find the n largest elements in a dataset. + */ + + nlargest = function(array, n, cmp) { + var elem, result, _i, _len, _ref; + + if (cmp == null) { + cmp = defaultCmp; + } + + result = array.slice(0, n); + + if (!result.length) { + return result; + } + + heapify(result, cmp); + _ref = array.slice(n); + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + + return result.sort(cmp).reverse(); + }; + /* + Find the n smallest elements in a dataset. + */ + + nsmallest = function(array, n, cmp) { + var elem, i, los, result, _i, _j, _len, _ref, _ref1, _results; + + if (cmp == null) { + cmp = defaultCmp; + } + + if (n * 10 <= array.length) { + result = array.slice(0, n).sort(cmp); + + if (!result.length) { + return result; + } + + los = result[result.length - 1]; + _ref = array.slice(n); + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + + return result; + } + + heapify(array, cmp); + _results = []; + + for ( + i = _j = 0, _ref1 = min(n, array.length); + 0 <= _ref1 ? _j < _ref1 : _j > _ref1; + i = 0 <= _ref1 ? ++_j : --_j + ) { + _results.push(heappop(array, cmp)); + } + + return _results; + }; + + _siftdown = function(array, startpos, pos, cmp) { + var newitem, parent, parentpos; + + if (cmp == null) { + cmp = defaultCmp; + } + + newitem = array[pos]; + + while (pos > startpos) { + parentpos = (pos - 1) >> 1; + parent = array[parentpos]; + + if (cmp(newitem, parent) < 0) { + array[pos] = parent; + pos = parentpos; + continue; + } + + break; + } + + return (array[pos] = newitem); + }; + + _siftup = function(array, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + + if (cmp == null) { + cmp = defaultCmp; + } + + endpos = array.length; + startpos = pos; + newitem = array[pos]; + childpos = 2 * pos + 1; + + while (childpos < endpos) { + rightpos = childpos + 1; + + if ( + rightpos < endpos && + !(cmp(array[childpos], array[rightpos]) < 0) + ) { + childpos = rightpos; + } + + array[pos] = array[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + + array[pos] = newitem; + return _siftdown(array, startpos, pos, cmp); + }; + + Heap = (function() { + Heap.push = heappush; + Heap.pop = heappop; + Heap.replace = heapreplace; + Heap.pushpop = heappushpop; + Heap.heapify = heapify; + Heap.updateItem = updateItem; + Heap.nlargest = nlargest; + Heap.nsmallest = nsmallest; + + function Heap(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + + Heap.prototype.push = function(x) { + return heappush(this.nodes, x, this.cmp); + }; + + Heap.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + + Heap.prototype.peek = function() { + return this.nodes[0]; + }; + + Heap.prototype.contains = function(x) { + return this.nodes.indexOf(x) !== -1; + }; + + Heap.prototype.replace = function(x) { + return heapreplace(this.nodes, x, this.cmp); + }; + + Heap.prototype.pushpop = function(x) { + return heappushpop(this.nodes, x, this.cmp); + }; + + Heap.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + + Heap.prototype.updateItem = function(x) { + return updateItem(this.nodes, x, this.cmp); + }; + + Heap.prototype.clear = function() { + return (this.nodes = []); + }; + + Heap.prototype.empty = function() { + return this.nodes.length === 0; + }; + + Heap.prototype.size = function() { + return this.nodes.length; + }; + + Heap.prototype.clone = function() { + var heap; + heap = new Heap(); + heap.nodes = this.nodes.slice(0); + return heap; + }; + + Heap.prototype.toArray = function() { + return this.nodes.slice(0); + }; + + Heap.prototype.insert = Heap.prototype.push; + Heap.prototype.top = Heap.prototype.peek; + Heap.prototype.front = Heap.prototype.peek; + Heap.prototype.has = Heap.prototype.contains; + Heap.prototype.copy = Heap.prototype.clone; + return Heap; + })(); + + (function(root, factory) { + { + return (module.exports = factory()); + } + })(this, function() { + return Heap; + }); + }.call(this)); + }); + + var heap$1 = heap; + + var difflib = createCommonjsModule(function(module, exports) { + // Generated by CoffeeScript 1.3.1 + + /* + Module difflib -- helpers for computing deltas between objects. + + Function getCloseMatches(word, possibilities, n=3, cutoff=0.6): + Use SequenceMatcher to return list of the best "good enough" matches. + + Function contextDiff(a, b): + For two lists of strings, return a delta in context diff format. + + Function ndiff(a, b): + Return a delta: the difference between `a` and `b` (lists of strings). + + Function restore(delta, which): + Return one of the two sequences that generated an ndiff delta. + + Function unifiedDiff(a, b): + For two lists of strings, return a delta in unified diff format. + + Class SequenceMatcher: + A flexible class for comparing pairs of sequences of any type. + + Class Differ: + For producing human-readable deltas from sequences of lines of text. + */ + (function() { + var Differ, + Heap, + IS_CHARACTER_JUNK, + IS_LINE_JUNK, + SequenceMatcher, + contextDiff, + floor, + getCloseMatches, + max, + min, + ndiff, + restore, + unifiedDiff, + _any, + _arrayCmp, + _calculateRatio, + _countLeading, + _formatRangeContext, + _formatRangeUnified, + _has, + __indexOf = + [].indexOf || + function(item) { + for (var i = 0, l = this.length; i < l; i++) { + if (i in this && this[i] === item) return i; + } + + return -1; + }; + + (floor = Math.floor), (max = Math.max), (min = Math.min); + Heap = heap$1; + + _calculateRatio = function(matches, length) { + if (length) { + return (2.0 * matches) / length; + } else { + return 1.0; + } + }; + + _arrayCmp = function(a, b) { + var i, la, lb, _i, _ref, _ref1; + + (_ref = [a.length, b.length]), (la = _ref[0]), (lb = _ref[1]); + + for ( + i = _i = 0, _ref1 = min(la, lb); + 0 <= _ref1 ? _i < _ref1 : _i > _ref1; + i = 0 <= _ref1 ? ++_i : --_i + ) { + if (a[i] < b[i]) { + return -1; + } + + if (a[i] > b[i]) { + return 1; + } + } + + return la - lb; + }; + + _has = function(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + }; + + _any = function(items) { + var item, _i, _len; + + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + + if (item) { + return true; + } + } + + return false; + }; + + SequenceMatcher = (function() { + /* + SequenceMatcher is a flexible class for comparing pairs of sequences of + any type, so long as the sequence elements are hashable. The basic + algorithm predates, and is a little fancier than, an algorithm + published in the late 1980's by Ratcliff and Obershelp under the + hyperbolic name "gestalt pattern matching". The basic idea is to find + the longest contiguous matching subsequence that contains no "junk" + elements (R-O doesn't address junk). The same idea is then applied + recursively to the pieces of the sequences to the left and to the right + of the matching subsequence. This does not yield minimal edit + sequences, but does tend to yield matches that "look right" to people. + + SequenceMatcher tries to compute a "human-friendly diff" between two + sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the + longest *contiguous* & junk-free matching subsequence. That's what + catches peoples' eyes. The Windows(tm) windiff has another interesting + notion, pairing up elements that appear uniquely in each sequence. + That, and the method here, appear to yield more intuitive difference + reports than does diff. This method appears to be the least vulnerable + to synching up on blocks of "junk lines", though (like blank lines in + ordinary text files, or maybe "<P>" lines in HTML files). That may be + because this is the only method of the 3 that has a *concept* of + "junk" <wink>. + + Example, comparing two strings, and considering blanks to be "junk": + + >>> isjunk = (c) -> c is ' ' + >>> s = new SequenceMatcher(isjunk, + 'private Thread currentThread;', + 'private volatile Thread currentThread;') + + .ratio() returns a float in [0, 1], measuring the "similarity" of the + sequences. As a rule of thumb, a .ratio() value over 0.6 means the + sequences are close matches: + + >>> s.ratio().toPrecision(3) + '0.866' + + If you're only interested in where the sequences match, + .getMatchingBlocks() is handy: + + >>> for [a, b, size] in s.getMatchingBlocks() + ... console.log("a[#{a}] and b[#{b}] match for #{size} elements"); + a[0] and b[0] match for 8 elements + a[8] and b[17] match for 21 elements + a[29] and b[38] match for 0 elements + + Note that the last tuple returned by .get_matching_blocks() is always a + dummy, (len(a), len(b), 0), and this is the only case in which the last + tuple element (number of elements matched) is 0. + + If you want to know how to change the first sequence into the second, + use .get_opcodes(): + + >>> for [op, a1, a2, b1, b2] in s.getOpcodes() + ... console.log "#{op} a[#{a1}:#{a2}] b[#{b1}:#{b2}]" + equal a[0:8] b[0:8] + insert a[8:8] b[8:17] + equal a[8:29] b[17:38] + + See the Differ class for a fancy human-friendly file differencer, which + uses SequenceMatcher both to compare sequences of lines, and to compare + sequences of characters within similar (near-matching) lines. + + See also function getCloseMatches() in this module, which shows how + simple code building on SequenceMatcher can be used to do useful work. + + Timing: Basic R-O is cubic time worst case and quadratic time expected + case. SequenceMatcher is quadratic time for the worst case and has + expected-case behavior dependent in a complicated way on how many + elements the sequences have in common; best case time is linear. + + Methods: + + constructor(isjunk=null, a='', b='') + Construct a SequenceMatcher. + + setSeqs(a, b) + Set the two sequences to be compared. + + setSeq1(a) + Set the first sequence to be compared. + + setSeq2(b) + Set the second sequence to be compared. + + findLongestMatch(alo, ahi, blo, bhi) + Find longest matching block in a[alo:ahi] and b[blo:bhi]. + + getMatchingBlocks() + Return list of triples describing matching subsequences. + + getOpcodes() + Return list of 5-tuples describing how to turn a into b. + + ratio() + Return a measure of the sequences' similarity (float in [0,1]). + + quickRatio() + Return an upper bound on .ratio() relatively quickly. + + realQuickRatio() + Return an upper bound on ratio() very quickly. + */ + function SequenceMatcher(isjunk, a, b, autojunk) { + this.isjunk = isjunk; + + if (a == null) { + a = ''; + } + + if (b == null) { + b = ''; + } + + this.autojunk = autojunk != null ? autojunk : true; + /* + Construct a SequenceMatcher. + + Optional arg isjunk is null (the default), or a one-argument + function that takes a sequence element and returns true iff the + element is junk. Null is equivalent to passing "(x) -> 0", i.e. + no elements are considered to be junk. For example, pass + (x) -> x in ' \t' + if you're comparing lines as sequences of characters, and don't + want to synch up on blanks or hard tabs. + + Optional arg a is the first of two sequences to be compared. By + default, an empty string. The elements of a must be hashable. See + also .setSeqs() and .setSeq1(). + + Optional arg b is the second of two sequences to be compared. By + default, an empty string. The elements of b must be hashable. See + also .setSeqs() and .setSeq2(). + + Optional arg autojunk should be set to false to disable the + "automatic junk heuristic" that treats popular elements as junk + (see module documentation for more information). + */ + + this.a = this.b = null; + this.setSeqs(a, b); + } + + SequenceMatcher.prototype.setSeqs = function(a, b) { + /* + Set the two sequences to be compared. + + >>> s = new SequenceMatcher() + >>> s.setSeqs('abcd', 'bcde') + >>> s.ratio() + 0.75 + */ + this.setSeq1(a); + return this.setSeq2(b); + }; + + SequenceMatcher.prototype.setSeq1 = function(a) { + /* + Set the first sequence to be compared. + + The second sequence to be compared is not changed. + + >>> s = new SequenceMatcher(null, 'abcd', 'bcde') + >>> s.ratio() + 0.75 + >>> s.setSeq1('bcde') + >>> s.ratio() + 1.0 + + SequenceMatcher computes and caches detailed information about the + second sequence, so if you want to compare one sequence S against + many sequences, use .setSeq2(S) once and call .setSeq1(x) + repeatedly for each of the other sequences. + + See also setSeqs() and setSeq2(). + */ + if (a === this.a) { + return; + } + + this.a = a; + return (this.matchingBlocks = this.opcodes = null); + }; + + SequenceMatcher.prototype.setSeq2 = function(b) { + /* + Set the second sequence to be compared. + + The first sequence to be compared is not changed. + + >>> s = new SequenceMatcher(null, 'abcd', 'bcde') + >>> s.ratio() + 0.75 + >>> s.setSeq2('abcd') + >>> s.ratio() + 1.0 + + SequenceMatcher computes and caches detailed information about the + second sequence, so if you want to compare one sequence S against + many sequences, use .setSeq2(S) once and call .setSeq1(x) + repeatedly for each of the other sequences. + + See also setSeqs() and setSeq1(). + */ + if (b === this.b) { + return; + } + + this.b = b; + this.matchingBlocks = this.opcodes = null; + this.fullbcount = null; + return this._chainB(); + }; + + SequenceMatcher.prototype._chainB = function() { + var b, + b2j, + elt, + i, + idxs, + indices, + isjunk, + junk, + n, + ntest, + popular, + _i, + _j, + _len, + _len1, + _ref; + + b = this.b; + this.b2j = b2j = {}; + + for (i = _i = 0, _len = b.length; _i < _len; i = ++_i) { + elt = b[i]; + indices = _has(b2j, elt) ? b2j[elt] : (b2j[elt] = []); + indices.push(i); + } + + junk = {}; + isjunk = this.isjunk; + + if (isjunk) { + _ref = Object.keys(b2j); + + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + elt = _ref[_j]; + + if (isjunk(elt)) { + junk[elt] = true; + delete b2j[elt]; + } + } + } + + popular = {}; + n = b.length; + + if (this.autojunk && n >= 200) { + ntest = floor(n / 100) + 1; + + for (elt in b2j) { + idxs = b2j[elt]; + + if (idxs.length > ntest) { + popular[elt] = true; + delete b2j[elt]; + } + } + } + + this.isbjunk = function(b) { + return _has(junk, b); + }; + + return (this.isbpopular = function(b) { + return _has(popular, b); + }); + }; + + SequenceMatcher.prototype.findLongestMatch = function( + alo, + ahi, + blo, + bhi + ) { + /* + Find longest matching block in a[alo...ahi] and b[blo...bhi]. + + If isjunk is not defined: + + Return [i,j,k] such that a[i...i+k] is equal to b[j...j+k], where + alo <= i <= i+k <= ahi + blo <= j <= j+k <= bhi + and for all [i',j',k'] meeting those conditions, + k >= k' + i <= i' + and if i == i', j <= j' + + In other words, of all maximal matching blocks, return one that + starts earliest in a, and of all those maximal matching blocks that + start earliest in a, return the one that starts earliest in b. + + >>> isjunk = (x) -> x is ' ' + >>> s = new SequenceMatcher(isjunk, ' abcd', 'abcd abcd') + >>> s.findLongestMatch(0, 5, 0, 9) + [1, 0, 4] + + >>> s = new SequenceMatcher(null, 'ab', 'c') + >>> s.findLongestMatch(0, 2, 0, 1) + [0, 0, 0] + */ + var a, + b, + b2j, + besti, + bestj, + bestsize, + i, + isbjunk, + j, + j2len, + k, + newj2len, + _i, + _j, + _len, + _ref, + _ref1, + _ref2, + _ref3, + _ref4, + _ref5; + + (_ref = [this.a, this.b, this.b2j, this.isbjunk]), + (a = _ref[0]), + (b = _ref[1]), + (b2j = _ref[2]), + (isbjunk = _ref[3]); + (_ref1 = [alo, blo, 0]), + (besti = _ref1[0]), + (bestj = _ref1[1]), + (bestsize = _ref1[2]); + j2len = {}; + + for ( + i = _i = alo; + alo <= ahi ? _i < ahi : _i > ahi; + i = alo <= ahi ? ++_i : --_i + ) { + newj2len = {}; + _ref2 = _has(b2j, a[i]) ? b2j[a[i]] : []; + + for (_j = 0, _len = _ref2.length; _j < _len; _j++) { + j = _ref2[_j]; + + if (j < blo) { + continue; + } + + if (j >= bhi) { + break; + } + + k = newj2len[j] = (j2len[j - 1] || 0) + 1; + + if (k > bestsize) { + (_ref3 = [i - k + 1, j - k + 1, k]), + (besti = _ref3[0]), + (bestj = _ref3[1]), + (bestsize = _ref3[2]); + } + } + + j2len = newj2len; + } + + while ( + besti > alo && + bestj > blo && + !isbjunk(b[bestj - 1]) && + a[besti - 1] === b[bestj - 1] + ) { + (_ref4 = [besti - 1, bestj - 1, bestsize + 1]), + (besti = _ref4[0]), + (bestj = _ref4[1]), + (bestsize = _ref4[2]); + } + + while ( + besti + bestsize < ahi && + bestj + bestsize < bhi && + !isbjunk(b[bestj + bestsize]) && + a[besti + bestsize] === b[bestj + bestsize] + ) { + bestsize++; + } + + while ( + besti > alo && + bestj > blo && + isbjunk(b[bestj - 1]) && + a[besti - 1] === b[bestj - 1] + ) { + (_ref5 = [besti - 1, bestj - 1, bestsize + 1]), + (besti = _ref5[0]), + (bestj = _ref5[1]), + (bestsize = _ref5[2]); + } + + while ( + besti + bestsize < ahi && + bestj + bestsize < bhi && + isbjunk(b[bestj + bestsize]) && + a[besti + bestsize] === b[bestj + bestsize] + ) { + bestsize++; + } + + return [besti, bestj, bestsize]; + }; + + SequenceMatcher.prototype.getMatchingBlocks = function() { + /* + Return list of triples describing matching subsequences. + + Each triple is of the form [i, j, n], and means that + a[i...i+n] == b[j...j+n]. The triples are monotonically increasing in + i and in j. it's also guaranteed that if + [i, j, n] and [i', j', n'] are adjacent triples in the list, and + the second is not the last triple in the list, then i+n != i' or + j+n != j'. IOW, adjacent triples never describe adjacent equal + blocks. + + The last triple is a dummy, [a.length, b.length, 0], and is the only + triple with n==0. + + >>> s = new SequenceMatcher(null, 'abxcd', 'abcd') + >>> s.getMatchingBlocks() + [[0, 0, 2], [3, 2, 2], [5, 4, 0]] + */ + var ahi, + alo, + bhi, + blo, + i, + i1, + i2, + j, + j1, + j2, + k, + k1, + k2, + la, + lb, + matchingBlocks, + nonAdjacent, + queue, + x, + _i, + _len, + _ref, + _ref1, + _ref2, + _ref3, + _ref4; + + if (this.matchingBlocks) { + return this.matchingBlocks; + } + + (_ref = [this.a.length, this.b.length]), + (la = _ref[0]), + (lb = _ref[1]); + queue = [[0, la, 0, lb]]; + matchingBlocks = []; + + while (queue.length) { + (_ref1 = queue.pop()), + (alo = _ref1[0]), + (ahi = _ref1[1]), + (blo = _ref1[2]), + (bhi = _ref1[3]); + (_ref2 = x = this.findLongestMatch(alo, ahi, blo, bhi)), + (i = _ref2[0]), + (j = _ref2[1]), + (k = _ref2[2]); + + if (k) { + matchingBlocks.push(x); + + if (alo < i && blo < j) { + queue.push([alo, i, blo, j]); + } + + if (i + k < ahi && j + k < bhi) { + queue.push([i + k, ahi, j + k, bhi]); + } + } + } + + matchingBlocks.sort(_arrayCmp); + i1 = j1 = k1 = 0; + nonAdjacent = []; + + for (_i = 0, _len = matchingBlocks.length; _i < _len; _i++) { + (_ref3 = matchingBlocks[_i]), + (i2 = _ref3[0]), + (j2 = _ref3[1]), + (k2 = _ref3[2]); + + if (i1 + k1 === i2 && j1 + k1 === j2) { + k1 += k2; + } else { + if (k1) { + nonAdjacent.push([i1, j1, k1]); + } + + (_ref4 = [i2, j2, k2]), + (i1 = _ref4[0]), + (j1 = _ref4[1]), + (k1 = _ref4[2]); + } + } + + if (k1) { + nonAdjacent.push([i1, j1, k1]); + } + + nonAdjacent.push([la, lb, 0]); + return (this.matchingBlocks = nonAdjacent); + }; + + SequenceMatcher.prototype.getOpcodes = function() { + /* + Return list of 5-tuples describing how to turn a into b. + + Each tuple is of the form [tag, i1, i2, j1, j2]. The first tuple + has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the + tuple preceding it, and likewise for j1 == the previous j2. + + The tags are strings, with these meanings: + + 'replace': a[i1...i2] should be replaced by b[j1...j2] + 'delete': a[i1...i2] should be deleted. + Note that j1==j2 in this case. + 'insert': b[j1...j2] should be inserted at a[i1...i1]. + Note that i1==i2 in this case. + 'equal': a[i1...i2] == b[j1...j2] + + >>> s = new SequenceMatcher(null, 'qabxcd', 'abycdf') + >>> s.getOpcodes() + [ [ 'delete' , 0 , 1 , 0 , 0 ] , + [ 'equal' , 1 , 3 , 0 , 2 ] , + [ 'replace' , 3 , 4 , 2 , 3 ] , + [ 'equal' , 4 , 6 , 3 , 5 ] , + [ 'insert' , 6 , 6 , 5 , 6 ] ] + */ + var ai, answer, bj, i, j, size, tag, _i, _len, _ref, _ref1, _ref2; + + if (this.opcodes) { + return this.opcodes; + } + + i = j = 0; + this.opcodes = answer = []; + _ref = this.getMatchingBlocks(); + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + (_ref1 = _ref[_i]), + (ai = _ref1[0]), + (bj = _ref1[1]), + (size = _ref1[2]); + tag = ''; + + if (i < ai && j < bj) { + tag = 'replace'; + } else if (i < ai) { + tag = 'delete'; + } else if (j < bj) { + tag = 'insert'; + } + + if (tag) { + answer.push([tag, i, ai, j, bj]); + } + + (_ref2 = [ai + size, bj + size]), (i = _ref2[0]), (j = _ref2[1]); + + if (size) { + answer.push(['equal', ai, i, bj, j]); + } + } + + return answer; + }; + + SequenceMatcher.prototype.getGroupedOpcodes = function(n) { + var codes, + group, + groups, + i1, + i2, + j1, + j2, + nn, + tag, + _i, + _len, + _ref, + _ref1, + _ref2, + _ref3; + + if (n == null) { + n = 3; + } + /* + Isolate change clusters by eliminating ranges with no changes. + + Return a list groups with upto n lines of context. + Each group is in the same format as returned by get_opcodes(). + + >>> a = [1...40].map(String) + >>> b = a.slice() + >>> b[8...8] = 'i' + >>> b[20] += 'x' + >>> b[23...28] = [] + >>> b[30] += 'y' + >>> s = new SequenceMatcher(null, a, b) + >>> s.getGroupedOpcodes() + [ [ [ 'equal' , 5 , 8 , 5 , 8 ], + [ 'insert' , 8 , 8 , 8 , 9 ], + [ 'equal' , 8 , 11 , 9 , 12 ] ], + [ [ 'equal' , 16 , 19 , 17 , 20 ], + [ 'replace' , 19 , 20 , 20 , 21 ], + [ 'equal' , 20 , 22 , 21 , 23 ], + [ 'delete' , 22 , 27 , 23 , 23 ], + [ 'equal' , 27 , 30 , 23 , 26 ] ], + [ [ 'equal' , 31 , 34 , 27 , 30 ], + [ 'replace' , 34 , 35 , 30 , 31 ], + [ 'equal' , 35 , 38 , 31 , 34 ] ] ] + */ + + codes = this.getOpcodes(); + + if (!codes.length) { + codes = [['equal', 0, 1, 0, 1]]; + } + + if (codes[0][0] === 'equal') { + (_ref = codes[0]), + (tag = _ref[0]), + (i1 = _ref[1]), + (i2 = _ref[2]), + (j1 = _ref[3]), + (j2 = _ref[4]); + codes[0] = [tag, max(i1, i2 - n), i2, max(j1, j2 - n), j2]; + } + + if (codes[codes.length - 1][0] === 'equal') { + (_ref1 = codes[codes.length - 1]), + (tag = _ref1[0]), + (i1 = _ref1[1]), + (i2 = _ref1[2]), + (j1 = _ref1[3]), + (j2 = _ref1[4]); + codes[codes.length - 1] = [ + tag, + i1, + min(i2, i1 + n), + j1, + min(j2, j1 + n), + ]; + } + + nn = n + n; + groups = []; + group = []; + + for (_i = 0, _len = codes.length; _i < _len; _i++) { + (_ref2 = codes[_i]), + (tag = _ref2[0]), + (i1 = _ref2[1]), + (i2 = _ref2[2]), + (j1 = _ref2[3]), + (j2 = _ref2[4]); + + if (tag === 'equal' && i2 - i1 > nn) { + group.push([tag, i1, min(i2, i1 + n), j1, min(j2, j1 + n)]); + groups.push(group); + group = []; + (_ref3 = [max(i1, i2 - n), max(j1, j2 - n)]), + (i1 = _ref3[0]), + (j1 = _ref3[1]); + } + + group.push([tag, i1, i2, j1, j2]); + } + + if ( + group.length && + !(group.length === 1 && group[0][0] === 'equal') + ) { + groups.push(group); + } + + return groups; + }; + + SequenceMatcher.prototype.ratio = function() { + /* + Return a measure of the sequences' similarity (float in [0,1]). + + Where T is the total number of elements in both sequences, and + M is the number of matches, this is 2.0*M / T. + Note that this is 1 if the sequences are identical, and 0 if + they have nothing in common. + + .ratio() is expensive to compute if you haven't already computed + .getMatchingBlocks() or .getOpcodes(), in which case you may + want to try .quickRatio() or .realQuickRatio() first to get an + upper bound. + + >>> s = new SequenceMatcher(null, 'abcd', 'bcde') + >>> s.ratio() + 0.75 + >>> s.quickRatio() + 0.75 + >>> s.realQuickRatio() + 1.0 + */ + var match, matches, _i, _len, _ref; + + matches = 0; + _ref = this.getMatchingBlocks(); + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + match = _ref[_i]; + matches += match[2]; + } + + return _calculateRatio(matches, this.a.length + this.b.length); + }; + + SequenceMatcher.prototype.quickRatio = function() { + /* + Return an upper bound on ratio() relatively quickly. + + This isn't defined beyond that it is an upper bound on .ratio(), and + is faster to compute. + */ + var avail, + elt, + fullbcount, + matches, + numb, + _i, + _j, + _len, + _len1, + _ref, + _ref1; + + if (!this.fullbcount) { + this.fullbcount = fullbcount = {}; + _ref = this.b; + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elt = _ref[_i]; + fullbcount[elt] = (fullbcount[elt] || 0) + 1; + } + } + + fullbcount = this.fullbcount; + avail = {}; + matches = 0; + _ref1 = this.a; + + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + elt = _ref1[_j]; + + if (_has(avail, elt)) { + numb = avail[elt]; + } else { + numb = fullbcount[elt] || 0; + } + + avail[elt] = numb - 1; + + if (numb > 0) { + matches++; + } + } + + return _calculateRatio(matches, this.a.length + this.b.length); + }; + + SequenceMatcher.prototype.realQuickRatio = function() { + /* + Return an upper bound on ratio() very quickly. + + This isn't defined beyond that it is an upper bound on .ratio(), and + is faster to compute than either .ratio() or .quickRatio(). + */ + var la, lb, _ref; + + (_ref = [this.a.length, this.b.length]), + (la = _ref[0]), + (lb = _ref[1]); + return _calculateRatio(min(la, lb), la + lb); + }; + + return SequenceMatcher; + })(); + + getCloseMatches = function(word, possibilities, n, cutoff) { + var result, s, score, x, _i, _j, _len, _len1, _ref, _results; + + if (n == null) { + n = 3; + } + + if (cutoff == null) { + cutoff = 0.6; + } + /* + Use SequenceMatcher to return list of the best "good enough" matches. + + word is a sequence for which close matches are desired (typically a + string). + + possibilities is a list of sequences against which to match word + (typically a list of strings). + + Optional arg n (default 3) is the maximum number of close matches to + return. n must be > 0. + + Optional arg cutoff (default 0.6) is a float in [0, 1]. Possibilities + that don't score at least that similar to word are ignored. + + The best (no more than n) matches among the possibilities are returned + in a list, sorted by similarity score, most similar first. + + >>> getCloseMatches('appel', ['ape', 'apple', 'peach', 'puppy']) + ['apple', 'ape'] + >>> KEYWORDS = require('coffee-script').RESERVED + >>> getCloseMatches('wheel', KEYWORDS) + ['when', 'while'] + >>> getCloseMatches('accost', KEYWORDS) + ['const'] + */ + + if (!(n > 0)) { + throw new Error('n must be > 0: (' + n + ')'); + } + + if (!(0.0 <= cutoff && cutoff <= 1.0)) { + throw new Error('cutoff must be in [0.0, 1.0]: (' + cutoff + ')'); + } + + result = []; + s = new SequenceMatcher(); + s.setSeq2(word); + + for (_i = 0, _len = possibilities.length; _i < _len; _i++) { + x = possibilities[_i]; + s.setSeq1(x); + + if ( + s.realQuickRatio() >= cutoff && + s.quickRatio() >= cutoff && + s.ratio() >= cutoff + ) { + result.push([s.ratio(), x]); + } + } + + result = Heap.nlargest(result, n, _arrayCmp); + _results = []; + + for (_j = 0, _len1 = result.length; _j < _len1; _j++) { + (_ref = result[_j]), (score = _ref[0]), (x = _ref[1]); + + _results.push(x); + } + + return _results; + }; + + _countLeading = function(line, ch) { + /* + Return number of `ch` characters at the start of `line`. + + >>> _countLeading(' abc', ' ') + 3 + */ + var i, n, _ref; + + (_ref = [0, line.length]), (i = _ref[0]), (n = _ref[1]); + + while (i < n && line[i] === ch) { + i++; + } + + return i; + }; + + Differ = (function() { + /* + Differ is a class for comparing sequences of lines of text, and + producing human-readable differences or deltas. Differ uses + SequenceMatcher both to compare sequences of lines, and to compare + sequences of characters within similar (near-matching) lines. + + Each line of a Differ delta begins with a two-letter code: + + '- ' line unique to sequence 1 + '+ ' line unique to sequence 2 + ' ' line common to both sequences + '? ' line not present in either input sequence + + Lines beginning with '? ' attempt to guide the eye to intraline + differences, and were not present in either input sequence. These lines + can be confusing if the sequences contain tab characters. + + Note that Differ makes no claim to produce a *minimal* diff. To the + contrary, minimal diffs are often counter-intuitive, because they synch + up anywhere possible, sometimes accidental matches 100 pages apart. + Restricting synch points to contiguous matches preserves some notion of + locality, at the occasional cost of producing a longer diff. + + Example: Comparing two texts. + + >>> text1 = ['1. Beautiful is better than ugly.\n', + ... '2. Explicit is better than implicit.\n', + ... '3. Simple is better than complex.\n', + ... '4. Complex is better than complicated.\n'] + >>> text1.length + 4 + >>> text2 = ['1. Beautiful is better than ugly.\n', + ... '3. Simple is better than complex.\n', + ... '4. Complicated is better than complex.\n', + ... '5. Flat is better than nested.\n'] + + Next we instantiate a Differ object: + + >>> d = new Differ() + + Note that when instantiating a Differ object we may pass functions to + filter out line and character 'junk'. + + Finally, we compare the two: + + >>> result = d.compare(text1, text2) + [ ' 1. Beautiful is better than ugly.\n', + '- 2. Explicit is better than implicit.\n', + '- 3. Simple is better than complex.\n', + '+ 3. Simple is better than complex.\n', + '? ++\n', + '- 4. Complex is better than complicated.\n', + '? ^ ---- ^\n', + '+ 4. Complicated is better than complex.\n', + '? ++++ ^ ^\n', + '+ 5. Flat is better than nested.\n' ] + + Methods: + + constructor(linejunk=null, charjunk=null) + Construct a text differencer, with optional filters. + compare(a, b) + Compare two sequences of lines; generate the resulting delta. + */ + function Differ(linejunk, charjunk) { + this.linejunk = linejunk; + this.charjunk = charjunk; + /* + Construct a text differencer, with optional filters. + + The two optional keyword parameters are for filter functions: + + - `linejunk`: A function that should accept a single string argument, + and return true iff the string is junk. The module-level function + `IS_LINE_JUNK` may be used to filter out lines without visible + characters, except for at most one splat ('#'). It is recommended + to leave linejunk null. + + - `charjunk`: A function that should accept a string of length 1. The + module-level function `IS_CHARACTER_JUNK` may be used to filter out + whitespace characters (a blank or tab; **note**: bad idea to include + newline in this!). Use of IS_CHARACTER_JUNK is recommended. + */ + } + + Differ.prototype.compare = function(a, b) { + /* + Compare two sequences of lines; generate the resulting delta. + + Each sequence must contain individual single-line strings ending with + newlines. Such sequences can be obtained from the `readlines()` method + of file-like objects. The delta generated also consists of newline- + terminated strings, ready to be printed as-is via the writeline() + method of a file-like object. + + Example: + + >>> d = new Differ + >>> d.compare(['one\n', 'two\n', 'three\n'], + ... ['ore\n', 'tree\n', 'emu\n']) + [ '- one\n', + '? ^\n', + '+ ore\n', + '? ^\n', + '- two\n', + '- three\n', + '? -\n', + '+ tree\n', + '+ emu\n' ] + */ + var ahi, + alo, + bhi, + blo, + cruncher, + g, + line, + lines, + tag, + _i, + _j, + _len, + _len1, + _ref, + _ref1; + + cruncher = new SequenceMatcher(this.linejunk, a, b); + lines = []; + _ref = cruncher.getOpcodes(); + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + (_ref1 = _ref[_i]), + (tag = _ref1[0]), + (alo = _ref1[1]), + (ahi = _ref1[2]), + (blo = _ref1[3]), + (bhi = _ref1[4]); + + switch (tag) { + case 'replace': + g = this._fancyReplace(a, alo, ahi, b, blo, bhi); + break; + + case 'delete': + g = this._dump('-', a, alo, ahi); + break; + + case 'insert': + g = this._dump('+', b, blo, bhi); + break; + + case 'equal': + g = this._dump(' ', a, alo, ahi); + break; + + default: + throw new Error('unknow tag (' + tag + ')'); + } + + for (_j = 0, _len1 = g.length; _j < _len1; _j++) { + line = g[_j]; + lines.push(line); + } + } + + return lines; + }; + + Differ.prototype._dump = function(tag, x, lo, hi) { + /* + Generate comparison results for a same-tagged range. + */ + var i, _i, _results; + + _results = []; + + for ( + i = _i = lo; + lo <= hi ? _i < hi : _i > hi; + i = lo <= hi ? ++_i : --_i + ) { + _results.push('' + tag + ' ' + x[i]); + } + + return _results; + }; + + Differ.prototype._plainReplace = function(a, alo, ahi, b, blo, bhi) { + var first, g, line, lines, second, _i, _j, _len, _len1, _ref; + + if (bhi - blo < ahi - alo) { + first = this._dump('+', b, blo, bhi); + second = this._dump('-', a, alo, ahi); + } else { + first = this._dump('-', a, alo, ahi); + second = this._dump('+', b, blo, bhi); + } + + lines = []; + _ref = [first, second]; + + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + g = _ref[_i]; + + for (_j = 0, _len1 = g.length; _j < _len1; _j++) { + line = g[_j]; + lines.push(line); + } + } + + return lines; + }; + + Differ.prototype._fancyReplace = function(a, alo, ahi, b, blo, bhi) { + /* + When replacing one block of lines with another, search the blocks + for *similar* lines; the best-matching pair (if any) is used as a + synch point, and intraline difference marking is done on the + similar pair. Lots of work, but often worth it. + + Example: + >>> d = new Differ + >>> d._fancyReplace(['abcDefghiJkl\n'], 0, 1, + ... ['abcdefGhijkl\n'], 0, 1) + [ '- abcDefghiJkl\n', + '? ^ ^ ^\n', + '+ abcdefGhijkl\n', + '? ^ ^ ^\n' ] + */ + var aelt, + ai, + ai1, + ai2, + atags, + belt, + bestRatio, + besti, + bestj, + bj, + bj1, + bj2, + btags, + cruncher, + cutoff, + eqi, + eqj, + i, + j, + la, + lb, + line, + lines, + tag, + _i, + _j, + _k, + _l, + _len, + _len1, + _len2, + _len3, + _len4, + _m, + _n, + _o, + _ref, + _ref1, + _ref10, + _ref11, + _ref12, + _ref2, + _ref3, + _ref4, + _ref5, + _ref6, + _ref7, + _ref8, + _ref9; + + (_ref = [0.74, 0.75]), (bestRatio = _ref[0]), (cutoff = _ref[1]); + cruncher = new SequenceMatcher(this.charjunk); + (_ref1 = [null, null]), (eqi = _ref1[0]), (eqj = _ref1[1]); + lines = []; + + for ( + j = _i = blo; + blo <= bhi ? _i < bhi : _i > bhi; + j = blo <= bhi ? ++_i : --_i + ) { + bj = b[j]; + cruncher.setSeq2(bj); + + for ( + i = _j = alo; + alo <= ahi ? _j < ahi : _j > ahi; + i = alo <= ahi ? ++_j : --_j + ) { + ai = a[i]; + + if (ai === bj) { + if (eqi === null) { + (_ref2 = [i, j]), (eqi = _ref2[0]), (eqj = _ref2[1]); + } + + continue; + } + + cruncher.setSeq1(ai); + + if ( + cruncher.realQuickRatio() > bestRatio && + cruncher.quickRatio() > bestRatio && + cruncher.ratio() > bestRatio + ) { + (_ref3 = [cruncher.ratio(), i, j]), + (bestRatio = _ref3[0]), + (besti = _ref3[1]), + (bestj = _ref3[2]); + } + } + } + + if (bestRatio < cutoff) { + if (eqi === null) { + _ref4 = this._plainReplace(a, alo, ahi, b, blo, bhi); + + for (_k = 0, _len = _ref4.length; _k < _len; _k++) { + line = _ref4[_k]; + lines.push(line); + } + + return lines; + } + + (_ref5 = [eqi, eqj, 1.0]), + (besti = _ref5[0]), + (bestj = _ref5[1]), + (bestRatio = _ref5[2]); + } else { + eqi = null; + } + + _ref6 = this._fancyHelper(a, alo, besti, b, blo, bestj); + + for (_l = 0, _len1 = _ref6.length; _l < _len1; _l++) { + line = _ref6[_l]; + lines.push(line); + } + + (_ref7 = [a[besti], b[bestj]]), (aelt = _ref7[0]), (belt = _ref7[1]); + + if (eqi === null) { + atags = btags = ''; + cruncher.setSeqs(aelt, belt); + _ref8 = cruncher.getOpcodes(); + + for (_m = 0, _len2 = _ref8.length; _m < _len2; _m++) { + (_ref9 = _ref8[_m]), + (tag = _ref9[0]), + (ai1 = _ref9[1]), + (ai2 = _ref9[2]), + (bj1 = _ref9[3]), + (bj2 = _ref9[4]); + (_ref10 = [ai2 - ai1, bj2 - bj1]), + (la = _ref10[0]), + (lb = _ref10[1]); + + switch (tag) { + case 'replace': + atags += Array(la + 1).join('^'); + btags += Array(lb + 1).join('^'); + break; + + case 'delete': + atags += Array(la + 1).join('-'); + break; + + case 'insert': + btags += Array(lb + 1).join('+'); + break; + + case 'equal': + atags += Array(la + 1).join(' '); + btags += Array(lb + 1).join(' '); + break; + + default: + throw new Error('unknow tag (' + tag + ')'); + } + } + + _ref11 = this._qformat(aelt, belt, atags, btags); + + for (_n = 0, _len3 = _ref11.length; _n < _len3; _n++) { + line = _ref11[_n]; + lines.push(line); + } + } else { + lines.push(' ' + aelt); + } + + _ref12 = this._fancyHelper(a, besti + 1, ahi, b, bestj + 1, bhi); + + for (_o = 0, _len4 = _ref12.length; _o < _len4; _o++) { + line = _ref12[_o]; + lines.push(line); + } + + return lines; + }; + + Differ.prototype._fancyHelper = function(a, alo, ahi, b, blo, bhi) { + var g; + g = []; + + if (alo < ahi) { + if (blo < bhi) { + g = this._fancyReplace(a, alo, ahi, b, blo, bhi); + } else { + g = this._dump('-', a, alo, ahi); + } + } else if (blo < bhi) { + g = this._dump('+', b, blo, bhi); + } + + return g; + }; + + Differ.prototype._qformat = function(aline, bline, atags, btags) { + /* + Format "?" output and deal with leading tabs. + + Example: + + >>> d = new Differ + >>> d._qformat('\tabcDefghiJkl\n', '\tabcdefGhijkl\n', + [ '- \tabcDefghiJkl\n', + '? \t ^ ^ ^\n', + '+ \tabcdefGhijkl\n', + '? \t ^ ^ ^\n' ] + */ + var common, lines; + lines = []; + common = min(_countLeading(aline, '\t'), _countLeading(bline, '\t')); + common = min(common, _countLeading(atags.slice(0, common), ' ')); + common = min(common, _countLeading(btags.slice(0, common), ' ')); + atags = atags.slice(common).replace(/\s+$/, ''); + btags = btags.slice(common).replace(/\s+$/, ''); + lines.push('- ' + aline); + + if (atags.length) { + lines.push('? ' + Array(common + 1).join('\t') + atags + '\n'); + } + + lines.push('+ ' + bline); + + if (btags.length) { + lines.push('? ' + Array(common + 1).join('\t') + btags + '\n'); + } + + return lines; + }; + + return Differ; + })(); + + IS_LINE_JUNK = function(line, pat) { + if (pat == null) { + pat = /^\s*#?\s*$/; + } + /* + Return 1 for ignorable line: iff `line` is blank or contains a single '#'. + + Examples: + + >>> IS_LINE_JUNK('\n') + true + >>> IS_LINE_JUNK(' # \n') + true + >>> IS_LINE_JUNK('hello\n') + false + */ + + return pat.test(line); + }; + + IS_CHARACTER_JUNK = function(ch, ws) { + if (ws == null) { + ws = ' \t'; + } + /* + Return 1 for ignorable character: iff `ch` is a space or tab. + + Examples: + >>> IS_CHARACTER_JUNK(' ').should.be.true + true + >>> IS_CHARACTER_JUNK('\t').should.be.true + true + >>> IS_CHARACTER_JUNK('\n').should.be.false + false + >>> IS_CHARACTER_JUNK('x').should.be.false + false + */ + + return __indexOf.call(ws, ch) >= 0; + }; + + _formatRangeUnified = function(start, stop) { + /* + Convert range to the "ed" format' + */ + var beginning, length; + beginning = start + 1; + length = stop - start; + + if (length === 1) { + return '' + beginning; + } + + if (!length) { + beginning--; + } + + return '' + beginning + ',' + length; + }; + + unifiedDiff = function(a, b, _arg) { + var file1Range, + file2Range, + first, + fromdate, + fromfile, + fromfiledate, + group, + i1, + i2, + j1, + j2, + last, + line, + lines, + lineterm, + n, + started, + tag, + todate, + tofile, + tofiledate, + _i, + _j, + _k, + _l, + _len, + _len1, + _len2, + _len3, + _len4, + _m, + _ref, + _ref1, + _ref2, + _ref3, + _ref4, + _ref5, + _ref6; + + (_ref = _arg != null ? _arg : {}), + (fromfile = _ref.fromfile), + (tofile = _ref.tofile), + (fromfiledate = _ref.fromfiledate), + (tofiledate = _ref.tofiledate), + (n = _ref.n), + (lineterm = _ref.lineterm); + /* + Compare two sequences of lines; generate the delta as a unified diff. + + Unified diffs are a compact way of showing line changes and a few + lines of context. The number of context lines is set by 'n' which + defaults to three. + + By default, the diff control lines (those with ---, +++, or @@) are + created with a trailing newline. + + For inputs that do not have trailing newlines, set the lineterm + argument to "" so that the output will be uniformly newline free. + + The unidiff format normally has a header for filenames and modification + times. Any or all of these may be specified using strings for + 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. + The modification times are normally expressed in the ISO 8601 format. + + Example: + + >>> unifiedDiff('one two three four'.split(' '), + ... 'zero one tree four'.split(' '), { + ... fromfile: 'Original' + ... tofile: 'Current', + ... fromfiledate: '2005-01-26 23:30:50', + ... tofiledate: '2010-04-02 10:20:52', + ... lineterm: '' + ... }) + [ '--- Original\t2005-01-26 23:30:50', + '+++ Current\t2010-04-02 10:20:52', + '@@ -1,4 +1,4 @@', + '+zero', + ' one', + '-two', + '-three', + '+tree', + ' four' ] + */ + + if (fromfile == null) { + fromfile = ''; + } + + if (tofile == null) { + tofile = ''; + } + + if (fromfiledate == null) { + fromfiledate = ''; + } + + if (tofiledate == null) { + tofiledate = ''; + } + + if (n == null) { + n = 3; + } + + if (lineterm == null) { + lineterm = '\n'; + } + + lines = []; + started = false; + _ref1 = new SequenceMatcher(null, a, b).getGroupedOpcodes(); + + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + group = _ref1[_i]; + + if (!started) { + started = true; + fromdate = fromfiledate ? '\t' + fromfiledate : ''; + todate = tofiledate ? '\t' + tofiledate : ''; + lines.push('--- ' + fromfile + fromdate + lineterm); + lines.push('+++ ' + tofile + todate + lineterm); + } + + (_ref2 = [group[0], group[group.length - 1]]), + (first = _ref2[0]), + (last = _ref2[1]); + file1Range = _formatRangeUnified(first[1], last[2]); + file2Range = _formatRangeUnified(first[3], last[4]); + lines.push( + '@@ -' + file1Range + ' +' + file2Range + ' @@' + lineterm + ); + + for (_j = 0, _len1 = group.length; _j < _len1; _j++) { + (_ref3 = group[_j]), + (tag = _ref3[0]), + (i1 = _ref3[1]), + (i2 = _ref3[2]), + (j1 = _ref3[3]), + (j2 = _ref3[4]); + + if (tag === 'equal') { + _ref4 = a.slice(i1, i2); + + for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) { + line = _ref4[_k]; + lines.push(' ' + line); + } + + continue; + } + + if (tag === 'replace' || tag === 'delete') { + _ref5 = a.slice(i1, i2); + + for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) { + line = _ref5[_l]; + lines.push('-' + line); + } + } + + if (tag === 'replace' || tag === 'insert') { + _ref6 = b.slice(j1, j2); + + for (_m = 0, _len4 = _ref6.length; _m < _len4; _m++) { + line = _ref6[_m]; + lines.push('+' + line); + } + } + } + } + + return lines; + }; + + _formatRangeContext = function(start, stop) { + /* + Convert range to the "ed" format' + */ + var beginning, length; + beginning = start + 1; + length = stop - start; + + if (!length) { + beginning--; + } + + if (length <= 1) { + return '' + beginning; + } + + return '' + beginning + ',' + (beginning + length - 1); + }; + + contextDiff = function(a, b, _arg) { + var file1Range, + file2Range, + first, + fromdate, + fromfile, + fromfiledate, + group, + i1, + i2, + j1, + j2, + last, + line, + lines, + lineterm, + n, + prefix, + started, + tag, + todate, + tofile, + tofiledate, + _, + _i, + _j, + _k, + _l, + _len, + _len1, + _len2, + _len3, + _len4, + _m, + _ref, + _ref1, + _ref2, + _ref3, + _ref4, + _ref5, + _ref6; + + (_ref = _arg != null ? _arg : {}), + (fromfile = _ref.fromfile), + (tofile = _ref.tofile), + (fromfiledate = _ref.fromfiledate), + (tofiledate = _ref.tofiledate), + (n = _ref.n), + (lineterm = _ref.lineterm); + /* + Compare two sequences of lines; generate the delta as a context diff. + + Context diffs are a compact way of showing line changes and a few + lines of context. The number of context lines is set by 'n' which + defaults to three. + + By default, the diff control lines (those with *** or ---) are + created with a trailing newline. This is helpful so that inputs + created from file.readlines() result in diffs that are suitable for + file.writelines() since both the inputs and outputs have trailing + newlines. + + For inputs that do not have trailing newlines, set the lineterm + argument to "" so that the output will be uniformly newline free. + + The context diff format normally has a header for filenames and + modification times. Any or all of these may be specified using + strings for 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. + The modification times are normally expressed in the ISO 8601 format. + If not specified, the strings default to blanks. + + Example: + >>> a = ['one\n', 'two\n', 'three\n', 'four\n'] + >>> b = ['zero\n', 'one\n', 'tree\n', 'four\n'] + >>> contextDiff(a, b, {fromfile: 'Original', tofile: 'Current'}) + [ '*** Original\n', + '--- Current\n', + '***************\n', + '*** 1,4 ****\n', + ' one\n', + '! two\n', + '! three\n', + ' four\n', + '--- 1,4 ----\n', + '+ zero\n', + ' one\n', + '! tree\n', + ' four\n' ] + */ + + if (fromfile == null) { + fromfile = ''; + } + + if (tofile == null) { + tofile = ''; + } + + if (fromfiledate == null) { + fromfiledate = ''; + } + + if (tofiledate == null) { + tofiledate = ''; + } + + if (n == null) { + n = 3; + } + + if (lineterm == null) { + lineterm = '\n'; + } + + prefix = { + insert: '+ ', + delete: '- ', + replace: '! ', + equal: ' ', + }; + started = false; + lines = []; + _ref1 = new SequenceMatcher(null, a, b).getGroupedOpcodes(); + + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + group = _ref1[_i]; + + if (!started) { + started = true; + fromdate = fromfiledate ? '\t' + fromfiledate : ''; + todate = tofiledate ? '\t' + tofiledate : ''; + lines.push('*** ' + fromfile + fromdate + lineterm); + lines.push('--- ' + tofile + todate + lineterm); + (_ref2 = [group[0], group[group.length - 1]]), + (first = _ref2[0]), + (last = _ref2[1]); + lines.push('***************' + lineterm); + file1Range = _formatRangeContext(first[1], last[2]); + lines.push('*** ' + file1Range + ' ****' + lineterm); + + if ( + _any( + (function() { + var _j, _len1, _ref3, _results; + + _results = []; + + for (_j = 0, _len1 = group.length; _j < _len1; _j++) { + (_ref3 = group[_j]), + (tag = _ref3[0]), + (_ = _ref3[1]), + (_ = _ref3[2]), + (_ = _ref3[3]), + (_ = _ref3[4]); + + _results.push(tag === 'replace' || tag === 'delete'); + } + + return _results; + })() + ) + ) { + for (_j = 0, _len1 = group.length; _j < _len1; _j++) { + (_ref3 = group[_j]), + (tag = _ref3[0]), + (i1 = _ref3[1]), + (i2 = _ref3[2]), + (_ = _ref3[3]), + (_ = _ref3[4]); + + if (tag !== 'insert') { + _ref4 = a.slice(i1, i2); + + for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) { + line = _ref4[_k]; + lines.push(prefix[tag] + line); + } + } + } + } + + file2Range = _formatRangeContext(first[3], last[4]); + lines.push('--- ' + file2Range + ' ----' + lineterm); + + if ( + _any( + (function() { + var _l, _len3, _ref5, _results; + + _results = []; + + for (_l = 0, _len3 = group.length; _l < _len3; _l++) { + (_ref5 = group[_l]), + (tag = _ref5[0]), + (_ = _ref5[1]), + (_ = _ref5[2]), + (_ = _ref5[3]), + (_ = _ref5[4]); + + _results.push(tag === 'replace' || tag === 'insert'); + } + + return _results; + })() + ) + ) { + for (_l = 0, _len3 = group.length; _l < _len3; _l++) { + (_ref5 = group[_l]), + (tag = _ref5[0]), + (_ = _ref5[1]), + (_ = _ref5[2]), + (j1 = _ref5[3]), + (j2 = _ref5[4]); + + if (tag !== 'delete') { + _ref6 = b.slice(j1, j2); + + for (_m = 0, _len4 = _ref6.length; _m < _len4; _m++) { + line = _ref6[_m]; + lines.push(prefix[tag] + line); + } + } + } + } + } + } + + return lines; + }; + + ndiff = function(a, b, linejunk, charjunk) { + if (charjunk == null) { + charjunk = IS_CHARACTER_JUNK; + } + /* + Compare `a` and `b` (lists of strings); return a `Differ`-style delta. + + Optional keyword parameters `linejunk` and `charjunk` are for filter + functions (or None): + + - linejunk: A function that should accept a single string argument, and + return true iff the string is junk. The default is null, and is + recommended; + + - charjunk: A function that should accept a string of length 1. The + default is module-level function IS_CHARACTER_JUNK, which filters out + whitespace characters (a blank or tab; note: bad idea to include newline + in this!). + + Example: + >>> a = ['one\n', 'two\n', 'three\n'] + >>> b = ['ore\n', 'tree\n', 'emu\n'] + >>> ndiff(a, b) + [ '- one\n', + '? ^\n', + '+ ore\n', + '? ^\n', + '- two\n', + '- three\n', + '? -\n', + '+ tree\n', + '+ emu\n' ] + */ + + return new Differ(linejunk, charjunk).compare(a, b); + }; + + restore = function(delta, which) { + /* + Generate one of the two sequences that generated a delta. + + Given a `delta` produced by `Differ.compare()` or `ndiff()`, extract + lines originating from file 1 or 2 (parameter `which`), stripping off line + prefixes. + + Examples: + >>> a = ['one\n', 'two\n', 'three\n'] + >>> b = ['ore\n', 'tree\n', 'emu\n'] + >>> diff = ndiff(a, b) + >>> restore(diff, 1) + [ 'one\n', + 'two\n', + 'three\n' ] + >>> restore(diff, 2) + [ 'ore\n', + 'tree\n', + 'emu\n' ] + */ + var line, lines, prefixes, tag, _i, _len, _ref; + + tag = { + 1: '- ', + 2: '+ ', + }[which]; + + if (!tag) { + throw new Error('unknow delta choice (must be 1 or 2): ' + which); + } + + prefixes = [' ', tag]; + lines = []; + + for (_i = 0, _len = delta.length; _i < _len; _i++) { + line = delta[_i]; + + if ( + ((_ref = line.slice(0, 2)), __indexOf.call(prefixes, _ref) >= 0) + ) { + lines.push(line.slice(2)); + } + } + + return lines; + }; + + exports._arrayCmp = _arrayCmp; + exports.SequenceMatcher = SequenceMatcher; + exports.getCloseMatches = getCloseMatches; + exports._countLeading = _countLeading; + exports.Differ = Differ; + exports.IS_LINE_JUNK = IS_LINE_JUNK; + exports.IS_CHARACTER_JUNK = IS_CHARACTER_JUNK; + exports._formatRangeUnified = _formatRangeUnified; + exports.unifiedDiff = unifiedDiff; + exports._formatRangeContext = _formatRangeContext; + exports.contextDiff = contextDiff; + exports.ndiff = ndiff; + exports.restore = restore; + }.call(this)); + }); + var difflib_1 = difflib._arrayCmp; + var difflib_2 = difflib.SequenceMatcher; + var difflib_3 = difflib.getCloseMatches; + var difflib_4 = difflib._countLeading; + var difflib_5 = difflib.Differ; + var difflib_6 = difflib.IS_LINE_JUNK; + var difflib_7 = difflib.IS_CHARACTER_JUNK; + var difflib_8 = difflib._formatRangeUnified; + var difflib_9 = difflib.unifiedDiff; + var difflib_10 = difflib._formatRangeContext; + var difflib_11 = difflib.contextDiff; + var difflib_12 = difflib.ndiff; + var difflib_13 = difflib.restore; + + var difflib$1 = difflib; + + function scoreSimilarity(score, articleUrl, href) { + // Do this last and only if we have a real candidate, because it's + // potentially expensive computationally. Compare the link to this + // URL using difflib to get the % similarity of these URLs. On a + // sliding scale, subtract points from this link based on + // similarity. + if (score > 0) { + var similarity = new difflib$1.SequenceMatcher( + null, + articleUrl, + href + ).ratio(); // Subtract .1 from diff_percent when calculating modifier, + // which means that if it's less than 10% different, we give a + // bonus instead. Ex: + // 3% different = +17.5 points + // 10% different = 0 points + // 20% different = -25 points + + var diffPercent = 1.0 - similarity; + var diffModifier = -(250 * (diffPercent - 0.2)); + return score + diffModifier; + } + + return 0; + } + + function scoreLinkText(linkText, pageNum) { + // If the link text can be parsed as a number, give it a minor + // bonus, with a slight bias towards lower numbered pages. This is + // so that pages that might not have 'next' in their text can still + // get scored, and sorted properly by score. + var score = 0; + + if (IS_DIGIT_RE.test(linkText.trim())) { + var linkTextAsNum = _parseInt$2(linkText, 10); // If it's the first page, we already got it on the first call. + // Give it a negative score. Otherwise, up to page 10, give a + // small bonus. + + if (linkTextAsNum < 2) { + score = -30; + } else { + score = Math.max(0, 10 - linkTextAsNum); + } // If it appears that the current page number is greater than + // this links page number, it's a very bad sign. Give it a big + // penalty. + + if (pageNum && pageNum >= linkTextAsNum) { + score -= 50; + } + } + + return score; + } + + function scorePageInLink(pageNum, isWp) { + // page in the link = bonus. Intentionally ignore wordpress because + // their ?p=123 link style gets caught by this even though it means + // separate documents entirely. + if (pageNum && !isWp) { + return 50; + } + + return 0; + } + + var DIGIT_RE$2 = /\d/; // A list of words that, if found in link text or URLs, likely mean that + // this link is not a next page link. + + var EXTRANEOUS_LINK_HINTS$1 = [ + 'print', + 'archive', + 'comment', + 'discuss', + 'e-mail', + 'email', + 'share', + 'reply', + 'all', + 'login', + 'sign', + 'single', + 'adx', + 'entry-unrelated', + ]; + var EXTRANEOUS_LINK_HINTS_RE$1 = new RegExp( + EXTRANEOUS_LINK_HINTS$1.join('|'), + 'i' + ); // Match any link text/classname/id that looks like it could mean the next + // page. Things like: next, continue, >, >>, » but not >|, »| as those can + // mean last page. + + var NEXT_LINK_TEXT_RE$1 = new RegExp( + '(next|weiter|continue|>([^|]|$)|»([^|]|$))', + 'i' + ); // Match any link text/classname/id that looks like it is an end link: things + // like "first", "last", "end", etc. + + var CAP_LINK_TEXT_RE$1 = new RegExp('(first|last|end)', 'i'); // Match any link text/classname/id that looks like it means the previous + // page. + + var PREV_LINK_TEXT_RE$1 = new RegExp('(prev|earl|old|new|<|«)', 'i'); // Match any phrase that looks like it could be page, or paging, or pagination + + function scoreExtraneousLinks(href) { + // If the URL itself contains extraneous values, give a penalty. + if (EXTRANEOUS_LINK_HINTS_RE$1.test(href)) { + return -25; + } + + return 0; + } + + function makeSig($link) { + return '' + .concat($link.attr('class') || '', ' ') + .concat($link.attr('id') || ''); + } + + function scoreByParents$1($link) { + // If a parent node contains paging-like classname or id, give a + // bonus. Additionally, if a parent_node contains bad content + // (like 'sponsor'), give a penalty. + var $parent = $link.parent(); + var positiveMatch = false; + var negativeMatch = false; + var score = 0; + + from_1$1(range(0, 4)).forEach(function() { + if ($parent.length === 0) { + return; + } + + var parentData = makeSig($parent, ' '); // If we have 'page' or 'paging' in our data, that's a good + // sign. Add a bonus. + + if (!positiveMatch && PAGE_RE.test(parentData)) { + positiveMatch = true; + score += 25; + } // If we have 'comment' or something in our data, and + // we don't have something like 'content' as well, that's + // a bad sign. Give a penalty. + + if ( + !negativeMatch && + NEGATIVE_SCORE_RE.test(parentData) && + EXTRANEOUS_LINK_HINTS_RE$1.test(parentData) + ) { + if (!POSITIVE_SCORE_RE.test(parentData)) { + negativeMatch = true; + score -= 25; + } + } + + $parent = $parent.parent(); + }); + + return score; + } + + function scorePrevLink(linkData) { + // If the link has something like "previous", its definitely + // an old link, skip it. + if (PREV_LINK_TEXT_RE$1.test(linkData)) { + return -200; + } + + return 0; + } + + function shouldScore( + href, + articleUrl, + baseUrl, + parsedUrl, + linkText, + previousUrls + ) { + // skip if we've already fetched this url + if ( + previousUrls.find(function(url$$1) { + return href === url$$1; + }) !== undefined + ) { + return false; + } // If we've already parsed this URL, or the URL matches the base + // URL, or is empty, skip it. + + if (!href || href === articleUrl || href === baseUrl) { + return false; + } + + var hostname = parsedUrl.hostname; + + var _URL$parse = url.parse(href), + linkHost = _URL$parse.hostname; // Domain mismatch. + + if (linkHost !== hostname) { + return false; + } // If href doesn't contain a digit after removing the base URL, + // it's certainly not the next page. + + var fragment = href.replace(baseUrl, ''); + + if (!DIGIT_RE$2.test(fragment)) { + return false; + } // This link has extraneous content (like "comment") in its link + // text, so we skip it. + + if (EXTRANEOUS_LINK_HINTS_RE$1.test(linkText)) { + return false; + } // Next page link text is never long, skip if it is too long. + + if (linkText.length > 25) { + return false; + } + + return true; + } + + function scoreBaseUrl(href, baseRegex) { + // If the baseUrl isn't part of this URL, penalize this + // link. It could still be the link, but the odds are lower. + // Example: + // http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in-ActionScript-3/Page1.html + if (!baseRegex.test(href)) { + return -25; + } + + return 0; + } + + function scoreNextLinkText(linkData) { + // Things like "next", ">>", etc. + if (NEXT_LINK_TEXT_RE$1.test(linkData)) { + return 50; + } + + return 0; + } + + function scoreCapLinks(linkData) { + // Cap links are links like "last", etc. + if (CAP_LINK_TEXT_RE$1.test(linkData)) { + // If we found a link like "last", but we've already seen that + // this link is also "next", it's fine. If it's not been + // previously marked as "next", then it's probably bad. + // Penalize. + if (NEXT_LINK_TEXT_RE$1.test(linkData)) { + return -65; + } + } + + return 0; + } + + function makeBaseRegex(baseUrl) { + return new RegExp('^'.concat(baseUrl), 'i'); + } + + function makeSig$1($link, linkText) { + return '' + .concat(linkText || $link.text(), ' ') + .concat($link.attr('class') || '', ' ') + .concat($link.attr('id') || ''); + } + + function scoreLinks(_ref) { + var links = _ref.links, + articleUrl = _ref.articleUrl, + baseUrl = _ref.baseUrl, + parsedUrl = _ref.parsedUrl, + $ = _ref.$, + _ref$previousUrls = _ref.previousUrls, + previousUrls = _ref$previousUrls === void 0 ? [] : _ref$previousUrls; + parsedUrl = parsedUrl || url.parse(articleUrl); + var baseRegex = makeBaseRegex(baseUrl); + var isWp = isWordpress($); // Loop through all links, looking for hints that they may be next-page + // links. Things like having "page" in their textContent, className or + // id, or being a child of a node with a page-y className or id. + // + // After we do that, assign each page a score, and pick the one that + // looks most like the next page link, as long as its score is strong + // enough to have decent confidence. + + var scoredPages = links.reduce(function(possiblePages, link) { + // Remove any anchor data since we don't do a good job + // standardizing URLs (it's hard), we're going to do + // some checking with and without a trailing slash + var attrs = getAttrs(link); // if href is undefined, return + + if (!attrs.href) return possiblePages; + var href = removeAnchor(attrs.href); + var $link = $(link); + var linkText = $link.text(); + + if ( + !shouldScore( + href, + articleUrl, + baseUrl, + parsedUrl, + linkText, + previousUrls + ) + ) { + return possiblePages; + } // ## PASSED THE FIRST-PASS TESTS. Start scoring. ## + + if (!possiblePages[href]) { + possiblePages[href] = { + score: 0, + linkText: linkText, + href: href, + }; + } else { + possiblePages[href].linkText = '' + .concat(possiblePages[href].linkText, '|') + .concat(linkText); + } + + var possiblePage = possiblePages[href]; + var linkData = makeSig$1($link, linkText); + var pageNum = pageNumFromUrl(href); + var score = scoreBaseUrl(href, baseRegex); + score += scoreNextLinkText(linkData); + score += scoreCapLinks(linkData); + score += scorePrevLink(linkData); + score += scoreByParents$1($link); + score += scoreExtraneousLinks(href); + score += scorePageInLink(pageNum, isWp); + score += scoreLinkText(linkText, pageNum); + score += scoreSimilarity(score, articleUrl, href); + possiblePage.score = score; + return possiblePages; + }, {}); + return ownKeys$1(scoredPages).length === 0 ? null : scoredPages; + } + + // for multi-page articles + + var GenericNextPageUrlExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + url$$1 = _ref.url, + parsedUrl = _ref.parsedUrl, + _ref$previousUrls = _ref.previousUrls, + previousUrls = _ref$previousUrls === void 0 ? [] : _ref$previousUrls; + parsedUrl = parsedUrl || url.parse(url$$1); + var articleUrl = removeAnchor(url$$1); + var baseUrl = articleBaseUrl(url$$1, parsedUrl); + var links = $('a[href]').toArray(); + var scoredLinks = scoreLinks({ + links: links, + articleUrl: articleUrl, + baseUrl: baseUrl, + parsedUrl: parsedUrl, + $: $, + previousUrls: previousUrls, + }); // If no links were scored, return null + + if (!scoredLinks) return null; // now that we've scored all possible pages, + // find the biggest one. + + var topPage = ownKeys$1(scoredLinks).reduce( + function(acc, link) { + var scoredLink = scoredLinks[link]; + return scoredLink.score > acc.score ? scoredLink : acc; + }, + { + score: -100, + } + ); // If the score is less than 50, we're not confident enough to use it, + // so we fail. + + if (topPage.score >= 50) { + return topPage.href; + } + + return null; + }, + }; + + var CANONICAL_META_SELECTORS = ['og:url']; + + function parseDomain(url$$1) { + var parsedUrl = url.parse(url$$1); + var hostname = parsedUrl.hostname; + return hostname; + } + + function result(url$$1) { + return { + url: url$$1, + domain: parseDomain(url$$1), + }; + } + + var GenericUrlExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + url$$1 = _ref.url, + metaCache = _ref.metaCache; + var $canonical = $('link[rel=canonical]'); + + if ($canonical.length !== 0) { + var href = $canonical.attr('href'); + + if (href) { + return result(href); + } + } + + var metaUrl = extractFromMeta$$1($, CANONICAL_META_SELECTORS, metaCache); + + if (metaUrl) { + return result(metaUrl); + } + + return result(url$$1); + }, + }; + + var defaults = { + ellipse: '…', + chars: [' ', '-'], + max: 140, + truncate: true, + }; + + function ellipsize(str, max, ellipse, chars, truncate) { + if (str.length < max) return str; + var last = 0, + c = '', + midMax = Math.floor(max / 2), + computedMax = truncate === 'middle' ? midMax : max; + + for (var i = 0, len = str.length; i < len; i++) { + c = str.charAt(i); + + if (chars.indexOf(c) !== -1 && truncate !== 'middle') { + last = i; + } + + if (i < computedMax) continue; + + if (last === 0) { + return !truncate + ? '' + : str.substring(0, computedMax - 1) + + ellipse + + (truncate === 'middle' + ? str.substring(str.length - midMax, str.length) + : ''); + } + + return str.substring(0, last) + ellipse; + } + + return str; + } + + var ellipsize_1 = function(str, max, opts) { + if (typeof str !== 'string' || str.length === 0) return ''; + if (max === 0) return ''; + opts = opts || {}; + + for (var key in defaults) { + if (opts[key] === null || typeof opts[key] === 'undefined') { + opts[key] = defaults[key]; + } + } + + opts.max = max || opts.max; + return ellipsize(str, opts.max, opts.ellipse, opts.chars, opts.truncate); + }; + + var EXCERPT_META_SELECTORS = ['og:description', 'twitter:description']; + + function clean$2(content, $) { + var maxLength = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; + content = content.replace(/[\s\n]+/g, ' ').trim(); + return ellipsize_1(content, maxLength, { + ellipse: '…', + }); + } + var GenericExcerptExtractor = { + extract: function extract(_ref) { + var $ = _ref.$, + content = _ref.content, + metaCache = _ref.metaCache; + var excerpt = extractFromMeta$$1($, EXCERPT_META_SELECTORS, metaCache); + + if (excerpt) { + return clean$2(stripTags(excerpt, $)); + } // Fall back to excerpting from the extracted content + + var maxLength = 200; + var shortContent = content.slice(0, maxLength * 5); + return clean$2($(shortContent).text(), $, maxLength); + }, + }; + + var GenericWordCountExtractor = { + extract: function extract(_ref) { + var content = _ref.content; + var $$$1 = $.load(content); + var $content = $$$1('div').first(); + var text = normalizeSpaces($content.text()); + return text.split(/\s/).length; + }, + }; + + var GenericExtractor = { + // This extractor is the default for all domains + domain: '*', + title: GenericTitleExtractor.extract, + date_published: GenericDatePublishedExtractor.extract, + author: GenericAuthorExtractor.extract, + content: GenericContentExtractor.extract.bind(GenericContentExtractor), + lead_image_url: GenericLeadImageUrlExtractor.extract, + dek: GenericDekExtractor.extract, + next_page_url: GenericNextPageUrlExtractor.extract, + url_and_domain: GenericUrlExtractor.extract, + excerpt: GenericExcerptExtractor.extract, + word_count: GenericWordCountExtractor.extract, + direction: function direction(_ref) { + var title = _ref.title; + return stringDirection.getDirection(title); + }, + extract: function extract(options) { + var html = options.html, + $$$1 = options.$; + + if (html && !$$$1) { + var loaded = $.load(html); + options.$ = loaded; + } + + var title = this.title(options); + var date_published = this.date_published(options); + var author = this.author(options); + var content = this.content( + objectSpread({}, options, { + title: title, + }) + ); + var lead_image_url = this.lead_image_url( + objectSpread({}, options, { + content: content, + }) + ); + var dek = this.dek( + objectSpread({}, options, { + content: content, + }) + ); + var next_page_url = this.next_page_url(options); + var excerpt = this.excerpt( + objectSpread({}, options, { + content: content, + }) + ); + var word_count = this.word_count( + objectSpread({}, options, { + content: content, + }) + ); + var direction = this.direction({ + title: title, + }); + + var _this$url_and_domain = this.url_and_domain(options), + url = _this$url_and_domain.url, + domain = _this$url_and_domain.domain; + + return { + title: title, + author: author, + date_published: date_published || null, + dek: dek, + lead_image_url: lead_image_url, + content: content, + next_page_url: next_page_url, + url: url, + domain: domain, + excerpt: excerpt, + word_count: word_count, + direction: direction, + }; + }, + }; + + var Detectors = { + 'meta[name="al:ios:app_name"][value="Medium"]': MediumExtractor, + 'meta[name="generator"][value="blogger"]': BloggerExtractor, + }; + function detectByHtml($) { + var selector = ownKeys$1(Detectors).find(function(s) { + return $(s).length > 0; + }); + + return Detectors[selector]; + } + + function getExtractor(url$$1, parsedUrl, $) { + parsedUrl = parsedUrl || url.parse(url$$1); + var _parsedUrl = parsedUrl, + hostname = _parsedUrl.hostname; + var baseDomain = hostname + .split('.') + .slice(-2) + .join('.'); + return ( + Extractors[hostname] || + Extractors[baseDomain] || + detectByHtml($) || + GenericExtractor + ); + } + + function cleanBySelectors($content, $, _ref) { + var clean = _ref.clean; + if (!clean) return $content; + $(clean.join(','), $content).remove(); + return $content; + } // Transform matching elements + + function transformElements($content, $, _ref2) { + var transforms = _ref2.transforms; + if (!transforms) return $content; + + ownKeys$1(transforms).forEach(function(key) { + var $matches = $(key, $content); + var value = transforms[key]; // If value is a string, convert directly + + if (typeof value === 'string') { + $matches.each(function(index, node) { + convertNodeTo$$1($(node), $, transforms[key]); + }); + } else if (typeof value === 'function') { + // If value is function, apply function to node + $matches.each(function(index, node) { + var result = value($(node), $); // If function returns a string, convert node to that value + + if (typeof result === 'string') { + convertNodeTo$$1($(node), $, result); + } + }); + } + }); + + return $content; + } + + function findMatchingSelector($, selectors, extractHtml) { + return selectors.find(function(selector) { + if (isArray$1(selector)) { + if (extractHtml) { + return selector.reduce(function(acc, s) { + return acc && $(s).length > 0; + }, true); + } + + var _selector = slicedToArray(selector, 2), + s = _selector[0], + attr = _selector[1]; + + return ( + $(s).length === 1 && + $(s).attr(attr) && + $(s) + .attr(attr) + .trim() !== '' + ); + } + + return ( + $(selector).length === 1 && + $(selector) + .text() + .trim() !== '' + ); + }); + } + + function select(opts) { + var $ = opts.$, + type = opts.type, + extractionOpts = opts.extractionOpts, + _opts$extractHtml = opts.extractHtml, + extractHtml = _opts$extractHtml === void 0 ? false : _opts$extractHtml; // Skip if there's not extraction for this type + + if (!extractionOpts) return null; // If a string is hardcoded for a type (e.g., Wikipedia + // contributors), return the string + + if (typeof extractionOpts === 'string') return extractionOpts; + var selectors = extractionOpts.selectors, + _extractionOpts$defau = extractionOpts.defaultCleaner, + defaultCleaner = + _extractionOpts$defau === void 0 ? true : _extractionOpts$defau; + var matchingSelector = findMatchingSelector($, selectors, extractHtml); + if (!matchingSelector) return null; // Declaring result; will contain either + // text or html, which will be cleaned + // by the appropriate cleaner type + // If the selector type requests html as its return type + // transform and clean the element with provided selectors + + var $content; + + if (extractHtml) { + // If matching selector is an array, we're considering this a + // multi-match selection, which allows the parser to choose several + // selectors to include in the result. Note that all selectors in the + // array must match in order for this selector to trigger + if (isArray$1(matchingSelector)) { + $content = $(matchingSelector.join(',')); + var $wrapper = $('<div></div>'); + $content.each(function(index, element) { + $wrapper.append(element); + }); + $content = $wrapper; + } else { + $content = $(matchingSelector); + } // Wrap in div so transformation can take place on root element + + $content.wrap($('<div></div>')); + $content = $content.parent(); + $content = transformElements($content, $, extractionOpts); + $content = cleanBySelectors($content, $, extractionOpts); + $content = Cleaners[type]( + $content, + objectSpread({}, opts, { + defaultCleaner: defaultCleaner, + }) + ); + return $.html($content); + } + + var result; // if selector is an array (e.g., ['img', 'src']), + // extract the attr + + if (isArray$1(matchingSelector)) { + var _matchingSelector = slicedToArray(matchingSelector, 2), + selector = _matchingSelector[0], + attr = _matchingSelector[1]; + + result = $(selector) + .attr(attr) + .trim(); + } else { + var $node = $(matchingSelector); + $node = cleanBySelectors($node, $, extractionOpts); + $node = transformElements($node, $, extractionOpts); + result = $node.text().trim(); + } // Allow custom extractor to skip default cleaner + // for this type; defaults to true + + if (defaultCleaner) { + return Cleaners[type](result, objectSpread({}, opts, extractionOpts)); + } + + return result; + } + + function extractResult(opts) { + var type = opts.type, + extractor = opts.extractor, + _opts$fallback = opts.fallback, + fallback = _opts$fallback === void 0 ? true : _opts$fallback; + var result = select( + objectSpread({}, opts, { + extractionOpts: extractor[type], + }) + ); // If custom parser succeeds, return the result + + if (result) { + return result; + } // If nothing matches the selector, and fallback is enabled, + // run the Generic extraction + + if (fallback) return GenericExtractor[type](opts); + return null; + } + + var RootExtractor = { + extract: function extract() { + var extractor = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : GenericExtractor; + var opts = arguments.length > 1 ? arguments[1] : undefined; + var _opts = opts, + contentOnly = _opts.contentOnly, + extractedTitle = _opts.extractedTitle; // This is the generic extractor. Run its extract method + + if (extractor.domain === '*') return extractor.extract(opts); + opts = objectSpread({}, opts, { + extractor: extractor, + }); + + if (contentOnly) { + var _content = extractResult( + objectSpread({}, opts, { + type: 'content', + extractHtml: true, + title: extractedTitle, + }) + ); + + return { + content: _content, + }; + } + + var title = extractResult( + objectSpread({}, opts, { + type: 'title', + }) + ); + var date_published = extractResult( + objectSpread({}, opts, { + type: 'date_published', + }) + ); + var author = extractResult( + objectSpread({}, opts, { + type: 'author', + }) + ); + var next_page_url = extractResult( + objectSpread({}, opts, { + type: 'next_page_url', + }) + ); + var content = extractResult( + objectSpread({}, opts, { + type: 'content', + extractHtml: true, + title: title, + }) + ); + var lead_image_url = extractResult( + objectSpread({}, opts, { + type: 'lead_image_url', + content: content, + }) + ); + var excerpt = extractResult( + objectSpread({}, opts, { + type: 'excerpt', + content: content, + }) + ); + var dek = extractResult( + objectSpread({}, opts, { + type: 'dek', + content: content, + excerpt: excerpt, + }) + ); + var word_count = extractResult( + objectSpread({}, opts, { + type: 'word_count', + content: content, + }) + ); + var direction = extractResult( + objectSpread({}, opts, { + type: 'direction', + title: title, + }) + ); + + var _ref3 = extractResult( + objectSpread({}, opts, { + type: 'url_and_domain', + }) + ) || { + url: null, + domain: null, + }, + url = _ref3.url, + domain = _ref3.domain; + + return { + title: title, + content: content, + author: author, + date_published: date_published, + lead_image_url: lead_image_url, + dek: dek, + next_page_url: next_page_url, + url: url, + domain: domain, + excerpt: excerpt, + word_count: word_count, + direction: direction, + }; + }, + }; + + function collectAllPages(_x) { + return _collectAllPages.apply(this, arguments); + } + + function _collectAllPages() { + _collectAllPages = asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee(_ref) { + var next_page_url, + html, + $, + metaCache, + result, + Extractor, + title, + url, + pages, + previousUrls, + extractorOpts, + nextPageResult, + word_count; + return regenerator.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + (next_page_url = _ref.next_page_url), + (html = _ref.html), + ($ = _ref.$), + (metaCache = _ref.metaCache), + (result = _ref.result), + (Extractor = _ref.Extractor), + (title = _ref.title), + (url = _ref.url); + // At this point, we've fetched just the first page + pages = 1; + previousUrls = [removeAnchor(url)]; // If we've gone over 26 pages, something has + // likely gone wrong. + + case 3: + if (!(next_page_url && pages < 26)) { + _context.next = 16; + break; + } + + pages += 1; // eslint-disable-next-line no-await-in-loop + + _context.next = 7; + return Resource.create(next_page_url); + + case 7: + $ = _context.sent; + html = $.html(); + extractorOpts = { + url: next_page_url, + html: html, + $: $, + metaCache: metaCache, + contentOnly: true, + extractedTitle: title, + previousUrls: previousUrls, + }; + nextPageResult = RootExtractor.extract( + Extractor, + extractorOpts + ); + previousUrls.push(next_page_url); + result = objectSpread({}, result, { + content: '' + .concat(result.content, '<hr><h4>Page ') + .concat(pages, '</h4>') + .concat(nextPageResult.content), + }); // eslint-disable-next-line prefer-destructuring + + next_page_url = nextPageResult.next_page_url; + _context.next = 3; + break; + + case 16: + word_count = GenericExtractor.word_count({ + content: '<div>'.concat(result.content, '</div>'), + }); + return _context.abrupt( + 'return', + objectSpread({}, result, { + total_pages: pages, + pages_rendered: pages, + word_count: word_count, + }) + ); + + case 18: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this + ); + }) + ); + return _collectAllPages.apply(this, arguments); + } + + var Mercury = { + parse: function parse$$1(url$$1, html) { + var opts = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return asyncToGenerator( + /*#__PURE__*/ + regenerator.mark(function _callee() { + var _opts$fetchAllPages, + fetchAllPages, + _opts$fallback, + fallback, + parsedUrl, + $$$1, + Extractor, + metaCache, + result, + _result, + title, + next_page_url; + + return regenerator.wrap( + function _callee$(_context) { + while (1) { + switch ((_context.prev = _context.next)) { + case 0: + (_opts$fetchAllPages = opts.fetchAllPages), + (fetchAllPages = + _opts$fetchAllPages === void 0 + ? true + : _opts$fetchAllPages), + (_opts$fallback = opts.fallback), + (fallback = + _opts$fallback === void 0 ? true : _opts$fallback); // if no url was passed and this is the browser version, + // set url to window.location.href and load the html + // from the current page + + if (!url$$1 && $.browser) { + url$$1 = window.location.href; // eslint-disable-line no-undef + + html = html || $.html(); + } + + parsedUrl = url.parse(url$$1); + + if (validateUrl(parsedUrl)) { + _context.next = 5; + break; + } + + return _context.abrupt('return', Errors.badUrl); + + case 5: + _context.next = 7; + return Resource.create(url$$1, html, parsedUrl); + + case 7: + $$$1 = _context.sent; + Extractor = getExtractor(url$$1, parsedUrl, $$$1); // console.log(`Using extractor for ${Extractor.domain}`); + // If we found an error creating the resource, return that error + + if (!$$$1.failed) { + _context.next = 11; + break; + } + + return _context.abrupt('return', $$$1); + + case 11: + // if html still has not been set (i.e., url passed to Mercury.parse), + // set html from the response of Resource.create + if (!html) { + html = $$$1.html(); + } // Cached value of every meta name in our document. + // Used when extracting title/author/date_published/dek + + metaCache = $$$1('meta') + .map(function(_, node) { + return $$$1(node).attr('name'); + }) + .toArray(); + result = RootExtractor.extract(Extractor, { + url: url$$1, + html: html, + $: $$$1, + metaCache: metaCache, + parsedUrl: parsedUrl, + fallback: fallback, + }); + (_result = result), + (title = _result.title), + (next_page_url = _result.next_page_url); // Fetch more pages if next_page_url found + + if (!(fetchAllPages && next_page_url)) { + _context.next = 21; + break; + } + + _context.next = 18; + return collectAllPages({ + Extractor: Extractor, + next_page_url: next_page_url, + html: html, + $: $$$1, + metaCache: metaCache, + result: result, + title: title, + url: url$$1, + }); + + case 18: + result = _context.sent; + _context.next = 22; + break; + + case 21: + result = objectSpread({}, result, { + total_pages: 1, + rendered_pages: 1, + }); + + case 22: + return _context.abrupt('return', result); + + case 23: + case 'end': + return _context.stop(); + } + } + }, + _callee, + this + ); + }) + )(); + }, + browser: !!$.browser, + // A convenience method for getting a resource + // to work with, e.g., for custom extractor generator + fetchResource: function fetchResource(url$$1) { + return Resource.create(url$$1); + }, + }; + + return Mercury; +})(); diff --git a/karma.conf.js b/karma.conf.js index 9f9b042e..67f554c6 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -4,15 +4,11 @@ module.exports = function (config) { basePath: '', frameworks: ['jasmine', 'browserify'], - files: [ - './node_modules/phantomjs-polyfill-find/find-polyfill.js', - './node_modules/phantomjs-polyfill-string-includes/index.js', { pattern: 'src/**/*.test.js', included: true }, ], - exclude: [ - ], + exclude: [], preprocessors: { 'src/**/*.js': ['browserify'], @@ -20,10 +16,7 @@ module.exports = function (config) { browserify: { debug: true, - transform: [ - 'brfs-babel', - 'babelify', - ], + transform: ['babelify', 'brfs'], }, reporters: ['progress'], @@ -31,7 +24,7 @@ module.exports = function (config) { colors: true, logLevel: config.LOG_INFO, autoWatch: false, - browsers: [(process.env.CI ? 'PhantomJS' : 'Chrome')], + browsers: ['Chrome'], singleRun: true, concurrency: Infinity, }); diff --git a/package.json b/package.json index 97fd5974..f29d8354 100644 --- a/package.json +++ b/package.json @@ -26,78 +26,80 @@ "author": "Postlight", "license": "ISC", "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/plugin-external-helpers": "^7.2.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-transform-async-to-generator": "^7.0.0", + "@babel/plugin-transform-destructuring": "^7.0.0", + "@babel/plugin-transform-runtime": "^7.0.0", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/runtime": "^7.0.0", + "@babel/runtime-corejs2": "^7.2.0", "@jesses/circle-github-bot": "^2.1.0", - "@octokit/rest": "^16.8.1", - "all-contributors-cli": "^3.0.7", - "babel-eslint": "^7.1.0", - "babel-jest": "^16.0.0", - "babel-plugin-external-helpers": "^6.18.0", + "@octokit/rest": "^16.9.0", + "all-contributors-cli": "^5.10.0", + "babel-core": "^7.0.0-bridge.0", + "babel-eslint": "^10.0.1", + "babel-jest": "^23.4.2", + "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-module-alias": "^1.6.0", - "babel-plugin-module-resolver": "^2.2.0", - "babel-plugin-transform-async-to-generator": "^6.8.0", - "babel-plugin-transform-es2015-destructuring": "^6.9.0", - "babel-plugin-transform-export-extensions": "^6.8.0", - "babel-plugin-transform-object-rest-spread": "^6.8.0", - "babel-plugin-transform-runtime": "6.15.0", - "babel-polyfill": "^6.16.0", - "babel-preset-es2015": "^6.13.2", - "babel-runtime": "^6.18.0", - "babelify": "^7.3.0", + "babel-plugin-module-resolver": "^3.1.2", + "babelify": "^10.0.0", "babelrc-rollup": "^3.0.0", + "brfs": "^2.0.1", "brfs-babel": "^1.0.0", - "browserify": "^13.1.1", + "browserify": "^16.2.3", "changelog-maker": "^2.3.0", - "eslint": "^3.8.1", - "eslint-config-airbnb": "^12.0.0", + "eslint": "^5.12.0", + "eslint-config-airbnb": "^17.1.0", "eslint-config-prettier": "^3.5.0", - "eslint-import-resolver-babel-module": "^2.0.1", - "eslint-plugin-babel": "^3.3.0", - "eslint-plugin-import": "^1.16.0", - "eslint-plugin-jsx-a11y": "^2.2.3", - "eslint-plugin-react": "^6.4.1", - "express": "^4.14.0", + "eslint-import-resolver-babel-module": "^2.2.1", + "eslint-plugin-babel": "^5.3.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jsx-a11y": "^6.1.2", + "eslint-plugin-react": "^7.12.3", + "express": "^4.16.4", "husky": "^1.3.1", - "inquirer": "^1.1.3", + "inquirer": "^6.2.1", "jasmine-core": "^2.5.2", - "jest": "^16.0.2", - "jest-cli": "^16.0.2", - "karma": "^1.3.0", - "karma-browserify": "^5.1.0", - "karma-chrome-launcher": "^2.0.0", + "jest": "^23.6.0", + "jest-cli": "^23.6.0", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", "karma-cli": "^2.0.0", "karma-jasmine": "^1.0.2", "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", "karma-requirejs": "^1.1.0", "lint-staged": "^8.1.0", - "mocha": "^3.1.2", - "nock": "^9.0.2", - "ora": "^0.3.0", - "phantomjs-polyfill-find": "ptim/phantomjs-polyfill-find", - "phantomjs-polyfill-string-includes": "^1.0.0", - "phantomjs-prebuilt": "^2.1.14", + "mocha": "^5.2.0", + "nock": "^10.0.6", + "ora": "^3.0.0", "prettier": "^1.15.3", - "requirejs": "^2.3.2", - "rollup": "^0.36.3", - "rollup-plugin-babel": "^2.6.1", - "rollup-plugin-commonjs": "^5.0.5", - "rollup-plugin-node-globals": "^1.0.9", + "requirejs": "^2.3.6", + "rollup": "^1.1.0", + "rollup-plugin-babel": "^4.0.1", + "rollup-plugin-commonjs": "^9.2.0", + "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-uglify": "^1.0.1", - "watchify": "^3.7.0" + "rollup-plugin-uglify": "^6.0.1", + "watchify": "^3.11.0" }, "dependencies": { "browser-request": "adampash/browser-request#feat-add-headers-to-response", "cheerio": "^0.22.0", "difflib": "adampash/difflib.js", - "ellipsize": "0.0.2", - "iconv-lite": "^0.4.15", - "jquery": "^3.1.1", - "moment": "^2.14.1", - "moment-parseformat": "^2.1.4", - "moment-timezone": "^0.5.10", + "ellipsize": "0.1.0", + "iconv-lite": "0.4.24", + "jquery": "^3.3.1", + "moment": "^2.23.0", + "moment-parseformat": "3.0.0", + "moment-timezone": "0.5.23", "request": "czardoz/request", - "request-promise": "^4.1.1", + "request-promise": "^4.2.2", "string-direction": "^0.1.2", "url": "adampash/node-url#feat-remove-punycode", "valid-url": "^1.0.9", @@ -106,9 +108,10 @@ "browser": { "main": "./dist/mercury.web.js", "cheerio": "./src/shims/cheerio-query", + "jquery": "./node_modules/jquery/dist/jquery.min.js", "request": "browser-request", "iconv-lite": "./src/shims/iconv-lite", - "moment-timezone": "./node_modules/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js" + "moment-timezone": "./node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js" }, "husky": { "hooks": { diff --git a/rollup.config.js b/rollup.config.js index 6c9b29ee..7021d166 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,18 +1,22 @@ /* eslint-disable import/no-extraneous-dependencies */ import babel from 'rollup-plugin-babel'; -import babelrc from 'babelrc-rollup'; // eslint-disable-line import/extensions import commonjs from 'rollup-plugin-commonjs'; -const babelOpts = babelrc(); -babelOpts.runtimeHelpers = true; - export default { - entry: 'src/mercury.js', + input: 'src/mercury.js', plugins: [ commonjs(), - babel(babelOpts), + babel({ + externalHelpers: false, + runtimeHelpers: true, + }), ], - format: 'cjs', - dest: process.env.MERCURY_TEST_BUILD ? 'dist/mercury_test.js' : 'dist/mercury.js', - sourceMap: true, + treeshake: true, + output: { + file: process.env.MERCURY_TEST_BUILD + ? 'dist/mercury_test.js' + : 'dist/mercury.js', + format: 'cjs', + sourceMap: true, + }, }; diff --git a/rollup.config.web.js b/rollup.config.web.js index 964cef86..f9d7d8fd 100644 --- a/rollup.config.web.js +++ b/rollup.config.web.js @@ -1,19 +1,16 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import babel from 'rollup-plugin-babel'; -import babelrc from 'babelrc-rollup'; // eslint-disable-line import/extensions -import commonjs from 'rollup-plugin-commonjs'; import nodeResolve from 'rollup-plugin-node-resolve'; import globals from 'rollup-plugin-node-globals'; -import uglify from 'rollup-plugin-uglify'; // eslint-disable-line import/extensions - -const babelOpts = babelrc(); -babelOpts.runtimeHelpers = true; -babelOpts.exclude = './node_modules/**'; +import { uglify } from 'rollup-plugin-uglify'; // eslint-disable-line import/extensions +import babel from 'rollup-plugin-babel'; +import commonjs from 'rollup-plugin-commonjs'; export default { - entry: 'src/mercury.js', + input: 'src/mercury.js', plugins: [ - babel(babelOpts), + babel({ + runtimeHelpers: true, + exclude: './node_modules#<{(|*', + }), commonjs({ ignoreGlobal: true, }), @@ -24,8 +21,13 @@ export default { }), uglify(), ], - format: 'iife', - moduleName: 'Mercury', - dest: process.env.MERCURY_TEST_BUILD ? 'dist/mercury_test.web.js' : 'dist/mercury.web.js', - sourceMap: false, + treeshake: true, + output: { + file: process.env.MERCURY_TEST_BUILD + ? 'dist/mercury_test.web.js' + : 'dist/mercury.web.js', + format: 'iife', + name: 'Mercury', + sourceMap: true, + }, }; diff --git a/scripts/check-build.test.js b/scripts/check-build.test.js index 94fe128b..e70eb014 100644 --- a/scripts/check-build.test.js +++ b/scripts/check-build.test.js @@ -52,7 +52,7 @@ if (process.env.CI) { assert.equal(true, false); done(); }); - }) + }, 10000) ); }); } diff --git a/scripts/karma.conf.js b/scripts/karma.conf.js index 64202877..b5f7795d 100644 --- a/scripts/karma.conf.js +++ b/scripts/karma.conf.js @@ -11,12 +11,10 @@ module.exports = function(config) { // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['jasmine', 'browserify'], + frameworks: ['browserify', 'jasmine'], // list of files / patterns to load in the browser files: [ - '../node_modules/phantomjs-polyfill-find/find-polyfill.js', - '../node_modules/phantomjs-polyfill-string-includes/index.js', '../dist/mercury.web.js', { pattern: 'check-build.test.js', included: true }, ], @@ -32,7 +30,7 @@ module.exports = function(config) { browserify: { debug: true, - transform: ['brfs-babel', 'babelify'], + transform: [['babelify', { presets: ['@babel/preset-env'] }], 'brfs'], }, // test results reporter to use @@ -56,7 +54,7 @@ module.exports = function(config) { // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher // browsers: ['PhantomJS'], - browsers: [process.env.CI ? 'PhantomJS' : 'Chrome'], + browsers: ['Chrome'], // browsers: ['Chrome'], // Continuous Integration mode diff --git a/scripts/templates/custom-extractor-test.js b/scripts/templates/custom-extractor-test.js index 3a45a557..1a9d131d 100644 --- a/scripts/templates/custom-extractor-test.js +++ b/scripts/templates/custom-extractor-test.js @@ -28,10 +28,9 @@ function testFor(key, value, dir) { `; } -export default function (file, url, dir, result, name) { +export default function(file, url, dir, result, name) { return template` import assert from 'assert'; - import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -39,6 +38,8 @@ export default function (file, url, dir, result, name) { import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; + const fs = require('fs'); + describe('${name}', () => { describe('initial test case', () => { let result; @@ -60,7 +61,9 @@ export default function (file, url, dir, result, name) { assert.equal(extractor.domain, URL.parse(url).hostname) }) - ${Reflect.ownKeys(result).map(k => testFor(k, result[k], dir)).join('\n\n')} + ${Reflect.ownKeys(result) + .map(k => testFor(k, result[k], dir)) + .join('\n\n')} it('returns the content', async () => { // To pass this test, fill out the content selector diff --git a/src/cleaners/content.test.js b/src/cleaners/content.test.js index 347b2ba1..834615dc 100644 --- a/src/cleaners/content.test.js +++ b/src/cleaners/content.test.js @@ -1,10 +1,11 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import fs from 'fs'; import extractBestNode from 'extractors/generic/content/extract-best-node'; import extractCleanNode from './content'; +const fs = require('fs'); + describe('extractCleanNode(article, { $, cleanConditionally, title } })', () => { it('cleans cruft out of a DOM node', () => { const html = fs.readFileSync('./fixtures/wired.html', 'utf-8'); diff --git a/src/cleaners/date-published.test.js b/src/cleaners/date-published.test.js index b427f5ce..c5f4a3e4 100644 --- a/src/cleaners/date-published.test.js +++ b/src/cleaners/date-published.test.js @@ -1,8 +1,7 @@ import assert from 'assert'; import moment from 'moment-timezone'; -import { - default as cleanDatePublished, +import cleanDatePublished, { cleanDateString, } from './date-published'; diff --git a/src/extractors/collect-all-pages.js b/src/extractors/collect-all-pages.js index d5ff7561..e15a3e4a 100644 --- a/src/extractors/collect-all-pages.js +++ b/src/extractors/collect-all-pages.js @@ -21,6 +21,7 @@ export default async function collectAllPages({ // likely gone wrong. while (next_page_url && pages < 26) { pages += 1; + // eslint-disable-next-line no-await-in-loop $ = await Resource.create(next_page_url); html = $.html(); @@ -44,6 +45,7 @@ export default async function collectAllPages({ }`, }; + // eslint-disable-next-line prefer-destructuring next_page_url = nextPageResult.next_page_url; } diff --git a/src/extractors/custom/247sports.com/index.test.js b/src/extractors/custom/247sports.com/index.test.js index b3e55d1c..1bd373df 100644 --- a/src/extractors/custom/247sports.com/index.test.js +++ b/src/extractors/custom/247sports.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('twofortysevensportsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/abcnews.go.com/index.test.js b/src/extractors/custom/abcnews.go.com/index.test.js index d0cc3a20..7254bf60 100644 --- a/src/extractors/custom/abcnews.go.com/index.test.js +++ b/src/extractors/custom/abcnews.go.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('AbcnewsGoComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/deadspin.com/index.test.js b/src/extractors/custom/deadspin.com/index.test.js index ea0c78f7..f1044119 100644 --- a/src/extractors/custom/deadspin.com/index.test.js +++ b/src/extractors/custom/deadspin.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('DeadspinExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/fandom.wikia.com/index.test.js b/src/extractors/custom/fandom.wikia.com/index.test.js index 4e6e519c..3efbe252 100644 --- a/src/extractors/custom/fandom.wikia.com/index.test.js +++ b/src/extractors/custom/fandom.wikia.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('WikiaExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/fortune.com/index.test.js b/src/extractors/custom/fortune.com/index.test.js index 1bcd3731..64ac7907 100644 --- a/src/extractors/custom/fortune.com/index.test.js +++ b/src/extractors/custom/fortune.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('FortuneComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/forward.com/index.test.js b/src/extractors/custom/forward.com/index.test.js index 2dc47c70..4bc15b84 100644 --- a/src/extractors/custom/forward.com/index.test.js +++ b/src/extractors/custom/forward.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ForwardComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/fusion.net/index.test.js b/src/extractors/custom/fusion.net/index.test.js index 8287dbb6..695f351d 100644 --- a/src/extractors/custom/fusion.net/index.test.js +++ b/src/extractors/custom/fusion.net/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('FusionNetExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/gothamist.com/index.test.js b/src/extractors/custom/gothamist.com/index.test.js index 9dde3fa4..1603cc5d 100644 --- a/src/extractors/custom/gothamist.com/index.test.js +++ b/src/extractors/custom/gothamist.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('GothamistComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/hellogiggles.com/index.test.js b/src/extractors/custom/hellogiggles.com/index.test.js index 70a1d14d..8dcc7db1 100644 --- a/src/extractors/custom/hellogiggles.com/index.test.js +++ b/src/extractors/custom/hellogiggles.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('HellogigglesComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/ici.radio-canada.ca/index.test.js b/src/extractors/custom/ici.radio-canada.ca/index.test.js index 693dcb9a..2d9598b7 100644 --- a/src/extractors/custom/ici.radio-canada.ca/index.test.js +++ b/src/extractors/custom/ici.radio-canada.ca/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('IciRadioCanadaCaExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/mashable.com/index.test.js b/src/extractors/custom/mashable.com/index.test.js index 8a578128..217d24f4 100644 --- a/src/extractors/custom/mashable.com/index.test.js +++ b/src/extractors/custom/mashable.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('MashableComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/medium.com/index.test.js b/src/extractors/custom/medium.com/index.test.js index d7ccdae8..e9260d26 100644 --- a/src/extractors/custom/medium.com/index.test.js +++ b/src/extractors/custom/medium.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('MediumExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/money.cnn.com/index.test.js b/src/extractors/custom/money.cnn.com/index.test.js index 2a41ba9b..5343b514 100644 --- a/src/extractors/custom/money.cnn.com/index.test.js +++ b/src/extractors/custom/money.cnn.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('MoneyCnnComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/newrepublic.com/index.test.js b/src/extractors/custom/newrepublic.com/index.test.js index fb911cab..b67a988a 100644 --- a/src/extractors/custom/newrepublic.com/index.test.js +++ b/src/extractors/custom/newrepublic.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('NewrepublicComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/news.nationalgeographic.com/index.test.js b/src/extractors/custom/news.nationalgeographic.com/index.test.js index a46aea08..9f78207e 100644 --- a/src/extractors/custom/news.nationalgeographic.com/index.test.js +++ b/src/extractors/custom/news.nationalgeographic.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('NewsNationalgeographicComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/nymag.com/index.test.js b/src/extractors/custom/nymag.com/index.test.js index 4109e1f4..49207583 100644 --- a/src/extractors/custom/nymag.com/index.test.js +++ b/src/extractors/custom/nymag.com/index.test.js @@ -1,8 +1,9 @@ import assert from 'assert'; -import fs from 'fs'; import Mercury from 'mercury'; +const fs = require('fs'); + describe('NYMagExtractor', () => { it('works with a feature story', async () => { const html = fs.readFileSync('./fixtures/nymag.com/ailes.html'); diff --git a/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js b/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js index 3260b14c..8bc2083e 100644 --- a/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js +++ b/src/extractors/custom/obamawhitehouse.archives.gov/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ObamawhitehouseArchivesGovExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/observer.com/index.test.js b/src/extractors/custom/observer.com/index.test.js index 26e0c5f9..883b3b07 100644 --- a/src/extractors/custom/observer.com/index.test.js +++ b/src/extractors/custom/observer.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ObserverComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/pagesix.com/index.test.js b/src/extractors/custom/pagesix.com/index.test.js index a7a3a607..8d52e2d3 100644 --- a/src/extractors/custom/pagesix.com/index.test.js +++ b/src/extractors/custom/pagesix.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('PagesixComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/people.com/index.test.js b/src/extractors/custom/people.com/index.test.js index 71a6bd52..694dc490 100644 --- a/src/extractors/custom/people.com/index.test.js +++ b/src/extractors/custom/people.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('PeopleComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/qz.com/index.test.js b/src/extractors/custom/qz.com/index.test.js index 9f735b4c..2ebcb0d1 100644 --- a/src/extractors/custom/qz.com/index.test.js +++ b/src/extractors/custom/qz.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('QzComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/sciencefly.com/index.test.js b/src/extractors/custom/sciencefly.com/index.test.js index 462af5ad..ea0bdbab 100644 --- a/src/extractors/custom/sciencefly.com/index.test.js +++ b/src/extractors/custom/sciencefly.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ScienceflyComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/thefederalistpapers.org/index.test.js b/src/extractors/custom/thefederalistpapers.org/index.test.js index c9a3b5d3..6b905d5f 100644 --- a/src/extractors/custom/thefederalistpapers.org/index.test.js +++ b/src/extractors/custom/thefederalistpapers.org/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ThefederalistpapersOrgExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/thoughtcatalog.com/index.test.js b/src/extractors/custom/thoughtcatalog.com/index.test.js index f94e9941..350fcf3e 100644 --- a/src/extractors/custom/thoughtcatalog.com/index.test.js +++ b/src/extractors/custom/thoughtcatalog.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('ThoughtcatalogComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/twitter.com/index.test.js b/src/extractors/custom/twitter.com/index.test.js index b1548e1d..db4f2d9d 100644 --- a/src/extractors/custom/twitter.com/index.test.js +++ b/src/extractors/custom/twitter.com/index.test.js @@ -1,8 +1,9 @@ import assert from 'assert'; -import fs from 'fs'; import Mercury from 'mercury'; +const fs = require('fs'); + describe('TwitterExtractor', () => { it('works with a feature story', async () => { const html = fs.readFileSync('./fixtures/twitter.com/tweet.html'); diff --git a/src/extractors/custom/uproxx.com/index.test.js b/src/extractors/custom/uproxx.com/index.test.js index ac1afaa6..4046d5fa 100644 --- a/src/extractors/custom/uproxx.com/index.test.js +++ b/src/extractors/custom/uproxx.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('UproxxComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.al.com/index.test.js b/src/extractors/custom/www.al.com/index.test.js index 6735fbfb..76a05dfa 100644 --- a/src/extractors/custom/www.al.com/index.test.js +++ b/src/extractors/custom/www.al.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwAlComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.americanow.com/index.test.js b/src/extractors/custom/www.americanow.com/index.test.js index 8f7edbb4..10ad407f 100644 --- a/src/extractors/custom/www.americanow.com/index.test.js +++ b/src/extractors/custom/www.americanow.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwAmericanowComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.androidcentral.com/index.test.js b/src/extractors/custom/www.androidcentral.com/index.test.js index 9af6d945..09bddebf 100644 --- a/src/extractors/custom/www.androidcentral.com/index.test.js +++ b/src/extractors/custom/www.androidcentral.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwAndroidcentralComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.aol.com/index.test.js b/src/extractors/custom/www.aol.com/index.test.js index 7da5ad97..47335983 100644 --- a/src/extractors/custom/www.aol.com/index.test.js +++ b/src/extractors/custom/www.aol.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwAolComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.apartmenttherapy.com/index.test.js b/src/extractors/custom/www.apartmenttherapy.com/index.test.js index 886b7247..1103133f 100644 --- a/src/extractors/custom/www.apartmenttherapy.com/index.test.js +++ b/src/extractors/custom/www.apartmenttherapy.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('ApartmentTherapyExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.bloomberg.com/index.test.js b/src/extractors/custom/www.bloomberg.com/index.test.js index e0157ccb..73a47c6a 100644 --- a/src/extractors/custom/www.bloomberg.com/index.test.js +++ b/src/extractors/custom/www.bloomberg.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwBloombergComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.broadwayworld.com/index.test.js b/src/extractors/custom/www.broadwayworld.com/index.test.js index e9c9befa..c78a858e 100644 --- a/src/extractors/custom/www.broadwayworld.com/index.test.js +++ b/src/extractors/custom/www.broadwayworld.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('CustomExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.bustle.com/index.test.js b/src/extractors/custom/www.bustle.com/index.test.js index 45158b8b..95b2ac5c 100644 --- a/src/extractors/custom/www.bustle.com/index.test.js +++ b/src/extractors/custom/www.bustle.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwBustleComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.buzzfeed.com/index.test.js b/src/extractors/custom/www.buzzfeed.com/index.test.js index 64b2fd0a..6ff969ae 100644 --- a/src/extractors/custom/www.buzzfeed.com/index.test.js +++ b/src/extractors/custom/www.buzzfeed.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('BuzzfeedExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.cbssports.com/index.test.js b/src/extractors/custom/www.cbssports.com/index.test.js index 316e5f53..3d4e9076 100644 --- a/src/extractors/custom/www.cbssports.com/index.test.js +++ b/src/extractors/custom/www.cbssports.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwCbssportsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.chicagotribune.com/index.test.js b/src/extractors/custom/www.chicagotribune.com/index.test.js index 7221cb1d..36c95668 100644 --- a/src/extractors/custom/www.chicagotribune.com/index.test.js +++ b/src/extractors/custom/www.chicagotribune.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwChicagotribuneComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.cinemablend.com/index.test.js b/src/extractors/custom/www.cinemablend.com/index.test.js index f04be0af..55659606 100644 --- a/src/extractors/custom/www.cinemablend.com/index.test.js +++ b/src/extractors/custom/www.cinemablend.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwCinemablendComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.cnbc.com/index.test.js b/src/extractors/custom/www.cnbc.com/index.test.js index d5e3cccb..87bafdb7 100644 --- a/src/extractors/custom/www.cnbc.com/index.test.js +++ b/src/extractors/custom/www.cnbc.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwCnbcComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.cnet.com/index.test.js b/src/extractors/custom/www.cnet.com/index.test.js index d393a679..4b694cd6 100644 --- a/src/extractors/custom/www.cnet.com/index.test.js +++ b/src/extractors/custom/www.cnet.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwCnetComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.cnn.com/index.test.js b/src/extractors/custom/www.cnn.com/index.test.js index bd11cfec..77107a38 100644 --- a/src/extractors/custom/www.cnn.com/index.test.js +++ b/src/extractors/custom/www.cnn.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwCnnComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.dmagazine.com/index.test.js b/src/extractors/custom/www.dmagazine.com/index.test.js index e34fae42..d14e9939 100644 --- a/src/extractors/custom/www.dmagazine.com/index.test.js +++ b/src/extractors/custom/www.dmagazine.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwDmagazineComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.eonline.com/index.test.js b/src/extractors/custom/www.eonline.com/index.test.js index 325cc30d..0bb7e7ef 100644 --- a/src/extractors/custom/www.eonline.com/index.test.js +++ b/src/extractors/custom/www.eonline.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwEonlineComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.fool.com/index.test.js b/src/extractors/custom/www.fool.com/index.test.js index 9d24f703..22b61cb6 100644 --- a/src/extractors/custom/www.fool.com/index.test.js +++ b/src/extractors/custom/www.fool.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwFoolComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.howtogeek.com/index.test.js b/src/extractors/custom/www.howtogeek.com/index.test.js index dc3952ce..29ae320e 100644 --- a/src/extractors/custom/www.howtogeek.com/index.test.js +++ b/src/extractors/custom/www.howtogeek.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwHowtogeekComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.huffingtonpost.com/index.test.js b/src/extractors/custom/www.huffingtonpost.com/index.test.js index 698e4555..8ef146bf 100644 --- a/src/extractors/custom/www.huffingtonpost.com/index.test.js +++ b/src/extractors/custom/www.huffingtonpost.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwHuffingtonpostComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.inquisitr.com/index.test.js b/src/extractors/custom/www.inquisitr.com/index.test.js index a52a44e5..5da61e40 100644 --- a/src/extractors/custom/www.inquisitr.com/index.test.js +++ b/src/extractors/custom/www.inquisitr.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwInquisitrComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.latimes.com/index.test.js b/src/extractors/custom/www.latimes.com/index.test.js index cbf0de54..3779a90c 100644 --- a/src/extractors/custom/www.latimes.com/index.test.js +++ b/src/extractors/custom/www.latimes.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwLatimesComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.linkedin.com/index.test.js b/src/extractors/custom/www.linkedin.com/index.test.js index 7a504eb5..be2edffb 100644 --- a/src/extractors/custom/www.linkedin.com/index.test.js +++ b/src/extractors/custom/www.linkedin.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwLinkedinComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.littlethings.com/index.test.js b/src/extractors/custom/www.littlethings.com/index.test.js index c08a1dcd..ce77a78f 100644 --- a/src/extractors/custom/www.littlethings.com/index.test.js +++ b/src/extractors/custom/www.littlethings.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('LittleThingsExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.macrumors.com/index.test.js b/src/extractors/custom/www.macrumors.com/index.test.js index a02684b9..b8428406 100644 --- a/src/extractors/custom/www.macrumors.com/index.test.js +++ b/src/extractors/custom/www.macrumors.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwMacrumorsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.mentalfloss.com/index.test.js b/src/extractors/custom/www.mentalfloss.com/index.test.js index 11732c76..a284884d 100644 --- a/src/extractors/custom/www.mentalfloss.com/index.test.js +++ b/src/extractors/custom/www.mentalfloss.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwMentalflossComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.miamiherald.com/index.test.js b/src/extractors/custom/www.miamiherald.com/index.test.js index bd7233b2..d020d970 100644 --- a/src/extractors/custom/www.miamiherald.com/index.test.js +++ b/src/extractors/custom/www.miamiherald.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwMiamiheraldComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.msn.com/index.test.js b/src/extractors/custom/www.msn.com/index.test.js index 388deb5e..cc4fad10 100644 --- a/src/extractors/custom/www.msn.com/index.test.js +++ b/src/extractors/custom/www.msn.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('MSNExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.msnbc.com/index.test.js b/src/extractors/custom/www.msnbc.com/index.test.js index ba9b11e9..1a5e943a 100644 --- a/src/extractors/custom/www.msnbc.com/index.test.js +++ b/src/extractors/custom/www.msnbc.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwMsnbcComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.nationalgeographic.com/index.test.js b/src/extractors/custom/www.nationalgeographic.com/index.test.js index c351237b..83e90957 100644 --- a/src/extractors/custom/www.nationalgeographic.com/index.test.js +++ b/src/extractors/custom/www.nationalgeographic.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwNationalgeographicComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.nbcnews.com/index.test.js b/src/extractors/custom/www.nbcnews.com/index.test.js index 4f34d075..8881e9ca 100644 --- a/src/extractors/custom/www.nbcnews.com/index.test.js +++ b/src/extractors/custom/www.nbcnews.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwNbcnewsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.newyorker.com/index.test.js b/src/extractors/custom/www.newyorker.com/index.test.js index 51dac73b..d573c790 100644 --- a/src/extractors/custom/www.newyorker.com/index.test.js +++ b/src/extractors/custom/www.newyorker.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('NewYorkerExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.nj.com/index.test.js b/src/extractors/custom/www.nj.com/index.test.js index bf78e922..8a4fb2af 100644 --- a/src/extractors/custom/www.nj.com/index.test.js +++ b/src/extractors/custom/www.nj.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwNjComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.npr.org/index.test.js b/src/extractors/custom/www.npr.org/index.test.js index 4416c8b1..65281736 100644 --- a/src/extractors/custom/www.npr.org/index.test.js +++ b/src/extractors/custom/www.npr.org/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwNprOrgExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.nydailynews.com/index.test.js b/src/extractors/custom/www.nydailynews.com/index.test.js index d0aa2266..05bac967 100644 --- a/src/extractors/custom/www.nydailynews.com/index.test.js +++ b/src/extractors/custom/www.nydailynews.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwNydailynewsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.nytimes.com/index.test.js b/src/extractors/custom/www.nytimes.com/index.test.js index 86148764..f1005d2c 100644 --- a/src/extractors/custom/www.nytimes.com/index.test.js +++ b/src/extractors/custom/www.nytimes.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import cheerio from 'cheerio'; import URL from 'url'; @@ -7,6 +6,8 @@ import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; import Mercury from 'mercury'; +const fs = require('fs'); + describe('NYTimesExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.opposingviews.com/index.test.js b/src/extractors/custom/www.opposingviews.com/index.test.js index 0cacb50c..a31463b9 100644 --- a/src/extractors/custom/www.opposingviews.com/index.test.js +++ b/src/extractors/custom/www.opposingviews.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwOpposingviewsComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.politico.com/index.test.js b/src/extractors/custom/www.politico.com/index.test.js index a07c5467..8dd53415 100644 --- a/src/extractors/custom/www.politico.com/index.test.js +++ b/src/extractors/custom/www.politico.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('PoliticoExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.popsugar.com/index.test.js b/src/extractors/custom/www.popsugar.com/index.test.js index 03f012bd..f9213e4d 100644 --- a/src/extractors/custom/www.popsugar.com/index.test.js +++ b/src/extractors/custom/www.popsugar.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwPopsugarComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.prospectmagazine.co.uk/index.test.js b/src/extractors/custom/www.prospectmagazine.co.uk/index.test.js index 0cb138f9..4330e612 100644 --- a/src/extractors/custom/www.prospectmagazine.co.uk/index.test.js +++ b/src/extractors/custom/www.prospectmagazine.co.uk/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwProspectmagazineCoUkExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.qdaily.com/index.test.js b/src/extractors/custom/www.qdaily.com/index.test.js index a5185b09..c7bf03e8 100644 --- a/src/extractors/custom/www.qdaily.com/index.test.js +++ b/src/extractors/custom/www.qdaily.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwQdailyComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.rawstory.com/index.test.js b/src/extractors/custom/www.rawstory.com/index.test.js index 72f371c0..e3776d63 100644 --- a/src/extractors/custom/www.rawstory.com/index.test.js +++ b/src/extractors/custom/www.rawstory.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwRawstoryComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.recode.net/index.test.js b/src/extractors/custom/www.recode.net/index.test.js index a8f23765..34696707 100644 --- a/src/extractors/custom/www.recode.net/index.test.js +++ b/src/extractors/custom/www.recode.net/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwRecodeNetExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.refinery29.com/index.test.js b/src/extractors/custom/www.refinery29.com/index.test.js index 53712d27..11ef2666 100644 --- a/src/extractors/custom/www.refinery29.com/index.test.js +++ b/src/extractors/custom/www.refinery29.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwRefinery29ComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.reuters.com/index.test.js b/src/extractors/custom/www.reuters.com/index.test.js index 1fb36170..f5eb334a 100644 --- a/src/extractors/custom/www.reuters.com/index.test.js +++ b/src/extractors/custom/www.reuters.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwReutersComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.rollingstone.com/index.test.js b/src/extractors/custom/www.rollingstone.com/index.test.js index 6d86cdcc..2c60ed7c 100644 --- a/src/extractors/custom/www.rollingstone.com/index.test.js +++ b/src/extractors/custom/www.rollingstone.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwRollingstoneComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.sbnation.com/index.test.js b/src/extractors/custom/www.sbnation.com/index.test.js index 0fdc0009..5c9e3539 100644 --- a/src/extractors/custom/www.sbnation.com/index.test.js +++ b/src/extractors/custom/www.sbnation.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwSbnationComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.si.com/index.test.js b/src/extractors/custom/www.si.com/index.test.js index 93f26585..6ff4f206 100644 --- a/src/extractors/custom/www.si.com/index.test.js +++ b/src/extractors/custom/www.si.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwSiComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.slate.com/index.test.js b/src/extractors/custom/www.slate.com/index.test.js index 9d064707..3804042d 100644 --- a/src/extractors/custom/www.slate.com/index.test.js +++ b/src/extractors/custom/www.slate.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwSlateComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.theatlantic.com/index.test.js b/src/extractors/custom/www.theatlantic.com/index.test.js index 5ad14e56..7fdde89b 100644 --- a/src/extractors/custom/www.theatlantic.com/index.test.js +++ b/src/extractors/custom/www.theatlantic.com/index.test.js @@ -1,11 +1,12 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; +const fs = require('fs'); + // Rename CustomExtractor describe('AtlanticExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.theguardian.com/index.test.js b/src/extractors/custom/www.theguardian.com/index.test.js index b6fa481b..d6d6756d 100644 --- a/src/extractors/custom/www.theguardian.com/index.test.js +++ b/src/extractors/custom/www.theguardian.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwTheguardianComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.thepennyhoarder.com/index.test.js b/src/extractors/custom/www.thepennyhoarder.com/index.test.js index 1c9caf42..d1b2c67c 100644 --- a/src/extractors/custom/www.thepennyhoarder.com/index.test.js +++ b/src/extractors/custom/www.thepennyhoarder.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwThepennyhoarderComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.thepoliticalinsider.com/index.test.js b/src/extractors/custom/www.thepoliticalinsider.com/index.test.js index 31ea911f..eb39ce62 100644 --- a/src/extractors/custom/www.thepoliticalinsider.com/index.test.js +++ b/src/extractors/custom/www.thepoliticalinsider.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwThepoliticalinsiderComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.theverge.com/index.test.js b/src/extractors/custom/www.theverge.com/index.test.js index fae6c0e5..fbea6581 100644 --- a/src/extractors/custom/www.theverge.com/index.test.js +++ b/src/extractors/custom/www.theverge.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwThevergeComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.tmz.com/index.test.js b/src/extractors/custom/www.tmz.com/index.test.js index 98c0bbdc..a94588ca 100644 --- a/src/extractors/custom/www.tmz.com/index.test.js +++ b/src/extractors/custom/www.tmz.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwTmzComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.today.com/index.test.js b/src/extractors/custom/www.today.com/index.test.js index 7465233d..29b6d3a3 100644 --- a/src/extractors/custom/www.today.com/index.test.js +++ b/src/extractors/custom/www.today.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwTodayComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.usmagazine.com/index.test.js b/src/extractors/custom/www.usmagazine.com/index.test.js index 39479e0a..56cd77d0 100644 --- a/src/extractors/custom/www.usmagazine.com/index.test.js +++ b/src/extractors/custom/www.usmagazine.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwUsmagazineComExtractor', () => { it('is selected properly', () => { // This test should be passing by default. diff --git a/src/extractors/custom/www.vox.com/index.test.js b/src/extractors/custom/www.vox.com/index.test.js index aa1bbdc3..caf34738 100644 --- a/src/extractors/custom/www.vox.com/index.test.js +++ b/src/extractors/custom/www.vox.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwVoxComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.washingtonpost.com/index.test.js b/src/extractors/custom/www.washingtonpost.com/index.test.js index b64b6789..62fbec50 100644 --- a/src/extractors/custom/www.washingtonpost.com/index.test.js +++ b/src/extractors/custom/www.washingtonpost.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwWashingtonpostComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.westernjournalism.com/index.test.js b/src/extractors/custom/www.westernjournalism.com/index.test.js index 3fcceefa..e56d71b4 100644 --- a/src/extractors/custom/www.westernjournalism.com/index.test.js +++ b/src/extractors/custom/www.westernjournalism.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwWesternjournalismComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/custom/www.wired.com/index.test.js b/src/extractors/custom/www.wired.com/index.test.js index d356b424..282c9745 100644 --- a/src/extractors/custom/www.wired.com/index.test.js +++ b/src/extractors/custom/www.wired.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('WiredExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.yahoo.com/index.test.js b/src/extractors/custom/www.yahoo.com/index.test.js index b4c29c0b..1c20840b 100644 --- a/src/extractors/custom/www.yahoo.com/index.test.js +++ b/src/extractors/custom/www.yahoo.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + // Rename CustomExtractor describe('YahooExtractor', () => { describe('initial test case', () => { diff --git a/src/extractors/custom/www.youtube.com/index.test.js b/src/extractors/custom/www.youtube.com/index.test.js index 885094ff..c6879091 100644 --- a/src/extractors/custom/www.youtube.com/index.test.js +++ b/src/extractors/custom/www.youtube.com/index.test.js @@ -1,5 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; import URL from 'url'; import cheerio from 'cheerio'; @@ -7,6 +6,8 @@ import Mercury from 'mercury'; import getExtractor from 'extractors/get-extractor'; import { excerptContent } from 'utils/text'; +const fs = require('fs'); + describe('WwwYoutubeComExtractor', () => { describe('initial test case', () => { let result; diff --git a/src/extractors/detect-by-html.js b/src/extractors/detect-by-html.js index 10ee02af..f55df5f4 100644 --- a/src/extractors/detect-by-html.js +++ b/src/extractors/detect-by-html.js @@ -1,4 +1,4 @@ -import { MediumExtractor, BloggerExtractor } from './custom/'; +import { MediumExtractor, BloggerExtractor } from "./custom"; const Detectors = { 'meta[name="al:ios:app_name"][value="Medium"]': MediumExtractor, diff --git a/src/extractors/generic/author/extractor.js b/src/extractors/generic/author/extractor.js index 1956210b..f63d9633 100644 --- a/src/extractors/generic/author/extractor.js +++ b/src/extractors/generic/author/extractor.js @@ -27,6 +27,7 @@ const GenericAuthorExtractor = { // Last, use our looser regular-expression based selectors for // potential authors. + // eslint-disable-next-line no-restricted-syntax for (const [selector, regex] of BYLINE_SELECTORS_RE) { const node = $(selector); if (node.length === 1) { diff --git a/src/extractors/generic/content/extract-best-node.test.js b/src/extractors/generic/content/extract-best-node.test.js index bc6463be..9e960727 100644 --- a/src/extractors/generic/content/extract-best-node.test.js +++ b/src/extractors/generic/content/extract-best-node.test.js @@ -1,8 +1,9 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import fs from 'fs'; import extractBestNode from './extract-best-node'; +const fs = require('fs'); + describe('extractBestNode($, flags)', () => { it('scores the dom nodes and returns the best option', () => { const html = fs.readFileSync('./fixtures/latimes.html', 'utf-8'); diff --git a/src/extractors/generic/content/extractor.js b/src/extractors/generic/content/extractor.js index e8465a7d..b4e57a73 100644 --- a/src/extractors/generic/content/extractor.js +++ b/src/extractors/generic/content/extractor.js @@ -47,6 +47,7 @@ const GenericContentExtractor = { // We didn't succeed on first pass, one by one disable our // extraction opts and try again. + // eslint-disable-next-line no-restricted-syntax for (const key of Reflect.ownKeys(opts).filter(k => opts[k] === true)) { opts[key] = false; $ = cheerio.load(html); diff --git a/src/extractors/generic/content/extractor.test.js b/src/extractors/generic/content/extractor.test.js index b567ec49..3bdc6fa4 100644 --- a/src/extractors/generic/content/extractor.test.js +++ b/src/extractors/generic/content/extractor.test.js @@ -1,10 +1,11 @@ import assert from 'assert'; -import fs from 'fs'; import { clean } from 'test-helpers'; import GenericContentExtractor from './extractor'; +const fs = require('fs'); + describe('GenericContentExtractor', () => { describe('extract($, html, opts)', () => { it('extracts html and returns the article', () => { diff --git a/src/extractors/generic/content/scoring/find-top-candidate.test.js b/src/extractors/generic/content/scoring/find-top-candidate.test.js index fd89e6e6..8a825203 100644 --- a/src/extractors/generic/content/scoring/find-top-candidate.test.js +++ b/src/extractors/generic/content/scoring/find-top-candidate.test.js @@ -1,11 +1,12 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import fs from 'fs'; import HTML from './fixtures/html'; import { getScore, findTopCandidate, scoreContent } from './index'; +const fs = require('fs'); + describe('findTopCandidate($)', () => { it('finds the top candidate from simple case', () => { const $ = cheerio.load(HTML.findDom1); diff --git a/src/extractors/generic/content/scoring/merge-siblings.js b/src/extractors/generic/content/scoring/merge-siblings.js index a93f8729..4891fb7a 100644 --- a/src/extractors/generic/content/scoring/merge-siblings.js +++ b/src/extractors/generic/content/scoring/merge-siblings.js @@ -57,13 +57,13 @@ export default function mergeSiblings($candidate, topScore, $) { if (newScore >= siblingScoreThreshold) { return wrappingDiv.append($sibling); - } else if (sibling.tagName === 'p') { + } if (sibling.tagName === 'p') { const siblingContent = $sibling.text(); const siblingContentLength = textLength(siblingContent); if (siblingContentLength > 80 && density < 0.25) { return wrappingDiv.append($sibling); - } else if ( + } if ( siblingContentLength <= 80 && density === 0 && hasSentenceEnd(siblingContent) diff --git a/src/extractors/generic/content/scoring/score-content.test.js b/src/extractors/generic/content/scoring/score-content.test.js index 6af98c2b..ee7fd9ba 100644 --- a/src/extractors/generic/content/scoring/score-content.test.js +++ b/src/extractors/generic/content/scoring/score-content.test.js @@ -1,11 +1,12 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import fs from 'fs'; import HTML from './fixtures/html'; import { scoreContent, getScore } from './index'; +const fs = require('fs'); + // TODO: Walk through these and sanity check my scores // Commented out scores were what I expected, but I was also // probably missing something when calculating diff --git a/src/extractors/generic/content/scoring/score-node.js b/src/extractors/generic/content/scoring/score-node.js index 7282cdc0..248a9a75 100644 --- a/src/extractors/generic/content/scoring/score-node.js +++ b/src/extractors/generic/content/scoring/score-node.js @@ -15,13 +15,13 @@ export default function scoreNode($node) { // Could save doing that regex test on every node – AP if (PARAGRAPH_SCORE_TAGS.test(tagName)) { return scoreParagraph($node); - } else if (tagName.toLowerCase() === 'div') { + } if (tagName.toLowerCase() === 'div') { return 5; - } else if (CHILD_CONTENT_TAGS.test(tagName)) { + } if (CHILD_CONTENT_TAGS.test(tagName)) { return 3; - } else if (BAD_TAGS.test(tagName)) { + } if (BAD_TAGS.test(tagName)) { return -3; - } else if (tagName.toLowerCase() === 'th') { + } if (tagName.toLowerCase() === 'th') { return -5; } diff --git a/src/extractors/generic/excerpt/extractor.test.js b/src/extractors/generic/excerpt/extractor.test.js index 32733a88..24977937 100644 --- a/src/extractors/generic/excerpt/extractor.test.js +++ b/src/extractors/generic/excerpt/extractor.test.js @@ -1,7 +1,7 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import { default as GenericExcerptExtractor, clean } from './extractor'; +import GenericExcerptExtractor, { clean } from './extractor'; describe('GenericExcerptExtractor', () => { describe('extract({ $, content, metaCache })', () => { diff --git a/src/extractors/generic/index.test.js b/src/extractors/generic/index.test.js index 0b354ac3..f8252784 100644 --- a/src/extractors/generic/index.test.js +++ b/src/extractors/generic/index.test.js @@ -1,8 +1,9 @@ import assert from 'assert'; -import fs from 'fs'; import GenericExtractor from './index'; +const fs = require('fs'); + describe('GenericExtractor', () => { describe('extract(opts)', () => { it('extracts this old LA Times article', () => { diff --git a/src/extractors/generic/lead-image-url/extractor.js b/src/extractors/generic/lead-image-url/extractor.js index a25f1388..606f3d51 100644 --- a/src/extractors/generic/lead-image-url/extractor.js +++ b/src/extractors/generic/lead-image-url/extractor.js @@ -85,6 +85,7 @@ const GenericLeadImageUrlExtractor = { // If nothing else worked, check to see if there are any really // probable nodes in the doc, like <link rel="image_src" />. + // eslint-disable-next-line no-restricted-syntax for (const selector of LEAD_IMAGE_URL_SELECTORS) { const $node = $(selector).first(); const src = $node.attr('src'); diff --git a/src/extractors/generic/next-page-url/extractor.test.js b/src/extractors/generic/next-page-url/extractor.test.js index 36bcc13f..ad79556d 100644 --- a/src/extractors/generic/next-page-url/extractor.test.js +++ b/src/extractors/generic/next-page-url/extractor.test.js @@ -1,9 +1,10 @@ import assert from 'assert'; -import fs from 'fs'; import cheerio from 'cheerio'; import GenericNextPageUrlExtractor from './extractor'; +const fs = require('fs'); + describe('GenericNextPageUrlExtractor', () => { it('returns most likely next page url', () => { const html = fs.readFileSync('./fixtures/ars.html', 'utf8'); diff --git a/src/extractors/generic/next-page-url/scoring/score-links.test.js b/src/extractors/generic/next-page-url/scoring/score-links.test.js index 3cfc14cf..9ff348b9 100644 --- a/src/extractors/generic/next-page-url/scoring/score-links.test.js +++ b/src/extractors/generic/next-page-url/scoring/score-links.test.js @@ -1,9 +1,10 @@ import assert from 'assert'; import cheerio from 'cheerio'; -import fs from 'fs'; import scoreLinks from './score-links'; +const fs = require('fs'); + describe('scoreLinks(links)', () => { it('returns an object of scored links', () => { const html = fs.readFileSync('./fixtures/ars.html', 'utf8'); diff --git a/src/extractors/root-extractor.test.js b/src/extractors/root-extractor.test.js index 3f486563..97b62636 100644 --- a/src/extractors/root-extractor.test.js +++ b/src/extractors/root-extractor.test.js @@ -1,10 +1,8 @@ import assert from 'assert'; -import fs from 'fs'; import cheerio from 'cheerio'; import { assertClean } from 'test-helpers'; -import { - default as RootExtractor, +import RootExtractor, { select, cleanBySelectors, transformElements, @@ -12,6 +10,8 @@ import { import { NYMagExtractor } from './custom/nymag.com'; +const fs = require('fs'); + describe('RootExtractor', () => { it('only returns what the custom parser gives it if fallback is disabled', () => { const fullUrl = diff --git a/src/mercury.js b/src/mercury.js index 972c2ecb..1b4daf62 100644 --- a/src/mercury.js +++ b/src/mercury.js @@ -85,8 +85,8 @@ const Mercury = { // A convenience method for getting a resource // to work with, e.g., for custom extractor generator - async fetchResource(url) { - return await Resource.create(url); + fetchResource(url) { + return Resource.create(url); }, }; diff --git a/src/resource/utils/fetch-resource.test.js b/src/resource/utils/fetch-resource.test.js index c8fe4866..cf9e2244 100644 --- a/src/resource/utils/fetch-resource.test.js +++ b/src/resource/utils/fetch-resource.test.js @@ -2,8 +2,7 @@ import assert from 'assert'; import URL from 'url'; import { record } from 'test-helpers'; -import { - default as fetchResource, +import fetchResource, { baseDomain, validateResponse, } from './fetch-resource'; diff --git a/src/shims/cheerio-query.js b/src/shims/cheerio-query.js index 274826f6..6581b004 100644 --- a/src/shims/cheerio-query.js +++ b/src/shims/cheerio-query.js @@ -23,6 +23,7 @@ const $ = (selector, context, rootjQuery, contextOverride = true) => { return new jQuery.fn.init(selector, context, rootjQuery); // eslint-disable-line new-cap }; +// eslint-disable-next-line no-multi-assign $.fn = $.prototype = jQuery.fn; jQuery.extend($, jQuery); // copy's trim, extend etc to $ @@ -84,6 +85,7 @@ $.html = $node => { return html; }; +// eslint-disable-next-line no-unused-vars $.load = (html, opts = {}, returnHtml = false) => { if (!html) { html = $.cloneHtml(); diff --git a/src/test-helpers.js b/src/test-helpers.js index a8f40c48..3252898f 100644 --- a/src/test-helpers.js +++ b/src/test-helpers.js @@ -2,7 +2,8 @@ import assert from 'assert'; import nock from 'nock'; // eslint-disable-line import/no-extraneous-dependencies import path from 'path'; import cheerio from 'cheerio'; -// import fs from 'fs'; + +// const fs = require('fs'); export function clean(string) { return string @@ -78,6 +79,7 @@ export class MockDomNode { this.attributes.pop(); this.attributes.push({ name: key, value: val }); } + removeAttribute() { this.attributes.pop(); } diff --git a/src/utils/dom/clean-tags.js b/src/utils/dom/clean-tags.js index beba45ab..f208bac4 100644 --- a/src/utils/dom/clean-tags.js +++ b/src/utils/dom/clean-tags.js @@ -77,7 +77,7 @@ function removeUnlessContent($node, $, weight) { // Too many script tags, not enough content. if (scriptCount > 0 && contentLength < 150) { $node.remove(); - return; + } } } diff --git a/src/utils/dom/extract-from-meta.js b/src/utils/dom/extract-from-meta.js index df31d923..c83665f8 100644 --- a/src/utils/dom/extract-from-meta.js +++ b/src/utils/dom/extract-from-meta.js @@ -10,6 +10,7 @@ export default function extractFromMeta( ) { const foundNames = metaNames.filter(name => cachedNames.indexOf(name) !== -1); + // eslint-disable-next-line no-restricted-syntax for (const name of foundNames) { const type = 'name'; const value = 'value'; @@ -35,7 +36,7 @@ export default function extractFromMeta( if (cleanTags) { metaValue = stripTags(values[0], $); } else { - metaValue = values[0]; + [metaValue] = values; } return metaValue; diff --git a/src/utils/dom/extract-from-selectors.js b/src/utils/dom/extract-from-selectors.js index c88123b5..f3591f43 100644 --- a/src/utils/dom/extract-from-selectors.js +++ b/src/utils/dom/extract-from-selectors.js @@ -23,6 +23,7 @@ export default function extractFromSelectors( maxChildren = 1, textOnly = true ) { + // eslint-disable-next-line no-restricted-syntax for (const selector of selectors) { const nodes = $(selector); diff --git a/src/utils/dom/link-density.js b/src/utils/dom/link-density.js index 82fdc7b9..f64aebc3 100644 --- a/src/utils/dom/link-density.js +++ b/src/utils/dom/link-density.js @@ -13,7 +13,7 @@ export function linkDensity($node) { if (totalTextLength > 0) { return linkLength / totalTextLength; - } else if (totalTextLength === 0 && linkLength > 0) { + } if (totalTextLength === 0 && linkLength > 0) { return 1; } diff --git a/src/utils/dom/paragraphize.js b/src/utils/dom/paragraphize.js index ae0a6bca..ccc6e3d7 100644 --- a/src/utils/dom/paragraphize.js +++ b/src/utils/dom/paragraphize.js @@ -24,7 +24,7 @@ export default function paragraphize(node, $, br = false) { sibling && !(sibling.tagName && BLOCK_LEVEL_TAGS_RE.test(sibling.tagName)) ) { - const nextSibling = sibling.nextSibling; + const { nextSibling } = sibling; $(sibling).appendTo(p); sibling = nextSibling; } diff --git a/src/utils/dom/strip-unlikely-candidates.js b/src/utils/dom/strip-unlikely-candidates.js index 40ffcc5b..3c8bc086 100644 --- a/src/utils/dom/strip-unlikely-candidates.js +++ b/src/utils/dom/strip-unlikely-candidates.js @@ -21,7 +21,7 @@ export default function stripUnlikelyCandidates($) { const classAndId = `${classes || ''} ${id || ''}`; if (CANDIDATES_WHITELIST.test(classAndId)) { return; - } else if (CANDIDATES_BLACKLIST.test(classAndId)) { + } if (CANDIDATES_BLACKLIST.test(classAndId)) { $node.remove(); } }); diff --git a/yarn.lock b/yarn.lock index d9d8fdfc..d38abab0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,583 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/core@^7.0.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.2.2" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.2.2" + "@babel/template" "^7.2.2" + "@babel/traverse" "^7.2.2" + "@babel/types" "^7.2.2" + convert-source-map "^1.1.0" + debug "^4.1.0" + json5 "^2.1.0" + lodash "^4.17.10" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" + dependencies: + "@babel/types" "^7.2.2" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + dependencies: + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-call-delegate@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" + dependencies: + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-define-map@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.0.0" + lodash "^4.17.10" + +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + dependencies: + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-hoist-variables@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-transforms@^7.1.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/template" "^7.2.2" + "@babel/types" "^7.2.2" + lodash "^4.17.10" + +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-plugin-utils@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + +"@babel/helper-regex@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" + dependencies: + lodash "^4.17.10" + +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-replace-supers@^7.1.0": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" + dependencies: + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.2.3" + "@babel/types" "^7.0.0" + +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + dependencies: + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-wrap-function@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.2.0" + +"@babel/helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" + dependencies: + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.5" + "@babel/types" "^7.2.0" + +"@babel/highlight@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" + +"@babel/plugin-external-helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.2.0.tgz#7f4cb7dee651cd380d2034847d914288467a6be4" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + +"@babel/plugin-proposal-export-default-from@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.2.0.tgz#737b0da44b9254b6152fe29bb99c64e5691f6f68" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-export-default-from" "^7.2.0" + +"@babel/plugin-proposal-export-namespace-from@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.2.0.tgz#308fd4d04ff257fc3e4be090550840eeabad5dd9" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-export-namespace-from" "^7.2.0" + +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + +"@babel/plugin-proposal-object-rest-spread@^7.0.0", "@babel/plugin-proposal-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + +"@babel/plugin-proposal-unicode-property-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.2.0" + +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-export-default-from@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.2.0.tgz#edd83b7adc2e0d059e2467ca96c650ab6d2f3820" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-export-namespace-from@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.2.0.tgz#8d257838c6b3b779db52c0224443459bd27fb039" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-arrow-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-async-to-generator@^7.0.0", "@babel/plugin-transform-async-to-generator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-block-scoping@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.10" + +"@babel/plugin-transform-classes@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.1.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-destructuring@^7.0.0", "@babel/plugin-transform-destructuring@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-dotall-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" + +"@babel/plugin-transform-duplicate-keys@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-for-of@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-function-name@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-amd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-commonjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + +"@babel/plugin-transform-modules-systemjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" + dependencies: + "@babel/helper-hoist-variables" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-new-target@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + +"@babel/plugin-transform-parameters@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" + dependencies: + "@babel/helper-call-delegate" "^7.1.0" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" + dependencies: + regenerator-transform "^0.13.3" + +"@babel/plugin-transform-runtime@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz#566bc43f7d0aedc880eaddbd29168d0f248966ea" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + resolve "^1.8.1" + semver "^5.5.1" + +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-unicode-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + regexpu-core "^4.1.3" + +"@babel/polyfill@^7.0.0": + version "7.2.5" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d" + dependencies: + core-js "^2.5.7" + regenerator-runtime "^0.12.0" + +"@babel/preset-env@^7.0.0": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.2.0" + "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.2.0" + "@babel/plugin-transform-dotall-regex" "^7.2.0" + "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.2.0" + "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.2.0" + "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-new-target" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.2.0" + browserslist "^4.3.4" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.3.0" + +"@babel/runtime-corejs2@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs2/-/runtime-corejs2-7.2.0.tgz#5ccd722b72d2c18c6a7224b5751f4b9816b60ada" + dependencies: + core-js "^2.5.7" + regenerator-runtime "^0.12.0" + +"@babel/runtime@^7.0.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f" + dependencies: + regenerator-runtime "^0.12.0" + +"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.2.2" + "@babel/types" "^7.2.2" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.2.2" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.2.3" + "@babel/types" "^7.2.2" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.10" + +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + "@iamstarkov/listr-update-renderer@0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz#d7c48092a2dcf90fd672b6c8b458649cb350c77e" @@ -37,9 +614,9 @@ node-fetch "^2.3.0" universal-user-agent "^2.0.1" -"@octokit/rest@^16.8.1": - version "16.8.1" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.8.1.tgz#2d3ea3bbee140feb991476971a927f2e8a103982" +"@octokit/rest@^16.9.0": + version "16.9.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.9.0.tgz#8fda1952b28c7671872620ad4f6884bd7d22802f" dependencies: "@octokit/request" "2.2.1" before-after-hook "^1.2.0" @@ -58,6 +635,14 @@ dependencies: any-observable "^0.3.0" +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + +"@types/node@*": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + JSONStream@^1.0.3: version "1.2.1" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.2.1.tgz#32aa5790e799481083b49b4b7fa94e23bae69bf9" @@ -65,70 +650,77 @@ JSONStream@^1.0.3: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" +abab@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" -abbrev@1, abbrev@1.0.x: +abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" -accepts@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.1.4.tgz#d71c96f7d41d0feda2c38cd14e8a27c04158df4a" - dependencies: - mime-types "~2.0.4" - negotiator "0.4.9" - -accepts@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" +accepts@~1.3.4, accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" dependencies: - mime-types "~2.1.11" + mime-types "~2.1.18" negotiator "0.6.1" -acorn-globals@^1.0.4: - version "1.0.9" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" +acorn-dynamic-import@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz#482210140582a36b83c3e342e1cfebcaa9240948" + +acorn-globals@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" dependencies: - acorn "^2.1.0" + acorn "^6.0.1" + acorn-walk "^6.0.1" -acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + +acorn-node@^1.3.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.6.2.tgz#b7d7ceca6f22e6417af933a62cad4de01048d5d2" dependencies: - acorn "^3.0.4" + acorn "^6.0.2" + acorn-dynamic-import "^4.0.0" + acorn-walk "^6.1.0" + xtend "^4.0.1" + +acorn-walk@^6.0.1, acorn-walk@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" acorn@^1.0.3: version "1.2.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" -acorn@^2.1.0, acorn@^2.4.0, acorn@^2.7.0: +acorn@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" -acorn@^3.0.4, acorn@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn@^5.5.3, acorn@^5.7.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" -acorn@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.3.tgz#1a3e850b428e73ba6b09d1cc527f5aaad4d03ef1" - -after@0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627" +acorn@^6.0.1, acorn@^6.0.2, acorn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" -ajv-keywords@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.1.1.tgz#02550bc605a3e576041565628af972e06c549d50" +after@0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" -ajv@^4.7.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.9.0.tgz#5a358085747b134eb567d6d15e015f1d7802f45c" +ajv@^6.5.3, ajv@^6.5.5, ajv@^6.6.1: + version "6.7.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.7.0.tgz#e3ce7bb372d6577bb1839f1dfdfcbf5ad2948d96" dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -138,24 +730,22 @@ align-text@^0.1.1, align-text@^0.1.3: longest "^1.0.1" repeat-string "^1.5.2" -all-contributors-cli@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-3.0.7.tgz#8c1b791e744893c0a254ee6793776eaa1bdf13cc" +all-contributors-cli@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/all-contributors-cli/-/all-contributors-cli-5.10.0.tgz#925bd0ec3432dc912dddfc7aef45f2d76d9586c6" dependencies: async "^2.0.0-rc.1" - inquirer "^0.12.0" + chalk "^2.3.0" + inquirer "^4.0.0" lodash "^4.11.2" + pify "^3.0.0" request "^2.72.0" - yargs "^4.7.0" + yargs "^10.0.3" amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" @@ -182,10 +772,6 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansicolors@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" - any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" @@ -197,9 +783,18 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" -append-transform@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.3.0.tgz#d6933ce4a85f09445d9ccc4cc119051b7381a813" +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" application-config-path@^0.1.0: version "0.1.0" @@ -229,6 +824,13 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +aria-query@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" + dependencies: + ast-types-flow "0.0.7" + commander "^2.11.0" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -251,10 +853,6 @@ arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" - array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" @@ -267,6 +865,17 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +array-from@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195" + +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-map@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" @@ -297,9 +906,9 @@ array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" -arraybuffer.slice@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" +arraybuffer.slice@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" @@ -325,20 +934,28 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" -assert@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.3.0.tgz#03939a622582a812cc202320a0b9a56c9b815849" +assert@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" dependencies: util "0.10.3" -assertion-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" +ast-types-flow@0.0.7, ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + astw@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/astw/-/astw-2.0.0.tgz#08121ac8288d35611c0ceec663f6cd545604897d" @@ -349,7 +966,11 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" -async@1.x, async@^1.4.0, async@^1.4.2: +async-limiter@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + +async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -359,16 +980,16 @@ async@^2.0.0-rc.1, async@^2.0.1: dependencies: lodash "^4.14.0" -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -async@~2.6.1: +async@^2.1.4, async@~2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" dependencies: lodash "^4.17.10" +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -381,10 +1002,24 @@ aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + +axobject-query@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9" + dependencies: + ast-types-flow "0.0.7" + babel-code-frame@^6.16.0: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de" @@ -393,39 +1028,52 @@ babel-code-frame@^6.16.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@6, babel-core@^6.0.0, babel-core@^6.0.14, babel-core@^6.11.4, babel-core@^6.18.0, babel-core@^6.4.0: - version "6.18.2" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.18.2.tgz#d8bb14dd6986fa4f3566a26ceda3964fa0e04e5b" +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: - babel-code-frame "^6.16.0" - babel-generator "^6.18.0" - babel-helpers "^6.16.0" - babel-messages "^6.8.0" - babel-register "^6.18.0" - babel-runtime "^6.9.1" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.11.0" - convert-source-map "^1.1.0" - debug "^2.1.1" - json5 "^0.5.0" - lodash "^4.2.0" - minimatch "^3.0.2" - path-is-absolute "^1.0.0" - private "^0.1.6" + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.26.0, babel-core@^6.4.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" slash "^1.0.0" - source-map "^0.5.0" + source-map "^0.5.7" -babel-eslint@^7.1.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" +babel-core@^7.0.0-bridge.0: + version "7.0.0-bridge.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" + +babel-eslint@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed" dependencies: - babel-code-frame "^6.16.0" - babel-traverse "^6.15.0" - babel-types "^6.15.0" - babylon "^6.13.0" - lodash.pickby "^4.6.0" + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + eslint-scope "3.7.1" + eslint-visitor-keys "^1.0.0" babel-generator@^6.18.0: version "6.19.0" @@ -439,98 +1087,38 @@ babel-generator@^6.18.0: lodash "^4.2.0" source-map "^0.5.0" -babel-helper-call-delegate@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.18.0.tgz#05b14aafa430884b034097ef29e9f067ea4133bd" - dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.0.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-define-map@^6.18.0, babel-helper-define-map@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.18.0.tgz#8d6c85dc7fbb4c19be3de40474d18e97c3676ec2" - dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.9.0" - babel-types "^6.18.0" - lodash "^4.2.0" - -babel-helper-function-name@^6.18.0, babel-helper-function-name@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6" - dependencies: - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-helper-get-function-arity@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-hoist-variables@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.18.0.tgz#a835b5ab8b46d6de9babefae4d98ea41e866b82a" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-optimise-call-expression@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.18.0.tgz#9261d0299ee1a4f08a6dd28b7b7c777348fd8f0f" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-helper-regex@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.18.0.tgz#ae0ebfd77de86cb2f1af258e2cc20b5fe893ecc6" - dependencies: - babel-runtime "^6.9.0" - babel-types "^6.18.0" - lodash "^4.2.0" - -babel-helper-remap-async-to-generator@^6.16.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.18.0.tgz#336cdf3cab650bb191b02fc16a3708e7be7f9ce5" +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: - babel-helper-function-name "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" -babel-helper-replace-supers@^6.18.0, babel-helper-replace-supers@^6.8.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.18.0.tgz#28ec69877be4144dbd64f4cc3a337e89f29a924e" +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: - babel-helper-optimise-call-expression "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" -babel-helpers@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3" +babel-jest@^23.4.2, babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" dependencies: - babel-runtime "^6.0.0" - babel-template "^6.16.0" + babel-plugin-istanbul "^4.1.6" + babel-preset-jest "^23.2.0" -babel-jest@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-16.0.0.tgz#348729aea6d624a4774b8a934d07a40dd2cfd640" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: - babel-core "^6.0.0" - babel-plugin-istanbul "^2.0.0" - babel-preset-jest "^16.0.0" + babel-runtime "^6.22.0" babel-messages@^6.8.0: version "6.8.0" @@ -538,42 +1126,38 @@ babel-messages@^6.8.0: dependencies: babel-runtime "^6.0.0" -babel-plugin-check-es2015-constants@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-external-helpers@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.18.0.tgz#c6bbf87a4448eb49616f24a8b8088503863488da" +babel-plugin-external-helpers@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" dependencies: - babel-runtime "^6.0.0" + babel-runtime "^6.22.0" -babel-plugin-istanbul@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-2.0.3.tgz#266b304b9109607d60748474394676982f660df4" +babel-plugin-istanbul@^4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" dependencies: - find-up "^1.1.2" - istanbul-lib-instrument "^1.1.4" - object-assign "^4.1.0" - test-exclude "^2.1.1" + babel-plugin-syntax-object-rest-spread "^6.13.0" + find-up "^2.1.0" + istanbul-lib-instrument "^1.10.1" + test-exclude "^4.2.1" -babel-plugin-jest-hoist@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-16.0.0.tgz#b58ca3f770982a7e7c25b5614b2e57e9dafc6e76" +babel-plugin-jest-hoist@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" babel-plugin-module-alias@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/babel-plugin-module-alias/-/babel-plugin-module-alias-1.6.0.tgz#df7e3aaba3544f4c06a9d3314a26bbbff6d87b61" -babel-plugin-module-resolver@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-2.3.0.tgz#2c0eee55b9eb51e20cf763bafa400fe16e9003d1" +babel-plugin-module-resolver@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.1.2.tgz#5d4bd3572eb1d1d4c7ca37bd53de8ec82d251dcb" dependencies: - find-babel-config "^1.0.1" - glob "^7.1.1" - resolve "^1.1.7" + find-babel-config "^1.1.0" + glob "^7.1.2" + pkg-up "^2.0.0" + reselect "^3.0.1" + resolve "^1.4.0" babel-plugin-static-fs@^1.1.0: version "1.1.0" @@ -583,293 +1167,44 @@ babel-plugin-static-fs@^1.1.0: babel-types "^6.4.1" events "^1.1.0" -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-export-extensions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" - -babel-plugin-syntax-object-rest-spread@^6.8.0: +babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-plugin-transform-async-to-generator@^6.8.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999" - dependencies: - babel-helper-remap-async-to-generator "^6.16.0" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-arrow-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-block-scoping@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.18.0.tgz#3bfdcfec318d46df22525cdea88f1978813653af" - dependencies: - babel-runtime "^6.9.0" - babel-template "^6.15.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - lodash "^4.2.0" - -babel-plugin-transform-es2015-classes@^6.18.0, babel-plugin-transform-es2015-classes@^6.9.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.18.0.tgz#ffe7a17321bf83e494dcda0ae3fc72df48ffd1d9" - dependencies: - babel-helper-define-map "^6.18.0" - babel-helper-function-name "^6.18.0" - babel-helper-optimise-call-expression "^6.18.0" - babel-helper-replace-supers "^6.18.0" - babel-messages "^6.8.0" - babel-runtime "^6.9.0" - babel-template "^6.14.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-computed-properties@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870" - dependencies: - babel-helper-define-map "^6.8.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-destructuring@^6.18.0, babel-plugin-transform-es2015-destructuring@^6.9.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.19.0.tgz#ff1d911c4b3f4cab621bd66702a869acd1900533" - dependencies: - babel-runtime "^6.9.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.8.0" - -babel-plugin-transform-es2015-for-of@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.18.0.tgz#4c517504db64bf8cfc119a6b8f177211f2028a70" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-function-name@^6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719" - dependencies: - babel-helper-function-name "^6.8.0" - babel-runtime "^6.9.0" - babel-types "^6.9.0" - -babel-plugin-transform-es2015-literals@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-modules-amd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.18.0.tgz#49a054cbb762bdf9ae2d8a807076cfade6141e40" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-modules-commonjs@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.18.0.tgz#c15ae5bb11b32a0abdcc98a5837baa4ee8d67bcc" - dependencies: - babel-plugin-transform-strict-mode "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.16.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.18.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.19.0.tgz#50438136eba74527efa00a5b0fefaf1dc4071da6" - dependencies: - babel-helper-hoist-variables "^6.18.0" - babel-runtime "^6.11.6" - babel-template "^6.14.0" - -babel-plugin-transform-es2015-modules-umd@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.18.0.tgz#23351770ece5c1f8e83ed67cb1d7992884491e50" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-runtime "^6.0.0" - babel-template "^6.8.0" - -babel-plugin-transform-es2015-object-super@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5" - dependencies: - babel-helper-replace-supers "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-parameters@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.18.0.tgz#9b2cfe238c549f1635ba27fc1daa858be70608b1" - dependencies: - babel-helper-call-delegate "^6.18.0" - babel-helper-get-function-arity "^6.18.0" - babel-runtime "^6.9.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-shorthand-properties@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.18.0.tgz#e2ede3b7df47bf980151926534d1dd0cbea58f43" - dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-plugin-transform-es2015-spread@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-sticky-regex@^6.3.13: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be" - dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" - babel-types "^6.8.0" - -babel-plugin-transform-es2015-template-literals@^6.6.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.18.0.tgz#0b14c48629c90ff47a0650077f6aa699bee35798" - dependencies: - babel-runtime "^6.0.0" - -babel-plugin-transform-es2015-unicode-regex@^6.3.13: - version "6.11.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c" - dependencies: - babel-helper-regex "^6.8.0" - babel-runtime "^6.0.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-export-extensions@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.8.0.tgz#fa80ff655b636549431bfd38f6b817bd82e47f5b" - dependencies: - babel-plugin-syntax-export-extensions "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-object-rest-spread@^6.8.0: - version "6.19.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.19.0.tgz#f6ac428ee3cb4c6aa00943ed1422ce813603b34c" - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.0.0" - -babel-plugin-transform-regenerator@^6.16.0: - version "6.16.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59" - dependencies: - babel-runtime "^6.9.0" - babel-types "^6.16.0" - private "~0.1.5" - -babel-plugin-transform-runtime@6.15.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.15.0.tgz#3d75b4d949ad81af157570273846fb59aeb0d57c" +babel-preset-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" dependencies: - babel-runtime "^6.9.0" + babel-plugin-jest-hoist "^23.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" -babel-plugin-transform-strict-mode@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.18.0.tgz#df7cf2991fe046f44163dcd110d5ca43bc652b9d" +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: - babel-runtime "^6.0.0" - babel-types "^6.18.0" - -babel-polyfill@^6.16.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422" - dependencies: - babel-runtime "^6.9.1" - core-js "^2.4.0" - regenerator-runtime "^0.9.5" - -babel-preset-es2015@^6.13.2: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.18.0.tgz#b8c70df84ec948c43dcf2bf770e988eb7da88312" - dependencies: - babel-plugin-check-es2015-constants "^6.3.13" - babel-plugin-transform-es2015-arrow-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoped-functions "^6.3.13" - babel-plugin-transform-es2015-block-scoping "^6.18.0" - babel-plugin-transform-es2015-classes "^6.18.0" - babel-plugin-transform-es2015-computed-properties "^6.3.13" - babel-plugin-transform-es2015-destructuring "^6.18.0" - babel-plugin-transform-es2015-duplicate-keys "^6.6.0" - babel-plugin-transform-es2015-for-of "^6.18.0" - babel-plugin-transform-es2015-function-name "^6.9.0" - babel-plugin-transform-es2015-literals "^6.3.13" - babel-plugin-transform-es2015-modules-amd "^6.18.0" - babel-plugin-transform-es2015-modules-commonjs "^6.18.0" - babel-plugin-transform-es2015-modules-systemjs "^6.18.0" - babel-plugin-transform-es2015-modules-umd "^6.18.0" - babel-plugin-transform-es2015-object-super "^6.3.13" - babel-plugin-transform-es2015-parameters "^6.18.0" - babel-plugin-transform-es2015-shorthand-properties "^6.18.0" - babel-plugin-transform-es2015-spread "^6.3.13" - babel-plugin-transform-es2015-sticky-regex "^6.3.13" - babel-plugin-transform-es2015-template-literals "^6.6.0" - babel-plugin-transform-es2015-typeof-symbol "^6.18.0" - babel-plugin-transform-es2015-unicode-regex "^6.3.13" - babel-plugin-transform-regenerator "^6.16.0" - -babel-preset-jest@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-16.0.0.tgz#417aabc2d7d93170f43c20ef1ea0145e8f7f2db5" - dependencies: - babel-plugin-jest-hoist "^16.0.0" - -babel-register@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.18.0.tgz#892e2e03865078dd90ad2c715111ec4449b32a68" - dependencies: - babel-core "^6.18.0" - babel-runtime "^6.11.6" - core-js "^2.4.0" + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" home-or-tmp "^2.0.0" - lodash "^4.2.0" + lodash "^4.17.4" mkdirp "^0.5.1" - source-map-support "^0.4.2" + source-map-support "^0.4.15" -babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1: +babel-runtime@^6.0.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078" dependencies: core-js "^2.4.0" regenerator-runtime "^0.9.5" -babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.3.13, babel-template@^6.8.0: +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.3.13: version "6.16.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca" dependencies: @@ -879,7 +1214,31 @@ babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-te babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0: +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.0.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-traverse@^6.16.0, babel-traverse@^6.18.0: version "6.19.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.19.0.tgz#68363fb821e26247d52a519a84b2ceab8df4f55a" dependencies: @@ -893,7 +1252,16 @@ babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.18.0: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.4.1, babel-types@^6.8.0, babel-types@^6.9.0: +babel-types@^6.0.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.4.1: version "6.19.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.19.0.tgz#8db2972dbed01f1192a8b602ba1e1e4c516240b9" dependencies: @@ -902,12 +1270,9 @@ babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19 lodash "^4.2.0" to-fast-properties "^1.0.1" -babelify@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" - dependencies: - babel-core "^6.0.14" - object-assign "^4.0.0" +babelify@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/babelify/-/babelify-10.0.0.tgz#fe73b1a22583f06680d8d072e25a1e0d1d1d7fb5" babelrc-rollup@^3.0.0: version "3.0.0" @@ -915,10 +1280,14 @@ babelrc-rollup@^3.0.0: dependencies: resolve "^1.1.7" -babylon@^6.11.0, babylon@^6.13.0: +babylon@^6.11.0: version "6.14.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815" +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + backo2@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" @@ -927,17 +1296,21 @@ balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" -base64-arraybuffer@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz#474df4a9f2da24e05df3158c3b1db3c3cd46a154" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +base64-arraybuffer@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" -base64id@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/base64id/-/base64id-0.1.0.tgz#02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f" +base64id@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" base@^0.11.1: version "0.11.2" @@ -961,10 +1334,6 @@ before-after-hook@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.3.2.tgz#7bfbf844ad670aa7a96b5a4e4e15bd74b08ed66b" -benchmark@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-1.0.0.tgz#2f1e2fa4c359f11122aa183082218e957e390c73" - better-assert@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/better-assert/-/better-assert-1.0.2.tgz#40866b9e1b9e0b55b481894311e68faffaebc522" @@ -994,9 +1363,9 @@ bl@~1.2.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -blob@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921" +blob@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" block-stream@*: version "0.0.9" @@ -1004,28 +1373,32 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.3.0, bluebird@^3.4.1: +bluebird@^3.3.0: version "3.4.6" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f" +bluebird@^3.5.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" -body-parser@^1.12.4: - version "1.15.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.15.2.tgz#d7578cf4f1d11d5f6ea804cef35dc7a7ff6dae67" +body-parser@1.18.3, body-parser@^1.16.1: + version "1.18.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" dependencies: - bytes "2.4.0" - content-type "~1.0.2" - debug "~2.2.0" - depd "~1.1.0" - http-errors "~1.5.0" - iconv-lite "0.4.13" + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "~1.6.3" + iconv-lite "0.4.23" on-finished "~2.3.0" - qs "6.2.0" - raw-body "~2.1.7" - type-is "~1.6.13" + qs "6.5.2" + raw-body "2.3.3" + type-is "~1.6.16" boolbase@~1.0.0: version "1.0.0" @@ -1044,6 +1417,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + braces@^0.1.2: version "0.1.5" resolved "https://registry.yarnpkg.com/braces/-/braces-0.1.5.tgz#c085711085291d8b75fdd74eab0f8597280711e6" @@ -1058,7 +1438,7 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" -braces@^2.3.1: +braces@^2.3.0, braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" dependencies: @@ -1081,6 +1461,15 @@ brfs-babel@^1.0.0: babel-plugin-static-fs "^1.1.0" through2 "^2.0.0" +brfs@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brfs/-/brfs-2.0.1.tgz#d19370b3fad787a24af1eee5474ad7ec9c305d3a" + dependencies: + quote-stream "^1.0.1" + resolve "^1.1.5" + static-module "^3.0.0" + through2 "^2.0.0" + brorand@^1.0.1: version "1.0.6" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.0.6.tgz#4028706b915f91f7b349a2e0bf3c376039d216e5" @@ -1095,21 +1484,31 @@ browser-pack@^6.0.1: through2 "^2.0.0" umd "^3.0.0" +browser-process-hrtime@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + browser-request@adampash/browser-request#feat-add-headers-to-response: version "0.3.2" resolved "https://codeload.github.com/adampash/browser-request/tar.gz/38faa5b85741aabfca61aa37d1ef044d68969ddf" dependencies: http-headers "^3.0.1" -browser-resolve@^1.11.0, browser-resolve@^1.11.2, browser-resolve@^1.7.0: +browser-resolve@^1.11.0, browser-resolve@^1.7.0: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" dependencies: resolve "1.1.7" -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + dependencies: + resolve "1.1.7" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.0.6" @@ -1156,41 +1555,42 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserify-zlib@~0.1.2: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" +browserify-zlib@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" dependencies: - pako "~0.2.0" + pako "~1.0.5" -browserify@^13.0.0, browserify@^13.1.1: - version "13.1.1" - resolved "https://registry.yarnpkg.com/browserify/-/browserify-13.1.1.tgz#72a2310e2f706ed87db929cf0ee73a5e195d9bb0" +browserify@^16.1.0, browserify@^16.2.3: + version "16.2.3" + resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.2.3.tgz#7ee6e654ba4f92bce6ab3599c3485b1cc7a0ad0b" dependencies: JSONStream "^1.0.3" - assert "~1.3.0" + assert "^1.4.0" browser-pack "^6.0.1" browser-resolve "^1.11.0" - browserify-zlib "~0.1.2" - buffer "^4.1.0" + browserify-zlib "~0.2.0" + buffer "^5.0.2" cached-path-relative "^1.0.0" - concat-stream "~1.5.1" + concat-stream "^1.6.0" console-browserify "^1.1.0" constants-browserify "~1.0.0" crypto-browserify "^3.0.0" defined "^1.0.0" deps-sort "^2.0.0" - domain-browser "~1.1.0" + domain-browser "^1.2.0" duplexer2 "~0.1.2" - events "~1.1.0" - glob "^5.0.15" + events "^2.0.0" + glob "^7.1.0" has "^1.0.0" htmlescape "^1.1.0" - https-browserify "~0.0.0" + https-browserify "^1.0.0" inherits "~2.0.1" insert-module-globals "^7.0.0" labeled-stream-splicer "^2.0.0" - module-deps "^4.0.8" - os-browserify "~0.1.1" + mkdirp "^0.5.0" + module-deps "^6.0.0" + os-browserify "~0.3.0" parents "^1.0.1" path-browserify "~0.0.0" process "~0.11.0" @@ -1200,23 +1600,31 @@ browserify@^13.0.0, browserify@^13.1.1: readable-stream "^2.0.2" resolve "^1.1.4" shasum "^1.0.0" - shell-quote "^1.4.3" + shell-quote "^1.6.1" stream-browserify "^2.0.0" stream-http "^2.0.0" - string_decoder "~0.10.0" + string_decoder "^1.1.1" subarg "^1.0.0" syntax-error "^1.1.1" through2 "^2.0.0" timers-browserify "^1.0.1" - tty-browserify "~0.0.0" + tty-browserify "0.0.1" url "~0.11.0" util "~0.10.1" - vm-browserify "~0.0.1" + vm-browserify "^1.0.0" xtend "^4.0.0" -bser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" +browserslist@^4.3.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.4.0.tgz#7050d1412cbfc5274aba609ed5e50359ca1a5fdf" + dependencies: + caniuse-lite "^1.0.30000928" + electron-to-chromium "^1.3.100" + node-releases "^1.1.3" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" dependencies: node-int64 "^0.4.0" @@ -1224,7 +1632,11 @@ btoa-lite@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" -buffer-es6@^4.9.1: +buffer-equal@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" + +buffer-es6@^4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" @@ -1232,6 +1644,10 @@ buffer-from@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-0.1.2.tgz#15f4b9bcef012044df31142c14333caf6e0260d0" +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -1240,15 +1656,14 @@ buffer-xor@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" -buffer@^4.1.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" +buffer@^5.0.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6" dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" - isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0, builtin-modules@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1256,9 +1671,9 @@ builtin-status-codes@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-2.0.0.tgz#6f22003baacf003ccd287afe6872151fddc58579" -bytes@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" cache-base@^1.0.1: version "1.0.1" @@ -1284,12 +1699,6 @@ caller-callsite@^2.0.0: dependencies: callsites "^2.0.0" -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - caller-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" @@ -1300,33 +1709,40 @@ callsite@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +callsites@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" + camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -cardinal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" +caniuse-lite@^1.0.30000928: + version "1.0.30000929" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz#7b391b781a9c3097ecc39ea053301aea8ea16317" + +capture-exit@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" dependencies: - ansicolors "~0.2.1" - redeyed "~1.0.0" + rsvp "^3.3.3" caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" @@ -1334,13 +1750,16 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -"chai@>=1.9.2 <4.0.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" +chai@^4.1.2: + version "4.2.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" dependencies: - assertion-error "^1.0.1" - deep-eql "^0.1.3" - type-detect "^1.0.0" + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.0" + type-detect "^4.0.5" chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" @@ -1352,7 +1771,7 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" dependencies: @@ -1385,6 +1804,18 @@ changelog-maker@^2.3.0: split2 "~3.0.0" strip-ansi "~5.0.0" +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + cheerio@^0.22.0: version "0.22.0" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" @@ -1406,7 +1837,7 @@ cheerio@^0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -chokidar@^1.0.0, chokidar@^1.4.1: +chokidar@^1.0.0: version "1.6.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" dependencies: @@ -1421,9 +1852,32 @@ chokidar@^1.0.0, chokidar@^1.4.1: optionalDependencies: fsevents "^1.0.0" -ci-info@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" +chokidar@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.5" + optionalDependencies: + fsevents "^1.2.2" + +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" ci-info@^2.0.0: version "2.0.0" @@ -1439,6 +1893,10 @@ circular-json@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" +circular-json@^0.5.5: + version "0.5.9" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.5.9.tgz#932763ae88f4f7dead7a0d09c8a51a4743a53b1d" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1448,27 +1906,15 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-cursor@^1.0.1, cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" - dependencies: - restore-cursor "^1.0.1" - cli-cursor@^2.0.0, cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" dependencies: restore-cursor "^2.0.0" -cli-spinners@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.2.0.tgz#85078737913b880f6ec9ffe7b65e83ec7776284f" - -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - dependencies: - colors "1.0.3" +cli-spinners@^1.1.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" cli-truncate@^0.2.1: version "0.2.1" @@ -1477,13 +1923,6 @@ cli-truncate@^0.2.1: slice-ansi "0.0.4" string-width "^1.0.1" -cli-usage@^0.1.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" - dependencies: - marked "^0.3.6" - marked-terminal "^1.6.2" - cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" @@ -1496,12 +1935,12 @@ cliui@^2.1.0: right-align "^0.1.1" wordwrap "0.0.2" -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" + string-width "^2.1.1" + strip-ansi "^4.0.0" wrap-ansi "^2.0.0" clone@^1.0.2: @@ -1533,10 +1972,6 @@ color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - colors@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -1562,15 +1997,29 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.9.0, commander@^2.9.0: +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + dependencies: + delayed-stream "~1.0.0" + +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +commander@^2.11.0, commander@^2.14.1: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + +commander@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: graceful-readlink ">= 1.0.0" -commander@^2.14.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" +commander@~2.17.1: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" commit-stream@~1.1.0: version "1.1.0" @@ -1583,15 +2032,7 @@ component-bind@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1" -component-emitter@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.1.2.tgz#296594f2753daa63996d2af08d15a95116c9aec3" - -component-emitter@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.0.tgz#ccd113a86388d06482d03de3fc7df98526ba8efe" - -component-emitter@^1.2.1: +component-emitter@1.2.1, component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" @@ -1603,15 +2044,16 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.0.tgz#53f7d43c51c5e43f81c8fdd03321c631be68d611" +concat-stream@^1.6.0, concat-stream@~1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" dependencies: - inherits "~2.0.1" - readable-stream "~2.0.0" - typedarray "~0.0.5" + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" -concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@~1.5.0, concat-stream@~1.5.1: +concat-stream@~1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" dependencies: @@ -1619,14 +2061,14 @@ concat-stream@^1.4.6, concat-stream@^1.4.7, concat-stream@~1.5.0, concat-stream@ readable-stream "~2.0.0" typedarray "~0.0.5" -connect@^3.3.5: - version "3.5.0" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.5.0.tgz#b357525a0b4c1f50599cd983e1d9efeea9677198" +connect@^3.6.0: + version "3.6.6" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" dependencies: - debug "~2.2.0" - finalhandler "0.5.0" - parseurl "~1.3.1" - utils-merge "1.0.0" + debug "2.6.9" + finalhandler "1.1.0" + parseurl "~1.3.2" + utils-merge "1.0.1" console-browserify@^1.1.0: version "1.1.0" @@ -1646,22 +2088,24 @@ contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" -content-disposition@0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.1.tgz#87476c6a67c8daa87e32e87616df883ba7fb071b" - -content-type-parser@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" -content-type@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" convert-source-map@^1.1.0, convert-source-map@^1.1.3: version "1.3.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" +convert-source-map@^1.4.0, convert-source-map@^1.5.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + dependencies: + safe-buffer "~5.1.1" + convert-source-map@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" @@ -1682,6 +2126,10 @@ core-js@^2.2.0, core-js@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +core-js@^2.5.0, core-js@^2.5.7: + version "2.6.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.2.tgz#267988d7268323b349e20b4588211655f0e83944" + core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1726,7 +2174,15 @@ create-hmac@^1.1.0, create-hmac@^1.1.2: create-hash "^1.1.0" inherits "^2.0.1" -cross-spawn@^6.0.0: +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -1770,13 +2226,17 @@ css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" -cssom@0.3.x, "cssom@>= 0.3.0 < 0.4.0": +cssom@0.3.x: version "0.3.1" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.1.tgz#c9e37ef2490e64f6d1baa10fda852257082c25d3" -"cssstyle@>= 0.2.36 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" +"cssom@>= 0.3.2 < 0.4.0": + version "0.3.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" + +cssstyle@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" dependencies: cssom "0.3.x" @@ -1784,15 +2244,15 @@ custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: - es5-ext "~0.10.2" + es5-ext "^0.10.9" -damerau-levenshtein@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.3.tgz#ae4f4ce0b62acae10ff63a01bb08f652f5213af2" +damerau-levenshtein@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" dashdash@^1.12.0: version "1.14.0" @@ -1800,48 +2260,62 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + dependencies: + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + date-fns@^1.27.2: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" +date-format@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-1.2.0.tgz#615e828e233dd1ab9bb9ae0950e0ceccfa6ecad8" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" +debug@2.6.9, debug@^2.1.2, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" -debug@2.2.0, debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" +debug@3.1.0, debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: - ms "0.7.1" + ms "2.0.0" -debug@^2.1.1, debug@^2.2.0: +debug@^2.2.0: version "2.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" dependencies: ms "0.7.2" -debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - dependencies: - ms "2.0.0" - debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" dependencies: ms "^2.1.1" -debug@^4.0.1: +debug@^4.0.1, debug@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" dependencies: ms "^2.1.1" +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + debug@~4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" @@ -1860,16 +2334,20 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" -deep-eql@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" dependencies: - type-detect "0.1.1" + type-detect "^4.0.0" deep-equal@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + deep-extend@~0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" @@ -1882,6 +2360,24 @@ deepmerge@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.0.0.tgz#ca7903b34bfa1f8c2eab6779280775a411bfc6ba" +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + dependencies: + object-keys "^1.0.12" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -1936,9 +2432,9 @@ delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" -depd@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" deps-sort@^2.0.0: version "2.0.0" @@ -1966,24 +2462,29 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -detective@^4.0.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.3.2.tgz#77697e2e7947ac3fe7c8e26a6d6f115235afa91c" +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +detective@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/detective/-/detective-5.1.0.tgz#7a20d89236d7b331ccea65832e7123b5551bb7cb" dependencies: - acorn "^3.1.0" + acorn-node "^1.3.0" defined "^1.0.0" + minimist "^1.1.1" di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" -diff@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - -diff@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.0.1.tgz#a52d90cc08956994be00877bff97110062582c35" +diff@3.5.0, diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" diffie-hellman@^5.0.0: version "5.0.2" @@ -1999,19 +2500,18 @@ difflib@adampash/difflib.js: dependencies: heap ">= 0.2.0" -doctrine@1.3.x: - version "1.3.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.3.0.tgz#13e75682b55518424276f7c173783456ef913d26" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: esutils "^2.0.2" - isarray "^1.0.0" dom-serialize@^2.2.0: version "2.2.1" @@ -2029,9 +2529,9 @@ dom-serializer@0, dom-serializer@~0.1.0: domelementtype "~1.1.1" entities "~1.1.1" -domain-browser@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" +domain-browser@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" domelementtype@1, domelementtype@^1.3.0: version "1.3.0" @@ -2041,6 +2541,12 @@ domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + dependencies: + webidl-conversions "^4.0.2" + domhandler@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" @@ -2054,7 +2560,7 @@ domutils@1.5.1, domutils@^1.5.1: dom-serializer "0" domelementtype "1" -duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: +duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2, duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" dependencies: @@ -2076,13 +2582,17 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" +electron-to-chromium@^1.3.100: + version "1.3.103" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz#a695777efdbc419cad6cbb0e58458251302cd52f" + elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" -ellipsize@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/ellipsize/-/ellipsize-0.0.2.tgz#b56b952a7b40f0a6cd11e1c86d23d6acdffcb1fe" +ellipsize@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ellipsize/-/ellipsize-0.1.0.tgz#9d43682d44b91ad16ebd84268ac103170a6553f8" elliptic@^6.0.0: version "6.3.2" @@ -2093,9 +2603,13 @@ elliptic@^6.0.0: hash.js "^1.0.0" inherits "^2.0.1" -encodeurl@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" +emoji-regex@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" + +encodeurl@~1.0.1, encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" end-of-stream@^1.1.0: version "1.4.1" @@ -2103,43 +2617,42 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -engine.io-client@1.6.9: - version "1.6.9" - resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.6.9.tgz#1d6ad48048a5083c95096943b29d36efdb212401" +engine.io-client@~3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.2.1.tgz#6f54c0475de487158a1a7c77d10178708b6add36" dependencies: - component-emitter "1.1.2" + component-emitter "1.2.1" component-inherit "0.0.3" - debug "2.2.0" - engine.io-parser "1.2.4" + debug "~3.1.0" + engine.io-parser "~2.1.1" has-cors "1.1.0" indexof "0.0.1" - parsejson "0.0.1" - parseqs "0.0.2" - parseuri "0.0.4" - ws "1.0.1" - xmlhttprequest-ssl "1.5.1" + parseqs "0.0.5" + parseuri "0.0.5" + ws "~3.3.1" + xmlhttprequest-ssl "~1.5.4" yeast "0.1.2" -engine.io-parser@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.2.4.tgz#e0897b0bf14e792d4cd2a5950553919c56948c42" +engine.io-parser@~2.1.0, engine.io-parser@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.3.tgz#757ab970fbf2dfb32c7b74b033216d5739ef79a6" dependencies: - after "0.8.1" - arraybuffer.slice "0.0.6" - base64-arraybuffer "0.1.2" - blob "0.0.4" - has-binary "0.1.6" - utf8 "2.1.0" + after "0.8.2" + arraybuffer.slice "~0.0.7" + base64-arraybuffer "0.1.5" + blob "0.0.5" + has-binary2 "~1.0.2" -engine.io@1.6.10: - version "1.6.10" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-1.6.10.tgz#f87d84e1bd21d1a2ec7f8deef0c62054acdfb27a" +engine.io@~3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.2.1.tgz#b60281c35484a70ee0351ea0ebff83ec8c9522a2" dependencies: - accepts "1.1.4" - base64id "0.1.0" - debug "2.2.0" - engine.io-parser "1.2.4" - ws "1.0.1" + accepts "~1.3.4" + base64id "1.0.0" + cookie "0.3.1" + debug "~3.1.0" + engine.io-parser "~2.1.0" + ws "~3.3.1" ent@~2.2.0: version "2.2.0" @@ -2149,12 +2662,6 @@ entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -"errno@>=0.1.1 <0.2.0-0": - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - error-ex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" @@ -2167,61 +2674,68 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.5.1, es-abstract@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" dependencies: - es6-iterator "2" - es6-symbol "~3.1" + es-to-primitive "^1.2.0" + function-bind "^1.1.1" + has "^1.0.3" + is-callable "^1.1.4" + is-regex "^1.0.4" + object-keys "^1.0.12" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es-to-primitive@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" -es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" +es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.47" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.47.tgz#d24232e1380daad5449a817be19bde9729024a11" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + next-tick "1" -es6-promise@~4.0.3: - version "4.0.5" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" +es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" -es6-set@^0.1.4, es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" +es6-map@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" +es6-set@^0.1.5, es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" -es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "~0.10.14" escape-html@~1.0.3: version "1.0.3" @@ -2231,35 +2745,43 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@1.8.x, escodegen@^1.6.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" +escodegen@^1.8.1, escodegen@^1.9.1: + version "1.11.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" + esprima "^3.1.3" + estraverse "^4.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: - source-map "~0.2.0" + source-map "~0.6.1" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" +escodegen@~1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" -eslint-config-airbnb-base@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-8.0.0.tgz#c5e958a469ab8af76aff068b43d784e5afe74ca7" +eslint-config-airbnb-base@^13.1.0: + version "13.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz#b5a1b480b80dfad16433d6c4ad84e6605052c05c" + dependencies: + eslint-restricted-globals "^0.1.1" + object.assign "^4.1.0" + object.entries "^1.0.4" -eslint-config-airbnb@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-12.0.0.tgz#ab282b756a25f03d04ac264c24d673a08a803270" +eslint-config-airbnb@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.0.tgz#3964ed4bc198240315ff52030bf8636f42bc4732" dependencies: - eslint-config-airbnb-base "^8.0.0" + eslint-config-airbnb-base "^13.1.0" + object.assign "^4.1.0" + object.entries "^1.0.4" eslint-config-prettier@^3.5.0: version "3.5.0" @@ -2267,118 +2789,166 @@ eslint-config-prettier@^3.5.0: dependencies: get-stdin "^6.0.0" -eslint-import-resolver-babel-module@^2.0.1: +eslint-import-resolver-babel-module@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-2.2.1.tgz#6c42f33a6f09f3944d8cfa9e1de470fc8a3c2cfc" dependencies: find-babel-config "^1.0.0" resolve "^1.1.7" -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" +eslint-import-resolver-node@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" + debug "^2.6.9" + resolve "^1.5.0" -eslint-plugin-babel@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-3.3.0.tgz#2f494aedcf6f4aa4e75b9155980837bc1fbde193" +eslint-module-utils@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" + dependencies: + debug "^2.6.8" + pkg-dir "^1.0.0" -eslint-plugin-import@^1.16.0: - version "1.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-1.16.0.tgz#b2fa07ebcc53504d0f2a4477582ec8bff1871b9f" +eslint-plugin-babel@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-5.3.0.tgz#2e7f251ccc249326da760c1a4c948a91c32d0023" + dependencies: + eslint-rule-composer "^0.3.0" + +eslint-plugin-import@^2.14.0: + version "2.14.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz#6b17626d2e3e6ad52cfce8807a845d15e22111a8" dependencies: - builtin-modules "^1.1.1" contains-path "^0.1.0" - debug "^2.2.0" - doctrine "1.3.x" - es6-map "^0.1.3" - es6-set "^0.1.4" - eslint-import-resolver-node "^0.2.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.2.0" has "^1.0.1" - lodash.cond "^4.3.0" - lodash.endswith "^4.0.1" - lodash.find "^4.3.0" - lodash.findindex "^4.3.0" + lodash "^4.17.4" minimatch "^3.0.3" - object-assign "^4.0.1" - pkg-dir "^1.0.0" - pkg-up "^1.0.0" + read-pkg-up "^2.0.0" + resolve "^1.6.0" + +eslint-plugin-jsx-a11y@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.1.2.tgz#69bca4890b36dcf0fe16dd2129d2d88b98f33f88" + dependencies: + aria-query "^3.0.0" + array-includes "^3.0.3" + ast-types-flow "^0.0.7" + axobject-query "^2.0.1" + damerau-levenshtein "^1.0.4" + emoji-regex "^6.5.1" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + +eslint-plugin-react@^7.12.3: + version "7.12.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.3.tgz#b9ca4cd7cd3f5d927db418a1950366a12d4568fd" + dependencies: + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + object.fromentries "^2.0.0" + prop-types "^15.6.2" + resolve "^1.9.0" + +eslint-restricted-globals@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" -eslint-plugin-jsx-a11y@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.3.tgz#4e35cb71b8a7db702ac415c806eb8e8d9ea6c65d" +eslint-rule-composer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" + +eslint-scope@3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: - damerau-levenshtein "^1.0.0" - jsx-ast-utils "^1.0.0" - object-assign "^4.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" -eslint-plugin-react@^6.4.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz#1af96aea545856825157d97c1b50d5a8fb64a5a7" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" dependencies: - doctrine "^1.2.2" - jsx-ast-utils "^1.3.3" + esrecurse "^4.1.0" + estraverse "^4.1.1" -eslint@^3.8.1: - version "3.10.2" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.2.tgz#c9a10e8bf6e9d65651204778c503341f1eac3ce7" +eslint-utils@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + +eslint@^5.12.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.12.0.tgz#fab3b908f60c52671fb14e996a450b96c743c859" dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.4.6" - debug "^2.1.1" - doctrine "^1.2.2" - escope "^3.6.0" - espree "^3.3.1" - estraverse "^4.2.0" + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^2.1.0" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.0" + esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.2.0" - ignore "^3.2.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" + inquirer "^6.1.0" + js-yaml "^3.12.0" + json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + lodash "^4.17.5" + minimatch "^3.0.4" + mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~1.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.0.2" + text-table "^0.2.0" -espree@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" +espree@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.0.tgz#fc7f984b62b36a0f543b13fb9cd7b9f4a7f5b65c" dependencies: - acorn "^4.0.1" - acorn-jsx "^3.0.0" + acorn "^6.0.2" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" -esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" -esprima@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + dependencies: + estraverse "^4.0.0" esrecurse@^4.1.0: version "4.1.0" @@ -2387,11 +2957,7 @@ esrecurse@^4.1.0: estraverse "~4.1.0" object-assign "^4.0.1" -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -2399,33 +2965,41 @@ estraverse@~4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" -estree-walker@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" +estree-is-function@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/estree-is-function/-/estree-is-function-1.0.0.tgz#c0adc29806d7f18a74db7df0f3b2666702e37ad2" + +estree-walker@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39" esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -etag@~1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.7.0.tgz#03d30b5f67dd6e632d2945d30d6652731a34d5d8" +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" eventemitter3@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" -events@^1.1.0, events@~1.1.0: +events@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" +events@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5" + evp_bytestokey@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz#497b66ad9fef65cd7c08a6180824ba1476b66e53" @@ -2450,6 +3024,18 @@ execa@^0.10.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -2462,9 +3048,9 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" expand-braces@^0.1.1: version "0.1.2" @@ -2505,36 +3091,51 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -express@^4.14.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/express/-/express-4.14.0.tgz#c1ee3f42cdc891fb3dc650a8922d51ec847d0d66" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^23.6.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + +express@^4.16.4: + version "4.16.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" dependencies: - accepts "~1.3.3" + accepts "~1.3.5" array-flatten "1.1.1" - content-disposition "0.5.1" - content-type "~1.0.2" + body-parser "1.18.3" + content-disposition "0.5.2" + content-type "~1.0.4" cookie "0.3.1" cookie-signature "1.0.6" - debug "~2.2.0" - depd "~1.1.0" - encodeurl "~1.0.1" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" escape-html "~1.0.3" - etag "~1.7.0" - finalhandler "0.5.0" - fresh "0.3.0" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" merge-descriptors "1.0.1" methods "~1.1.2" on-finished "~2.3.0" - parseurl "~1.3.1" + parseurl "~1.3.2" path-to-regexp "0.1.7" - proxy-addr "~1.1.2" - qs "6.2.0" + proxy-addr "~2.0.4" + qs "6.5.2" range-parser "~1.2.0" - send "0.14.1" - serve-static "~1.11.1" - type-is "~1.6.13" - utils-merge "1.0.0" - vary "~1.1.0" + safe-buffer "5.1.2" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" extend-shallow@^2.0.1: version "2.0.1" @@ -2553,13 +3154,25 @@ extend@^3.0.0, extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" -external-editor@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-1.1.1.tgz#12d7b0db850f7ff7e7081baf4005700060c4600b" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + +external-editor@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" dependencies: - extend "^3.0.0" - spawn-sync "^1.0.15" - tmp "^0.0.29" + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +external-editor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" extglob@^0.3.1: version "0.3.2" @@ -2580,36 +3193,29 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.5.0.tgz#92ccf6d81ef70a9fa4c1747114ccef6d8688a6c4" - dependencies: - concat-stream "1.5.0" - debug "0.7.4" - mkdirp "0.5.0" - yauzl "2.4.1" - extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fb-watchman@^1.8.0, fb-watchman@^1.9.0: - version "1.9.0" - resolved "http://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.0.tgz#6f268f1f347a6b3c875d1e89da7e1ed79adfc0ec" - dependencies: - bser "^1.0.2" - -fd-slicer@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" dependencies: - pend "~1.2.0" + bser "^2.0.0" -figures@^1.3.5, figures@^1.7.0: +figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: @@ -2633,12 +3239,12 @@ filename-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" -fileset@0.2.x: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fileset/-/fileset-0.2.1.tgz#588ef8973c6623b2a76df465105696b96aac8067" +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" dependencies: - glob "5.x" - minimatch "2.x" + glob "^7.0.3" + minimatch "^3.0.3" fill-range@^2.1.0: version "2.2.3" @@ -2659,34 +3265,54 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" -finalhandler@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-0.5.0.tgz#e9508abece9b6dba871a6942a1d7911b91911ac7" +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" dependencies: - debug "~2.2.0" + debug "2.6.9" + encodeurl "~1.0.1" escape-html "~1.0.3" on-finished "~2.3.0" - statuses "~1.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" unpipe "~1.0.0" -find-babel-config@^1.0.0, find-babel-config@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.0.1.tgz#179fa7b36bf3e94b487410855df448b6f853b9ec" +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-babel-config@^1.0.0, find-babel-config@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.1.0.tgz#acc01043a6749fec34429be6b64f542ebb5d6355" dependencies: - json5 "^0.5.0" + json5 "^0.5.1" path-exists "^3.0.0" find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" -find-up@^1.0.0, find-up@^1.1.2: +find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -2702,6 +3328,10 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + for-in@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" @@ -2736,9 +3366,17 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -forwarded@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" fragment-cache@^0.2.1: version "0.2.1" @@ -2746,9 +3384,9 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" fs-access@^1.0.0: version "1.0.1" @@ -2756,23 +3394,11 @@ fs-access@^1.0.0: dependencies: null-check "^1.0.0" -fs-extra@~0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" + minipass "^2.2.1" fs.realpath@^1.0.0: version "1.0.0" @@ -2785,6 +3411,13 @@ fsevents@^1.0.0: nan "^2.3.0" node-pre-gyp "^0.6.29" +fsevents@^1.2.2, fsevents@^1.2.3: + version "1.2.6" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.6.tgz#d3a1864a71876a2eb9b244e3bd8f606eb09568c0" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + fstream-ignore@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" @@ -2806,6 +3439,14 @@ function-bind@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + g-status@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/g-status/-/g-status-2.0.2.tgz#270fd32119e8fc9496f066fe5fe88e0a6bc78b97" @@ -2828,6 +3469,19 @@ gauge@~2.7.1: strip-ansi "^3.0.1" wide-align "^1.1.0" +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -2838,10 +3492,18 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" +get-assigned-identifiers@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz#6dbf411de648cbaf8d9169ebb0d2d576191e2ff1" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" @@ -2913,19 +3575,27 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@5.x, glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: + fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "2 || 3" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2934,21 +3604,29 @@ glob@7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@^7.1.0, glob@^7.1.2, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.2" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.2.0: +globals@^11.1.0, globals@^11.7.0: + version "11.10.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.10.0.tgz#1e09776dffda5e01816b3bb4077c8b59c24eaa50" + +globals@^9.0.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -2970,7 +3648,11 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + +graceful-fs@^4.1.2: version "4.1.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131" @@ -2978,15 +3660,15 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" -growly@^1.2.0: +growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" -handlebars@^4.0.1, handlebars@^4.0.3: +handlebars@^4.0.3: version "4.0.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" dependencies: @@ -2996,6 +3678,10 @@ handlebars@^4.0.1, handlebars@^4.0.3: optionalDependencies: uglify-js "^2.6" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -3005,23 +3691,24 @@ har-validator@~2.0.6: is-my-json-valid "^2.12.4" pinkie-promise "^2.0.0" +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" dependencies: ansi-regex "^2.0.0" -has-binary@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.6.tgz#25326f39cfa4f616ad8787894e3af2cfbc7b6e10" - dependencies: - isarray "0.0.1" - -has-binary@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/has-binary/-/has-binary-0.1.7.tgz#68e61eb16210c9545a0a5cce06a873912fe1e68c" +has-binary2@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-binary2/-/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" dependencies: - isarray "0.0.1" + isarray "2.0.1" has-color@^0.1.7: version "0.1.7" @@ -3039,6 +3726,10 @@ has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3076,19 +3767,18 @@ has@^1.0.0, has@^1.0.1: dependencies: function-bind "^1.0.2" +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" + hash.js@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.0.3.tgz#1332ff00156c0a0ffdd8236013d07b77a0451573" dependencies: inherits "^2.0.1" -hasha@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" - dependencies: - is-stream "^1.0.1" - pinkie-promise "^2.0.0" - hat@^0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" @@ -3102,6 +3792,10 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + "heap@>= 0.2.0": version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" @@ -3121,9 +3815,9 @@ hosted-git-info@^2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" -html-encoding-sniffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" dependencies: whatwg-encoding "^1.0.1" @@ -3142,13 +3836,14 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^2.0.2" -http-errors@~1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.5.1.tgz#788c0d2c1de2c81b9e6e8c01843b6b97eb920750" +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" dependencies: + depd "~1.1.2" inherits "2.0.3" - setprototypeof "1.0.2" - statuses ">= 1.3.1 < 2" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" http-headers@^3.0.1: version "3.0.1" @@ -3171,9 +3866,17 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" husky@^1.3.1: version "1.3.1" @@ -3205,21 +3908,35 @@ hyperquest@~2.1.2: duplexer2 "~0.0.2" through2 "~0.6.3" -iconv-lite, iconv-lite@^0.4.13: - version "0.4.15" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" - iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + dependencies: + safer-buffer ">= 2.1.2 < 3" + ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" import-fresh@^2.0.0: version "2.0.0" @@ -3228,6 +3945,20 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3265,41 +3996,41 @@ inline-source-map@~0.6.0: dependencies: source-map "~0.5.3" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" +inquirer@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-4.0.2.tgz#cc678b4cbc0e183a3500cc63395831ec956ab0a3" dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" - figures "^1.3.5" + external-editor "^2.1.0" + figures "^2.0.0" lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" through "^2.3.6" -inquirer@^1.1.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-1.2.3.tgz#4dec6f32f37ef7bb0b2ed3f1d1a5c3f545074918" +inquirer@^6.1.0, inquirer@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" dependencies: - ansi-escapes "^1.1.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^1.1.0" - figures "^1.3.5" - lodash "^4.3.0" - mute-stream "0.0.6" - pinkie-promise "^2.0.0" + external-editor "^3.0.0" + figures "^2.0.0" + lodash "^4.17.10" + mute-stream "0.0.7" run-async "^2.2.0" - rx "^4.1.0" - string-width "^1.0.1" - strip-ansi "^3.0.0" + rxjs "^6.1.0" + string-width "^2.1.0" + strip-ansi "^5.0.0" through "^2.3.6" insert-module-globals@^7.0.0: @@ -3315,23 +4046,29 @@ insert-module-globals@^7.0.0: through2 "^2.0.0" xtend "^4.0.0" -interpret@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" - invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: loose-envify "^1.0.0" +invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -ipaddr.js@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.1.1.tgz#c791d95f52b29c1247d5df80ada39b8a73647230" +ip-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-3.0.0.tgz#0a934694b4066558c46294244a23cc33116bf732" + +ipaddr.js@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" is-accessor-descriptor@^0.1.6: version "0.1.6" @@ -3369,11 +4106,15 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-ci@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" +is-callable@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + +is-ci@^1.0.10: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" dependencies: - ci-info "^1.0.0" + ci-info "^1.5.0" is-ci@^2.0.0: version "2.0.0" @@ -3393,6 +4134,10 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -3437,7 +4182,7 @@ is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" -is-extglob@^2.1.1: +is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3457,19 +4202,29 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-generator-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" dependencies: is-extglob "^2.1.1" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: +is-my-json-valid@^2.12.4: version "2.15.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" dependencies: @@ -3542,20 +4297,26 @@ is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" - -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + dependencies: + has-symbols "^1.0.0" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -3576,6 +4337,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isarray@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e" + isbinaryfile@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.1.tgz#6e99573675372e841a0520c036b41513d783e79e" @@ -3602,280 +4367,334 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -istanbul-api@^1.0.0-aplha.10: - version "1.0.0-aplha.10" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.0.0-aplha.10.tgz#902edf5cf5404e0eba7e00ef46408488a0d3e337" - dependencies: - async "1.x" - clone "^1.0.2" - fileset "0.2.x" - istanbul-lib-coverage "^1.0.0-alpha" - istanbul-lib-hook "^1.0.0-alpha" - istanbul-lib-instrument "^1.0.0-alpha" - istanbul-lib-report "^1.0.0-alpha" - istanbul-lib-source-maps "^1.0.0-alpha" - istanbul-reports "^1.0.0-alpha" - js-yaml "3.x" - mkdirp "0.5.x" - once "1.x" - -istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz#c3f9b6d226da12424064cce87fce0fb57fdfa7a2" +istanbul-api@^1.3.1: + version "1.3.7" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.2.1" + istanbul-lib-hook "^1.2.2" + istanbul-lib-instrument "^1.10.2" + istanbul-lib-report "^1.1.5" + istanbul-lib-source-maps "^1.2.6" + istanbul-reports "^1.5.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" -istanbul-lib-hook@^1.0.0-alpha: - version "1.0.0-alpha.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz#8c5bb9f6fbd8526e0ae6cf639af28266906b938f" +istanbul-lib-hook@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" dependencies: - append-transform "^0.3.0" + append-transform "^0.4.0" -istanbul-lib-instrument@^1.0.0-alpha, istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.1.4: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.3.0.tgz#19f0a973397454989b98330333063a5b56df0e58" +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" - babylon "^6.13.0" - istanbul-lib-coverage "^1.0.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.1" semver "^5.3.0" -istanbul-lib-report@^1.0.0-alpha: - version "1.0.0-alpha.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz#32d5f6ec7f33ca3a602209e278b2e6ff143498af" +istanbul-lib-report@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" dependencies: - async "^1.4.2" - istanbul-lib-coverage "^1.0.0-alpha" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" path-parse "^1.0.5" - rimraf "^2.4.3" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.0.0-alpha: - version "1.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.1.0.tgz#9d429218f35b823560ea300a96ff0c3bbdab785f" +istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" dependencies: - istanbul-lib-coverage "^1.0.0-alpha.0" + debug "^3.1.0" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" - rimraf "^2.4.4" + rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.0.0-alpha: - version "1.0.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.0.0.tgz#24b4eb2b1d29d50f103b369bd422f6e640aa0777" +istanbul-reports@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" + dependencies: + handlebars "^4.0.3" + +jasmine-core@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" + +jest-changed-files@^23.4.2: + version "23.4.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" + dependencies: + throat "^4.0.0" + +jest-cli@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + graceful-fs "^4.1.11" + import-local "^1.0.0" + is-ci "^1.0.10" + istanbul-api "^1.3.1" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-source-maps "^1.2.4" + jest-changed-files "^23.4.2" + jest-config "^23.6.0" + jest-environment-jsdom "^23.4.0" + jest-get-type "^22.1.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve-dependencies "^23.6.0" + jest-runner "^23.6.0" + jest-runtime "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + jest-watcher "^23.4.0" + jest-worker "^23.2.0" + micromatch "^2.3.11" + node-notifier "^5.2.1" + prompts "^0.1.9" + realpath-native "^1.0.0" + rimraf "^2.5.4" + slash "^1.0.0" + string-length "^2.0.0" + strip-ansi "^4.0.0" + which "^1.2.12" + yargs "^11.0.0" + +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" dependencies: - handlebars "^4.0.3" + babel-core "^6.0.0" + babel-jest "^23.6.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^23.6.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" -istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - -jasmine-check@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/jasmine-check/-/jasmine-check-0.1.5.tgz#dbad7eec56261c4b3d175ada55fe59b09ac9e415" +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" dependencies: - testcheck "^0.1.0" - -jasmine-core@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.5.2.tgz#6f61bd79061e27f43e6f9355e44b3c6cab6ff297" - -jest-changed-files@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-16.0.0.tgz#7931deff4424182b8173d80e06800d7363b19c45" + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" -jest-cli@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-16.0.2.tgz#d439b28affa7189aa3d046d2af931f7ebb9af69d" +jest-docblock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" dependencies: - ansi-escapes "^1.4.0" - callsites "^2.0.0" - chalk "^1.1.1" - graceful-fs "^4.1.6" - is-ci "^1.0.9" - istanbul-api "^1.0.0-aplha.10" - istanbul-lib-coverage "^1.0.0" - istanbul-lib-instrument "^1.1.1" - jest-changed-files "^16.0.0" - jest-config "^16.0.2" - jest-environment-jsdom "^16.0.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" - jest-jasmine2 "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-resolve-dependencies "^16.0.2" - jest-runtime "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" - json-stable-stringify "^1.0.0" - node-notifier "^4.6.1" - sane "~1.4.1" - strip-ansi "^3.0.1" - throat "^3.0.0" - which "^1.1.1" - worker-farm "^1.3.1" - yargs "^5.0.0" + detect-newline "^2.1.0" -jest-config@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-16.0.2.tgz#8e82a9c08846f23dc7fd42b5c0a1f596c385772a" - dependencies: - chalk "^1.1.1" - istanbul "^0.4.5" - jest-environment-jsdom "^16.0.2" - jest-environment-node "^16.0.2" - jest-jasmine2 "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-util "^16.0.2" - json-stable-stringify "^1.0.0" - -jest-diff@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-16.0.0.tgz#4a5d13b1e36c5b8020d5d9e69639e486a675ce14" +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" dependencies: - chalk "^1.1.3" - diff "^3.0.0" - jest-matcher-utils "^16.0.0" - pretty-format "~4.2.1" + chalk "^2.0.1" + pretty-format "^23.6.0" -jest-environment-jsdom@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-16.0.2.tgz#548d883b68f8ed0bd6466d8703986296724c1ef7" +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" dependencies: - jest-mock "^16.0.2" - jest-util "^16.0.2" - jsdom "^9.8.0" + jest-mock "^23.2.0" + jest-util "^23.4.0" + jsdom "^11.5.1" -jest-environment-node@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-16.0.2.tgz#eb7b3a4a9c63b728ce023828d4b5661aad8c7a08" +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" dependencies: - jest-mock "^16.0.2" - jest-util "^16.0.2" - -jest-file-exists@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-15.0.0.tgz#b7fefdd3f4b227cb686bb156ecc7661ee6935a88" + jest-mock "^23.2.0" + jest-util "^23.4.0" jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-16.0.2.tgz#4562915b25171ae2d0d75118c992f0e97536a2ed" +jest-haste-map@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + invariant "^2.2.4" + jest-docblock "^23.2.0" + jest-serializer "^23.0.1" + jest-worker "^23.2.0" + micromatch "^2.3.11" + sane "^2.0.0" + +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" dependencies: - fb-watchman "^1.9.0" - graceful-fs "^4.1.6" - multimatch "^2.1.0" - worker-farm "^1.3.1" + babel-traverse "^6.0.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^23.6.0" + is-generator-fn "^1.0.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + pretty-format "^23.6.0" -jest-jasmine2@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-16.0.2.tgz#c91ae170d127aae22180dbfe181d77655a5da8c3" +jest-leak-detector@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" dependencies: - graceful-fs "^4.1.6" - jasmine-check "^0.1.4" - jest-matchers "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" + pretty-format "^23.6.0" -jest-matcher-utils@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-16.0.0.tgz#705af3ff85944bec1c25bc813f427aff8642b0cd" +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" dependencies: - chalk "^1.1.3" - pretty-format "~4.2.1" + chalk "^2.0.1" + jest-get-type "^22.1.0" + pretty-format "^23.6.0" -jest-matchers@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-16.0.2.tgz#c078c28cfe05b9b1f295f9ab27b5991f1095bbbf" +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" dependencies: - jest-diff "^16.0.0" - jest-matcher-utils "^16.0.0" - jest-util "^16.0.2" + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + +jest-mock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" -jest-mock@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-16.0.2.tgz#97b533343295d0082e9474a73ac4eb474d1636fe" +jest-resolve-dependencies@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" + dependencies: + jest-regex-util "^23.3.0" + jest-snapshot "^23.6.0" -jest-resolve-dependencies@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-16.0.2.tgz#b204166d50141469d10667dc216239c0be865729" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" dependencies: - jest-file-exists "^15.0.0" - jest-resolve "^16.0.2" + browser-resolve "^1.11.3" + chalk "^2.0.1" + realpath-native "^1.0.0" -jest-resolve@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-16.0.2.tgz#46b92b9c2a44aa7ddd9a6b73dc234e9503e8c609" +jest-runner@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" + dependencies: + exit "^0.1.2" + graceful-fs "^4.1.11" + jest-config "^23.6.0" + jest-docblock "^23.2.0" + jest-haste-map "^23.6.0" + jest-jasmine2 "^23.6.0" + jest-leak-detector "^23.6.0" + jest-message-util "^23.4.0" + jest-runtime "^23.6.0" + jest-util "^23.4.0" + jest-worker "^23.2.0" + source-map-support "^0.5.6" + throat "^4.0.0" + +jest-runtime@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" dependencies: - browser-resolve "^1.11.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" - resolve "^1.1.6" + babel-core "^6.0.0" + babel-plugin-istanbul "^4.1.6" + chalk "^2.0.1" + convert-source-map "^1.4.0" + exit "^0.1.2" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.11" + jest-config "^23.6.0" + jest-haste-map "^23.6.0" + jest-message-util "^23.4.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.6.0" + jest-snapshot "^23.6.0" + jest-util "^23.4.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + realpath-native "^1.0.0" + slash "^1.0.0" + strip-bom "3.0.0" + write-file-atomic "^2.1.0" + yargs "^11.0.0" + +jest-serializer@^23.0.1: + version "23.0.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" -jest-runtime@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-16.0.2.tgz#a741e8d55a7b5f011bbe17a22c673a83d278a45d" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" dependencies: - babel-core "^6.11.4" - babel-jest "^16.0.0" - babel-plugin-istanbul "^2.0.0" - chalk "^1.1.3" - graceful-fs "^4.1.6" - jest-config "^16.0.2" - jest-file-exists "^15.0.0" - jest-haste-map "^16.0.2" - jest-mock "^16.0.2" - jest-resolve "^16.0.2" - jest-snapshot "^16.0.2" - jest-util "^16.0.2" - json-stable-stringify "^1.0.0" - multimatch "^2.1.0" - yargs "^5.0.0" - -jest-snapshot@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-16.0.2.tgz#f137a4176d661bd4058910850191d1816bebdaae" - dependencies: - jest-diff "^16.0.0" - jest-file-exists "^15.0.0" - jest-matcher-utils "^16.0.0" - jest-util "^16.0.2" + babel-types "^6.0.0" + chalk "^2.0.1" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" + jest-message-util "^23.4.0" + jest-resolve "^23.6.0" + mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "~4.2.1" + pretty-format "^23.6.0" + semver "^5.5.0" -jest-util@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-16.0.2.tgz#db5123358278e7a34a6d9f837409d649a0db5d54" +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" dependencies: - chalk "^1.1.1" - diff "^3.0.0" - graceful-fs "^4.1.6" - jest-file-exists "^15.0.0" - jest-mock "^16.0.2" + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.4.0" mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" -jest-validate@^23.5.0: +jest-validate@^23.5.0, jest-validate@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" dependencies: @@ -3884,11 +4703,26 @@ jest-validate@^23.5.0: leven "^2.1.0" pretty-format "^23.6.0" -jest@^16.0.2: - version "16.0.2" - resolved "https://registry.yarnpkg.com/jest/-/jest-16.0.2.tgz#4a2f7f3527465168a0bafe0c3d55055188253f3a" +jest-watcher@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + string-length "^2.0.0" + +jest-worker@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + dependencies: + merge-stream "^1.0.1" + +jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" dependencies: - jest-cli "^16.0.2" + import-local "^1.0.0" + jest-cli "^23.6.0" jodid25519@^1.0.0: version "1.0.2" @@ -3896,9 +4730,13 @@ jodid25519@^1.0.0: dependencies: jsbn "~0.1.0" -jquery@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.1.1.tgz#347c1c21c7e004115e0a4da32cece041fad3c8a3" +jquery@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca" + +js-levenshtein@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" js-string-escape@^1.0.0: version "1.0.1" @@ -3908,14 +4746,15 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" -js-yaml@3.x, js-yaml@^3.5.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.9.0: +js-yaml@^3.12.0, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.12.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" dependencies: @@ -3926,35 +4765,45 @@ jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" -jsdom@^9.8.0: - version "9.8.3" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.8.3.tgz#fde29c109c32a1131e0b6c65914e64198f97c370" +jsdom@^11.5.1: + version "11.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" dependencies: - abab "^1.0.0" - acorn "^2.4.0" - acorn-globals "^1.0.4" + abab "^2.0.0" + acorn "^5.5.3" + acorn-globals "^4.1.0" array-equal "^1.0.0" - content-type-parser "^1.0.1" - cssom ">= 0.3.0 < 0.4.0" - cssstyle ">= 0.2.36 < 0.3.0" - escodegen "^1.6.1" - html-encoding-sniffer "^1.0.1" - iconv-lite "^0.4.13" - nwmatcher ">= 1.3.7 < 2.0.0" - parse5 "^1.5.1" - request "^2.55.0" - sax "^1.1.4" - symbol-tree ">= 3.1.0 < 4.0.0" - tough-cookie "^2.3.1" - webidl-conversions "^3.0.1" - whatwg-encoding "^1.0.1" - whatwg-url "^3.0.0" - xml-name-validator ">= 2.0.1 < 3.0.0" + cssom ">= 0.3.2 < 0.4.0" + cssstyle "^1.0.0" + data-urls "^1.0.0" + domexception "^1.0.1" + escodegen "^1.9.1" + html-encoding-sniffer "^1.0.2" + left-pad "^1.3.0" + nwsapi "^2.0.7" + parse5 "4.0.0" + pn "^1.1.0" + request "^2.87.0" + request-promise-native "^1.0.5" + sax "^1.2.4" + symbol-tree "^3.2.2" + tough-cookie "^2.3.4" + w3c-hr-time "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" + whatwg-url "^6.4.1" + ws "^5.2.0" + xml-name-validator "^3.0.0" jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -3963,15 +4812,17 @@ json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" json-stable-stringify@~0.0.0: version "0.0.1" @@ -3983,23 +4834,15 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json3@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.2.6.tgz#f6efc93c06a04de9aec53053df2559bb19e2038b" - -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -json5@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.0.tgz#9b20715b026cbe3778fd769edccd822d8332a5b2" +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - optionalDependencies: - graceful-fs "^4.1.6" +json5@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + dependencies: + minimist "^1.2.0" jsonify@~0.0.0: version "0.0.0" @@ -4030,27 +4873,26 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.3: - version "1.3.4" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.4.tgz#0257ed1cc4b1e65b39d7d9940f9fb4f20f7ba0a9" +jsx-ast-utils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: - acorn-jsx "^3.0.1" - object-assign "^4.1.0" + array-includes "^3.0.3" -karma-browserify@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/karma-browserify/-/karma-browserify-5.1.0.tgz#06819daf2c8ddf6c01ba446619c7b342e1eff765" +karma-browserify@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/karma-browserify/-/karma-browserify-6.0.0.tgz#423b719fe80d064ad5ec36f8eb15c399305b9aba" dependencies: convert-source-map "^1.1.3" hat "^0.0.3" js-string-escape "^1.0.0" - lodash "^3.10.1" + lodash "^4.17.10" minimatch "^3.0.0" os-shim "^0.1.3" -karma-chrome-launcher@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.0.0.tgz#c2790c5a32b15577d0fff5a4d5a2703b3b439c25" +karma-chrome-launcher@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz#cf1b9d07136cc18fe239327d24654c3dbc368acf" dependencies: fs-access "^1.0.0" which "^1.2.1" @@ -4071,51 +4913,42 @@ karma-mocha@^1.3.0: dependencies: minimist "1.2.0" -karma-phantomjs-launcher@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.2.tgz#19e1041498fd75563ed86730a22c1fe579fa8fb1" - dependencies: - lodash "^4.0.1" - phantomjs-prebuilt "^2.1.7" - karma-requirejs@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/karma-requirejs/-/karma-requirejs-1.1.0.tgz#fddae2cb87d7ebc16fb0222893564d7fee578798" -karma@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/karma/-/karma-1.3.0.tgz#b2b94e8f499fadd0069d54f9aef4a4d48ec5cc1f" +karma@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/karma/-/karma-3.1.4.tgz#3890ca9722b10d1d14b726e1335931455788499e" dependencies: bluebird "^3.3.0" - body-parser "^1.12.4" - chokidar "^1.4.1" + body-parser "^1.16.1" + chokidar "^2.0.3" colors "^1.1.0" combine-lists "^1.0.0" - connect "^3.3.5" + connect "^3.6.0" core-js "^2.2.0" di "^0.0.1" dom-serialize "^2.2.0" expand-braces "^0.1.1" - glob "^7.0.3" + flatted "^2.0.0" + glob "^7.1.1" graceful-fs "^4.1.2" http-proxy "^1.13.0" isbinaryfile "^3.0.0" - lodash "^3.8.0" - log4js "^0.6.31" - mime "^1.3.4" - minimatch "^3.0.0" + lodash "^4.17.5" + log4js "^3.0.0" + mime "^2.3.1" + minimatch "^3.0.2" optimist "^0.6.1" qjobs "^1.1.4" range-parser "^1.2.0" - rimraf "^2.3.3" - socket.io "1.4.7" - source-map "^0.5.3" - tmp "0.0.28" - useragent "^2.1.9" - -kew@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + rimraf "^2.6.0" + safe-buffer "^5.0.1" + socket.io "2.1.1" + source-map "^0.6.1" + tmp "0.0.33" + useragent "2.3.0" kind-of@^3.0.2: version "3.0.4" @@ -4143,11 +4976,9 @@ kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - optionalDependencies: - graceful-fs "^4.1.9" +kleur@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" labeled-stream-splicer@^2.0.0: version "2.0.0" @@ -4167,6 +4998,10 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -4271,6 +5106,22 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -4278,60 +5129,6 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -lodash._arraycopy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" - -lodash._arrayeach@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._baseclone@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" - dependencies: - lodash._arraycopy "^3.0.0" - lodash._arrayeach "^3.0.0" - lodash._baseassign "^3.0.0" - lodash._basefor "^3.0.0" - lodash.isarray "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - -lodash._basefor@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" - -lodash._bindcallback@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - -lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.1.0, lodash.assign@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - lodash.assignin@^4.0.9: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" @@ -4340,45 +5137,18 @@ lodash.bind@^4.1.4: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" -lodash.clonedeep@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" - dependencies: - lodash._baseclone "^3.0.0" - lodash._bindcallback "^3.0.0" - -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" - -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" lodash.defaults@^4.0.1: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" -lodash.endswith@^4.0.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" - lodash.filter@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" -lodash.find@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" - -lodash.findindex@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.findindex/-/lodash.findindex-4.6.0.tgz#a3245dee61fb9b6e0624b535125624bb69c11106" - lodash.flatten@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" @@ -4391,22 +5161,6 @@ lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - lodash.map@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" @@ -4416,17 +5170,13 @@ lodash.memoize@~3.0.3: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" lodash.merge@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" lodash.pick@^4.2.1, lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" -lodash.pickby@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" - lodash.reduce@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" @@ -4443,19 +5193,19 @@ lodash.some@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^3.10.1, lodash@^3.8.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - -lodash@^4.0.0, lodash@^4.0.1, lodash@^4.11.2, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: +lodash@^4.11.2, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: version "4.17.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" -lodash@^4.17.10, lodash@^4.17.5: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -4463,10 +5213,6 @@ lodash@~2.4.x: version "2.4.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" -lodash@~4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.9.0.tgz#4c20d742f03ce85dc700e0dd7ab9bcab85e6fc14" - log-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" @@ -4487,12 +5233,15 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" -log4js@^0.6.31: - version "0.6.38" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd" +log4js@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-3.0.6.tgz#e6caced94967eeeb9ce399f9f8682a4b2b28c8ff" dependencies: - readable-stream "~1.0.2" - semver "~4.3.3" + circular-json "^0.5.5" + date-format "^1.2.0" + debug "^3.1.0" + rfdc "^1.1.2" + streamroller "0.7.0" longest@^1.0.1: version "1.0.1" @@ -4504,19 +5253,34 @@ loose-envify@^1.0.0: dependencies: js-tokens "^2.0.0" -lru-cache@2.2.x: - version "2.2.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" +loose-envify@^1.3.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@4.1.x, lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" macos-release@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.0.0.tgz#7dddf4caf79001a851eb4fba7fb6034f251276ab" -magic-string@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.16.0.tgz#970ebb0da7193301285fb1aa650f39bdd81eb45a" +magic-string@^0.22.4, magic-string@^0.22.5: + version "0.22.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" + dependencies: + vlq "^0.2.2" + +magic-string@^0.25.1: + version "0.25.1" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e" dependencies: - vlq "^0.2.1" + sourcemap-codec "^1.4.1" makeerror@1.0.x: version "1.0.11" @@ -4534,20 +5298,6 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -marked-terminal@^1.6.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" - dependencies: - cardinal "^1.0.0" - chalk "^1.1.3" - cli-table "^0.3.1" - lodash.assign "^4.2.0" - node-emoji "^1.4.1" - -marked@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - matcher@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/matcher/-/matcher-1.1.1.tgz#51d8301e138f840982b338b116bb0c09af62c1c2" @@ -4558,10 +5308,28 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" +merge-source-map@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.4.tgz#a5de46538dae84d4114cc5ea02b4772a6346701f" + dependencies: + source-map "^0.5.6" + +merge-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -4588,7 +5356,7 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.8: +micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" dependencies: @@ -4613,29 +5381,33 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@~1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.12.0.tgz#3d0c63180f458eb10d325aaa37d7c58ae312e9d7" - mime-db@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" -mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.13, mime-types@~2.1.7: +mime-db@~1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" + +mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.13" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" dependencies: mime-db "~1.25.0" -mime-types@~2.0.4: - version "2.0.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.0.14.tgz#310e159db23e077f8bb22b748dabfa4957140aa6" +mime-types@~2.1.18, mime-types@~2.1.19: + version "2.1.21" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" dependencies: - mime-db "~1.12.0" + mime-db "~1.37.0" -mime@1.3.4, mime@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^2.3.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" mimic-fn@^1.0.0: version "1.2.0" @@ -4645,15 +5417,15 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: - brace-expansion "^1.0.0" + brace-expansion "^1.1.7" -minimatch@2.x: - version "2.0.10" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" @@ -4661,10 +5433,23 @@ minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0: +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minipass@^2.2.1, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + dependencies: + minipass "^2.2.1" + mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -4672,67 +5457,61 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" - dependencies: - minimist "0.0.8" - -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" -mocha@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.1.2.tgz#51f93b432bf7e1b175ffc22883ccd0be32dba6b5" +mocha@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.2.0" - diff "1.4.0" + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" escape-string-regexp "1.0.5" - glob "7.0.5" - growl "1.9.2" - json3 "3.3.2" - lodash.create "3.1.1" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" mkdirp "0.5.1" - supports-color "3.1.2" + supports-color "5.4.0" -module-deps@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.0.8.tgz#55fd70623399706c3288bef7a609ff1e8c0ed2bb" +module-deps@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.2.0.tgz#d41a2e790245ce319171e4e7c4d8c73993ba3cd5" dependencies: JSONStream "^1.0.3" browser-resolve "^1.7.0" cached-path-relative "^1.0.0" - concat-stream "~1.5.0" + concat-stream "~1.6.0" defined "^1.0.0" - detective "^4.0.0" + detective "^5.0.2" duplexer2 "^0.1.2" inherits "^2.0.1" parents "^1.0.0" readable-stream "^2.0.2" - resolve "^1.1.3" + resolve "^1.4.0" stream-combiner2 "^1.1.1" subarg "^1.0.0" through2 "^2.0.0" xtend "^4.0.0" -moment-parseformat: - version "2.1.4" - resolved "https://registry.yarnpkg.com/moment-parseformat/-/moment-parseformat-2.1.4.tgz#593708637858956ac327cc2f42bc0ec48900da32" +moment-parseformat@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/moment-parseformat/-/moment-parseformat-3.0.0.tgz#3a1dc438b4bc073b7e93cc298cfb6c5daac26dba" -moment-timezone: - version "0.5.10" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.10.tgz#3766249c2d317d08f07d896d3033c26f87c4ae2b" +moment-timezone@0.5.23: + version "0.5.23" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.23.tgz#7cbb00db2c14c71b19303cb47b0fb0a6d8651463" dependencies: - moment ">= 2.6.0" + moment ">= 2.9.0" -"moment@>= 2.6.0", moment@^2.14.1: - version "2.16.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.16.0.tgz#f38f2c97c9889b0ee18fc6cc392e1e443ad2da8e" +"moment@>= 2.9.0", moment@^2.23.0: + version "2.23.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" ms@0.7.1: version "0.7.1" @@ -4748,26 +5527,9 @@ ms@2.0.0: ms@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - -multimatch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" - dependencies: - array-differ "^1.0.0" - array-union "^1.0.1" - arrify "^1.0.0" - minimatch "^3.0.0" - -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - -mute-stream@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" -mute-stream@~0.0.4: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -4775,6 +5537,10 @@ nan@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232" +nan@^2.9.2: + version "2.12.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4795,9 +5561,13 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" -negotiator@0.4.9: - version "0.4.9" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.4.9.tgz#92e46b6db53c7e421ed64a2bc94f08be7630df3f" +needle@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" negotiator@0.6.1: version "0.6.1" @@ -4807,28 +5577,27 @@ next-line@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-line/-/next-line-1.1.0.tgz#fcae57853052b6a9bae8208e40dd7d3c2d304603" +next-tick@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" -nock@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/nock/-/nock-9.0.2.tgz#f6a5f4a8d560d61f48b5ad428ccff8dc9b62701e" +nock@^10.0.6: + version "10.0.6" + resolved "https://registry.yarnpkg.com/nock/-/nock-10.0.6.tgz#e6d90ee7a68b8cfc2ab7f6127e7d99aa7d13d111" dependencies: - chai ">=1.9.2 <4.0.0" - debug "^2.2.0" + chai "^4.1.2" + debug "^4.1.0" deep-equal "^1.0.0" json-stringify-safe "^5.0.1" - lodash "~4.9.0" + lodash "^4.17.5" mkdirp "^0.5.0" - propagate "0.4.0" - qs "^6.0.2" - -node-emoji@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.4.1.tgz#c9fa0cf91094335bcb967a6f42b2305c15af2ebc" - dependencies: - string.prototype.codepointat "^0.2.0" + propagate "^1.0.0" + qs "^6.5.1" + semver "^5.5.0" node-fetch@^2.3.0: version "2.3.0" @@ -4838,17 +5607,29 @@ node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-notifier@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" +node-notifier@^5.2.1: + version "5.3.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.3.0.tgz#c77a4a7b84038733d5fb351aafd8a268bfe19a01" dependencies: - cli-usage "^0.1.1" - growly "^1.2.0" - lodash.clonedeep "^3.0.0" - minimist "^1.1.1" - semver "^5.1.0" - shellwords "^0.1.0" - which "^1.0.5" + growly "^1.3.0" + semver "^5.5.0" + shellwords "^0.1.1" + which "^1.3.0" + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" node-pre-gyp@^0.6.29: version "0.6.31" @@ -4864,11 +5645,24 @@ node-pre-gyp@^0.6.29: tar "~2.2.1" tar-pack "~3.3.0" +node-releases@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.3.tgz#aad9ce0dcb98129c753f772c0aa01360fb90fbd2" + dependencies: + semver "^5.3.0" + node-uuid@~1.4.7: version "1.4.7" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" -nopt@3.x, nopt@~3.0.6: +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -4887,6 +5681,23 @@ normalize-path@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + +npm-packlist@^1.1.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.2.0.tgz#55a60e793e272f00862c7089274439a4cc31fc7f" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" @@ -4916,6 +5727,15 @@ npmlog@^4.0.0: gauge "~2.7.1" set-blocking "~2.0.0" +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + nth-check@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" @@ -4930,18 +5750,26 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -"nwmatcher@>= 1.3.7 < 2.0.0": - version "1.3.9" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" +nwsapi@^2.0.7: + version "2.0.9" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" @@ -4954,12 +5782,54 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@~1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.4.1.tgz#37ffb10e71adaf3748d05f713b4c9452f402cbc4" + +object-keys@^1.0.11, object-keys@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" dependencies: isobject "^3.0.0" +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.entries@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" + dependencies: + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" + +object.fromentries@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.11.0" + function-bind "^1.1.1" + has "^1.0.1" + +object.getownpropertydescriptors@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.5.1" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -4983,7 +5853,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -4995,10 +5865,6 @@ once@~1.3.3: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" - onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" @@ -5023,32 +5889,32 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - -ora@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-0.3.0.tgz#367a078ad25cfb096da501115eb5b401e07d7495" +ora@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-3.0.0.tgz#8179e3525b9aafd99242d63cc206fd64732741d0" dependencies: - chalk "^1.1.1" - cli-cursor "^1.0.2" - cli-spinners "^0.2.0" - log-symbols "^1.0.2" + chalk "^2.3.1" + cli-cursor "^2.1.0" + cli-spinners "^1.1.0" + log-symbols "^2.2.0" + strip-ansi "^4.0.0" + wcwidth "^1.0.1" -os-browserify@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54" +os-browserify@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" dependencies: + execa "^0.7.0" lcid "^1.0.0" + mem "^1.1.0" os-name@^3.0.0: version "3.0.0" @@ -5057,14 +5923,21 @@ os-name@^3.0.0: macos-release "^2.0.0" windows-release "^3.1.0" -os-shim@^0.1.2, os-shim@^0.1.3: +os-shim@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" -os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + outpipe@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/outpipe/-/outpipe-1.1.1.tgz#50cf8616365e87e031e29a5ec9339a3da4725fa2" @@ -5075,12 +5948,24 @@ p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + dependencies: + p-try "^1.0.0" + p-limit@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.1.0.tgz#1d5a0d20fb12707c758a655f6bbc4386b5930d68" dependencies: p-try "^2.0.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -5095,13 +5980,23 @@ p-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + p-try@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" +pako@~1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.8.tgz#6844890aab9c635af868ad5fecc62e8acbba3ea4" + +parent-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" + dependencies: + callsites "^3.0.0" parents@^1.0.0, parents@^1.0.1: version "1.0.1" @@ -5141,31 +6036,25 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" - -parsejson@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/parsejson/-/parsejson-0.0.1.tgz#9b10c6c0d825ab589e685153826de0a3ba278bcc" - dependencies: - better-assert "~1.0.0" +parse5@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" -parseqs@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.2.tgz#9dfe70b2cddac388bde4f35b1f240fa58adbe6c7" +parseqs@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.5.tgz#d5208a3738e46766e291ba2ea173684921a8b89d" dependencies: better-assert "~1.0.0" -parseuri@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.4.tgz#806582a39887e1ea18dd5e2fe0e01902268e9350" +parseuri@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/parseuri/-/parseuri-0.0.5.tgz#80204a50d4dbb779bfdc6ebe2778d90e4bce320a" dependencies: better-assert "~1.0.0" -parseurl@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" pascalcase@^0.1.1: version "0.1.1" @@ -5175,6 +6064,10 @@ path-browserify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" @@ -5185,7 +6078,7 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -5221,51 +6114,25 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pathval@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" + pbkdf2@^3.0.3: version "3.0.9" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.9.tgz#f2c4b25a600058b3c3773c086c37dbbee1ffe693" dependencies: create-hmac "^1.1.2" -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - -phantomjs-polyfill-find@ptim/phantomjs-polyfill-find: - version "0.0.1" - resolved "https://codeload.github.com/ptim/phantomjs-polyfill-find/tar.gz/026b69dcabe743265f5214775e42f8d1e8aabedc" - -phantomjs-polyfill-string-includes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/phantomjs-polyfill-string-includes/-/phantomjs-polyfill-string-includes-1.0.0.tgz#ea180d4bbc24b8d83e477f8ee8893efabcb29393" - -phantomjs-prebuilt@^2.1.14: - version "2.1.14" - resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz#d53d311fcfb7d1d08ddb24014558f1188c516da0" - dependencies: - es6-promise "~4.0.3" - extract-zip "~1.5.0" - fs-extra "~1.0.0" - hasha "~2.2.0" - kew "~0.7.0" - progress "~1.1.8" - request "~2.79.0" - request-progress "~2.0.1" - which "~1.2.10" - -phantomjs-prebuilt@^2.1.7: - version "2.1.13" - resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.13.tgz#66556ad9e965d893ca5a7dc9e763df7e8697f76d" - dependencies: - es6-promise "~4.0.3" - extract-zip "~1.5.0" - fs-extra "~0.30.0" - hasha "~2.2.0" - kew "~0.7.0" - progress "~1.1.8" - request "~2.74.0" - request-progress "~2.0.1" - which "~1.2.10" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" pify@^2.0.0: version "2.3.0" @@ -5291,6 +6158,12 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -5301,11 +6174,11 @@ pkg-to-id@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/pkg-to-id/-/pkg-to-id-0.0.3.tgz#34ff336cff53c27a8bf484bc7e3d31ea6c1ccca8" -pkg-up@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" dependencies: - find-up "^1.0.0" + find-up "^2.1.0" please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: version "3.1.1" @@ -5313,9 +6186,13 @@ please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: dependencies: semver-compare "^1.0.0" -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" posix-character-classes@^0.1.0: version "0.1.1" @@ -5340,15 +6217,15 @@ pretty-format@^23.6.0: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@~4.2.1: - version "4.2.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.2.3.tgz#8894c2ac81419cf801629d8f66320a25380d8b05" - -private@^0.1.6, private@~0.1.5: +private@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" -process-es6@^0.11.3: +private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-es6@^0.11.6: version "0.11.6" resolved "https://registry.yarnpkg.com/process-es6/-/process-es6-0.11.6.tgz#c6bb389f9a951f82bd4eb169600105bd2ff9c778" @@ -5364,24 +6241,42 @@ process@~0.11.0: version "0.11.9" resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" -progress@^1.1.8, progress@~1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" -propagate@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-0.4.0.tgz#f3fcca0a6fe06736a7ba572966069617c130b481" +prompts@^0.1.9: + version "0.1.14" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" + dependencies: + kleur "^2.0.1" + sisteransi "^0.1.1" -proxy-addr@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.2.tgz#b4cc5f22610d9535824c123aef9d3cf73c40ba37" +prop-types@^15.6.2: + version "15.6.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: - forwarded "~0.1.0" - ipaddr.js "1.1.1" + loose-envify "^1.3.1" + object-assign "^4.1.1" -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" +propagate@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-1.0.0.tgz#00c2daeedda20e87e3782b344adba1cddd6ad709" + +proxy-addr@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.8.0" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +psl@^1.1.24, psl@^1.1.28: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" public-encrypt@^4.0.0: version "4.0.0" @@ -5408,11 +6303,23 @@ punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + qjobs@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" -qs@6.2.0, qs@^6.0.2, qs@~6.2.0: +qs@6.5.2, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + +qs@^6.5.1: + version "6.6.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" + +qs@~6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" @@ -5428,6 +6335,14 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" +quote-stream@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/quote-stream/-/quote-stream-1.0.2.tgz#84963f8c9c26b942e153feeb53aae74652b7e0b2" + dependencies: + buffer-equal "0.0.1" + minimist "^1.1.3" + through2 "^2.0.0" + randomatic@^1.1.3: version "1.1.5" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.5.tgz#5e9ef5f2d573c67bd2b8124ae90b5156e457840b" @@ -5443,14 +6358,24 @@ range-parser@^1.2.0, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" -raw-body@~2.1.7: - version "2.1.7" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" +raw-body@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" dependencies: - bytes "2.4.0" - iconv-lite "0.4.13" + bytes "3.0.0" + http-errors "1.6.3" + iconv-lite "0.4.23" unpipe "1.0.0" +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + rc@~1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" @@ -5473,6 +6398,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -5481,6 +6413,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + read-pkg@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" @@ -5495,7 +6435,7 @@ read@~1.0.7: dependencies: mute-stream "~0.0.4" -"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.2: +"readable-stream@>=1.0.33-1 <1.1.0-0": version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" dependencies: @@ -5516,7 +6456,7 @@ read@~1.0.7: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@^2.3.5, readable-stream@~2.3.6: +readable-stream@^2.0.1, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.3, readable-stream@~2.3.6: version "2.3.6" resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -5577,34 +6517,40 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" +realpath-native@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560" dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" + util.promisify "^1.0.0" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" +regenerate-unicode-properties@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" dependencies: - resolve "^1.1.6" + regenerate "^1.4.0" -redeyed@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" - dependencies: - esprima "~3.0.0" +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" -regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" regenerator-runtime@^0.9.5: version "0.9.6" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" +regenerator-transform@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" + dependencies: + private "^0.1.6" + regex-cache@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" @@ -5619,24 +6565,35 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + +regexpu-core@^4.1.3, regexpu-core@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" + regenerate "^1.4.0" + regenerate-unicode-properties "^7.0.0" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.0.2" -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" dependencies: jsesc "~0.5.0" +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -5655,27 +6612,30 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request-progress@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" - dependencies: - throttleit "^1.0.0" - request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" dependencies: lodash "^4.13.1" -request-promise@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.1.1.tgz#26021e4f6f56fd4c309f6bf1ebd8c97a95ac1fb5" +request-promise-native@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" dependencies: - bluebird "^3.4.1" request-promise-core "1.1.1" - stealthy-require "^1.0.0" + stealthy-require "^1.1.0" + tough-cookie ">=2.3.3" -request@^2.55.0, request@^2.72.0, request@^2.75.0, request@~2.79.0: +request-promise@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.2.tgz#d1ea46d654a6ee4f8ee6a4fea1018c22911904b4" + dependencies: + bluebird "^3.5.0" + request-promise-core "1.1.1" + stealthy-require "^1.1.0" + tough-cookie ">=2.3.3" + +request@^2.72.0, request@^2.75.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -5700,35 +6660,34 @@ request@^2.55.0, request@^2.72.0, request@^2.75.0, request@~2.79.0: tunnel-agent "~0.4.1" uuid "^3.0.0" -request@czardoz/request: - version "2.74.1" - resolved "https://codeload.github.com/czardoz/request/tar.gz/6ebb4651b72bee7292e54943adfa6b503465adfb" +request@^2.87.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - bl "~1.1.2" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" forever-agent "~0.6.1" - form-data "~1.0.0-rc4" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - node-uuid "~1.4.7" - oauth-sign "~0.8.1" - qs "~6.2.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" -request@~2.74.0: - version "2.74.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab" +request@czardoz/request: + version "2.74.1" + resolved "https://codeload.github.com/czardoz/request/tar.gz/6ebb4651b72bee7292e54943adfa6b503465adfb" dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -5760,50 +6719,46 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -requirejs@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.2.tgz#0eaa870d4c7db3b15dd1322e6b65b0388fc4b2c6" +requirejs@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/requirejs/-/requirejs-2.3.6.tgz#e5093d9601c2829251258c0b9445d4d19fa9e7c9" requires-port@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +reselect@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147" + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" -resolve@1.1.7, resolve@1.1.x, resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7: +resolve@1.1.7, resolve@^1.1.4, resolve@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.3.3: +resolve@^1.1.5, resolve@^1.1.6, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1, resolve@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" dependencies: path-parse "^1.0.6" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" - dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -5815,84 +6770,94 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" +rfdc@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.1.2.tgz#e6e72d74f5dc39de8f538f65e00c36c18018e349" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@~2.5.1, rimraf@~2.5.4: +rimraf@2, rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: glob "^7.0.5" +rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + dependencies: + glob "^7.1.3" + ripemd160@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" -rollup-plugin-babel@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.6.1.tgz#470b03486337045d7e8a3e43fc5fc00e8db82c26" +rollup-plugin-babel@^4.0.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.3.0.tgz#1900e66af70c3975fef26a54111b87ee22a50974" dependencies: - babel-core "6" - babel-plugin-transform-es2015-classes "^6.9.0" - object-assign "^4.1.0" - rollup-pluginutils "^1.5.0" + "@babel/helper-module-imports" "^7.0.0" + rollup-pluginutils "^2.3.0" -rollup-plugin-commonjs@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-5.0.5.tgz#14f93d92cb70e6c31142914b83cd3e904be30c1f" +rollup-plugin-commonjs@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.0.tgz#4604e25069e0c78a09e08faa95dc32dec27f7c89" dependencies: - acorn "^4.0.1" - estree-walker "^0.2.1" - magic-string "^0.16.0" - resolve "^1.1.7" - rollup-pluginutils "^1.5.1" + estree-walker "^0.5.2" + magic-string "^0.25.1" + resolve "^1.8.1" + rollup-pluginutils "^2.3.3" -rollup-plugin-node-globals@^1.0.9: - version "1.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-globals/-/rollup-plugin-node-globals-1.1.0.tgz#7efd8d611d132737829e804e9f51f50962af451f" +rollup-plugin-node-globals@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-globals/-/rollup-plugin-node-globals-1.4.0.tgz#5e1f24a9bb97c0ef51249f625e16c7e61b7c020b" dependencies: - acorn "^4.0.1" - buffer-es6 "^4.9.1" - estree-walker "^0.2.1" - magic-string "^0.16.0" - process-es6 "^0.11.3" - rollup-pluginutils "^1.5.2" + acorn "^5.7.3" + buffer-es6 "^4.9.3" + estree-walker "^0.5.2" + magic-string "^0.22.5" + process-es6 "^0.11.6" + rollup-pluginutils "^2.3.1" rollup-plugin-node-resolve@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.0.0.tgz#07e0ae94ac002a3ea36e8f33ca121d9f836b1309" + version "2.1.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" dependencies: browser-resolve "^1.11.0" builtin-modules "^1.1.0" resolve "^1.1.6" -rollup-plugin-uglify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-1.0.1.tgz#11d0b0c8bcd2d07e6908f74fd16b0152390b922a" - dependencies: - uglify-js "^2.6.1" - -rollup-pluginutils@^1.5.0, rollup-pluginutils@^1.5.1, rollup-pluginutils@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" +rollup-plugin-uglify@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.1.tgz#f8d8e0309104af33981ec0956670b0bd7fac75f5" dependencies: - estree-walker "^0.2.1" - minimatch "^3.0.2" + "@babel/code-frame" "^7.0.0" + jest-worker "^23.2.0" + serialize-javascript "^1.5.0" + uglify-js "^3.4.9" -rollup@^0.36.3: - version "0.36.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.36.3.tgz#c89ac479828924ff8f69c1d44541cb4ea2fc11fc" +rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794" dependencies: - source-map-support "^0.4.0" + estree-walker "^0.5.2" + micromatch "^2.3.11" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" +rollup@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.1.0.tgz#461a7534b55be48aa4a6e6810a1543a5769e75d1" dependencies: - once "^1.3.0" + "@types/estree" "0.0.39" + "@types/node" "*" + acorn "^6.0.5" + +rsvp@^3.3.3: + version "3.6.2" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" run-async@^2.2.0: version "2.2.0" @@ -5905,21 +6870,23 @@ run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" -rx@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -rxjs@^6.3.3: +rxjs@^6.1.0, rxjs@^6.3.3: version "6.3.3" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" dependencies: tslib "^1.9.0" -safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5929,63 +6896,82 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -sane@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sane@^2.0.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" dependencies: + anymatch "^2.0.0" + capture-exit "^1.2.0" exec-sh "^0.2.0" - fb-watchman "^1.8.0" - minimatch "^3.0.2" + fb-watchman "^2.0.0" + micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" - watch "~0.10.0" + watch "~0.18.0" + optionalDependencies: + fsevents "^1.2.3" -sax@^1.1.4: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +scope-analyzer@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/scope-analyzer/-/scope-analyzer-2.0.5.tgz#72c9c6770c3e66984f84c7d3c7045998a1a7db8a" + dependencies: + array-from "^2.1.1" + es6-map "^0.1.5" + es6-set "^0.1.5" + es6-symbol "^3.1.1" + estree-is-function "^1.0.0" + get-assigned-identifiers "^1.1.0" semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -semver@^5.5.0: +semver@^5.4.1, semver@^5.5.0, semver@^5.5.1: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" -semver@~4.3.3: - version "4.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" - -send@0.14.1: - version "0.14.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.14.1.tgz#a954984325392f51532a7760760e459598c89f7a" +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" dependencies: - debug "~2.2.0" - depd "~1.1.0" + debug "2.6.9" + depd "~1.1.2" destroy "~1.0.4" - encodeurl "~1.0.1" + encodeurl "~1.0.2" escape-html "~1.0.3" - etag "~1.7.0" - fresh "0.3.0" - http-errors "~1.5.0" - mime "1.3.4" - ms "0.7.1" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" on-finished "~2.3.0" range-parser "~1.2.0" - statuses "~1.3.0" + statuses "~1.4.0" + +serialize-javascript@^1.5.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" -serve-static@~1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.11.1.tgz#d6cce7693505f733c759de57befc1af76c0f0805" +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" dependencies: - encodeurl "~1.0.1" + encodeurl "~1.0.2" escape-html "~1.0.3" - parseurl "~1.3.1" - send "0.14.1" + parseurl "~1.3.2" + send "0.16.2" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -6013,9 +6999,9 @@ set-value@^2.0.0: is-plain-object "^2.0.3" split-string "^3.0.1" -setprototypeof@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.2.tgz#81a552141ec104b88e89ce383103ad5c66564d08" +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" sha.js@^2.3.6, sha.js@~2.4.4: version "2.4.8" @@ -6023,6 +7009,10 @@ sha.js@^2.3.6, sha.js@~2.4.4: dependencies: inherits "^2.0.1" +shallow-copy@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" + shasum@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" @@ -6040,7 +7030,7 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shell-quote@^1.4.2, shell-quote@^1.4.3: +shell-quote@^1.4.2, shell-quote@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" dependencies: @@ -6049,17 +7039,9 @@ shell-quote@^1.4.2, shell-quote@^1.4.3: array-reduce "~0.0.0" jsonify "~0.0.0" -shelljs@^0.7.5: - version "0.7.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" signal-exit@^3.0.0: version "3.0.1" @@ -6075,6 +7057,10 @@ simple-git@^1.85.0: dependencies: debug "^4.0.1" +sisteransi@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -6087,6 +7073,14 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slice-ansi@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.0.0.tgz#5373bdb8559b45676e8541c66916cdd6251612e7" + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -6120,59 +7114,47 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -socket.io-adapter@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz#fb9f82ab1aa65290bf72c3657955b930a991a24f" - dependencies: - debug "2.2.0" - socket.io-parser "2.2.2" +socket.io-adapter@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b" -socket.io-client@1.4.6: - version "1.4.6" - resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.4.6.tgz#49b0ba537efd15b8297c84016e642e1c7c752c3d" +socket.io-client@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.1.1.tgz#dcb38103436ab4578ddb026638ae2f21b623671f" dependencies: backo2 "1.0.2" + base64-arraybuffer "0.1.5" component-bind "1.0.0" - component-emitter "1.2.0" - debug "2.2.0" - engine.io-client "1.6.9" - has-binary "0.1.7" + component-emitter "1.2.1" + debug "~3.1.0" + engine.io-client "~3.2.0" + has-binary2 "~1.0.2" + has-cors "1.1.0" indexof "0.0.1" object-component "0.0.3" - parseuri "0.0.4" - socket.io-parser "2.2.6" + parseqs "0.0.5" + parseuri "0.0.5" + socket.io-parser "~3.2.0" to-array "0.1.4" -socket.io-parser@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.2.2.tgz#3d7af6b64497e956b7d9fe775f999716027f9417" - dependencies: - benchmark "1.0.0" - component-emitter "1.1.2" - debug "0.7.4" - isarray "0.0.1" - json3 "3.2.6" - -socket.io-parser@2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.2.6.tgz#38dfd61df50dcf8ab1d9e2091322bf902ba28b99" +socket.io-parser@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.2.0.tgz#e7c6228b6aa1f814e6148aea325b51aa9499e077" dependencies: - benchmark "1.0.0" - component-emitter "1.1.2" - debug "2.2.0" - isarray "0.0.1" - json3 "3.3.2" + component-emitter "1.2.1" + debug "~3.1.0" + isarray "2.0.1" -socket.io@1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-1.4.7.tgz#92b7f7cb88c5797d4daee279fe8075dbe6d3fa1c" +socket.io@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.1.1.tgz#a069c5feabee3e6b214a75b40ce0652e1cfb9980" dependencies: - debug "2.2.0" - engine.io "1.6.10" - has-binary "0.1.7" - socket.io-adapter "0.4.0" - socket.io-client "1.4.6" - socket.io-parser "2.2.6" + debug "~3.1.0" + engine.io "~3.2.0" + has-binary2 "~1.0.2" + socket.io-adapter "~1.1.0" + socket.io-client "2.1.1" + socket.io-parser "~3.2.0" source-map-resolve@^0.5.0: version "0.5.2" @@ -6184,11 +7166,18 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.4.0, source-map-support@^0.4.2: - version "0.4.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.6.tgz#32552aa64b458392a85eab3b0b5ee61527167aeb" +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: - source-map "^0.5.3" + source-map "^0.5.6" + +source-map-support@^0.5.6: + version "0.5.10" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" source-map-url@^0.4.0: version "0.4.0" @@ -6204,22 +7193,17 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1, source-map@~0.5.3: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@^0.5.6: +source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -spawn-sync@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" - dependencies: - concat-stream "^1.4.7" - os-shim "^0.1.2" +sourcemap-codec@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f" spdx-correct@~1.0.0: version "1.0.2" @@ -6266,10 +7250,20 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stack-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + staged-git-files@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.2.tgz#4326d33886dc9ecfa29a6193bf511ba90a46454b" +static-eval@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/static-eval/-/static-eval-2.0.0.tgz#0e821f8926847def7b4b50cda5d55c04a9b13864" + dependencies: + escodegen "^1.8.1" + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -6277,13 +7271,40 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.3.1 < 2", statuses@~1.3.0: +static-module@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/static-module/-/static-module-3.0.0.tgz#8583bfa2107b462ea462250871ceada4ea5d74b4" + dependencies: + acorn-node "^1.3.0" + concat-stream "~1.6.0" + convert-source-map "^1.5.1" + duplexer2 "~0.1.4" + escodegen "~1.9.0" + has "^1.0.1" + magic-string "^0.22.4" + merge-source-map "1.0.4" + object-inspect "~1.4.0" + readable-stream "~2.3.3" + scope-analyzer "^2.0.1" + shallow-copy "~0.0.1" + static-eval "^2.0.0" + through2 "~2.0.3" + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" -stealthy-require@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.0.0.tgz#1a8ed8fc19a8b56268f76f5a1a3e3832b0c26200" +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +stealthy-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" stream-browserify@^2.0.0: version "2.0.1" @@ -6316,6 +7337,15 @@ stream-splicer@^2.0.0: inherits "^2.0.1" readable-stream "^2.0.2" +streamroller@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-0.7.0.tgz#a1d1b7cf83d39afb0d63049a5acbf93493bdf64b" + dependencies: + date-format "^1.2.0" + debug "^3.1.0" + mkdirp "^0.5.1" + readable-stream "^2.3.0" + string-argv@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" @@ -6324,7 +7354,14 @@ string-direction@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/string-direction/-/string-direction-0.1.2.tgz#3d8453e7274a2e44a142b3dc8449dfb64d9ade3a" -string-width@^1.0.1, string-width@^1.0.2: +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + dependencies: + astral-regex "^1.0.0" + strip-ansi "^4.0.0" + +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -6339,24 +7376,20 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" -string-width@^2.1.1: +string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.codepointat@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" - string_decoder@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" dependencies: safe-buffer "~5.1.0" -string_decoder@~0.10.0, string_decoder@~0.10.x: +string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -6390,27 +7423,31 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@~5.0.0: +strip-ansi@^5.0.0, strip-ansi@~5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" dependencies: ansi-regex "^4.0.0" +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -strip-json-comments@~1.0.1, strip-json-comments@~1.0.4: +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +strip-json-comments@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" @@ -6420,16 +7457,22 @@ subarg@^1.0.0: dependencies: minimist "^1.1.0" -supports-color@3.1.2, supports-color@^3.1.0, supports-color@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" +supports-color@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: - has-flag "^1.0.0" + has-flag "^3.0.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +supports-color@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -6440,9 +7483,9 @@ symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" -"symbol-tree@>= 3.1.0 < 4.0.0": - version "3.1.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.1.4.tgz#02b279348d337debc39694c5c95f882d448a312a" +symbol-tree@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" syntax-error@^1.1.1: version "1.1.6" @@ -6450,16 +7493,14 @@ syntax-error@^1.1.1: dependencies: acorn "^2.7.0" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +table@^5.0.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/table/-/table-5.2.1.tgz#e78463702b1be9f7131c39860bcfb1b81114c2a1" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + ajv "^6.6.1" + lodash "^4.17.11" + slice-ansi "2.0.0" + string-width "^2.1.1" tar-pack@~3.3.0: version "3.3.0" @@ -6474,6 +7515,18 @@ tar-pack@~3.3.0: tar "~2.2.1" uid-number "~0.0.6" +tar@^4: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.4" + minizlib "^1.1.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + tar@~2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" @@ -6482,9 +7535,9 @@ tar@~2.2.1: fstream "^1.0.2" inherits "2" -test-exclude@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-2.1.3.tgz#a8d8968e1da83266f9864f2852c55e220f06434a" +test-exclude@^4.2.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" dependencies: arrify "^1.0.1" micromatch "^2.3.11" @@ -6492,21 +7545,13 @@ test-exclude@^2.1.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -testcheck@^0.1.0: - version "0.1.4" - resolved "https://registry.yarnpkg.com/testcheck/-/testcheck-0.1.4.tgz#90056edd48d11997702616ce6716f197d8190164" - -text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" -throat@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" - -throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" through2@^2.0.0: version "2.0.1" @@ -6522,7 +7567,7 @@ through2@~0.6.3: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through2@~2.0.0: +through2@~2.0.0, through2@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" dependencies: @@ -6539,17 +7584,11 @@ timers-browserify@^1.0.1: dependencies: process "~0.11.0" -tmp@0.0.28: - version "0.0.28" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.28.tgz#172735b7f614ea7af39664fa84cf0de4e515d120" - dependencies: - os-tmpdir "~1.0.1" - -tmp@^0.0.29: - version "0.0.29" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" +tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" dependencies: - os-tmpdir "~1.0.1" + os-tmpdir "~1.0.2" tmpl@1.0.x: version "1.0.4" @@ -6567,6 +7606,14 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -6589,27 +7636,57 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@^2.3.1, tough-cookie@~2.3.0: +tough-cookie@>=2.3.3: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.0.tgz#d2bceddebde633153ff20a52fa844a0dc71dacef" + dependencies: + ip-regex "^3.0.0" + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: punycode "^1.4.1" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + dependencies: + punycode "^2.1.0" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" -tty-browserify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" +tty-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" tunnel-agent@~0.4.1: version "0.4.3" @@ -6625,26 +7702,22 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" - -type-detect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" -type-is@~1.6.13: - version "1.6.14" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" +type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" dependencies: media-typer "0.3.0" - mime-types "~2.1.13" + mime-types "~2.1.18" -typedarray@~0.0.5: +typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -uglify-js@^2.6, uglify-js@^2.6.1: +uglify-js@^2.6: version "2.7.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.4.tgz#a295a0de12b6a650c031c40deb0dc40b14568bd2" dependencies: @@ -6653,6 +7726,13 @@ uglify-js@^2.6, uglify-js@^2.6.1: uglify-to-browserify "~1.0.0" yargs "~3.10.0" +uglify-js@^3.4.9: + version "3.4.9" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" + dependencies: + commander "~2.17.1" + source-map "~0.6.1" + uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" @@ -6661,14 +7741,33 @@ uid-number@~0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" -ultron@1.0.x: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" umd@^3.0.0: version "3.0.1" resolved "http://registry.npmjs.org/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" + union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -6695,6 +7794,16 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + dependencies: + punycode "^2.1.0" + urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" @@ -6720,40 +7829,42 @@ use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - -useragent@^2.1.9: - version "2.1.9" - resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.1.9.tgz#4dba2bc4dad1875777ab15de3ff8098b475000b7" +useragent@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" dependencies: - lru-cache "2.2.x" - -utf8@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.0.tgz#0cfec5c8052d44a23e3aaa908104e8075f95dfd5" + lru-cache "4.1.x" + tmp "0.0.x" util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +util.promisify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + util@0.10.3, util@~0.10.1: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: inherits "2.0.1" -utils-merge@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" uuid@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.0.tgz#6728fc0459c450d796a99c31837569bdf672d728" +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + valid-url@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" @@ -6765,9 +7876,9 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.0.tgz#e1e5affbbd16ae768dd2674394b9ad3022653140" +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" verror@1.3.6: version "1.3.6" @@ -6775,45 +7886,58 @@ verror@1.3.6: dependencies: extsprintf "1.0.2" -vlq@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.1.tgz#14439d711891e682535467f8587c5630e4222a6c" +vlq@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" -vm-browserify@~0.0.1: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" +vm-browserify@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" +w3c-hr-time@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + dependencies: + browser-process-hrtime "^0.1.2" + walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" dependencies: makeerror "1.0.x" -watch@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" +watch@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" -watchify@^3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.7.0.tgz#ee2f2c5c8c37312303f998b818b2b3450eefe648" +watchify@^3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/watchify/-/watchify-3.11.0.tgz#03f1355c643955e7ab8dcbf399f624644221330f" dependencies: anymatch "^1.3.0" - browserify "^13.0.0" + browserify "^16.1.0" chokidar "^1.0.0" defined "^1.0.0" outpipe "^1.1.0" through2 "^2.0.0" xtend "^4.0.0" -webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + dependencies: + defaults "^1.0.3" + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" whatwg-encoding@^1.0.1: version "1.0.1" @@ -6821,24 +7945,43 @@ whatwg-encoding@^1.0.1: dependencies: iconv-lite "0.4.13" -whatwg-url@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-3.1.0.tgz#7bdcae490f921aef6451fb6739ec6bbd8e907bf6" +whatwg-encoding@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" + iconv-lite "0.4.24" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + +whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.0.5, which@^1.1.1, which@^1.2.1, which@~1.2.10: +which@^1.2.1: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: isexe "^1.1.1" -which@^1.2.10, which@^1.2.9: +which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" dependencies: @@ -6854,10 +7997,6 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - windows-release@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.1.0.tgz#8d4a7e266cbf5a233f6c717dac19ce00af36e12e" @@ -6868,20 +8007,13 @@ wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" -wordwrap@^1.0.0, wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" -worker-farm@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" - dependencies: - errno ">=0.1.1 <0.2.0-0" - xtend ">=4.0.0 <4.1.0-0" +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" wrap-ansi@^2.0.0: version "2.0.0" @@ -6900,18 +8032,33 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" dependencies: mkdirp "^0.5.1" -ws@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.0.1.tgz#7d0b2a2e58cddd819039c29c9de65045e1b310e9" +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + dependencies: + async-limiter "~1.0.0" + +ws@~3.3.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" dependencies: - options ">=0.0.5" - ultron "1.0.x" + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" wuzzy@adampash/wuzzy#feat-array-is-array: version "0.1.4" @@ -6919,15 +8066,15 @@ wuzzy@adampash/wuzzy#feat-array-is-array: dependencies: lodash "~2.4.x" -"xml-name-validator@>= 2.0.1 < 3.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" -xmlhttprequest-ssl@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz#3b7741fea4a86675976e908d296d4445961faa67" +xmlhttprequest-ssl@~1.5.4: + version "1.5.5" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -6935,57 +8082,59 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + +yargs-parser@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" + camelcase "^4.1.0" -yargs-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-3.2.0.tgz#5081355d19d9d0c8c5d81ada908cb4e6d186664f" +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" dependencies: - camelcase "^3.0.0" - lodash.assign "^4.1.0" + camelcase "^4.1.0" -yargs@^4.7.0: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" +yargs@^10.0.3: + version "10.1.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" dependencies: - cliui "^3.2.0" + cliui "^4.0.0" decamelize "^1.1.1" + find-up "^2.1.0" get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" + os-locale "^2.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" + string-width "^2.0.0" + which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^2.4.1" + yargs-parser "^8.1.0" -yargs@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-5.0.0.tgz#3355144977d05757dbb86d6e38ec056123b3a66e" +yargs@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" dependencies: - cliui "^3.2.0" + cliui "^4.0.0" decamelize "^1.1.1" + find-up "^2.1.0" get-caller-file "^1.0.1" - lodash.assign "^4.2.0" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" + os-locale "^2.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - window-size "^0.2.0" + string-width "^2.0.0" + which-module "^2.0.0" y18n "^3.2.1" - yargs-parser "^3.2.0" + yargs-parser "^9.0.2" yargs@~3.10.0: version "3.10.0" @@ -6996,12 +8145,6 @@ yargs@~3.10.0: decamelize "^1.0.0" window-size "0.1.0" -yauzl@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" - dependencies: - fd-slicer "~1.0.1" - yeast@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"