aboutsummaryrefslogtreecommitdiff
path: root/node_modules/cheerio-select
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-02-09 17:58:07 +0100
committerMinteck <contact@minteck.org>2022-02-09 17:58:07 +0100
commit22a25ded9f7d9c9a96cce8d1bc12475ca0434201 (patch)
tree0e33d0650fe58f41c00bbc4b8047956905766823 /node_modules/cheerio-select
parent8f54d903fb3470823a5e4d6ff4655de009836245 (diff)
downloadyoutoo-22a25ded9f7d9c9a96cce8d1bc12475ca0434201.tar.gz
youtoo-22a25ded9f7d9c9a96cce8d1bc12475ca0434201.tar.bz2
youtoo-22a25ded9f7d9c9a96cce8d1bc12475ca0434201.zip
Major update
Diffstat (limited to 'node_modules/cheerio-select')
-rw-r--r--node_modules/cheerio-select/LICENSE11
-rw-r--r--node_modules/cheerio-select/README.md18
-rw-r--r--node_modules/cheerio-select/lib/helpers.d.ts5
-rw-r--r--node_modules/cheerio-select/lib/helpers.d.ts.map1
-rw-r--r--node_modules/cheerio-select/lib/helpers.js25
-rw-r--r--node_modules/cheerio-select/lib/index.d.ts12
-rw-r--r--node_modules/cheerio-select/lib/index.d.ts.map1
-rw-r--r--node_modules/cheerio-select/lib/index.js296
-rw-r--r--node_modules/cheerio-select/lib/positionals.d.ts10
-rw-r--r--node_modules/cheerio-select/lib/positionals.d.ts.map1
-rw-r--r--node_modules/cheerio-select/lib/positionals.js42
-rw-r--r--node_modules/cheerio-select/package.json63
12 files changed, 485 insertions, 0 deletions
diff --git a/node_modules/cheerio-select/LICENSE b/node_modules/cheerio-select/LICENSE
new file mode 100644
index 0000000..c464f86
--- /dev/null
+++ b/node_modules/cheerio-select/LICENSE
@@ -0,0 +1,11 @@
+Copyright (c) Felix Böhm
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/cheerio-select/README.md b/node_modules/cheerio-select/README.md
new file mode 100644
index 0000000..140a661
--- /dev/null
+++ b/node_modules/cheerio-select/README.md
@@ -0,0 +1,18 @@
+# cheerio-select [![NPM version](http://img.shields.io/npm/v/cheerio-select.svg)](https://npmjs.org/package/cheerio-select) [![Build Status](https://travis-ci.org/cheeriojs/cheerio-select.svg?branch=master)](http://travis-ci.org/cheeriojs/cheerio-select) [![Downloads](https://img.shields.io/npm/dm/cheerio-select.svg)](https://npmjs.org/package/cheerio-select) [![Coverage](https://coveralls.io/repos/cheeriojs/cheerio-select/badge.svg?branch=master)](https://coveralls.io/r/cheeriojs/cheerio-select)
+
+CSS selector engine supporting jQuery selectors, based on [`css-select`](https://github.com/fb55/css-select).
+
+Supports all jQuery positional pseudo-selectors:
+
+- `:first`
+- `:last`
+- `:eq`
+- `:nth`
+- `:gt`
+- `:lt`
+- `:even`
+- `:odd`
+- `:not(:positional)`, where `:positional` is any of the above.
+
+This library is a thin wrapper around [`css-select`](https://github.com/fb55/css-select).
+Only use this module if you will actually use jQuery positional selectors.
diff --git a/node_modules/cheerio-select/lib/helpers.d.ts b/node_modules/cheerio-select/lib/helpers.d.ts
new file mode 100644
index 0000000..4e9a298
--- /dev/null
+++ b/node_modules/cheerio-select/lib/helpers.d.ts
@@ -0,0 +1,5 @@
+import type { Node } from "domhandler";
+import type { Selector } from "css-what";
+export declare function getDocumentRoot(node: Node): Node;
+export declare function groupSelectors(selectors: Selector[][]): [plain: Selector[][], filtered: Selector[][]];
+//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/helpers.d.ts.map b/node_modules/cheerio-select/lib/helpers.d.ts.map
new file mode 100644
index 0000000..43d0e80
--- /dev/null
+++ b/node_modules/cheerio-select/lib/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAGhD;AAED,wBAAgB,cAAc,CAC1B,SAAS,EAAE,QAAQ,EAAE,EAAE,GACxB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,CAa/C"} \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/helpers.js b/node_modules/cheerio-select/lib/helpers.js
new file mode 100644
index 0000000..1954691
--- /dev/null
+++ b/node_modules/cheerio-select/lib/helpers.js
@@ -0,0 +1,25 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.groupSelectors = exports.getDocumentRoot = void 0;
+var positionals_1 = require("./positionals");
+function getDocumentRoot(node) {
+ while (node.parent)
+ node = node.parent;
+ return node;
+}
+exports.getDocumentRoot = getDocumentRoot;
+function groupSelectors(selectors) {
+ var filteredSelectors = [];
+ var plainSelectors = [];
+ for (var _i = 0, selectors_1 = selectors; _i < selectors_1.length; _i++) {
+ var selector = selectors_1[_i];
+ if (selector.some(positionals_1.isFilter)) {
+ filteredSelectors.push(selector);
+ }
+ else {
+ plainSelectors.push(selector);
+ }
+ }
+ return [plainSelectors, filteredSelectors];
+}
+exports.groupSelectors = groupSelectors;
diff --git a/node_modules/cheerio-select/lib/index.d.ts b/node_modules/cheerio-select/lib/index.d.ts
new file mode 100644
index 0000000..4ecf774
--- /dev/null
+++ b/node_modules/cheerio-select/lib/index.d.ts
@@ -0,0 +1,12 @@
+import { Options as CSSSelectOptions } from "css-select";
+import type { Element, Node, Document } from "domhandler";
+export { filters, pseudos, aliases } from "css-select";
+export interface Options extends CSSSelectOptions<Node, Element> {
+ /** Optional reference to the root of the document. If not set, this will be computed when needed. */
+ root?: Document;
+}
+export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean;
+export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean;
+export declare function filter(selector: string, elements: Node[], options?: Options): Element[];
+export declare function select(selector: string | ((el: Element) => boolean), root: Node | Node[], options?: Options): Element[];
+//# sourceMappingURL=index.d.ts.map \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/index.d.ts.map b/node_modules/cheerio-select/lib/index.d.ts.map
new file mode 100644
index 0000000..c53a9da
--- /dev/null
+++ b/node_modules/cheerio-select/lib/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,OAAO,IAAI,gBAAgB,EAE9B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAK1D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYvD,MAAM,WAAW,OAAQ,SAAQ,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC;IAC5D,qGAAqG;IACrG,IAAI,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,wBAAgB,EAAE,CACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAET;AAED,wBAAgB,IAAI,CAChB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,OAAO,GAAE,OAAY,GACtB,OAAO,CAWT;AAsCD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,IAAI,EAAE,EAChB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAEX;AA6FD,wBAAgB,MAAM,CAClB,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,OAAO,CAAC,EAC7C,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EACnB,OAAO,GAAE,OAAY,GACtB,OAAO,EAAE,CAuBX"} \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/index.js b/node_modules/cheerio-select/lib/index.js
new file mode 100644
index 0000000..facd2ba
--- /dev/null
+++ b/node_modules/cheerio-select/lib/index.js
@@ -0,0 +1,296 @@
+"use strict";
+var __assign = (this && this.__assign) || function () {
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+};
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __spreadArray = (this && this.__spreadArray) || function (to, from) {
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
+ to[j] = from[i];
+ return to;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.select = exports.filter = exports.some = exports.is = exports.aliases = exports.pseudos = exports.filters = void 0;
+var css_what_1 = require("css-what");
+var css_select_1 = require("css-select");
+var DomUtils = __importStar(require("domutils"));
+var helpers_1 = require("./helpers");
+var positionals_1 = require("./positionals");
+// Re-export pseudo extension points
+var css_select_2 = require("css-select");
+Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return css_select_2.filters; } });
+Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return css_select_2.pseudos; } });
+Object.defineProperty(exports, "aliases", { enumerable: true, get: function () { return css_select_2.aliases; } });
+/** Used to indicate a scope should be filtered. Might be ignored when filtering. */
+var SCOPE_PSEUDO = {
+ type: "pseudo",
+ name: "scope",
+ data: null,
+};
+/** Used for actually filtering for scope. */
+var CUSTOM_SCOPE_PSEUDO = __assign({}, SCOPE_PSEUDO);
+var UNIVERSAL_SELECTOR = { type: "universal", namespace: null };
+function is(element, selector, options) {
+ if (options === void 0) { options = {}; }
+ return some([element], selector, options);
+}
+exports.is = is;
+function some(elements, selector, options) {
+ if (options === void 0) { options = {}; }
+ if (typeof selector === "function")
+ return elements.some(selector);
+ var _a = helpers_1.groupSelectors(css_what_1.parse(selector, options)), plain = _a[0], filtered = _a[1];
+ return ((plain.length > 0 && elements.some(css_select_1._compileToken(plain, options))) ||
+ filtered.some(function (sel) { return filterBySelector(sel, elements, options).length > 0; }));
+}
+exports.some = some;
+function filterByPosition(filter, elems, data, options) {
+ var num = typeof data === "string" ? parseInt(data, 10) : NaN;
+ switch (filter) {
+ case "first":
+ case "lt":
+ // Already done in `getLimit`
+ return elems;
+ case "last":
+ return elems.length > 0 ? [elems[elems.length - 1]] : elems;
+ case "nth":
+ case "eq":
+ return isFinite(num) && Math.abs(num) < elems.length
+ ? [num < 0 ? elems[elems.length + num] : elems[num]]
+ : [];
+ case "gt":
+ return isFinite(num) ? elems.slice(num + 1) : [];
+ case "even":
+ return elems.filter(function (_, i) { return i % 2 === 0; });
+ case "odd":
+ return elems.filter(function (_, i) { return i % 2 === 1; });
+ case "not": {
+ var filtered_1 = new Set(filterParsed(data, elems, options));
+ return elems.filter(function (e) { return !filtered_1.has(e); });
+ }
+ }
+}
+function filter(selector, elements, options) {
+ if (options === void 0) { options = {}; }
+ return filterParsed(css_what_1.parse(selector, options), elements, options);
+}
+exports.filter = filter;
+/**
+ * Filter a set of elements by a selector.
+ *
+ * Will return elements in the original order.
+ *
+ * @param selector Selector to filter by.
+ * @param elements Elements to filter.
+ * @param options Options for selector.
+ */
+function filterParsed(selector, elements, options) {
+ if (elements.length === 0)
+ return [];
+ var _a = helpers_1.groupSelectors(selector), plainSelectors = _a[0], filteredSelectors = _a[1];
+ var found;
+ if (plainSelectors.length) {
+ var filtered = filterElements(elements, plainSelectors, options);
+ // If there are no filters, just return
+ if (filteredSelectors.length === 0) {
+ return filtered;
+ }
+ // Otherwise, we have to do some filtering
+ if (filtered.length) {
+ found = new Set(filtered);
+ }
+ }
+ for (var i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) {
+ var filteredSelector = filteredSelectors[i];
+ var missing = found
+ ? elements.filter(function (e) { return DomUtils.isTag(e) && !found.has(e); })
+ : elements;
+ if (missing.length === 0)
+ break;
+ var filtered = filterBySelector(filteredSelector, elements, options);
+ if (filtered.length) {
+ if (!found) {
+ /*
+ * If we haven't found anything before the last selector,
+ * just return what we found now.
+ */
+ if (i === filteredSelectors.length - 1) {
+ return filtered;
+ }
+ found = new Set(filtered);
+ }
+ else {
+ filtered.forEach(function (el) { return found.add(el); });
+ }
+ }
+ }
+ return typeof found !== "undefined"
+ ? (found.size === elements.length
+ ? elements
+ : // Filter elements to preserve order
+ elements.filter(function (el) {
+ return found.has(el);
+ }))
+ : [];
+}
+function filterBySelector(selector, elements, options) {
+ var _a;
+ if (selector.some(css_what_1.isTraversal)) {
+ /*
+ * Get root node, run selector with the scope
+ * set to all of our nodes.
+ */
+ var root = (_a = options.root) !== null && _a !== void 0 ? _a : helpers_1.getDocumentRoot(elements[0]);
+ var sel = __spreadArray(__spreadArray([], selector), [CUSTOM_SCOPE_PSEUDO]);
+ return findFilterElements(root, sel, options, true, elements);
+ }
+ // Performance optimization: If we don't have to traverse, just filter set.
+ return findFilterElements(elements, selector, options, false);
+}
+function select(selector, root, options) {
+ if (options === void 0) { options = {}; }
+ if (typeof selector === "function") {
+ return find(root, selector);
+ }
+ var _a = helpers_1.groupSelectors(css_what_1.parse(selector, options)), plain = _a[0], filtered = _a[1];
+ var results = filtered.map(function (sel) {
+ return findFilterElements(root, sel, options, true);
+ });
+ // Plain selectors can be queried in a single go
+ if (plain.length) {
+ results.push(findElements(root, plain, options, Infinity));
+ }
+ // If there was only a single selector, just return the result
+ if (results.length === 1) {
+ return results[0];
+ }
+ // Sort results, filtering for duplicates
+ return DomUtils.uniqueSort(results.reduce(function (a, b) { return __spreadArray(__spreadArray([], a), b); }));
+}
+exports.select = select;
+// Traversals that are treated differently in css-select.
+var specialTraversal = new Set(["descendant", "adjacent"]);
+function includesScopePseudo(t) {
+ return (t !== SCOPE_PSEUDO &&
+ t.type === "pseudo" &&
+ (t.name === "scope" ||
+ (Array.isArray(t.data) &&
+ t.data.some(function (data) { return data.some(includesScopePseudo); }))));
+}
+function addContextIfScope(selector, options, scopeContext) {
+ return scopeContext && selector.some(includesScopePseudo)
+ ? __assign(__assign({}, options), { context: scopeContext }) : options;
+}
+/**
+ *
+ * @param root Element(s) to search from.
+ * @param selector Selector to look for.
+ * @param options Options for querying.
+ * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal.
+ * @param scopeContext Optional context for a :scope.
+ */
+function findFilterElements(root, selector, options, queryForSelector, scopeContext) {
+ var filterIndex = selector.findIndex(positionals_1.isFilter);
+ var sub = selector.slice(0, filterIndex);
+ var filter = selector[filterIndex];
+ /*
+ * Set the number of elements to retrieve.
+ * Eg. for :first, we only have to get a single element.
+ */
+ var limit = positionals_1.getLimit(filter.name, filter.data);
+ if (limit === 0)
+ return [];
+ var subOpts = addContextIfScope(sub, options, scopeContext);
+ /*
+ * Skip `findElements` call if our selector starts with a positional
+ * pseudo.
+ */
+ var elemsNoLimit = sub.length === 0 && !Array.isArray(root)
+ ? DomUtils.getChildren(root).filter(DomUtils.isTag)
+ : sub.length === 0 || (sub.length === 1 && sub[0] === SCOPE_PSEUDO)
+ ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag)
+ : queryForSelector || sub.some(css_what_1.isTraversal)
+ ? findElements(root, [sub], subOpts, limit)
+ : filterElements(root, [sub], subOpts);
+ var elems = elemsNoLimit.slice(0, limit);
+ var result = filterByPosition(filter.name, elems, filter.data, options);
+ if (result.length === 0 || selector.length === filterIndex + 1) {
+ return result;
+ }
+ var remainingSelector = selector.slice(filterIndex + 1);
+ var remainingHasTraversal = remainingSelector.some(css_what_1.isTraversal);
+ var remainingOpts = addContextIfScope(remainingSelector, options, scopeContext);
+ if (remainingHasTraversal) {
+ /*
+ * Some types of traversals have special logic when they start a selector
+ * in css-select. If this is the case, add a universal selector in front of
+ * the selector to avoid this behavior.
+ */
+ if (specialTraversal.has(remainingSelector[0].type)) {
+ remainingSelector.unshift(UNIVERSAL_SELECTOR);
+ }
+ /*
+ * Add a scope token in front of the remaining selector,
+ * to make sure traversals don't match elements that aren't a
+ * part of the considered tree.
+ */
+ remainingSelector.unshift(SCOPE_PSEUDO);
+ }
+ /*
+ * If we have another filter, recursively call `findFilterElements`,
+ * with the `recursive` flag disabled. We only have to look for more
+ * elements when we see a traversal.
+ *
+ * Otherwise,
+ */
+ return remainingSelector.some(positionals_1.isFilter)
+ ? findFilterElements(result, remainingSelector, options, false, scopeContext)
+ : remainingHasTraversal
+ ? // Query existing elements to resolve traversal.
+ findElements(result, [remainingSelector], remainingOpts, Infinity)
+ : // If we don't have any more traversals, simply filter elements.
+ filterElements(result, [remainingSelector], remainingOpts);
+}
+function findElements(root, sel, options, limit) {
+ if (limit === 0)
+ return [];
+ var query = css_select_1._compileToken(sel, options, root);
+ return find(root, query, limit);
+}
+function find(root, query, limit) {
+ if (limit === void 0) { limit = Infinity; }
+ var elems = css_select_1.prepareContext(root, DomUtils, query.shouldTestNextSiblings);
+ return DomUtils.find(function (node) { return DomUtils.isTag(node) && query(node); }, elems, true, limit);
+}
+function filterElements(elements, sel, options) {
+ var els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag);
+ if (els.length === 0)
+ return els;
+ var query = css_select_1._compileToken(sel, options);
+ return els.filter(query);
+}
diff --git a/node_modules/cheerio-select/lib/positionals.d.ts b/node_modules/cheerio-select/lib/positionals.d.ts
new file mode 100644
index 0000000..9e581d3
--- /dev/null
+++ b/node_modules/cheerio-select/lib/positionals.d.ts
@@ -0,0 +1,10 @@
+import type { Selector, PseudoSelector } from "css-what";
+export declare type Filter = "first" | "last" | "eq" | "nth" | "gt" | "lt" | "even" | "odd" | "not";
+export declare const filterNames: Set<string>;
+export interface CheerioSelector extends PseudoSelector {
+ name: Filter;
+ data: string | null;
+}
+export declare function isFilter(s: Selector): s is CheerioSelector;
+export declare function getLimit(filter: Filter, data: string | null): number;
+//# sourceMappingURL=positionals.d.ts.map \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/positionals.d.ts.map b/node_modules/cheerio-select/lib/positionals.d.ts.map
new file mode 100644
index 0000000..0d755cc
--- /dev/null
+++ b/node_modules/cheerio-select/lib/positionals.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"positionals.d.ts","sourceRoot":"","sources":["../src/positionals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,oBAAY,MAAM,GACZ,OAAO,GACP,MAAM,GACN,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,KAAK,GACL,KAAK,CAAC;AACZ,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CASlC,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,eAAe,CAS1D;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAgBpE"} \ No newline at end of file
diff --git a/node_modules/cheerio-select/lib/positionals.js b/node_modules/cheerio-select/lib/positionals.js
new file mode 100644
index 0000000..a2ccaa7
--- /dev/null
+++ b/node_modules/cheerio-select/lib/positionals.js
@@ -0,0 +1,42 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getLimit = exports.isFilter = exports.filterNames = void 0;
+exports.filterNames = new Set([
+ "first",
+ "last",
+ "eq",
+ "gt",
+ "nth",
+ "lt",
+ "even",
+ "odd",
+]);
+function isFilter(s) {
+ if (s.type !== "pseudo")
+ return false;
+ if (exports.filterNames.has(s.name))
+ return true;
+ if (s.name === "not" && Array.isArray(s.data)) {
+ // Only consider `:not` with embedded filters
+ return s.data.some(function (s) { return s.some(isFilter); });
+ }
+ return false;
+}
+exports.isFilter = isFilter;
+function getLimit(filter, data) {
+ var num = data != null ? parseInt(data, 10) : NaN;
+ switch (filter) {
+ case "first":
+ return 1;
+ case "nth":
+ case "eq":
+ return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0;
+ case "lt":
+ return isFinite(num) ? (num >= 0 ? num : Infinity) : 0;
+ case "gt":
+ return isFinite(num) ? Infinity : 0;
+ default:
+ return Infinity;
+ }
+}
+exports.getLimit = getLimit;
diff --git a/node_modules/cheerio-select/package.json b/node_modules/cheerio-select/package.json
new file mode 100644
index 0000000..a36db8e
--- /dev/null
+++ b/node_modules/cheerio-select/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "cheerio-select",
+ "description": "CSS selector engine supporting jQuery selectors",
+ "version": "1.5.0",
+ "author": "Felix Boehm <me@feedic.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ },
+ "license": "BSD-2-Clause",
+ "sideEffects": false,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cheeriojs/cheerio-select.git"
+ },
+ "directories": {
+ "lib": "lib/"
+ },
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "files": [
+ "lib/**/*"
+ ],
+ "scripts": {
+ "test": "jest --coverage && npm run lint",
+ "coverage": "cat coverage/lcov.info | coveralls",
+ "lint": "npm run lint:es && npm run lint:prettier",
+ "lint:es": "eslint src",
+ "lint:prettier": "npm run format:prettier:raw -- --check",
+ "format": "npm run format:es && npm run format:prettier",
+ "format:es": "npm run lint:es -- --fix",
+ "format:prettier": "npm run format:prettier:raw -- --write",
+ "format:prettier:raw": "prettier '**/*.{ts,md,json,yml}'",
+ "build": "tsc",
+ "prepare": "npm run build"
+ },
+ "dependencies": {
+ "css-select": "^4.1.3",
+ "css-what": "^5.0.1",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0",
+ "domutils": "^2.7.0"
+ },
+ "devDependencies": {
+ "@types/jest": "^26.0.23",
+ "@typescript-eslint/eslint-plugin": "^4.26.0",
+ "@typescript-eslint/parser": "^4.26.0",
+ "coveralls": "^3.1.0",
+ "eslint": "^7.28.0",
+ "eslint-config-prettier": "^8.3.0",
+ "htmlparser2": "^6.1.0",
+ "jest": "^27.0.4",
+ "prettier": "^2.3.1",
+ "ts-jest": "^27.0.3",
+ "typescript": "^4.3.2"
+ },
+ "jest": {
+ "preset": "ts-jest",
+ "testEnvironment": "node"
+ },
+ "prettier": {
+ "tabWidth": 4
+ }
+}