Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

clipper: implement web clipper core library

Abdullah Atta96a3d8edaceb
diff --git a/.commitlintrc.js b/.commitlintrc.js
index 3325baccb..d8fc735c4 100644
--- a/.commitlintrc.js
+++ b/.commitlintrc.js
@@ -20,6 +20,7 @@ const SCOPES = [
"logger",
"theme",
"core",
+ "clipper",
"config",
"ci",
"setup",
diff --git a/packages/clipper/.gitignore b/packages/clipper/.gitignore
new file mode 100644
index 000000000..4c5050983
--- /dev/null
+++ b/packages/clipper/.gitignore
@@ -0,0 +1,6 @@
+node_modules/
+/test-results/
+/playwright-report/
+/playwright/.cache/
+/__tests__/temp
+test.ts
\ No newline at end of file
diff --git a/packages/clipper/__tests__/example.spec.ts b/packages/clipper/__tests__/example.spec.ts
new file mode 100644
index 000000000..fd2f1c094
--- /dev/null
+++ b/packages/clipper/__tests__/example.spec.ts
@@ -0,0 +1,197 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+import { expect, test } from "@playwright/test";
+import { buildSync } from "esbuild";
+import path, { join } from "path";
+import type { Clipper } from "../src";
+import Websites from "./pages.json";
+import slugify from "slugify";
+import { mkdirSync, rmSync, writeFileSync } from "fs";
+
+declare global {
+ interface Window {
+ clipper: Clipper;
+ }
+}
+
+test.setTimeout(0);
+test.use({ bypassCSP: true });
+
+const tempDirPath = join(__dirname, "temp");
+const output = buildSync({
+ bundle: true,
+ entryPoints: [path.join(__dirname, "../src/index.ts")],
+ minify: false,
+ write: false,
+ globalName: "clipper"
+}).outputFiles[0].text;
+
+test.beforeAll(() => {
+ mkdirSync(tempDirPath, { recursive: true });
+});
+
+// test.afterAll(() => {
+// rmSync(tempDirPath, { recursive: true, force: true });
+// });
+
+for (const website of Websites) {
+ const domain = new URL(website.url).hostname;
+ test(`clip ${domain} (${website.title})`, async ({ page }, info) => {
+ info.setTimeout(0);
+
+ await page.goto(website.url);
+
+ await page.addScriptTag({ content: output, type: "text/javascript" });
+
+ await page.waitForLoadState("networkidle");
+
+ // const originalScreenshot = await page.screenshot({
+ // fullPage: true,
+ // type: "jpeg"
+ // });
+
+ // expect(originalScreenshot).toMatchSnapshot({
+ // name: `${slugify(website.title)}.jpg`,
+ // maxDiffPixelRatio: 0.1
+ // });
+
+ const result = await page.evaluate(async () => {
+ const html = await window.clipper.clipPage(window.document, true, false);
+ if (html) {
+ return `\ufeff${html}`;
+ }
+ return null;
+ });
+
+ if (!result) throw new Error("Failed to clip page.");
+
+ const tempFilePath = join(
+ tempDirPath,
+ `${slugify(website.title.toLowerCase())}.html`
+ );
+
+ writeFileSync(join(tempFilePath), result);
+
+ await page.goto(`file://${tempFilePath}`);
+
+ const clippedScreenshot = await page.screenshot({
+ fullPage: true,
+ type: "jpeg"
+ });
+
+ expect(clippedScreenshot).toMatchSnapshot({
+ name: `${slugify(website.title)}.jpg`,
+ maxDiffPixelRatio: 0.1
+ });
+
+ rmSync(tempFilePath, { force: true });
+ });
+}
+
+for (const website of Websites) {
+ const domain = new URL(website.url).hostname;
+ test(`clip as image ${domain} (${website.title})`, async ({ page }, info) => {
+ info.setTimeout(0);
+
+ await page.goto(website.url);
+
+ await page.addScriptTag({ content: output, type: "text/javascript" });
+
+ await page.waitForLoadState("networkidle");
+
+ // const originalScreenshot = await page.screenshot({
+ // fullPage: true,
+ // type: "jpeg"
+ // });
+
+ // expect(originalScreenshot).toMatchSnapshot({
+ // name: `${slugify(website.title)}.jpg`,
+ // maxDiffPixelRatio: 0.1
+ // });
+
+ const result = await page.evaluate(async () => {
+ const data = await window.clipper.clipScreenshot(undefined, "raw");
+ if (data) {
+ return base64ArrayBuffer(await data.arrayBuffer());
+ }
+
+ function base64ArrayBuffer(arrayBuffer) {
+ let base64 = "";
+ const encodings =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+ const bytes = new Uint8Array(arrayBuffer);
+ const byteLength = bytes.byteLength;
+ const byteRemainder = byteLength % 3;
+ const mainLength = byteLength - byteRemainder;
+
+ let a, b, c, d;
+ let chunk;
+
+ // Main loop deals with bytes in chunks of 3
+ for (let i = 0; i < mainLength; i = i + 3) {
+ // Combine the three bytes into a single integer
+ chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
+
+ // Use bitmasks to extract 6-bit segments from the triplet
+ a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18
+ b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12
+ c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6
+ d = chunk & 63; // 63 = 2^6 - 1
+
+ // Convert the raw binary segments to the appropriate ASCII encoding
+ base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];
+ }
+
+ // Deal with the remaining bytes and padding
+ if (byteRemainder == 1) {
+ chunk = bytes[mainLength];
+
+ a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2
+
+ // Set the 4 least significant bits to zero
+ b = (chunk & 3) << 4; // 3 = 2^2 - 1
+
+ base64 += encodings[a] + encodings[b] + "==";
+ } else if (byteRemainder == 2) {
+ chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];
+
+ a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10
+ b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4
+
+ // Set the 2 least significant bits to zero
+ c = (chunk & 15) << 2; // 15 = 2^4 - 1
+
+ base64 += encodings[a] + encodings[b] + encodings[c] + "=";
+ }
+
+ return base64;
+ }
+ return null;
+ });
+
+ if (!result) throw new Error("Failed to clip page.");
+
+ expect(Buffer.from(result, "base64")).toMatchSnapshot({
+ name: `${slugify(website.title)}-image.png`,
+ maxDiffPixelRatio: 0.1
+ });
+ });
+}
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/Apple-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/Apple-chromium-linux.jpg
new file mode 100644
index 000000000..88d3c0144
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/Apple-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/Docgen-Github-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/Docgen-Github-chromium-linux.jpg
new file mode 100644
index 000000000..8da3b7127
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/Docgen-Github-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/House-of-the-Dragon--TV-Series-2022---IMDb-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/House-of-the-Dragon--TV-Series-2022---IMDb-chromium-linux.jpg
new file mode 100644
index 000000000..390f7e83d
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/House-of-the-Dragon--TV-Series-2022---IMDb-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/How-to-set-Linux-environment-variables-with-Ansible-Stack-Overflow-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/How-to-set-Linux-environment-variables-with-Ansible-Stack-Overflow-chromium-linux.jpg
new file mode 100644
index 000000000..491bdb8af
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/How-to-set-Linux-environment-variables-with-Ansible-Stack-Overflow-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/IMDb--Ratings-Reviews-and-Where-to-Watch-the-Best-Movies-and-TV-Shows-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/IMDb--Ratings-Reviews-and-Where-to-Watch-the-Best-Movies-and-TV-Shows-chromium-linux.jpg
new file mode 100644
index 000000000..6c1e83f9e
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/IMDb--Ratings-Reviews-and-Where-to-Watch-the-Best-Movies-and-TV-Shows-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/My-Ad-Center-helps-you-control-the-ads-you-see-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/My-Ad-Center-helps-you-control-the-ads-you-see-chromium-linux.jpg
new file mode 100644
index 000000000..9c4dc220e
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/My-Ad-Center-helps-you-control-the-ads-you-see-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-chromium-linux.jpg b/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-chromium-linux.jpg
new file mode 100644
index 000000000..9b5862484
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-chromium-linux.jpg differ
diff --git a/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-image-chromium-linux.png b/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-image-chromium-linux.png
new file mode 100644
index 000000000..87c8dcac4
Binary files /dev/null and b/packages/clipper/__tests__/example.spec.ts-snapshots/Playwright-Docs-image-chromium-linux.png differ
diff --git a/packages/clipper/__tests__/pages.json b/packages/clipper/__tests__/pages.json
new file mode 100644
index 000000000..958529a64
--- /dev/null
+++ b/packages/clipper/__tests__/pages.json
@@ -0,0 +1,24 @@
+[
+ {
+ "title": "My Ad Center helps you control the ads you see",
+ "url": "https://blog.google/technology/safety-security/my-ad-center/"
+ },
+ {
+ "title": "How to set Linux environment variables with Ansible - Stack Overflow",
+ "url": "https://stackoverflow.com/questions/27733511/how-to-set-linux-environment-variables-with-ansible"
+ },
+ {
+ "title": "IMDb: Ratings, Reviews, and Where to Watch the Best Movies & TV Shows",
+ "url": "https://www.imdb.com/"
+ },
+ {
+ "title": "House of the Dragon (TV Series 2022– ) - IMDb",
+ "url": "https://www.imdb.com/title/tt11198330/?ref_=hm_fanfav_tt_i_2_pd_fp1"
+ },
+ { "title": "Apple", "url": "https://www.apple.com/" },
+ { "title": "Docgen — Github", "url": "https://github.com/thecodrr/docgen" },
+ {
+ "title": "Playwright Docs",
+ "url": "https://playwright.dev/docs/api/class-testoptions"
+ }
+]
diff --git a/packages/clipper/package-lock.json b/packages/clipper/package-lock.json
new file mode 100644
index 000000000..893ca9634
--- /dev/null
+++ b/packages/clipper/package-lock.json
@@ -0,0 +1,3284 @@
+{
+ "name": "@notesnook/clipper",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@notesnook/clipper",
+ "version": "1.0.0",
+ "license": "GPL-3.0-or-later",
+ "dependencies": {
+ "@mozilla/readability": "^0.4.2",
+ "boreas": "^1.0.1",
+ "css": "^3.0.0",
+ "css-expression": "^0.0.8",
+ "css-tree": "^2.2.1",
+ "css-what": "^6.1.0",
+ "dompurify": "^2.4.0",
+ "hyperapp": "^2.0.22",
+ "jest-environment-jsdom": "^29.0.3",
+ "postcss-value-parser": "^4.2.0",
+ "shady-css-parser": "^0.1.0",
+ "slugify": "^1.6.5",
+ "specificity": "^0.4.1",
+ "stylis": "^4.1.2"
+ },
+ "devDependencies": {
+ "@playwright/test": "^1.27.1",
+ "@types/css": "^0.0.33",
+ "@types/css-tree": "^1.0.7",
+ "@types/dompurify": "^2.3.4",
+ "@types/stylis": "^4.0.2",
+ "esbuild": "^0.15.9",
+ "ts-node": "^10.9.1",
+ "typescript": "^4.8.2"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+ "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
+ "dependencies": {
+ "@babel/highlight": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.19.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
+ "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
+ },
+ "node_modules/@babel/highlight/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
+ "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
+ "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@jest/environment": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz",
+ "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==",
+ "dependencies": {
+ "@jest/fake-timers": "^29.0.3",
+ "@jest/types": "^29.0.3",
+ "@types/node": "*",
+ "jest-mock": "^29.0.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/fake-timers": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz",
+ "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==",
+ "dependencies": {
+ "@jest/types": "^29.0.3",
+ "@sinonjs/fake-timers": "^9.1.2",
+ "@types/node": "*",
+ "jest-message-util": "^29.0.3",
+ "jest-mock": "^29.0.3",
+ "jest-util": "^29.0.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/schemas": {
+ "version": "29.0.0",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz",
+ "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==",
+ "dependencies": {
+ "@sinclair/typebox": "^0.24.1"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jest/types": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz",
+ "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==",
+ "dependencies": {
+ "@jest/schemas": "^29.0.0",
+ "@types/istanbul-lib-coverage": "^2.0.0",
+ "@types/istanbul-reports": "^3.0.0",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.8",
+ "chalk": "^4.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@mozilla/readability": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/@mozilla/readability/-/readability-0.4.2.tgz",
+ "integrity": "sha512-48MJXzi4Dhy2fJ3lGjmwdEJKoMmn3oiYew9n/1OW6cZy78hAzRIyDJDBCGrg4PBFDyY4xos+H4LCFn5QVRDcfw==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/@playwright/test": {
+ "version": "1.27.1",
+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.1.tgz",
+ "integrity": "sha512-mrL2q0an/7tVqniQQF6RBL2saskjljXzqNcCOVMUjRIgE6Y38nCNaP+Dc2FBW06bcpD3tqIws/HT9qiMHbNU0A==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "playwright-core": "1.27.1"
+ },
+ "bin": {
+ "playwright": "cli.js"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@sinclair/typebox": {
+ "version": "0.24.43",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz",
+ "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw=="
+ },
+ "node_modules/@sinonjs/commons": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
+ "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
+ "dependencies": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "node_modules/@sinonjs/fake-timers": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz",
+ "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==",
+ "dependencies": {
+ "@sinonjs/commons": "^1.7.0"
+ }
+ },
+ "node_modules/@tootallnate/once": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
+ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
+ "dev": true
+ },
+ "node_modules/@types/css": {
+ "version": "0.0.33",
+ "resolved": "https://registry.npmjs.org/@types/css/-/css-0.0.33.tgz",
+ "integrity": "sha512-qjeDgh86R0LIeEM588q65yatc8Yyo/VvSIYFqq8JOIHDolhGNX0rz7k/OuxqDpnpqlefoHj8X4Ai/6hT9IWtKQ==",
+ "dev": true
+ },
+ "node_modules/@types/css-tree": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@types/css-tree/-/css-tree-1.0.7.tgz",
+ "integrity": "sha512-Pz+DfVODpQTAV6PwPBK6kzyy7+f6EyPbr1+mYkc1YolJfl2NAJ4wbg0TC/AJPBsqn9jWfyiO19A/sgpvFLfqnw==",
+ "dev": true
+ },
+ "node_modules/@types/dompurify": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-2.3.4.tgz",
+ "integrity": "sha512-EXzDatIb5EspL2eb/xPGmaC8pePcTHrkDCONjeisusLFrVfl38Pjea/R0YJGu3k9ZQadSvMqW0WXPI2hEo2Ajg==",
+ "dev": true,
+ "dependencies": {
+ "@types/trusted-types": "*"
+ }
+ },
+ "node_modules/@types/istanbul-lib-coverage": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
+ "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g=="
+ },
+ "node_modules/@types/istanbul-lib-report": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+ "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
+ "dependencies": {
+ "@types/istanbul-lib-coverage": "*"
+ }
+ },
+ "node_modules/@types/istanbul-reports": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz",
+ "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==",
+ "dependencies": {
+ "@types/istanbul-lib-report": "*"
+ }
+ },
+ "node_modules/@types/jsdom": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz",
+ "integrity": "sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==",
+ "dependencies": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "18.7.21",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.21.tgz",
+ "integrity": "sha512-rLFzK5bhM0YPyCoTC8bolBjMk7bwnZ8qeZUBslBfjZQou2ssJdWslx9CZ8DGM+Dx7QXQiiTVZ/6QO6kwtHkZCA=="
+ },
+ "node_modules/@types/stack-utils": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
+ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="
+ },
+ "node_modules/@types/stylis": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.0.2.tgz",
+ "integrity": "sha512-wtckGuk1eXUlUz0Qb1eXHG37Z7HWT2GfMdqRf8F/ifddTwadSS9Jwsqi4qtXk7cP7MtoyGVIHPElFCLc6HItbg==",
+ "dev": true
+ },
+ "node_modules/@types/tough-cookie": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
+ "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw=="
+ },
+ "node_modules/@types/trusted-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
+ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==",
+ "dev": true
+ },
+ "node_modules/@types/yargs": {
+ "version": "17.0.13",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz",
+ "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==",
+ "dependencies": {
+ "@types/yargs-parser": "*"
+ }
+ },
+ "node_modules/@types/yargs-parser": {
+ "version": "21.0.0",
+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz",
+ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA=="
+ },
+ "node_modules/abab": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
+ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="
+ },
+ "node_modules/acorn": {
+ "version": "8.8.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
+ "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-globals": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz",
+ "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
+ "dependencies": {
+ "acorn": "^7.1.1",
+ "acorn-walk": "^7.1.1"
+ }
+ },
+ "node_modules/acorn-globals/node_modules/acorn": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
+ "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "node_modules/atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+ "bin": {
+ "atob": "bin/atob.js"
+ },
+ "engines": {
+ "node": ">= 4.5.0"
+ }
+ },
+ "node_modules/boreas": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/boreas/-/boreas-1.0.1.tgz",
+ "integrity": "sha512-4gwEdtD4BGZKdmXNVlW18ej/618YilIVQSCvwTngMhVoa/WsVmMXbIWB3UKuwmvUhd/AgL89OG6e/GnteZETAA=="
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browser-process-hrtime": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
+ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/ci-info": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz",
+ "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug=="
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true
+ },
+ "node_modules/css": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
+ "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "source-map": "^0.6.1",
+ "source-map-resolve": "^0.6.0"
+ }
+ },
+ "node_modules/css-expression": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/css-expression/-/css-expression-0.0.8.tgz",
+ "integrity": "sha512-LxpsxtSsnFzf0vcbQZEc1otQnDIOQowQUilIczPVjVF/D73fRswlb6NCS/AX2Jp0QVDa0Dp+EGJzvj+GA92Klg==",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
+ "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==",
+ "dependencies": {
+ "mdn-data": "2.0.28",
+ "source-map-js": "^1.0.1"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/css-what": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
+ "engines": {
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/cssom": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz",
+ "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw=="
+ },
+ "node_modules/cssstyle": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
+ "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
+ "dependencies": {
+ "cssom": "~0.3.6"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cssstyle/node_modules/cssom": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
+ },
+ "node_modules/data-urls": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",
+ "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==",
+ "dependencies": {
+ "abab": "^2.0.6",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/data-urls/node_modules/tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "dependencies": {
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/data-urls/node_modules/whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "dependencies": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decimal.js": {
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.1.tgz",
+ "integrity": "sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw=="
+ },
+ "node_modules/decode-uri-component": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+ "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/domexception": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",
+ "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
+ "dependencies": {
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/dompurify": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
+ "integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA=="
+ },
+ "node_modules/entities": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
+ "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
+ "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.15.9",
+ "@esbuild/linux-loong64": "0.15.9",
+ "esbuild-android-64": "0.15.9",
+ "esbuild-android-arm64": "0.15.9",
+ "esbuild-darwin-64": "0.15.9",
+ "esbuild-darwin-arm64": "0.15.9",
+ "esbuild-freebsd-64": "0.15.9",
+ "esbuild-freebsd-arm64": "0.15.9",
+ "esbuild-linux-32": "0.15.9",
+ "esbuild-linux-64": "0.15.9",
+ "esbuild-linux-arm": "0.15.9",
+ "esbuild-linux-arm64": "0.15.9",
+ "esbuild-linux-mips64le": "0.15.9",
+ "esbuild-linux-ppc64le": "0.15.9",
+ "esbuild-linux-riscv64": "0.15.9",
+ "esbuild-linux-s390x": "0.15.9",
+ "esbuild-netbsd-64": "0.15.9",
+ "esbuild-openbsd-64": "0.15.9",
+ "esbuild-sunos-64": "0.15.9",
+ "esbuild-windows-32": "0.15.9",
+ "esbuild-windows-64": "0.15.9",
+ "esbuild-windows-arm64": "0.15.9"
+ }
+ },
+ "node_modules/esbuild-android-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
+ "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-android-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
+ "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-darwin-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
+ "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-darwin-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
+ "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-freebsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
+ "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-freebsd-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
+ "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-32": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
+ "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
+ "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
+ "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
+ "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-mips64le": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
+ "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-ppc64le": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
+ "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-riscv64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
+ "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-linux-s390x": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
+ "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-netbsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
+ "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-openbsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
+ "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-sunos-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
+ "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-32": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
+ "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
+ "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/esbuild-windows-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
+ "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/escodegen": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
+ "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
+ "dependencies": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2",
+ "optionator": "^0.8.1"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.6.1"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/html-encoding-sniffer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
+ "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
+ "dependencies": {
+ "whatwg-encoding": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/http-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
+ "dependencies": {
+ "@tootallnate/once": "2",
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "dependencies": {
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/hyperapp": {
+ "version": "2.0.22",
+ "resolved": "https://registry.npmjs.org/hyperapp/-/hyperapp-2.0.22.tgz",
+ "integrity": "sha512-3uf9HjnjrhbfykowFNEObZewBEo4DXJIM+9FnGkiR9E4H2eh2f921SzMCMS69X5nN3A7KFfmZc9KCKh/7TQBFA=="
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-potential-custom-element-name": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
+ },
+ "node_modules/jest-environment-jsdom": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz",
+ "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==",
+ "dependencies": {
+ "@jest/environment": "^29.0.3",
+ "@jest/fake-timers": "^29.0.3",
+ "@jest/types": "^29.0.3",
+ "@types/jsdom": "^20.0.0",
+ "@types/node": "*",
+ "jest-mock": "^29.0.3",
+ "jest-util": "^29.0.3",
+ "jsdom": "^20.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-message-util": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz",
+ "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==",
+ "dependencies": {
+ "@babel/code-frame": "^7.12.13",
+ "@jest/types": "^29.0.3",
+ "@types/stack-utils": "^2.0.0",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.9",
+ "micromatch": "^4.0.4",
+ "pretty-format": "^29.0.3",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-mock": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz",
+ "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==",
+ "dependencies": {
+ "@jest/types": "^29.0.3",
+ "@types/node": "*"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/jest-util": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz",
+ "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==",
+ "dependencies": {
+ "@jest/types": "^29.0.3",
+ "@types/node": "*",
+ "chalk": "^4.0.0",
+ "ci-info": "^3.2.0",
+ "graceful-fs": "^4.2.9",
+ "picomatch": "^2.2.3"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
+ "node_modules/jsdom": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz",
+ "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==",
+ "dependencies": {
+ "abab": "^2.0.6",
+ "acorn": "^8.7.1",
+ "acorn-globals": "^6.0.0",
+ "cssom": "^0.5.0",
+ "cssstyle": "^2.3.0",
+ "data-urls": "^3.0.2",
+ "decimal.js": "^10.3.1",
+ "domexception": "^4.0.0",
+ "escodegen": "^2.0.0",
+ "form-data": "^4.0.0",
+ "html-encoding-sniffer": "^3.0.0",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.1",
+ "is-potential-custom-element-name": "^1.0.1",
+ "nwsapi": "^2.2.0",
+ "parse5": "^7.0.0",
+ "saxes": "^6.0.0",
+ "symbol-tree": "^3.2.4",
+ "tough-cookie": "^4.0.0",
+ "w3c-hr-time": "^1.0.2",
+ "w3c-xmlserializer": "^3.0.0",
+ "webidl-conversions": "^7.0.0",
+ "whatwg-encoding": "^2.0.0",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0",
+ "ws": "^8.8.0",
+ "xml-name-validator": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "canvas": "^2.5.0"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/jsdom/node_modules/form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/jsdom/node_modules/tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "dependencies": {
+ "punycode": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/jsdom/node_modules/whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "dependencies": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
+ "dependencies": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
+ "node_modules/mdn-data": {
+ "version": "2.0.28",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz",
+ "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "node_modules/nwsapi": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz",
+ "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw=="
+ },
+ "node_modules/optionator": {
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "dependencies": {
+ "deep-is": "~0.1.3",
+ "fast-levenshtein": "~2.0.6",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "word-wrap": "~1.2.3"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/parse5": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz",
+ "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==",
+ "dependencies": {
+ "entities": "^4.4.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/playwright-core": {
+ "version": "1.27.1",
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz",
+ "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==",
+ "dev": true,
+ "bin": {
+ "playwright": "cli.js"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/pretty-format": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz",
+ "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==",
+ "dependencies": {
+ "@jest/schemas": "^29.0.0",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ }
+ },
+ "node_modules/pretty-format/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/psl": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
+ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
+ },
+ "node_modules/punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/querystringify": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
+ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
+ },
+ "node_modules/react-is": {
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
+ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w=="
+ },
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "node_modules/saxes": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
+ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
+ "dependencies": {
+ "xmlchars": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=v12.22.7"
+ }
+ },
+ "node_modules/shady-css-parser": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/shady-css-parser/-/shady-css-parser-0.1.0.tgz",
+ "integrity": "sha512-irfJUUkEuDlNHKZNAp2r7zOyMlmbfVJ+kWSfjlCYYUx/7dJnANLCyTzQZsuxy5NJkvtNwSxY5Gj8MOlqXUQPyA=="
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/slugify": {
+ "version": "1.6.5",
+ "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.5.tgz",
+ "integrity": "sha512-8mo9bslnBO3tr5PEVFzMPIWwWnipGS0xVbYf65zxDqfNwmzYn1LpiKNrR6DlClusuvo+hDHd1zKpmfAe83NQSQ==",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-resolve": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
+ "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
+ "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated",
+ "dependencies": {
+ "atob": "^2.1.2",
+ "decode-uri-component": "^0.2.0"
+ }
+ },
+ "node_modules/specificity": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz",
+ "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==",
+ "bin": {
+ "specificity": "bin/specificity"
+ }
+ },
+ "node_modules/stack-utils": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz",
+ "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==",
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/stylis": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.2.tgz",
+ "integrity": "sha512-Nn2CCrG2ZaFziDxaZPN43CXqn+j7tcdjPFCkRBkFue8QYXC2HdEwnw5TCBo4yQZ2WxKYeSi0fdoOrtEqgDrXbA=="
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/symbol-tree": {
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/tough-cookie": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz",
+ "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==",
+ "dependencies": {
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.2.0",
+ "url-parse": "^1.5.3"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
+ "dev": true,
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node/node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/type-check": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
+ "dependencies": {
+ "prelude-ls": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
+ "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
+ "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/url-parse": {
+ "version": "1.5.10",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+ "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
+ "dependencies": {
+ "querystringify": "^2.1.1",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true
+ },
+ "node_modules/w3c-hr-time": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
+ "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
+ "dependencies": {
+ "browser-process-hrtime": "^1.0.0"
+ }
+ },
+ "node_modules/w3c-xmlserializer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz",
+ "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==",
+ "dependencies": {
+ "xml-name-validator": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-encoding": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
+ "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
+ "dependencies": {
+ "iconv-lite": "0.6.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-mimetype": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
+ "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
+ "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xml-name-validator": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
+ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/xmlchars": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
+ },
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ }
+ },
+ "dependencies": {
+ "@babel/code-frame": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+ "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
+ "requires": {
+ "@babel/highlight": "^7.18.6"
+ }
+ },
+ "@babel/helper-validator-identifier": {
+ "version": "7.19.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
+ "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w=="
+ },
+ "@babel/highlight": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+ "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.18.6",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ }
+ },
+ "@esbuild/android-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
+ "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
+ "dev": true,
+ "optional": true
+ },
+ "@esbuild/linux-loong64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
+ "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
+ "dev": true,
+ "optional": true
+ },
+ "@jest/environment": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz",
+ "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==",
+ "requires": {
+ "@jest/fake-timers": "^29.0.3",
+ "@jest/types": "^29.0.3",
+ "@types/node": "*",
+ "jest-mock": "^29.0.3"
+ }
+ },
+ "@jest/fake-timers": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz",
+ "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==",
+ "requires": {
+ "@jest/types": "^29.0.3",
+ "@sinonjs/fake-timers": "^9.1.2",
+ "@types/node": "*",
+ "jest-message-util": "^29.0.3",
+ "jest-mock": "^29.0.3",
+ "jest-util": "^29.0.3"
+ }
+ },
+ "@jest/schemas": {
+ "version": "29.0.0",
+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz",
+ "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==",
+ "requires": {
+ "@sinclair/typebox": "^0.24.1"
+ }
+ },
+ "@jest/types": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz",
+ "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==",
+ "requires": {
+ "@jest/schemas": "^29.0.0",
+ "@types/istanbul-lib-coverage": "^2.0.0",
+ "@types/istanbul-reports": "^3.0.0",
+ "@types/node": "*",
+ "@types/yargs": "^17.0.8",
+ "chalk": "^4.0.0"
+ }
+ },
+ "@jridgewell/resolve-uri": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
+ "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+ "dev": true
+ },
+ "@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "@mozilla/readability": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/@mozilla/readability/-/readability-0.4.2.tgz",
+ "integrity": "sha512-48MJXzi4Dhy2fJ3lGjmwdEJKoMmn3oiYew9n/1OW6cZy78hAzRIyDJDBCGrg4PBFDyY4xos+H4LCFn5QVRDcfw=="
+ },
+ "@playwright/test": {
+ "version": "1.27.1",
+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.1.tgz",
+ "integrity": "sha512-mrL2q0an/7tVqniQQF6RBL2saskjljXzqNcCOVMUjRIgE6Y38nCNaP+Dc2FBW06bcpD3tqIws/HT9qiMHbNU0A==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "playwright-core": "1.27.1"
+ }
+ },
+ "@sinclair/typebox": {
+ "version": "0.24.43",
+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.43.tgz",
+ "integrity": "sha512-1orQTvtazZmsPeBroJjysvsOQCYV2yjWlebkSY38pl5vr2tdLjEJ+LoxITlGNZaH2RE19WlAwQMkH/7C14wLfw=="
+ },
+ "@sinonjs/commons": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
+ "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
+ "requires": {
+ "type-detect": "4.0.8"
+ }
+ },
+ "@sinonjs/fake-timers": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz",
+ "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==",
+ "requires": {
+ "@sinonjs/commons": "^1.7.0"
+ }
+ },
+ "@tootallnate/once": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A=="
+ },
+ "@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true
+ },
+ "@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true
+ },
+ "@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true
+ },
+ "@tsconfig/node16": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
+ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
+ "dev": true
+ },
+ "@types/css": {
+ "version": "0.0.33",
+ "resolved": "https://registry.npmjs.org/@types/css/-/css-0.0.33.tgz",
+ "integrity": "sha512-qjeDgh86R0LIeEM588q65yatc8Yyo/VvSIYFqq8JOIHDolhGNX0rz7k/OuxqDpnpqlefoHj8X4Ai/6hT9IWtKQ==",
+ "dev": true
+ },
+ "@types/css-tree": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/@types/css-tree/-/css-tree-1.0.7.tgz",
+ "integrity": "sha512-Pz+DfVODpQTAV6PwPBK6kzyy7+f6EyPbr1+mYkc1YolJfl2NAJ4wbg0TC/AJPBsqn9jWfyiO19A/sgpvFLfqnw==",
+ "dev": true
+ },
+ "@types/dompurify": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-2.3.4.tgz",
+ "integrity": "sha512-EXzDatIb5EspL2eb/xPGmaC8pePcTHrkDCONjeisusLFrVfl38Pjea/R0YJGu3k9ZQadSvMqW0WXPI2hEo2Ajg==",
+ "dev": true,
+ "requires": {
+ "@types/trusted-types": "*"
+ }
+ },
+ "@types/istanbul-lib-coverage": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
+ "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g=="
+ },
+ "@types/istanbul-lib-report": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+ "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
+ "requires": {
+ "@types/istanbul-lib-coverage": "*"
+ }
+ },
+ "@types/istanbul-reports": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz",
+ "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==",
+ "requires": {
+ "@types/istanbul-lib-report": "*"
+ }
+ },
+ "@types/jsdom": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz",
+ "integrity": "sha512-YfAchFs0yM1QPDrLm2VHe+WHGtqms3NXnXAMolrgrVP6fgBHHXy1ozAbo/dFtPNtZC/m66bPiCTWYmqp1F14gA==",
+ "requires": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "@types/node": {
+ "version": "18.7.21",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.21.tgz",
+ "integrity": "sha512-rLFzK5bhM0YPyCoTC8bolBjMk7bwnZ8qeZUBslBfjZQou2ssJdWslx9CZ8DGM+Dx7QXQiiTVZ/6QO6kwtHkZCA=="
+ },
+ "@types/stack-utils": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
+ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="
+ },
+ "@types/stylis": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.0.2.tgz",
+ "integrity": "sha512-wtckGuk1eXUlUz0Qb1eXHG37Z7HWT2GfMdqRf8F/ifddTwadSS9Jwsqi4qtXk7cP7MtoyGVIHPElFCLc6HItbg==",
+ "dev": true
+ },
+ "@types/tough-cookie": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
+ "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw=="
+ },
+ "@types/trusted-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
+ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==",
+ "dev": true
+ },
+ "@types/yargs": {
+ "version": "17.0.13",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz",
+ "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==",
+ "requires": {
+ "@types/yargs-parser": "*"
+ }
+ },
+ "@types/yargs-parser": {
+ "version": "21.0.0",
+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz",
+ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA=="
+ },
+ "abab": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
+ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="
+ },
+ "acorn": {
+ "version": "8.8.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
+ "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w=="
+ },
+ "acorn-globals": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz",
+ "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
+ "requires": {
+ "acorn": "^7.1.1",
+ "acorn-walk": "^7.1.1"
+ },
+ "dependencies": {
+ "acorn": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A=="
+ }
+ }
+ },
+ "acorn-walk": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
+ "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA=="
+ },
+ "agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "requires": {
+ "debug": "4"
+ }
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
+ },
+ "atob": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
+ },
+ "boreas": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/boreas/-/boreas-1.0.1.tgz",
+ "integrity": "sha512-4gwEdtD4BGZKdmXNVlW18ej/618YilIVQSCvwTngMhVoa/WsVmMXbIWB3UKuwmvUhd/AgL89OG6e/GnteZETAA=="
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "browser-process-hrtime": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
+ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "ci-info": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.4.0.tgz",
+ "integrity": "sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug=="
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true
+ },
+ "css": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
+ "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
+ "requires": {
+ "inherits": "^2.0.4",
+ "source-map": "^0.6.1",
+ "source-map-resolve": "^0.6.0"
+ }
+ },
+ "css-expression": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/css-expression/-/css-expression-0.0.8.tgz",
+ "integrity": "sha512-LxpsxtSsnFzf0vcbQZEc1otQnDIOQowQUilIczPVjVF/D73fRswlb6NCS/AX2Jp0QVDa0Dp+EGJzvj+GA92Klg=="
+ },
+ "css-tree": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
+ "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==",
+ "requires": {
+ "mdn-data": "2.0.28",
+ "source-map-js": "^1.0.1"
+ }
+ },
+ "css-what": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw=="
+ },
+ "cssom": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz",
+ "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw=="
+ },
+ "cssstyle": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
+ "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
+ "requires": {
+ "cssom": "~0.3.6"
+ },
+ "dependencies": {
+ "cssom": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
+ }
+ }
+ },
+ "data-urls": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",
+ "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==",
+ "requires": {
+ "abab": "^2.0.6",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0"
+ },
+ "dependencies": {
+ "tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "requires": {
+ "punycode": "^2.1.1"
+ }
+ },
+ "whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "requires": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ }
+ }
+ }
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "decimal.js": {
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.1.tgz",
+ "integrity": "sha512-F29o+vci4DodHYT9UrR5IEbfBw9pE5eSapIJdTqXK5+6hq+t8VRxwQyKlW2i+KDKFkkJQRvFyI/QXD83h8LyQw=="
+ },
+ "decode-uri-component": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+ "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og=="
+ },
+ "deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
+ },
+ "diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true
+ },
+ "domexception": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",
+ "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
+ "requires": {
+ "webidl-conversions": "^7.0.0"
+ }
+ },
+ "dompurify": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.0.tgz",
+ "integrity": "sha512-Be9tbQMZds4a3C6xTmz68NlMfeONA//4dOavl/1rNw50E+/QO0KVpbcU0PcaW0nsQxurXls9ZocqFxk8R2mWEA=="
+ },
+ "entities": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
+ "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA=="
+ },
+ "esbuild": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
+ "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
+ "dev": true,
+ "requires": {
+ "@esbuild/android-arm": "0.15.9",
+ "@esbuild/linux-loong64": "0.15.9",
+ "esbuild-android-64": "0.15.9",
+ "esbuild-android-arm64": "0.15.9",
+ "esbuild-darwin-64": "0.15.9",
+ "esbuild-darwin-arm64": "0.15.9",
+ "esbuild-freebsd-64": "0.15.9",
+ "esbuild-freebsd-arm64": "0.15.9",
+ "esbuild-linux-32": "0.15.9",
+ "esbuild-linux-64": "0.15.9",
+ "esbuild-linux-arm": "0.15.9",
+ "esbuild-linux-arm64": "0.15.9",
+ "esbuild-linux-mips64le": "0.15.9",
+ "esbuild-linux-ppc64le": "0.15.9",
+ "esbuild-linux-riscv64": "0.15.9",
+ "esbuild-linux-s390x": "0.15.9",
+ "esbuild-netbsd-64": "0.15.9",
+ "esbuild-openbsd-64": "0.15.9",
+ "esbuild-sunos-64": "0.15.9",
+ "esbuild-windows-32": "0.15.9",
+ "esbuild-windows-64": "0.15.9",
+ "esbuild-windows-arm64": "0.15.9"
+ }
+ },
+ "esbuild-android-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
+ "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-android-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
+ "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
+ "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
+ "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
+ "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
+ "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-32": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
+ "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
+ "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
+ "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
+ "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-mips64le": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
+ "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-ppc64le": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
+ "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-riscv64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
+ "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-s390x": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
+ "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-netbsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
+ "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-openbsd-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
+ "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-sunos-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
+ "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-32": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
+ "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
+ "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-arm64": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
+ "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
+ "dev": true,
+ "optional": true
+ },
+ "escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
+ },
+ "escodegen": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
+ "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
+ "requires": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2",
+ "optionator": "^0.8.1",
+ "source-map": "~0.6.1"
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
+ },
+ "estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
+ },
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "html-encoding-sniffer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
+ "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
+ "requires": {
+ "whatwg-encoding": "^2.0.0"
+ }
+ },
+ "http-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
+ "requires": {
+ "@tootallnate/once": "2",
+ "agent-base": "6",
+ "debug": "4"
+ }
+ },
+ "https-proxy-agent": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "requires": {
+ "agent-base": "6",
+ "debug": "4"
+ }
+ },
+ "hyperapp": {
+ "version": "2.0.22",
+ "resolved": "https://registry.npmjs.org/hyperapp/-/hyperapp-2.0.22.tgz",
+ "integrity": "sha512-3uf9HjnjrhbfykowFNEObZewBEo4DXJIM+9FnGkiR9E4H2eh2f921SzMCMS69X5nN3A7KFfmZc9KCKh/7TQBFA=="
+ },
+ "iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
+ },
+ "is-potential-custom-element-name": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
+ },
+ "jest-environment-jsdom": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.0.3.tgz",
+ "integrity": "sha512-KIGvpm12c71hoYTjL4wC2c8K6KfhOHJqJtaHc1IApu5rG047YWZoEP13BlbucWfzGISBrmli8KFqdhdQEa8Wnw==",
+ "requires": {
+ "@jest/environment": "^29.0.3",
+ "@jest/fake-timers": "^29.0.3",
+ "@jest/types": "^29.0.3",
+ "@types/jsdom": "^20.0.0",
+ "@types/node": "*",
+ "jest-mock": "^29.0.3",
+ "jest-util": "^29.0.3",
+ "jsdom": "^20.0.0"
+ }
+ },
+ "jest-message-util": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz",
+ "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==",
+ "requires": {
+ "@babel/code-frame": "^7.12.13",
+ "@jest/types": "^29.0.3",
+ "@types/stack-utils": "^2.0.0",
+ "chalk": "^4.0.0",
+ "graceful-fs": "^4.2.9",
+ "micromatch": "^4.0.4",
+ "pretty-format": "^29.0.3",
+ "slash": "^3.0.0",
+ "stack-utils": "^2.0.3"
+ }
+ },
+ "jest-mock": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz",
+ "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==",
+ "requires": {
+ "@jest/types": "^29.0.3",
+ "@types/node": "*"
+ }
+ },
+ "jest-util": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz",
+ "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==",
+ "requires": {
+ "@jest/types": "^29.0.3",
+ "@types/node": "*",
+ "chalk": "^4.0.0",
+ "ci-info": "^3.2.0",
+ "graceful-fs": "^4.2.9",
+ "picomatch": "^2.2.3"
+ }
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
+ "jsdom": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.0.tgz",
+ "integrity": "sha512-x4a6CKCgx00uCmP+QakBDFXwjAJ69IkkIWHmtmjd3wvXPcdOS44hfX2vqkOQrVrq8l9DhNNADZRXaCEWvgXtVA==",
+ "requires": {
+ "abab": "^2.0.6",
+ "acorn": "^8.7.1",
+ "acorn-globals": "^6.0.0",
+ "cssom": "^0.5.0",
+ "cssstyle": "^2.3.0",
+ "data-urls": "^3.0.2",
+ "decimal.js": "^10.3.1",
+ "domexception": "^4.0.0",
+ "escodegen": "^2.0.0",
+ "form-data": "^4.0.0",
+ "html-encoding-sniffer": "^3.0.0",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.1",
+ "is-potential-custom-element-name": "^1.0.1",
+ "nwsapi": "^2.2.0",
+ "parse5": "^7.0.0",
+ "saxes": "^6.0.0",
+ "symbol-tree": "^3.2.4",
+ "tough-cookie": "^4.0.0",
+ "w3c-hr-time": "^1.0.2",
+ "w3c-xmlserializer": "^3.0.0",
+ "webidl-conversions": "^7.0.0",
+ "whatwg-encoding": "^2.0.0",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0",
+ "ws": "^8.8.0",
+ "xml-name-validator": "^4.0.0"
+ },
+ "dependencies": {
+ "form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
+ "requires": {
+ "punycode": "^2.1.1"
+ }
+ },
+ "whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "requires": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ }
+ }
+ }
+ },
+ "levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
+ "requires": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ }
+ },
+ "make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
+ "mdn-data": {
+ "version": "2.0.28",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz",
+ "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g=="
+ },
+ "micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "requires": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ }
+ },
+ "mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
+ },
+ "mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "requires": {
+ "mime-db": "1.52.0"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
+ "nwsapi": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.2.tgz",
+ "integrity": "sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw=="
+ },
+ "optionator": {
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "requires": {
+ "deep-is": "~0.1.3",
+ "fast-levenshtein": "~2.0.6",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "word-wrap": "~1.2.3"
+ }
+ },
+ "parse5": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.1.tgz",
+ "integrity": "sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==",
+ "requires": {
+ "entities": "^4.4.0"
+ }
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
+ },
+ "playwright-core": {
+ "version": "1.27.1",
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz",
+ "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==",
+ "dev": true
+ },
+ "postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
+ },
+ "prelude-ls": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w=="
+ },
+ "pretty-format": {
+ "version": "29.0.3",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz",
+ "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==",
+ "requires": {
+ "@jest/schemas": "^29.0.0",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^18.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="
+ }
+ }
+ },
+ "psl": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
+ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
+ },
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
+ },
+ "querystringify": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
+ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
+ },
+ "react-is": {
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
+ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w=="
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
+ },
+ "saxes": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
+ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
+ "requires": {
+ "xmlchars": "^2.2.0"
+ }
+ },
+ "shady-css-parser": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/shady-css-parser/-/shady-css-parser-0.1.0.tgz",
+ "integrity": "sha512-irfJUUkEuDlNHKZNAp2r7zOyMlmbfVJ+kWSfjlCYYUx/7dJnANLCyTzQZsuxy5NJkvtNwSxY5Gj8MOlqXUQPyA=="
+ },
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="
+ },
+ "slugify": {
+ "version": "1.6.5",
+ "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.5.tgz",
+ "integrity": "sha512-8mo9bslnBO3tr5PEVFzMPIWwWnipGS0xVbYf65zxDqfNwmzYn1LpiKNrR6DlClusuvo+hDHd1zKpmfAe83NQSQ=="
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ },
+ "source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
+ },
+ "source-map-resolve": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
+ "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
+ "requires": {
+ "atob": "^2.1.2",
+ "decode-uri-component": "^0.2.0"
+ }
+ },
+ "specificity": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz",
+ "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg=="
+ },
+ "stack-utils": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz",
+ "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==",
+ "requires": {
+ "escape-string-regexp": "^2.0.0"
+ }
+ },
+ "stylis": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.2.tgz",
+ "integrity": "sha512-Nn2CCrG2ZaFziDxaZPN43CXqn+j7tcdjPFCkRBkFue8QYXC2HdEwnw5TCBo4yQZ2WxKYeSi0fdoOrtEqgDrXbA=="
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "symbol-tree": {
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "tough-cookie": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.2.tgz",
+ "integrity": "sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==",
+ "requires": {
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.2.0",
+ "url-parse": "^1.5.3"
+ }
+ },
+ "ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
+ "dev": true,
+ "requires": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "dependencies": {
+ "acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true
+ }
+ }
+ },
+ "type-check": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
+ "requires": {
+ "prelude-ls": "~1.1.2"
+ }
+ },
+ "type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
+ },
+ "typescript": {
+ "version": "4.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
+ "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==",
+ "dev": true
+ },
+ "universalify": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
+ "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg=="
+ },
+ "url-parse": {
+ "version": "1.5.10",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+ "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
+ "requires": {
+ "querystringify": "^2.1.1",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true
+ },
+ "w3c-hr-time": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
+ "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
+ "requires": {
+ "browser-process-hrtime": "^1.0.0"
+ }
+ },
+ "w3c-xmlserializer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz",
+ "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==",
+ "requires": {
+ "xml-name-validator": "^4.0.0"
+ }
+ },
+ "webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
+ },
+ "whatwg-encoding": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
+ "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
+ "requires": {
+ "iconv-lite": "0.6.3"
+ }
+ },
+ "whatwg-mimetype": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
+ "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="
+ },
+ "word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
+ },
+ "ws": {
+ "version": "8.9.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
+ "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
+ "requires": {}
+ },
+ "xml-name-validator": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
+ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw=="
+ },
+ "xmlchars": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
+ },
+ "yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true
+ }
+ }
+}
diff --git a/packages/clipper/package.json b/packages/clipper/package.json
new file mode 100644
index 000000000..878b43a5d
--- /dev/null
+++ b/packages/clipper/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "@notesnook/clipper",
+ "version": "1.0.0",
+ "description": "Web clipper core used by the Notesnook Web Clipper",
+ "keywords": [
+ "web-clipper"
+ ],
+ "author": "Abdullah Atta <[email protected]>",
+ "homepage": "https://notesnook.com/",
+ "license": "GPL-3.0-or-later",
+ "main": "dist/index.js",
+ "devDependencies": {
+ "@playwright/test": "^1.27.1",
+ "@types/css": "^0.0.33",
+ "@types/css-tree": "^1.0.7",
+ "@types/dompurify": "^2.3.4",
+ "@types/stylis": "^4.0.2",
+ "esbuild": "^0.15.9",
+ "ts-node": "^10.9.1",
+ "typescript": "^4.8.2",
+ "slugify": "^1.6.5"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/streetwriters/notesnook.git"
+ },
+ "scripts": {
+ "build": "tsc",
+ "test": "playwright test"
+ },
+ "bugs": {
+ "url": "https://github.com/streetwriters/notesnook/issues"
+ },
+ "dependencies": {
+ "@mozilla/readability": "^0.4.2",
+ "css-what": "^6.1.0",
+ "dompurify": "^2.4.0",
+ "hyperapp": "^2.0.22",
+ "jest-environment-jsdom": "^29.0.3",
+ "specificity": "^0.4.1"
+ }
+}
diff --git a/packages/clipper/playwright.config.ts b/packages/clipper/playwright.config.ts
new file mode 100644
index 000000000..2c347d4c9
--- /dev/null
+++ b/packages/clipper/playwright.config.ts
@@ -0,0 +1,131 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+import type { PlaywrightTestConfig } from "@playwright/test";
+import { devices } from "@playwright/test";
+
+/**
+ * Read environment variables from file.
+ * https://github.com/motdotla/dotenv
+ */
+// require('dotenv').config();
+
+/**
+ * See https://playwright.dev/docs/test-configuration.
+ */
+const config: PlaywrightTestConfig = {
+ testDir: "./__tests__",
+ /* Maximum time one test can run for. */
+ timeout: 30 * 1000,
+ expect: {
+ /**
+ * Maximum time expect() should wait for the condition to be met.
+ * For example in `await expect(locator).toHaveText();`
+ */
+ timeout: 5000
+ },
+ /* Run tests in files in parallel */
+ fullyParallel: true,
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
+ forbidOnly: !!process.env.CI,
+ /* Retry on CI only */
+ retries: process.env.CI ? 2 : 0,
+ /* Opt out of parallel tests on CI. */
+ workers: process.env.CI ? 2 : 1,
+
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
+ reporter: "list",
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
+ use: {
+ /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
+ actionTimeout: 0,
+ /* Base URL to use in actions like `await page.goto('/')`. */
+ // baseURL: 'http://localhost:3000',
+
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
+ trace: "retain-on-failure"
+ },
+
+ /* Configure projects for major browsers */
+ projects: [
+ {
+ name: "chromium",
+ use: {
+ ...devices["Desktop Chrome"],
+ viewport: {
+ height: 1080,
+ width: 1920
+ }
+ }
+ }
+
+ // {
+ // name: "firefox",
+ // use: {
+ // ...devices["Desktop Firefox"]
+ // }
+ // },
+
+ // {
+ // name: "webkit",
+ // use: {
+ // ...devices["Desktop Safari"]
+ // }
+ // }
+
+ /* Test against mobile viewports. */
+ // {
+ // name: 'Mobile Chrome',
+ // use: {
+ // ...devices['Pixel 5'],
+ // },
+ // },
+ // {
+ // name: 'Mobile Safari',
+ // use: {
+ // ...devices['iPhone 12'],
+ // },
+ // },
+
+ /* Test against branded browsers. */
+ // {
+ // name: 'Microsoft Edge',
+ // use: {
+ // channel: 'msedge',
+ // },
+ // },
+ // {
+ // name: 'Google Chrome',
+ // use: {
+ // channel: 'chrome',
+ // },
+ // },
+ ]
+
+ /* Folder for test artifacts such as screenshots, videos, traces, etc. */
+ // outputDir: 'test-results/',
+
+ /* Run your local dev server before starting the tests */
+ // webServer: {
+ // command: 'npm run start',
+ // port: 3000,
+ // },
+};
+
+export default config;
diff --git a/packages/clipper/src/clone.ts b/packages/clipper/src/clone.ts
new file mode 100644
index 000000000..c6aed838e
--- /dev/null
+++ b/packages/clipper/src/clone.ts
@@ -0,0 +1,315 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { createImage, FetchOptions } from "./fetch";
+import { Filter } from "./types";
+import { uid } from "./utils";
+
+const SVGElements = [
+ "altGlyph",
+ "altGlyphDef",
+ "altGlyphItem",
+ "animate",
+ "animateColor",
+ "animateMotion",
+ "animateTransform",
+ "circle",
+ "clipPath",
+ "color-profile",
+ "cursor",
+ "defs",
+ "desc",
+ "ellipse",
+ "feBlend",
+ "feColorMatrix",
+ "feComponentTransfer",
+ "feComposite",
+ "feConvolveMatrix",
+ "feDiffuseLighting",
+ "feDisplacementMap",
+ "feDistantLight",
+ "feFlood",
+ "feFuncA",
+ "feFuncB",
+ "feFuncG",
+ "feFuncR",
+ "feGaussianBlur",
+ "feImage",
+ "feMerge",
+ "feMergeNode",
+ "feMorphology",
+ "feOffset",
+ "fePointLight",
+ "feSpecularLighting",
+ "feSpotLight",
+ "feTile",
+ "feTurbulence",
+ "filter",
+ "font-face",
+ "font-face-format",
+ "font-face-name",
+ "font-face-src",
+ "font-face-uri",
+ "foreignObject",
+ "g",
+ "glyph",
+ "glyphRef",
+ "hkern",
+ "image",
+ "line",
+ "linearGradient",
+ "marker",
+ "mask",
+ "metadata",
+ "missing-glyph",
+ "mpath",
+ "path",
+ "pattern",
+ "polygon",
+ "polyline",
+ "radialGradient",
+ "rect",
+ "set",
+ "stop",
+ "svg",
+ "switch",
+ "symbol",
+ "text",
+ "textPath",
+ "title",
+ "tref",
+ "tspan",
+ "use",
+ "view",
+ "vkern"
+].map((a) => a.toLowerCase());
+
+const INVALID_ELEMENTS = ["script"].map((a) => a.toLowerCase());
+
+type CloneProps = {
+ filter?: Filter;
+ root: boolean;
+ vector: boolean;
+ getElementStyles?: (element: HTMLElement) => CSSStyleDeclaration | undefined;
+ getPseudoElementStyles?: (
+ element: HTMLElement,
+ pseudoElement: string
+ ) => CSSStyleDeclaration | undefined;
+ fetchOptions?: FetchOptions;
+};
+
+export async function cloneNode(node: HTMLElement, options: CloneProps) {
+ const { root, filter } = options;
+ if (!root && filter && !filter(node)) return null;
+
+ let clone = await makeNodeCopy(node, options.fetchOptions || {});
+
+ if (!clone) return null;
+ clone = await cloneChildren(node, clone, options);
+
+ const processed = processClone(node, clone, options);
+ return processed;
+}
+
+function makeNodeCopy(original: HTMLElement, options: FetchOptions) {
+ try {
+ if (original instanceof HTMLCanvasElement)
+ return createImage(original.toDataURL(), options);
+
+ if (original.nodeType === Node.COMMENT_NODE) return null;
+
+ if (isInvalidElement(original)) return null;
+
+ if (original.nodeType !== Node.TEXT_NODE && !isSVGElement(original)) {
+ const { display, width, height } = window.getComputedStyle(original);
+ if (display === "none" || (width === "0px" && height === "0px"))
+ return null;
+
+ if (isCustomElement(original)) {
+ const isInline = display.includes("inline");
+ const element = document.createElement(isInline ? "span" : "div");
+ for (const attribute of original.attributes) {
+ element.setAttribute(attribute.name, attribute.value);
+ }
+ return element;
+ }
+ }
+
+ return original.cloneNode(false) as HTMLElement;
+ } catch (e) {
+ console.error("Failed to clone element", e);
+ return null;
+ }
+}
+
+function isCustomElement(element: HTMLElement) {
+ if (!element || !element.tagName) return false;
+ return (
+ !SVGElements.includes(element.tagName.toLowerCase()) &&
+ element.tagName.includes("-")
+ );
+}
+
+export function isSVGElement(element: HTMLElement) {
+ if (!element || !element.tagName) return false;
+ return SVGElements.includes(element.tagName.toLowerCase());
+}
+
+function isInvalidElement(element: HTMLElement) {
+ if (!element || !element.tagName) return false;
+ return INVALID_ELEMENTS.includes(element.tagName.toLowerCase());
+}
+
+async function cloneChildren(
+ original: HTMLElement,
+ clone: HTMLElement,
+ options: CloneProps
+) {
+ const children = original.childNodes;
+ if (children.length === 0) return clone;
+
+ await cloneChildrenInOrder(clone, children, options);
+ return clone;
+}
+
+async function cloneChildrenInOrder(
+ parent: HTMLElement,
+ childs: NodeListOf<ChildNode>,
+ options: CloneProps
+) {
+ for (const node of childs) {
+ const childClone = await cloneNode(node as HTMLElement, {
+ ...options,
+ root: false
+ });
+ if (childClone) parent.appendChild(childClone);
+ }
+}
+
+function processClone(
+ original: HTMLElement,
+ clone: HTMLElement,
+ options: CloneProps
+) {
+ if (!(clone instanceof Element)) return clone;
+
+ // if (clone instanceof HTMLElement) removeAttributes(clone);
+
+ copyStyle(original, clone, options);
+ clonePseudoElements(original, clone, options);
+
+ copyUserInput(original, clone);
+ fixSvg(clone);
+ return clone;
+}
+
+function copyFont(source: CSSStyleDeclaration, target: CSSStyleDeclaration) {
+ target.font = source.font;
+ target.fontFamily = source.fontFamily;
+ target.fontFeatureSettings = source.fontFeatureSettings;
+ target.fontKerning = source.fontKerning;
+ target.fontSize = source.fontSize;
+ target.fontStretch = source.fontStretch;
+ target.fontStyle = source.fontStyle;
+ target.fontVariant = source.fontVariant;
+ target.fontVariantCaps = source.fontVariantCaps;
+ target.fontVariantEastAsian = source.fontVariantEastAsian;
+ target.fontVariantLigatures = source.fontVariantLigatures;
+ target.fontVariantNumeric = source.fontVariantNumeric;
+ target.fontVariationSettings = source.fontVariationSettings;
+ target.fontWeight = source.fontWeight;
+}
+
+function copyStyle(
+ sourceElement: HTMLElement,
+ targetElement: HTMLElement,
+ options: CloneProps
+) {
+ const { getElementStyles } = options;
+ const sourceComputedStyles =
+ getElementStyles && getElementStyles(sourceElement);
+ if (!sourceComputedStyles) return;
+
+ targetElement.style.cssText = sourceComputedStyles.cssText;
+
+ if (sourceElement.tagName.toLowerCase() === "body") {
+ copyFont(getComputedStyle(sourceElement), targetElement.style);
+ }
+
+ const styles = targetElement.getAttribute("style");
+ if (styles) targetElement.setAttribute("style", minifyStyles(styles));
+}
+
+function clonePseudoElements(
+ original: HTMLElement,
+ clone: HTMLElement,
+ options: CloneProps
+) {
+ const { getPseudoElementStyles } = options;
+ let hasPseudoElements = false;
+
+ const styleElement = document.createElement("style");
+ const className = `pseudo--${uid()}`;
+
+ for (const element of [":before", ":after"]) {
+ const style =
+ (getPseudoElementStyles && getPseudoElementStyles(original, element)) ||
+ getComputedStyle(original, element);
+
+ if (!style.cssText) continue;
+
+ const selector = `.${className}:${element} {
+ ${style.cssText}
+ }`;
+
+ styleElement.appendChild(document.createTextNode(selector));
+ hasPseudoElements = true;
+ }
+
+ if (hasPseudoElements) {
+ clone.className = className;
+ clone.appendChild(styleElement);
+ }
+
+ return hasPseudoElements;
+}
+
+function copyUserInput(original: HTMLElement, clone: HTMLElement) {
+ if (original instanceof HTMLTextAreaElement) clone.innerHTML = original.value;
+ if (original instanceof HTMLInputElement)
+ clone.setAttribute("value", original.value);
+}
+
+function fixSvg(clone: Element) {
+ if (!(clone instanceof SVGElement)) return;
+ clone.setAttribute("xmlns", "http://www.w3.org/2000/svg");
+
+ // if (!(clone instanceof SVGRectElement)) return;
+ ["width", "height"].forEach(function (attribute) {
+ const value = clone.getAttribute(attribute);
+ if (!value || !!clone.style.getPropertyValue(attribute)) return;
+
+ clone.style.setProperty(attribute, value);
+ });
+}
+
+function minifyStyles(text: string) {
+ return text.replace(/(:?[:;])(:? +)/gm, (_full, sep) => {
+ return sep;
+ });
+}
diff --git a/packages/clipper/src/css-tokenizer.ts b/packages/clipper/src/css-tokenizer.ts
new file mode 100644
index 000000000..1d5dd9d38
--- /dev/null
+++ b/packages/clipper/src/css-tokenizer.ts
@@ -0,0 +1,176 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+const from = String.fromCharCode;
+
+function trim(value: string): string {
+ return value.trim();
+}
+
+function charat(value: string, index: number): number {
+ return value.charCodeAt(index) | 0;
+}
+
+function strlen(value: string): number {
+ return value.length;
+}
+
+function substr(value: string, begin: number, end: number): string {
+ return value.slice(begin, end);
+}
+
+function append<T>(value: T, array: T[]): T {
+ array.push(value);
+ return value;
+}
+
+let line = 1;
+let column = 1;
+let length = 0;
+let position = 0;
+let character = 0;
+let characters = "";
+
+function next(): number {
+ character = position < length ? charat(characters, position++) : 0;
+
+ if ((column++, character === 10)) (column = 1), line++;
+
+ return character;
+}
+
+function peek(): number {
+ return charat(characters, position);
+}
+
+function slice(begin: number, end: number): string {
+ return substr(characters, begin, end);
+}
+
+function token(type: number): number {
+ switch (type) {
+ // \0 \t \n \r \s whitespace token
+ case 0:
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ return 5;
+
+ // ! + , / > @ ~ isolate token
+ case 33:
+ case 42:
+ case 43:
+ case 44:
+ case 47:
+ case 62:
+ case 64:
+ case 126:
+ case 59: /* ; { } breakpoint token */
+ case 123:
+ case 125:
+ return 4;
+ // : accompanied token
+ case 58:
+ return 3;
+ // " ' ( [ opening delimit token
+ case 34:
+ case 39:
+ case 40:
+ case 91:
+ return 2;
+ // ) ] closing delimit token
+ case 41:
+ case 93:
+ return 1;
+ }
+
+ return 0;
+}
+
+function alloc(value: string): [] {
+ line = column = 1;
+ length = strlen((characters = value));
+ position = 0;
+ return [];
+}
+
+function dealloc<T>(value: T): T {
+ characters = "";
+ return value;
+}
+
+function delimit(type: number): string {
+ return trim(
+ slice(
+ position - 1,
+ delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)
+ )
+ );
+}
+
+export function tokenize(value: string): string[] {
+ return dealloc(tokenizer(alloc(value)));
+}
+
+function tokenizer(children: string[]): string[] {
+ while (next())
+ switch (token(character)) {
+ case 0:
+ append(identifier(position - 1), children);
+ break;
+ case 2:
+ append(delimit(character), children);
+ break;
+ default:
+ append(from(character), children);
+ }
+
+ return children;
+}
+
+function delimiter(type: number): number {
+ while (next())
+ switch (character) {
+ // ] ) " '
+ case type:
+ return position;
+ // " '
+ case 34:
+ case 39:
+ if (type !== 34 && type !== 39) delimiter(character);
+ break;
+ // (
+ case 40:
+ if (type === 41) delimiter(type);
+ break;
+ // \
+ case 92:
+ next();
+ break;
+ }
+
+ return position;
+}
+
+function identifier(index: number): string {
+ while (!token(peek())) next();
+
+ return slice(index, position);
+}
diff --git a/packages/clipper/src/domtoimage.ts b/packages/clipper/src/domtoimage.ts
new file mode 100644
index 000000000..7a34be72d
--- /dev/null
+++ b/packages/clipper/src/domtoimage.ts
@@ -0,0 +1,248 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { cloneNode, isSVGElement } from "./clone";
+import { createImage, FetchOptions } from "./fetch";
+import { resolveAll } from "./fontfaces";
+import { inlineAllImages } from "./images";
+import { Options } from "./types";
+import { canvasToBlob, delay, escapeXhtml, height, width } from "./utils";
+import { cacheStylesheets, inlineStylesheets } from "./styles";
+import purify from "dompurify";
+
+// Default impl options
+const defaultOptions: Options = {
+ fetchOptions: {},
+ inlineOptions: {}
+};
+
+async function getInlinedNode(node: HTMLElement, options: Options) {
+ const { fonts, images, stylesheets } = options.inlineOptions || {};
+
+ console.time("inline styles");
+ if (stylesheets) await inlineStylesheets(options.fetchOptions || {});
+ console.timeEnd("inline styles");
+
+ const documentStyles = getComputedStyle(document.documentElement);
+
+ console.time("cache styles");
+ const styleCache = cacheStylesheets(documentStyles);
+ console.timeEnd("cache styles");
+
+ console.time("clone");
+ let clone = await cloneNode(node, {
+ filter: options.filter,
+ root: true,
+ vector: !options.raster,
+ fetchOptions: options.fetchOptions,
+ getElementStyles: styleCache.get,
+ getPseudoElementStyles: styleCache.getPseudo
+ });
+ console.timeEnd("clone");
+
+ if (!clone || clone instanceof Text) return;
+
+ console.time("embed fonts");
+ if (fonts) clone = await embedFonts(clone, options.fetchOptions || {});
+ console.timeEnd("embed fonts");
+
+ console.time("inline images");
+ if (images) await inlineAllImages(clone, options.fetchOptions || {});
+ console.timeEnd("inline images");
+
+ finalize(clone);
+ return clone;
+}
+
+async function toSvg(node: HTMLElement, options: Options) {
+ options.inlineOptions = {
+ fonts: true,
+ images: true,
+ stylesheets: true,
+ ...options.inlineOptions
+ };
+
+ let clone = await getInlinedNode(node, options);
+ if (!clone) return;
+
+ clone = applyOptions(clone, options);
+
+ clone = purify.sanitize(clone, {
+ RETURN_DOM: true,
+ KEEP_CONTENT: false,
+ ADD_ATTR: ["style"]
+ });
+
+ return makeSvgDataUri(
+ clone,
+ options.width || width(node),
+ options.height || height(node)
+ );
+}
+
+function applyOptions(clone: HTMLElement, options: Options) {
+ if (options.backgroundColor)
+ clone.style.backgroundColor = options.backgroundColor;
+ if (options.width) clone.style.width = options.width + "px";
+ if (options.height) clone.style.height = options.height + "px";
+
+ if (options.style) {
+ const style = options.style;
+ Object.keys(style).forEach(function (property) {
+ clone.style.setProperty(property, style.getPropertyValue(property));
+ // clone.style[property] = style[property];
+ });
+ }
+
+ options.onCloned?.(clone);
+ return clone;
+}
+
+function toPixelData(node: HTMLElement, options: Options) {
+ options = options || {};
+ options.raster = true;
+ return draw(node, options).then(function (canvas) {
+ return canvas
+ ?.getContext("2d")
+ ?.getImageData(0, 0, width(node), height(node)).data;
+ });
+}
+
+function toPng(node: HTMLElement, options: Options) {
+ options.raster = true;
+ return draw(node, options).then(function (canvas) {
+ return canvas?.toDataURL();
+ });
+}
+
+function toJpeg(node: HTMLElement, options: Options) {
+ options.raster = true;
+ return draw(node, options).then(function (canvas) {
+ return canvas?.toDataURL("image/jpeg", options.quality || 1.0);
+ });
+}
+
+function toBlob(node: HTMLElement, options: Options) {
+ options.raster = true;
+ return draw(node, options).then((canvas) => canvas && canvasToBlob(canvas));
+}
+
+function toCanvas(node: HTMLElement, options: Options) {
+ options.raster = true;
+ return draw(node, options);
+}
+
+function draw(domNode: HTMLElement, options: Options) {
+ options = { ...defaultOptions, ...options };
+ return toSvg(domNode, options)
+ .then((uri) => (uri ? createImage(uri, options.fetchOptions || {}) : null))
+ .then(delay(0))
+ .then(function (image) {
+ const scale = typeof options.scale !== "number" ? 1 : options.scale;
+ const canvas = newCanvas(domNode, scale, options);
+ const ctx = canvas?.getContext("2d");
+ if (!ctx) return null;
+ // ctx.mozImageSmoothingEnabled = false;
+ // ctx.msImageSmoothingEnabled = false;
+ ctx.imageSmoothingEnabled = false;
+ if (image) {
+ ctx.scale(scale, scale);
+ ctx.drawImage(image, 0, 0);
+ }
+ return canvas;
+ });
+}
+
+function newCanvas(node: HTMLElement, scale: number, options: Options) {
+ const canvas = document.createElement("canvas");
+ canvas.width = (options.width || width(node)) * scale;
+ canvas.height = (options.height || height(node)) * scale;
+
+ if (options.backgroundColor) {
+ const ctx = canvas.getContext("2d");
+ if (!ctx) return null;
+ ctx.fillStyle = options.backgroundColor;
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+
+ return canvas;
+}
+
+function embedFonts(node: HTMLElement, options: FetchOptions) {
+ return resolveAll(options).then(function (cssText) {
+ const styleNode = document.createElement("style");
+ node.appendChild(styleNode);
+ styleNode.appendChild(document.createTextNode(cssText));
+ return node;
+ });
+}
+
+function makeSvgDataUri(node: HTMLElement, width: number, height: number) {
+ node.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
+ const xhtml = escapeXhtml(new XMLSerializer().serializeToString(node));
+ const foreignObject =
+ '<foreignObject x="0" y="0" width="100%" height="100%">' +
+ xhtml +
+ "</foreignObject>";
+
+ const svgStr =
+ '<svg xmlns="http://www.w3.org/2000/svg" width="' +
+ width +
+ '" height="' +
+ height +
+ '">' +
+ foreignObject +
+ "</svg>";
+
+ return "data:image/svg+xml;charset=utf-8," + svgStr;
+}
+
+export { toJpeg, toBlob, toCanvas, toPixelData, toPng, toSvg, getInlinedNode };
+
+const VALID_ATTRIBUTES = [
+ "src",
+ "href",
+ "title",
+ "style",
+ "srcset",
+ "sizes",
+ "width",
+ "height",
+ "target",
+ "rel"
+];
+
+function finalize(root: HTMLElement) {
+ for (const element of root.querySelectorAll("*")) {
+ if (!(element instanceof HTMLElement) || isSVGElement(element)) continue;
+ for (const attribute of Array.from(element.attributes)) {
+ if (attribute.name === "class" && element.className.includes("pseudo--"))
+ continue;
+
+ if (!VALID_ATTRIBUTES.includes(attribute.name)) {
+ element.removeAttribute(attribute.name);
+ }
+ }
+
+ if (element instanceof HTMLAnchorElement) {
+ element.href = element.href.startsWith("http")
+ ? element.href
+ : document.location.origin + element.href;
+ }
+ }
+}
diff --git a/packages/clipper/src/fetch.ts b/packages/clipper/src/fetch.ts
new file mode 100644
index 000000000..f86a03e31
--- /dev/null
+++ b/packages/clipper/src/fetch.ts
@@ -0,0 +1,87 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+export type FetchOptions = {
+ bypassCors?: boolean;
+ corsHost?: string;
+ noCache?: boolean;
+ crossOrigin?: "anonymous" | "use-credentials" | null;
+};
+
+export async function fetchResource(url: string, options: FetchOptions) {
+ if (!url) return null;
+
+ const response = await fetch(constructUrl(url, options));
+ if (!response.ok) return "";
+
+ const blob = await response.blob();
+ const reader = new FileReader();
+ reader.readAsDataURL(blob);
+ return new Promise<string>((resolve) => {
+ reader.addEventListener("loadend", () => {
+ if (typeof reader.result === "string") resolve(reader.result);
+ });
+ });
+}
+
+export function createImage(url: string, options: FetchOptions) {
+ if (url === "data:,") return Promise.resolve(null);
+ return new Promise<HTMLImageElement>(function (resolve, reject) {
+ const image = new Image();
+ image.crossOrigin = options.crossOrigin || null;
+ image.onload = function () {
+ resolve(image);
+ };
+ image.onerror = reject;
+ image.src = constructUrl(url, options);
+ });
+}
+
+export function reloadImage(image: HTMLImageElement, options: FetchOptions) {
+ if (options.corsHost && image.currentSrc.startsWith(options.corsHost))
+ return Promise.resolve(null);
+
+ options.noCache = true;
+ return new Promise<HTMLImageElement>(function (resolve, reject) {
+ image.crossOrigin = options.crossOrigin || null;
+ image.onload = function () {
+ resolve(image);
+ };
+ image.onerror = (e) => {
+ console.error("Failed to load image", image.currentSrc);
+ reject(e);
+ };
+
+ image.src = constructUrl(image.currentSrc, options);
+ });
+}
+
+export function constructUrl(url: string, options: FetchOptions) {
+ if (!url.startsWith("http")) return url;
+ if (options.noCache) {
+ // Cache bypass so we dont have CORS issues with cached images
+ // Source: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache
+ url += (/\?/.test(url) ? "&" : "?") + Date.now();
+ }
+ if (options.bypassCors && options.corsHost) {
+ if (url.startsWith(options.corsHost)) return url;
+
+ url = `${options.corsHost}/${url}`;
+ }
+ return url;
+}
diff --git a/packages/clipper/src/fontfaces.ts b/packages/clipper/src/fontfaces.ts
new file mode 100644
index 000000000..9b7f05f97
--- /dev/null
+++ b/packages/clipper/src/fontfaces.ts
@@ -0,0 +1,79 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { FetchOptions } from "./fetch";
+import { inlineAll, shouldProcess } from "./inliner";
+
+async function resolveAll(options: FetchOptions) {
+ const fonts = readAll();
+ const cssStrings: string[] = [];
+ for (const font of fonts) {
+ cssStrings.push(await font.resolve(options));
+ }
+ return cssStrings.join("\n");
+}
+
+function readAll() {
+ const cssRules = getWebFonts(document.styleSheets);
+ const fonts = selectWebFontRules(cssRules);
+ return fonts.map(newWebFont);
+}
+
+function getWebFonts(styleSheets: StyleSheetList) {
+ const cssRules: CSSFontFaceRule[] = [];
+ for (const sheet of styleSheets) {
+ try {
+ const allFonts = selectWebFontRules(Array.from(sheet.cssRules));
+ if (allFonts.length > 3) cssRules.push(allFonts[0]);
+ } catch (e) {
+ if (e instanceof Error) {
+ console.log(
+ "Error while reading CSS rules from " + sheet.href,
+ e.toString()
+ );
+ }
+ }
+ }
+ return cssRules;
+}
+
+function newWebFont(webFontRule: CSSFontFaceRule) {
+ return {
+ resolve: function resolve(options: FetchOptions) {
+ const baseUrl = (webFontRule.parentStyleSheet || {}).href || undefined;
+ return inlineAll(webFontRule.cssText, options, baseUrl);
+ },
+ src: function () {
+ return webFontRule.style.getPropertyValue("src");
+ }
+ };
+}
+
+function selectWebFontRules(cssRules: CSSRule[]): CSSFontFaceRule[] {
+ return cssRules
+ .filter(function (rule) {
+ return rule.type === CSSRule.FONT_FACE_RULE;
+ })
+ .filter(function (rule) {
+ return shouldProcess(
+ (rule as CSSFontFaceRule).style.getPropertyValue("src")
+ );
+ }) as CSSFontFaceRule[];
+}
+
+export { resolveAll };
diff --git a/packages/clipper/src/images.ts b/packages/clipper/src/images.ts
new file mode 100644
index 000000000..49365773c
--- /dev/null
+++ b/packages/clipper/src/images.ts
@@ -0,0 +1,81 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { FetchOptions, fetchResource } from "./fetch";
+import { inlineAll } from "./inliner";
+import { isDataUrl } from "./utils";
+
+async function inlineAllImages(root: HTMLElement, options: FetchOptions) {
+ const imageNodes = root.querySelectorAll("img");
+ console.log("total images", imageNodes.length);
+
+ const promises: Promise<any>[] = [];
+ for (let i = 0; i < imageNodes.length; ++i) {
+ const image = imageNodes[i];
+ promises.push(inlineImage(image, options));
+ }
+
+ const backgroundImageNodes = root.querySelectorAll(
+ `[style*="background-image:"],[style*="background:"]`
+ );
+ for (let i = 0; i < backgroundImageNodes.length; ++i) {
+ const image = backgroundImageNodes[i];
+ promises.push(inlineBackground(image as HTMLElement, options));
+ }
+
+ await Promise.all(promises).catch((e) => console.error(e));
+}
+export { inlineAllImages };
+
+async function inlineImage(element: HTMLImageElement, options: FetchOptions) {
+ if (isDataUrl(element.currentSrc)) return Promise.resolve(null);
+
+ const dataURL = await fetchResource(
+ element.currentSrc || element.src,
+ options
+ );
+ if (!dataURL) return null;
+
+ if (dataURL === "data:,") {
+ element.removeAttribute("src");
+ return element;
+ }
+
+ return new Promise<HTMLImageElement | null>(function (resolve, reject) {
+ if (element.parentElement?.tagName === "PICTURE") {
+ element.parentElement?.replaceWith(element);
+ }
+
+ element.onload = () => resolve(element);
+ // for any image with invalid src(such as <img src />), just ignore it
+ element.onerror = (e) => reject(e);
+ element.src = dataURL;
+ element.removeAttribute("srcset");
+ });
+}
+
+async function inlineBackground(
+ backgroundNode: HTMLElement,
+ options: FetchOptions
+) {
+ const background = backgroundNode.style.getPropertyValue("background-image");
+ if (!background) return backgroundNode;
+ const inlined = await inlineAll(background, options);
+ backgroundNode.style.setProperty("background-image", inlined);
+ return backgroundNode;
+}
diff --git a/packages/clipper/src/index.ts b/packages/clipper/src/index.ts
new file mode 100644
index 000000000..cea2f38c7
--- /dev/null
+++ b/packages/clipper/src/index.ts
@@ -0,0 +1,500 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+import purify from "dompurify";
+import { Readability } from "@mozilla/readability";
+import { injectCss } from "./utils";
+import { app, h, text } from "hyperapp";
+import {
+ getInlinedNode,
+ toBlob,
+ toJpeg,
+ toPixelData,
+ toPng
+} from "./domtoimage";
+import { InlineOptions } from "./types";
+import { FetchOptions } from "./fetch";
+
+type ReadabilityEnhanced = Readability<string> & {
+ PRESENTATIONAL_ATTRIBUTES: string[];
+};
+
+const CLASSES = {
+ nodeHover: "nn-node-selection--hover",
+ nodeSelected: "nn-node-selection--selected",
+ nodeSelectionContainer: "nn-node-selection-container"
+};
+
+const BLACKLIST = [CLASSES.nodeSelected, CLASSES.nodeSelectionContainer];
+
+const fetchOptions: FetchOptions = {
+ bypassCors: true,
+ corsHost: "https://cors.eu.org",
+ crossOrigin: "anonymous",
+ noCache: true
+};
+
+const inlineOptions: InlineOptions = {
+ fonts: false,
+ images: true,
+ stylesheets: true
+};
+
+async function getPage(
+ document: Document,
+ styles: boolean,
+ onlyVisible = false
+) {
+ const body = await getInlinedNode(document.body, {
+ raster: true,
+ fetchOptions,
+ inlineOptions,
+ filter: (node) => {
+ return !onlyVisible || isElementInViewport(node);
+ }
+ });
+
+ if (!body) return {};
+
+ const head = document.createElement("head");
+ head.title = document.title;
+
+ return {
+ body,
+ head
+ };
+}
+
+function toDocument(head: HTMLElement, body: HTMLElement) {
+ const newHTMLDocument = document.implementation.createHTMLDocument();
+ newHTMLDocument.open();
+ newHTMLDocument.write(head.outerHTML, body.outerHTML);
+ newHTMLDocument.close();
+
+ // newHTMLDocument.insertBefore(documentType, newHTMLDocument.childNodes[0]);
+
+ return newHTMLDocument;
+}
+
+async function clipPage(
+ document: Document,
+ withStyles: boolean,
+ onlyVisible: boolean
+): Promise<string | null> {
+ const { body, head } = await getPage(document, withStyles, onlyVisible);
+ if (!body || !head) return null;
+ const result = toDocument(head, body).documentElement.outerHTML;
+ return `<!doctype html>\n${result}`;
+}
+
+const cleanup = () => {
+ setTimeout(() => {
+ document.querySelectorAll(`.${CLASSES.nodeSelected}`).forEach((node) => {
+ if (node instanceof HTMLElement) {
+ node.classList.remove(CLASSES.nodeSelected);
+ }
+ });
+
+ document
+ .querySelectorAll(`.${CLASSES.nodeSelectionContainer}`)
+ .forEach((node) => node.remove());
+
+ removeHoverListeners(document);
+ removeClickHandlers(document);
+ }, 0);
+};
+
+function clipNode(
+ element: HTMLElement | null | undefined,
+ keepStyles = true
+): string | null {
+ if (!element) return null;
+ return purifyBody(element.outerHTML, keepStyles).outerHTML;
+}
+
+async function clipArticle(
+ doc: Document,
+ withStyles: boolean
+): Promise<string | null> {
+ const { body, head } = await getPage(doc, withStyles);
+ if (!body || !head) return null;
+ const newDoc = toDocument(head, body);
+
+ const readability = new Readability(newDoc);
+ (readability as ReadabilityEnhanced).PRESENTATIONAL_ATTRIBUTES = [
+ "align",
+ "background",
+ "bgcolor",
+ "border",
+ "cellpadding",
+ "cellspacing",
+ "frame",
+ "hspace",
+ "rules",
+ "valign",
+ "vspace"
+ ];
+ const result = readability.parse();
+
+ return `<html>${head?.outerHTML || ""}<body>${
+ result?.content || ""
+ }</body></html>`;
+}
+
+// async function clipSimplifiedArticle(doc: Document): Promise<string | null> {
+// const article = await clipArticle(doc);
+// if (!article) return null;
+// return purifyBody(article, false).outerHTML;
+// }
+
+function purifyBody(htmlString: string, keepStyles = true) {
+ return purify.sanitize(htmlString, {
+ RETURN_DOM: true,
+ KEEP_CONTENT: false,
+ ADD_TAGS: keepStyles ? ["use"] : [],
+ ADD_ATTR: keepStyles ? ["style", "class", "id"] : [],
+ FORBID_ATTR: !keepStyles ? ["style", "class", "id"] : [],
+ FORBID_TAGS: !keepStyles ? ["style"] : [],
+ ADD_DATA_URI_TAGS: ["style"],
+ CUSTOM_ELEMENT_HANDLING: {
+ attributeNameCheck: /notesnook/ // allow all attributes containing "baz"
+ }
+ }) as HTMLElement;
+}
+
+async function clipScreenshot<
+ TOutputFormat extends "jpeg" | "png" | "raw",
+ TOutput extends TOutputFormat extends "jpeg"
+ ? string
+ : TOutputFormat extends "png"
+ ? string
+ : Blob | undefined
+>(
+ target?: HTMLElement,
+ output: TOutputFormat = "jpeg" as TOutputFormat
+): Promise<TOutput> {
+ const screenshotTarget = target || document.body;
+
+ const func = output === "jpeg" ? toJpeg : output === "png" ? toPng : toBlob;
+ const screenshot = await func(screenshotTarget, {
+ quality: 1,
+ backgroundColor: "white",
+ width: document.body.scrollWidth,
+ height: document.body.scrollHeight,
+ fetchOptions,
+ inlineOptions: {
+ fonts: true,
+ images: true,
+ stylesheets: true
+ }
+ });
+
+ if (output === "jpeg" || output === "png")
+ return `<img width="${document.body.scrollWidth}px" height="${document.body.scrollHeight}px" src="${screenshot}" />` as TOutput;
+ else return screenshot as TOutput;
+}
+
+function canSelect(target: HTMLElement) {
+ for (const className of BLACKLIST) {
+ if (target.classList.contains(className) || target.closest(`.${className}`))
+ return false;
+ }
+ return true;
+}
+
+const onMouseOver = (event: MouseEvent) => {
+ const target = event.target as HTMLElement;
+ if (target.classList.contains(CLASSES.nodeHover) || !canSelect(target))
+ return;
+ target.classList.add(CLASSES.nodeHover);
+};
+
+const onMouseLeave = (event: MouseEvent) => {
+ const target = event.target as HTMLElement;
+ if (!target.classList.contains(CLASSES.nodeHover)) return;
+ target.classList.remove(CLASSES.nodeHover);
+};
+
+function registerHoverListeners(doc: Document) {
+ doc.body.addEventListener("mouseout", onMouseLeave);
+ doc.body.addEventListener("mouseover", onMouseOver);
+}
+
+function removeHoverListeners(doc: Document) {
+ doc.body.removeEventListener("mouseout", onMouseLeave);
+ doc.body.removeEventListener("mouseover", onMouseOver);
+}
+
+const onMouseClick = (event: MouseEvent) => {
+ event.preventDefault();
+ const target = event.target as HTMLElement;
+
+ if (target.classList.contains(CLASSES.nodeSelected)) {
+ target.classList.remove(CLASSES.nodeSelected);
+ return;
+ }
+
+ if (!canSelect(target)) return;
+
+ target.classList.add(CLASSES.nodeSelected);
+ // const clipData = clipNode(target, false);
+ // useExtensionStore.getState().setClipData({
+ // type: "manualSelection",
+ // data: clipData,
+ // });
+};
+
+function registerClickListeners(doc: Document) {
+ doc.body.addEventListener("click", onMouseClick);
+}
+
+function removeClickHandlers(doc: Document) {
+ doc.body.removeEventListener("click", onMouseClick);
+}
+
+function enterNodeSelectionMode(doc: Document) {
+ setTimeout(() => {
+ registerClickListeners(doc);
+ registerHoverListeners(doc);
+ }, 0);
+
+ injectStyles();
+
+ return new Promise((resolve, reject) => {
+ injectNodeSelectionControls(
+ async () => {
+ const selectedNodes = document.querySelectorAll(
+ `.${CLASSES.nodeSelected}`
+ );
+
+ const div = document.createElement("div");
+ for (const node of selectedNodes) {
+ node.classList.remove(CLASSES.nodeSelected);
+ const inlined = await getInlinedNode(node as HTMLElement, {
+ raster: false,
+ fetchOptions,
+ inlineOptions
+ });
+ if (!inlined) continue;
+ div.appendChild(inlined);
+ }
+ cleanup();
+ resolve(div?.outerHTML);
+ },
+ () => reject("Cancelled.")
+ );
+ });
+}
+
+export {
+ clipPage,
+ clipArticle,
+ cleanup,
+ clipNode,
+ clipScreenshot,
+ enterNodeSelectionMode
+};
+
+const mod = {
+ clipPage,
+ clipArticle,
+ cleanup,
+ clipNode,
+ clipScreenshot,
+ enterNodeSelectionMode
+};
+export type Clipper = typeof mod;
+
+function injectStyles() {
+ const css = `.${CLASSES.nodeHover} {
+ border: 1px solid green;
+ background-color: rgb(0,0,0,0.05);
+ cursor: pointer;
+ }
+
+ .${CLASSES.nodeSelected} {
+ border: 2px solid green;
+ cursor: pointer;
+ }
+
+ .${CLASSES.nodeSelectionContainer} {
+ position: fixed;
+ bottom: 0px;
+ right: 0px;
+ z-index: ${Number.MAX_VALUE};
+ }`;
+ injectCss(css, "nn-clipper-styles");
+}
+
+function injectNodeSelectionControls(
+ onDone?: () => void,
+ onCancel?: () => void
+) {
+ const controlContainer = document.createElement("div");
+ controlContainer.classList.add(CLASSES.nodeSelectionContainer);
+ setTimeout(() => {
+ document.body.appendChild(controlContainer);
+ }, 0);
+
+ app({
+ init: {},
+ view: () =>
+ h(
+ "div",
+ {
+ style: {
+ padding: "10px",
+ backgroundColor: "white",
+ borderRadius: "5px",
+ boxShadow: "0px 0px 10px 0px #00000038"
+ }
+ },
+ [
+ h("p", { style: { marginBottom: "0px", fontSize: "18px" } }, [
+ text("Notesnook Web Clipper")
+ ]),
+ h(
+ "p",
+ {
+ style: {
+ margin: "0px",
+ marginBottom: "5px",
+ fontStyle: "italic"
+ }
+ },
+ [text("Click on any element to select it.")]
+ ),
+ h(
+ "div",
+ {
+ style: {
+ display: "flex",
+ alignItems: "center"
+ }
+ },
+ [
+ h(
+ "button",
+ {
+ onclick: (_state) => onDone?.(),
+ style: { marginRight: "5px" }
+ },
+ [text("Done")]
+ ),
+ h(
+ "button",
+ {
+ onclick: (_state) => {
+ cleanup();
+ onCancel?.();
+ }
+ },
+ [text("Cancel")]
+ )
+ ]
+ )
+ ]
+ ),
+ node: controlContainer
+ });
+}
+
+function isElementInViewport(el: HTMLElement) {
+ if (
+ (el.nodeType === Node.TEXT_NODE || !el.getBoundingClientRect) &&
+ el.parentElement
+ )
+ el = el.parentElement;
+
+ const info = getElementViewportInfo(el);
+ return info.isInViewport;
+}
+
+type ViewportInfo = {
+ isInViewport: boolean;
+ isPartiallyInViewport: boolean;
+ isInsideViewport: boolean;
+ isAroundViewport: boolean;
+ isOnEdge: boolean;
+ isOnTopEdge: boolean;
+ isOnRightEdge: boolean;
+ isOnBottomEdge: boolean;
+ isOnLeftEdge: boolean;
+};
+
+function getElementViewportInfo(el: HTMLElement) {
+ const result: ViewportInfo = {
+ isInViewport: false,
+ isPartiallyInViewport: false,
+ isInsideViewport: false,
+ isAroundViewport: false,
+ isOnEdge: false,
+ isOnTopEdge: false,
+ isOnRightEdge: false,
+ isOnBottomEdge: false,
+ isOnLeftEdge: false
+ };
+
+ const rect = el.getBoundingClientRect();
+ const windowHeight =
+ window.innerHeight || document.documentElement.clientHeight;
+ const windowWidth = window.innerWidth || document.documentElement.clientWidth;
+
+ const insideX = rect.left >= 0 && rect.left + rect.width <= windowWidth;
+ const insideY = rect.top >= 0 && rect.top + rect.height <= windowHeight;
+
+ result.isInsideViewport = insideX && insideY;
+
+ const aroundX = rect.left < 0 && rect.left + rect.width > windowWidth;
+ const aroundY = rect.top < 0 && rect.top + rect.height > windowHeight;
+
+ result.isAroundViewport = aroundX && aroundY;
+
+ const onTop = rect.top < 0 && rect.top + rect.height > 0;
+ const onRight =
+ rect.left < windowWidth && rect.left + rect.width > windowWidth;
+ const onLeft = rect.left < 0 && rect.left + rect.width > 0;
+ const onBottom =
+ rect.top < windowHeight && rect.top + rect.height > windowHeight;
+
+ const onY = insideY || aroundY || onTop || onBottom;
+ const onX = insideX || aroundX || onLeft || onRight;
+
+ result.isOnTopEdge = onTop && onX;
+ result.isOnRightEdge = onRight && onY;
+ result.isOnBottomEdge = onBottom && onX;
+ result.isOnLeftEdge = onLeft && onY;
+
+ result.isOnEdge =
+ result.isOnLeftEdge ||
+ result.isOnRightEdge ||
+ result.isOnTopEdge ||
+ result.isOnBottomEdge;
+
+ const isInX =
+ insideX || aroundX || result.isOnLeftEdge || result.isOnRightEdge;
+ const isInY =
+ insideY || aroundY || result.isOnTopEdge || result.isOnBottomEdge;
+
+ result.isInViewport = isInX && isInY;
+
+ result.isPartiallyInViewport = result.isInViewport && result.isOnEdge;
+
+ return result;
+}
diff --git a/packages/clipper/src/inliner.ts b/packages/clipper/src/inliner.ts
new file mode 100644
index 000000000..f7b194bc0
--- /dev/null
+++ b/packages/clipper/src/inliner.ts
@@ -0,0 +1,71 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { FetchOptions, fetchResource } from "./fetch";
+import { isDataUrl, resolveUrl, escape } from "./utils";
+
+const URL_REGEX = /url\(['"]?([^'"]+?)['"]?\)/g;
+
+function shouldProcess(string: string) {
+ return string.search(URL_REGEX) !== -1;
+}
+
+function readUrls(string: string) {
+ const result = [];
+ let match;
+ while ((match = URL_REGEX.exec(string)) !== null) {
+ result.push(match[1]);
+ }
+ return result.filter(function (url) {
+ return !isDataUrl(url);
+ });
+}
+
+async function inline(
+ string: string,
+ url: string,
+ options: FetchOptions,
+ baseUrl?: string
+) {
+ url = baseUrl ? resolveUrl(url, baseUrl) : url;
+ const dataUrl = await fetchResource(url, options);
+ // const dataUrl = dataAsUrl(data, mimeType(url));
+ return string.replace(urlAsRegex(url), "$1" + dataUrl + "$3");
+}
+
+function urlAsRegex(urlValue: string) {
+ return new RegExp("(url\\(['\"]?)(" + escape(urlValue) + ")(['\"]?\\))", "g");
+}
+
+async function inlineAll(
+ string: string,
+ options: FetchOptions,
+ baseUrl?: string
+) {
+ if (!shouldProcess(string)) return string;
+
+ const urls = readUrls(string);
+
+ let prefix = string;
+ for (const url of urls) {
+ prefix = await inline(prefix, url, options, baseUrl);
+ }
+ return prefix;
+}
+
+export { shouldProcess, inlineAll, readUrls };
diff --git a/packages/clipper/src/styles.ts b/packages/clipper/src/styles.ts
new file mode 100644
index 000000000..d49d766af
--- /dev/null
+++ b/packages/clipper/src/styles.ts
@@ -0,0 +1,425 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { constructUrl, FetchOptions } from "./fetch";
+import { compare, calculate, SpecificityArray } from "specificity";
+import { tokenize } from "./css-tokenizer";
+import { stringify, parse, SelectorType } from "css-what";
+
+const SHORTHANDS = [
+ "animation",
+ "background",
+ "border",
+ "border-block-end",
+ "border-block-start",
+ "border-bottom",
+ "border-color",
+ "border-image",
+ "border-inline-end",
+ "border-inline-start",
+ "border-left",
+ "border-radius",
+ "border-right",
+ "border-style",
+ "border-top",
+ "border-width",
+ "column-rule",
+ "columns",
+ "contain-intrinsic-size",
+ "flex",
+ "flex-flow",
+ "font",
+ "gap",
+ "grid",
+ "grid-area",
+ "grid-column",
+ "grid-row",
+ "grid-template",
+ "grid-gap",
+ "list-style",
+ "margin",
+ "mask",
+ "offset",
+ "outline",
+ "overflow",
+ "padding",
+ "place-content",
+ "place-items",
+ "place-self",
+ "scroll-margin",
+ "scroll-padding",
+ "text-decoration",
+ "text-emphasis",
+ "transition"
+];
+
+export async function inlineStylesheets(options: FetchOptions) {
+ for (const sheet of document.styleSheets) {
+ if (skipStyleSheet(sheet)) continue;
+
+ const node = sheet.ownerNode;
+ if (sheet.href && node instanceof HTMLLinkElement) {
+ try {
+ sheet.cssRules.length;
+ } catch (_e) {
+ const styleNode = await downloadStylesheet(node.href, options);
+ if (styleNode) node.replaceWith(styleNode);
+ console.error("Failed to access sheet", node.href, _e);
+ }
+ }
+ }
+ await resolveImports(options);
+}
+
+async function resolveImports(options: FetchOptions) {
+ let index = 0;
+ for (const sheet of document.styleSheets) {
+ if (skipStyleSheet(sheet)) continue;
+
+ for (const rule of sheet.cssRules) {
+ if (rule.type === CSSRule.IMPORT_RULE) {
+ const href = (rule as CSSImportRule).href;
+ const result = await downloadStylesheet(href, options);
+ if (result) {
+ if (sheet.ownerNode) sheet.ownerNode.before(result);
+ else document.head.appendChild(result);
+
+ sheet.deleteRule(index);
+ }
+ }
+ ++index;
+ }
+ }
+}
+
+async function downloadStylesheet(href: string, options: FetchOptions) {
+ try {
+ const style = document.createElement("style");
+ const response = await fetch(constructUrl(href, options));
+ if (!response.ok) return false;
+ style.innerText = await response.text();
+ style.setAttribute("href", href);
+ console.log(href);
+ return style;
+ } catch (e) {
+ console.error("Failed to inline stylesheet", href);
+ }
+}
+
+type StyleableElement = HTMLElement | SVGElement;
+type BaseStyle = {
+ rule: CSSStyleDeclaration;
+ href: URL | null;
+};
+type SpecifiedStyle = BaseStyle & {
+ specificity: SpecificityArray;
+};
+type PseudoElementStyle = BaseStyle & {
+ pseudoElement: string;
+};
+type CSSStyledElements = Map<StyleableElement, SpecifiedStyle[]>;
+type CSSPseudoElements = Map<StyleableElement, PseudoElementStyle[]>;
+
+export function cacheStylesheets(documentStyles: CSSStyleDeclaration) {
+ const styledElements: CSSStyledElements = new Map();
+ const styledPseudoElements: CSSPseudoElements = new Map();
+
+ for (const sheet of document.styleSheets) {
+ if (skipStyleSheet(sheet)) continue;
+ let href = sheet.href || undefined;
+ if (!href && sheet.ownerNode instanceof HTMLElement)
+ href = sheet.ownerNode.getAttribute("href") || undefined;
+
+ walkRules(
+ sheet.cssRules,
+ documentStyles,
+ styledElements,
+ styledPseudoElements,
+ href
+ );
+ }
+
+ return {
+ getPseudo(element: StyleableElement, pseudoElement: string) {
+ const styles = styledPseudoElements
+ .get(element)
+ ?.filter((s) => s.pseudoElement.includes(pseudoElement));
+ if (!styles || !styles.length) return;
+
+ return getElementStyles(element, styles, documentStyles);
+ },
+ get(element: StyleableElement) {
+ const styles = styledElements.get(element);
+ if (!styles) return;
+
+ const allStyles = styles.sort((a, b) =>
+ compare(a.specificity, b.specificity)
+ );
+ allStyles.push({
+ rule: element.style,
+ specificity: [0, 0, 0, 0],
+ href: null
+ });
+
+ return getElementStyles(element, allStyles, documentStyles);
+ }
+ };
+}
+
+function walkRules(
+ cssRules: CSSRuleList,
+ documentStyles: CSSStyleDeclaration,
+ styled: CSSStyledElements,
+ pseudoElements: CSSPseudoElements,
+ href?: string
+) {
+ for (const rule of cssRules) {
+ if (rule instanceof CSSStyleRule) {
+ if (isPseudoSelector(rule.selectorText)) {
+ const selectors = parsePseudoSelector(rule.selectorText);
+
+ for (const selector of selectors) {
+ if (!selector || !selector.selector.trim()) continue;
+ const elements = document.querySelectorAll(
+ selector.selector
+ ) as NodeListOf<StyleableElement>;
+
+ for (const element of elements) {
+ if (
+ !(element instanceof HTMLElement) &&
+ !(element instanceof SVGElement)
+ )
+ continue;
+
+ const styles: PseudoElementStyle[] =
+ pseudoElements.get(element) || [];
+ pseudoElements.set(element, styles);
+
+ styles.push({
+ rule: rule.style,
+ href: getBaseUrl(href),
+ pseudoElement: selector.pseudoElement
+ });
+ }
+ }
+ }
+
+ const elements = document.querySelectorAll(
+ rule.selectorText
+ ) as NodeListOf<StyleableElement>;
+
+ for (const element of elements) {
+ if (
+ !(element instanceof HTMLElement) &&
+ !(element instanceof SVGElement)
+ )
+ continue;
+
+ const parts = rule.selectorText.split(",");
+ const styles: SpecifiedStyle[] = styled.get(element) || [];
+ styled.set(element, styles);
+
+ for (const part of parts) {
+ try {
+ const specificity = calculate(part)[0];
+ styles.push({
+ specificity: specificity.specificityArray,
+ rule: rule.style,
+ href: getBaseUrl(href)
+ });
+ break;
+ } catch (e) {
+ console.error(e, href && getBaseUrl(href));
+ // ignore
+ }
+ }
+ }
+ } else if (
+ rule instanceof CSSMediaRule &&
+ window.matchMedia(rule.conditionText).matches
+ ) {
+ walkRules(rule.cssRules, documentStyles, styled, pseudoElements, href);
+ } else if (
+ rule instanceof CSSSupportsRule &&
+ CSS.supports(rule.conditionText)
+ ) {
+ walkRules(rule.cssRules, documentStyles, styled, pseudoElements, href);
+ }
+ }
+}
+
+function getElementStyles(
+ element: StyleableElement,
+ styles: BaseStyle[],
+ documentStyles: CSSStyleDeclaration
+) {
+ const newStyles = newStyleDeclaration();
+ const computedStyle = lazyComputedStyle(element);
+ const overrides = ["display"];
+
+ for (const style of styles) {
+ for (const property of [...style.rule, ...SHORTHANDS]) {
+ let value = style.rule.getPropertyValue(property);
+ if (overrides.includes(property))
+ value = computedStyle.style.getPropertyValue(property);
+
+ if (value.trim()) {
+ setStyle(
+ newStyles,
+ property,
+ value,
+ (variable) => {
+ return (
+ computedStyle.style.getPropertyValue(variable) ||
+ documentStyles.getPropertyValue(variable)
+ );
+ },
+ (url) => {
+ console.log("resolving url", url, style.href);
+ if (url.startsWith("data:") || !style.href) return url;
+ console.log("resolving url", url, style.href.href);
+ if (url.startsWith("/"))
+ return new URL(`${style.href.origin}${url}`).href;
+
+ return new URL(`${style.href.href}${url}`).href;
+ },
+ style.rule.getPropertyPriority(property)
+ );
+ }
+ }
+ }
+ return newStyles;
+}
+
+function setStyle(
+ target: CSSStyleDeclaration,
+ property: string,
+ value: string,
+ get: (variable: string) => string,
+ resolveUrl: (variable: string) => string,
+ priority?: string
+) {
+ value = resolveCssVariables(value, get);
+ value = resolveCssUrl(value, resolveUrl);
+
+ target.setProperty(property, value, priority);
+}
+
+function newStyleDeclaration() {
+ const sheet = new CSSStyleSheet();
+ sheet.insertRule(".dummy{}");
+ return (sheet.cssRules[0] as CSSStyleRule).style;
+}
+
+function lazyComputedStyle(element: StyleableElement) {
+ let computedStyle: CSSStyleDeclaration | undefined;
+
+ return Object.defineProperty({}, "style", {
+ get: () => {
+ if (!computedStyle) computedStyle = getComputedStyle(element);
+ return computedStyle;
+ }
+ }) as { style: CSSStyleDeclaration };
+}
+
+function skipStyleSheet(sheet: StyleSheet) {
+ return sheet.media.mediaText
+ .split(",")
+ .map((t) => t.trim())
+ .includes("print");
+}
+
+function resolveCssVariables(css: string, get: (variable: string) => string) {
+ const tokens = tokenize(css);
+ const finalTokens: string[] = [];
+ for (let i = 0; i < tokens.length; ++i) {
+ const token = tokens[i];
+ if (token === "var") {
+ const args = tokenize(tokens[++i].slice(1, -1));
+ const [variable, operator, space, ...restArgs] = args;
+
+ const value = get(variable);
+ if (value) {
+ finalTokens.push(value);
+ } else if (operator && restArgs.length <= 1) {
+ finalTokens.push(restArgs[0] || space);
+ } else if (operator && restArgs.length === 2) {
+ finalTokens.push(resolveCssVariables(restArgs.join(""), get));
+ }
+ } else if (token.startsWith("(") && token.endsWith(")")) {
+ finalTokens.push("(", resolveCssVariables(token.slice(1, -1), get), ")");
+ } else finalTokens.push(token);
+ }
+ return finalTokens.join("");
+}
+
+function resolveCssUrl(css: string, get: (url: string) => string) {
+ const tokens = tokenize(css);
+ const finalTokens: string[] = [];
+ for (let i = 0; i < tokens.length; ++i) {
+ const token = tokens[i];
+ if (token === "url" && !tokens[i + 1].startsWith("(data")) {
+ const url = tokens[++i].slice(2, -2);
+ const resolvedUrl = get(url);
+ if (resolvedUrl) {
+ finalTokens.push(token);
+ finalTokens.push('("');
+ finalTokens.push(resolvedUrl);
+ finalTokens.push('")');
+ }
+ } else finalTokens.push(token);
+ }
+ return finalTokens.join("");
+}
+
+function getBaseUrl(href?: string | null) {
+ if (!href) return null;
+ if (href.startsWith("/")) href = `${document.location.origin}${href}`;
+ const url = new URL(href);
+ const basepath = url.pathname.split("/").slice(0, -1).join("/");
+ return new URL(`${url.origin}${basepath}/`);
+}
+
+function isPseudoSelector(text: string) {
+ return (
+ text.includes(":before") ||
+ text.includes(":after") ||
+ text.includes("::after") ||
+ text.includes("::before")
+ );
+}
+
+function parsePseudoSelector(selector: string) {
+ const output = [];
+ const selectors = parse(selector);
+ for (const part of selectors) {
+ const pseduoElementIndex = part.findIndex(
+ (s) =>
+ (s.type === SelectorType.Pseudo ||
+ s.type === SelectorType.PseudoElement) &&
+ (s.name === "after" || s.name === "before")
+ );
+ if (pseduoElementIndex <= -1) continue;
+
+ output.push({
+ selector: stringify([part.slice(0, pseduoElementIndex)]),
+ pseudoElement: stringify([part.slice(pseduoElementIndex)])
+ });
+ }
+ return output;
+}
diff --git a/packages/clipper/src/types.ts b/packages/clipper/src/types.ts
new file mode 100644
index 000000000..63bcb533c
--- /dev/null
+++ b/packages/clipper/src/types.ts
@@ -0,0 +1,52 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+import { FetchOptions } from "./fetch";
+
+export type ClipArea = "full-page" | "visible" | "selection" | "article";
+export type ClipMode = "simplified" | "screenshot" | "complete";
+// | "full"
+// | "article"
+// | "simple-article"
+// | "full-screenshot"
+// | "screenshot"
+// | "manual";
+
+export type ClipData = string;
+
+export type Filter = (node: HTMLElement) => boolean;
+
+export type InlineOptions = {
+ stylesheets?: boolean;
+ fonts?: boolean;
+ images?: boolean;
+};
+
+export type Options = {
+ filter?: Filter;
+ onCloned?: (document: HTMLElement) => void;
+ backgroundColor?: CSSStyleDeclaration["backgroundColor"];
+ width?: number;
+ height?: number;
+ style?: CSSStyleDeclaration;
+ quality?: number;
+ raster?: boolean;
+ scale?: number;
+ fetchOptions?: FetchOptions;
+ inlineOptions?: InlineOptions;
+};
diff --git a/packages/clipper/src/utils.ts b/packages/clipper/src/utils.ts
new file mode 100644
index 000000000..97851259b
--- /dev/null
+++ b/packages/clipper/src/utils.ts
@@ -0,0 +1,183 @@
+/*
+This file is part of the Notesnook project (https://notesnook.com/)
+
+Copyright (C) 2022 Streetwriters (Private) Limited
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * Only WOFF and EOT mime types for fonts are 'real'
+ * see http://www.iana.org/assignments/media-types/media-types.xhtml
+ */
+const WOFF = "application/font-woff";
+const JPEG = "image/jpeg";
+
+const mimes = {
+ woff: WOFF,
+ woff2: WOFF,
+ ttf: "application/font-truetype",
+ eot: "application/vnd.ms-fontobject",
+ png: "image/png",
+ jpg: JPEG,
+ jpeg: JPEG,
+ gif: "image/gif",
+ tiff: "image/tiff",
+ svg: "image/svg+xml"
+};
+
+function parseExtension(url: string) {
+ const match = /\.([^./]*?)(\?|$)/g.exec(url);
+ if (match) return match[1];
+ else return "";
+}
+
+function mimeType(url: string) {
+ const extension = parseExtension(url).toLowerCase();
+ return mimes[extension as keyof typeof mimes] || "";
+}
+
+function isDataUrl(url: string) {
+ return url.search(/^(data:)/) !== -1;
+}
+
+function asBlob(canvas: HTMLCanvasElement) {
+ const binaryString = atob(canvas.toDataURL().split(",")[1]);
+ const length = binaryString.length;
+ const binaryArray = new Uint8Array(length);
+
+ for (let i = 0; i < length; i++) binaryArray[i] = binaryString.charCodeAt(i);
+
+ return new Blob([binaryArray], {
+ type: "image/png"
+ });
+}
+
+function canvasToBlob(canvas: HTMLCanvasElement) {
+ if (canvas.toBlob)
+ return new Promise<Blob | null>(function (resolve) {
+ canvas.toBlob(resolve);
+ });
+
+ return Promise.resolve(asBlob(canvas));
+}
+
+function resolveUrl(url: string, baseUrl: string) {
+ const doc = document.implementation.createHTMLDocument();
+ const base = doc.createElement("base");
+ doc.head.appendChild(base);
+ const a = doc.createElement("a");
+ doc.body.appendChild(a);
+ base.href = baseUrl;
+ a.href = url;
+ return a.href;
+}
+
+let index = 0;
+function uid() {
+ return "u" + fourRandomChars() + index++;
+
+ function fourRandomChars() {
+ /* see http://stackoverflow.com/a/6248722/2519373 */
+ return (
+ "0000" + ((Math.random() * Math.pow(36, 4)) << 0).toString(36)
+ ).slice(-4);
+ }
+}
+
+function dataAsUrl(content: string, type: string) {
+ return "data:" + type + ";base64," + content;
+}
+
+function escape(string: string) {
+ return string.replace(/([.*+?^${}()|[\]/\\])/g, "\\$1");
+}
+
+function delay(ms: number) {
+ return function <T>(arg: T) {
+ return new Promise<T>(function (resolve) {
+ setTimeout(function () {
+ resolve(arg);
+ }, ms);
+ });
+ };
+}
+
+function asArray<T>(arrayLike: ArrayLike<T>) {
+ const array = [];
+ const length = arrayLike.length;
+ for (let i = 0; i < length; i++) array.push(arrayLike[i]);
+ return array;
+}
+
+function escapeXhtml(string: string) {
+ return string.replace(/%/g, "%25").replace(/#/g, "%23").replace(/\n/g, "%0A");
+}
+
+function width(node: HTMLElement) {
+ const leftBorder = px(node, "border-left-width");
+ const rightBorder = px(node, "border-right-width");
+ return node.scrollWidth + leftBorder + rightBorder;
+}
+
+function height(node: HTMLElement) {
+ const topBorder = px(node, "border-top-width");
+ const bottomBorder = px(node, "border-bottom-width");
+ return node.scrollHeight + topBorder + bottomBorder;
+}
+
+function px(node: HTMLElement, styleProperty: string) {
+ const value = getComputedStyle(node).getPropertyValue(styleProperty);
+ return parseFloat(value.replace("px", ""));
+}
+
+function injectCss(rules: string, id: string) {
+ const variableCss = document.getElementById(id);
+ const head = document.getElementsByTagName("head")[0];
+ if (variableCss) {
+ head.removeChild(variableCss);
+ }
+ const css = document.createElement("style");
+ css.type = "text/css";
+ css.id = id;
+ css.appendChild(document.createTextNode(rules));
+
+ head.insertBefore(css, getRootStylesheet());
+}
+
+function getRootStylesheet() {
+ for (const sty of document.querySelectorAll("style")) {
+ if (sty.innerHTML.includes("#root")) {
+ return sty;
+ }
+ }
+ return null;
+}
+
+export {
+ injectCss,
+ escape,
+ parseExtension,
+ mimeType,
+ dataAsUrl,
+ isDataUrl,
+ canvasToBlob,
+ resolveUrl,
+ uid,
+ delay,
+ asArray,
+ escapeXhtml,
+ width,
+ height
+};
diff --git a/packages/clipper/tsconfig.json b/packages/clipper/tsconfig.json
new file mode 100644
index 000000000..d16fd5171
--- /dev/null
+++ b/packages/clipper/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../../tsconfig",
+ "compilerOptions": {
+ "outDir": "./dist",
+ "module": "CommonJS"
+ },
+ "include": ["src/"]
+}