diff --git a/.babelrc.cjs b/.babelrc.cjs
deleted file mode 100644
index 813530b..0000000
--- a/.babelrc.cjs
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- presets: ['env']
-}
diff --git a/.eslintignore b/.eslintignore
index 4785fe4..84dd626 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,4 @@
+tsconfig.json
node_modules
dist
yarn.lock
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 0000000..677c754
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,30 @@
+{
+ "root": true,
+ "extends": [
+ "standard",
+ "prettier",
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:json/recommended",
+ "plugin:markdown/recommended",
+ "plugin:yml/recommended",
+ "plugin:yml/prettier"
+ ],
+ "parser": "@typescript-eslint/parser",
+ "plugins": [
+ "@typescript-eslint"
+ ],
+ "overrides": [
+ {
+ "files": [
+ "*.yml"
+ ],
+ "rules": {
+ "camelcase": "off",
+ "no-labels": "off",
+ "no-unused-labels": "off",
+ "no-unused-expressions": "off"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index 463ca41..0000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = {
- root: true,
- extends: [
- 'standard',
- 'prettier',
- 'plugin:json/recommended',
- 'plugin:markdown/recommended',
- 'plugin:yml/recommended',
- 'plugin:yml/prettier'
- ],
- parser: '@babel/eslint-parser',
- overrides: [
- {
- files: ['*.yml'],
- rules: {
- camelcase: 'off',
- 'no-labels': 'off',
- 'no-unused-expressions': 'off'
- }
- }
- ]
-};
diff --git a/.github/workflows/feedbot.yml b/.github/workflows/feedbot.yml
index f6928bf..2afff40 100644
--- a/.github/workflows/feedbot.yml
+++ b/.github/workflows/feedbot.yml
@@ -17,8 +17,22 @@ jobs:
uses: actions/cache@v2
with:
path: ./slackfeedbot-cache
- key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
- restore-keys: feed-cache-
+ key: feed-cache-e-${{ steps.generate-key.outputs.cache-key }}
+ restore-keys: feed-cache-e-
+ - name: LAT
+ uses: 'selfagency/slackfeedbot@dev'
+ with:
+ rss: 'https://www.latimes.com/rss2.0.xml'
+ slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
+ cache_dir: './slackfeedbot-cache'
+ continue-on-error: true
+ - name: WaPo
+ uses: 'selfagency/slackfeedbot@dev'
+ with:
+ rss: 'https://feeds.washingtonpost.com/rss/homepage'
+ slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
+ cache_dir: './slackfeedbot-cache'
+ continue-on-error: true
- name: GitHub
uses: 'selfagency/slackfeedbot@dev'
with:
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 9b11ece..1fb5af0 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
-./node_modules/.bin/ncc build action.js --license licenses.txt
+npm run bundle
git add dist
-./node_modules/.bin/lint-staged --allow-empty
+npm run lint-staged
diff --git a/.prettierrc b/.prettierrc
index 419e3f4..c6fefc6 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -6,7 +6,6 @@
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
- "jsxBracketSameLine": true,
"arrowParens": "avoid",
"requirePragma": false,
"insertPragma": false,
diff --git a/README.md b/README.md
index 7d4f8dc..38888da 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ jobs:
key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-
- name: NYT
- uses: 'selfagency/feedbot@v1.2.4'
+ uses: 'selfagency/slackfeedbot@v1.2.6'
with:
rss: 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml'
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
@@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: NYT
- uses: 'selfagency/feedbot@v1.2.4'
+ uses: 'selfagency/slackfeedbot@v1.2.6'
with:
rss: 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml'
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
@@ -106,7 +106,7 @@ jobs:
key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-
- name: NYT
- uses: 'selfagency/feedbot@v1.2.4'
+ uses: 'selfagency/slackfeedbot@v1.2.6'
with:
rss: 'https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml'
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
@@ -138,13 +138,13 @@ jobs:
key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-
- name: LAT
- uses: 'selfagency/feedbot@v1.2.4'
+ uses: 'selfagency/slackfeedbot@v1.2.6'
with:
rss: 'https://www.latimes.com/rss2.0.xml'
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
cache_dir: './slackfeedbot-cache'
- name: WaPo
- uses: 'selfagency/feedbot@v1.2.4'
+ uses: 'selfagency/slackfeedbot@v1.2.6'
with:
rss: 'https://feeds.washingtonpost.com/rss/homepage'
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
diff --git a/action.js b/action.js
deleted file mode 100644
index 95454a1..0000000
--- a/action.js
+++ /dev/null
@@ -1,197 +0,0 @@
-import core from '@actions/core';
-import dayjs from 'dayjs';
-import { mkdir, readFile, writeFile } from 'fs';
-import html2md from 'html-to-md';
-import { compile } from 'html-to-text';
-import fetch from 'node-fetch';
-import * as objectSha from 'object-sha';
-import { parse } from 'rss-to-json';
-import { promisify } from 'util';
-
-const read = promisify(readFile);
-const write = promisify(writeFile);
-const md = promisify(mkdir);
-const { debug, setFailed, getInput, getBooleanInput } = core;
-const html2txt = compile({
- wordwrap: 120
-});
-
-const hash = async obj => {
- const toHash = objectSha.hashable(obj);
- const hashed = await objectSha.digest(toHash);
- return hashed;
-};
-
-const validate = () => {
- if (!getInput('rss') || !getInput('rss').startsWith('http')) {
- throw new Error('No feed or invalid feed specified');
- }
-
- if (!getInput('slack_webhook') || !getInput('slack_webhook').startsWith('https')) {
- throw new Error('No Slack webhook or invalid webhook specified');
- }
-
- if (!getInput('interval') && !getInput('cache_dir')) {
- throw new Error('No interval or cache folder specified');
- }
-
- if (getInput('interval') && parseInt(getInput('interval')).toString() === 'NaN') {
- throw new Error('Invalid interval specified');
- }
-};
-
-const getFeedImg = async rssFeed => {
- const url = new URL(rssFeed);
- let favicon;
-
- try {
- let icons = await fetch(
- `https:/favicongrabber.com/api/grab/${url.hostname
- .replace('//status.', '//')
- .replace('//feed.', '//')
- .replace('//fees.', '//')
- .replace('//rss.', '//')}`
- );
- icons = await icons.json();
- debug(icons);
- favicon = icons.icons.find(i => i?.sizes === '144x144')?.src || icons.icons[0]?.src;
- debug(favicon);
- } catch {
- debug('Favicon not found');
- favicon = undefined;
- }
-
- return favicon;
-};
-
-const run = async () => {
- try {
- debug(`Validating inputs`);
- validate();
-
- const rssFeed = getInput('rss');
- const rssFeedUrl = new URL(rssFeed);
- const slackWebhook = getInput('slack_webhook');
- const interval = parseInt(getInput('interval'));
- const cacheDir = getInput('cache_dir');
- const cachePath = `${cacheDir}/${rssFeedUrl.hostname.replace(/\./g, '_')}.json`;
-
- let unfurl = false;
- try {
- unfurl = getBooleanInput('unfurl');
- } catch (err) {
- debug(err);
- }
-
- debug(`Retrieving ${rssFeed}`);
- const rss = await parse(rssFeed);
- // debug(rss);
-
- debug('Checking for feed items');
- if (rss?.items?.length) {
- let toSend = [];
- let published = [];
- if (cacheDir) {
- debug(`Retrieving previously published entries`);
- try {
- published = JSON.parse(await read(cachePath, 'utf8'));
- // debug(published);
-
- for (const item in rss.items) {
- let cacheHit = false;
- for (const pubbed in published) {
- if (pubbed === (await hash({ title: item.title, date: item.created }))) {
- cacheHit = true;
- }
- }
- if (cacheHit) toSend.push(item);
- }
- } catch (err) {
- debug(err.message);
- toSend = rss.items.filter(item => {
- return dayjs(item.created).isAfter(dayjs().subtract(60, 'minute'));
- });
- }
- } else {
- debug(`Selecting items posted in the last ${interval} minutes`);
- toSend = rss.items.filter(item => {
- return dayjs(item.created).isAfter(dayjs().subtract(interval, 'minute'));
- });
- }
-
- const blocks = toSend.map(item => {
- let text = '';
-
- if (!unfurl) {
- if (item.title) text += `*${html2txt(item.title)}*\n`;
- if (item.description) {
- const description = html2md(item.description);
- debug(description);
- text += `${description.replace(/[Rr]ead more/g, '…').replace(/\n/g, ' ')}\n`;
- }
- if (item.link) text += `<${item.link}|Read more>`;
- } else {
- if (item.title) text += `<${item.link}|${html2txt(item.title + item.created)}>`;
- }
-
- return {
- type: 'section',
- text: {
- type: 'mrkdwn',
- text
- }
- };
- });
- // debug(blocks);
-
- debug(`Sending ${toSend.length} item(s)`);
- if (toSend.length > 0) {
- const payload = {
- as_user: false,
- username: rss.title ? html2txt(rss.title) : 'FeedBot',
- icon_url: await getFeedImg(rssFeed),
- unfurl_links: unfurl,
- unfurl_media: unfurl,
- blocks
- };
- debug(payload);
-
- const res = await fetch(slackWebhook, {
- method: 'POST',
- body: JSON.stringify(payload),
- headers: {
- 'Content-Type': 'application/json; charset=utf-8',
- Accept: 'application/json'
- }
- });
- debug(res);
-
- if (cacheDir) {
- debug(`Writing cache to ${cachePath}`);
- try {
- await md(cacheDir, { recursive: true });
- } catch (err) {
- debug(err.message);
- }
-
- const hashed = [...published];
- for (const sent of toSend) {
- hashed.push(await hash({ title: sent.title, date: sent.created }));
- }
-
- await write(cachePath, JSON.stringify(hashed));
- }
- }
- } else {
- throw new Error('No feed items found');
- }
- } catch (err) {
- debug('Operation failed due to error');
- setFailed(err.message);
- process.exit(1);
- }
-};
-
-(async () => {
- await run();
-})();
diff --git a/action.yml b/action.yml
index 9750a8d..6a0d79f 100644
--- a/action.yml
+++ b/action.yml
@@ -22,4 +22,4 @@ inputs:
required: false
runs:
using: 'node16'
- main: 'dist/index.js'
+ main: 'dist/index.cjs'
diff --git a/dist/37.index.js b/dist/37.index.js
deleted file mode 100644
index 62eb6b6..0000000
--- a/dist/37.index.js
+++ /dev/null
@@ -1,450 +0,0 @@
-export const id = 37;
-export const ids = [37];
-export const modules = {
-
-/***/ 4037:
-/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
-
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ "toFormData": () => (/* binding */ toFormData)
-/* harmony export */ });
-/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2777);
-/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8010);
-
-
-
-let s = 0;
-const S = {
- START_BOUNDARY: s++,
- HEADER_FIELD_START: s++,
- HEADER_FIELD: s++,
- HEADER_VALUE_START: s++,
- HEADER_VALUE: s++,
- HEADER_VALUE_ALMOST_DONE: s++,
- HEADERS_ALMOST_DONE: s++,
- PART_DATA_START: s++,
- PART_DATA: s++,
- END: s++
-};
-
-let f = 1;
-const F = {
- PART_BOUNDARY: f,
- LAST_BOUNDARY: f *= 2
-};
-
-const LF = 10;
-const CR = 13;
-const SPACE = 32;
-const HYPHEN = 45;
-const COLON = 58;
-const A = 97;
-const Z = 122;
-
-const lower = c => c | 0x20;
-
-const noop = () => {};
-
-class MultipartParser {
- /**
- * @param {string} boundary
- */
- constructor(boundary) {
- this.index = 0;
- this.flags = 0;
-
- this.onHeaderEnd = noop;
- this.onHeaderField = noop;
- this.onHeadersEnd = noop;
- this.onHeaderValue = noop;
- this.onPartBegin = noop;
- this.onPartData = noop;
- this.onPartEnd = noop;
-
- this.boundaryChars = {};
-
- boundary = '\r\n--' + boundary;
- const ui8a = new Uint8Array(boundary.length);
- for (let i = 0; i < boundary.length; i++) {
- ui8a[i] = boundary.charCodeAt(i);
- this.boundaryChars[ui8a[i]] = true;
- }
-
- this.boundary = ui8a;
- this.lookbehind = new Uint8Array(this.boundary.length + 8);
- this.state = S.START_BOUNDARY;
- }
-
- /**
- * @param {Uint8Array} data
- */
- write(data) {
- let i = 0;
- const length_ = data.length;
- let previousIndex = this.index;
- let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
- const boundaryLength = this.boundary.length;
- const boundaryEnd = boundaryLength - 1;
- const bufferLength = data.length;
- let c;
- let cl;
-
- const mark = name => {
- this[name + 'Mark'] = i;
- };
-
- const clear = name => {
- delete this[name + 'Mark'];
- };
-
- const callback = (callbackSymbol, start, end, ui8a) => {
- if (start === undefined || start !== end) {
- this[callbackSymbol](ui8a && ui8a.subarray(start, end));
- }
- };
-
- const dataCallback = (name, clear) => {
- const markSymbol = name + 'Mark';
- if (!(markSymbol in this)) {
- return;
- }
-
- if (clear) {
- callback(name, this[markSymbol], i, data);
- delete this[markSymbol];
- } else {
- callback(name, this[markSymbol], data.length, data);
- this[markSymbol] = 0;
- }
- };
-
- for (i = 0; i < length_; i++) {
- c = data[i];
-
- switch (state) {
- case S.START_BOUNDARY:
- if (index === boundary.length - 2) {
- if (c === HYPHEN) {
- flags |= F.LAST_BOUNDARY;
- } else if (c !== CR) {
- return;
- }
-
- index++;
- break;
- } else if (index - 1 === boundary.length - 2) {
- if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
- state = S.END;
- flags = 0;
- } else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
- index = 0;
- callback('onPartBegin');
- state = S.HEADER_FIELD_START;
- } else {
- return;
- }
-
- break;
- }
-
- if (c !== boundary[index + 2]) {
- index = -2;
- }
-
- if (c === boundary[index + 2]) {
- index++;
- }
-
- break;
- case S.HEADER_FIELD_START:
- state = S.HEADER_FIELD;
- mark('onHeaderField');
- index = 0;
- // falls through
- case S.HEADER_FIELD:
- if (c === CR) {
- clear('onHeaderField');
- state = S.HEADERS_ALMOST_DONE;
- break;
- }
-
- index++;
- if (c === HYPHEN) {
- break;
- }
-
- if (c === COLON) {
- if (index === 1) {
- // empty header field
- return;
- }
-
- dataCallback('onHeaderField', true);
- state = S.HEADER_VALUE_START;
- break;
- }
-
- cl = lower(c);
- if (cl < A || cl > Z) {
- return;
- }
-
- break;
- case S.HEADER_VALUE_START:
- if (c === SPACE) {
- break;
- }
-
- mark('onHeaderValue');
- state = S.HEADER_VALUE;
- // falls through
- case S.HEADER_VALUE:
- if (c === CR) {
- dataCallback('onHeaderValue', true);
- callback('onHeaderEnd');
- state = S.HEADER_VALUE_ALMOST_DONE;
- }
-
- break;
- case S.HEADER_VALUE_ALMOST_DONE:
- if (c !== LF) {
- return;
- }
-
- state = S.HEADER_FIELD_START;
- break;
- case S.HEADERS_ALMOST_DONE:
- if (c !== LF) {
- return;
- }
-
- callback('onHeadersEnd');
- state = S.PART_DATA_START;
- break;
- case S.PART_DATA_START:
- state = S.PART_DATA;
- mark('onPartData');
- // falls through
- case S.PART_DATA:
- previousIndex = index;
-
- if (index === 0) {
- // boyer-moore derrived algorithm to safely skip non-boundary data
- i += boundaryEnd;
- while (i < bufferLength && !(data[i] in boundaryChars)) {
- i += boundaryLength;
- }
-
- i -= boundaryEnd;
- c = data[i];
- }
-
- if (index < boundary.length) {
- if (boundary[index] === c) {
- if (index === 0) {
- dataCallback('onPartData', true);
- }
-
- index++;
- } else {
- index = 0;
- }
- } else if (index === boundary.length) {
- index++;
- if (c === CR) {
- // CR = part boundary
- flags |= F.PART_BOUNDARY;
- } else if (c === HYPHEN) {
- // HYPHEN = end boundary
- flags |= F.LAST_BOUNDARY;
- } else {
- index = 0;
- }
- } else if (index - 1 === boundary.length) {
- if (flags & F.PART_BOUNDARY) {
- index = 0;
- if (c === LF) {
- // unset the PART_BOUNDARY flag
- flags &= ~F.PART_BOUNDARY;
- callback('onPartEnd');
- callback('onPartBegin');
- state = S.HEADER_FIELD_START;
- break;
- }
- } else if (flags & F.LAST_BOUNDARY) {
- if (c === HYPHEN) {
- callback('onPartEnd');
- state = S.END;
- flags = 0;
- } else {
- index = 0;
- }
- } else {
- index = 0;
- }
- }
-
- if (index > 0) {
- // when matching a possible boundary, keep a lookbehind reference
- // in case it turns out to be a false lead
- lookbehind[index - 1] = c;
- } else if (previousIndex > 0) {
- // if our boundary turned out to be rubbish, the captured lookbehind
- // belongs to partData
- const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
- callback('onPartData', 0, previousIndex, _lookbehind);
- previousIndex = 0;
- mark('onPartData');
-
- // reconsider the current character even so it interrupted the sequence
- // it could be the beginning of a new sequence
- i--;
- }
-
- break;
- case S.END:
- break;
- default:
- throw new Error(`Unexpected state entered: ${state}`);
- }
- }
-
- dataCallback('onHeaderField');
- dataCallback('onHeaderValue');
- dataCallback('onPartData');
-
- // Update properties for the next call
- this.index = index;
- this.state = state;
- this.flags = flags;
- }
-
- end() {
- if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
- (this.state === S.PART_DATA && this.index === this.boundary.length)) {
- this.onPartEnd();
- } else if (this.state !== S.END) {
- throw new Error('MultipartParser.end(): stream ended unexpectedly');
- }
- }
-}
-
-function _fileName(headerValue) {
- // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
- const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
- if (!m) {
- return;
- }
-
- const match = m[2] || m[3] || '';
- let filename = match.slice(match.lastIndexOf('\\') + 1);
- filename = filename.replace(/%22/g, '"');
- filename = filename.replace(/(\d{4});/g, (m, code) => {
- return String.fromCharCode(code);
- });
- return filename;
-}
-
-async function toFormData(Body, ct) {
- if (!/multipart/i.test(ct)) {
- throw new TypeError('Failed to fetch');
- }
-
- const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
-
- if (!m) {
- throw new TypeError('no or bad content-type header, no multipart boundary');
- }
-
- const parser = new MultipartParser(m[1] || m[2]);
-
- let headerField;
- let headerValue;
- let entryValue;
- let entryName;
- let contentType;
- let filename;
- const entryChunks = [];
- const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct();
-
- const onPartData = ui8a => {
- entryValue += decoder.decode(ui8a, {stream: true});
- };
-
- const appendToFile = ui8a => {
- entryChunks.push(ui8a);
- };
-
- const appendFileToFormData = () => {
- const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType});
- formData.append(entryName, file);
- };
-
- const appendEntryToFormData = () => {
- formData.append(entryName, entryValue);
- };
-
- const decoder = new TextDecoder('utf-8');
- decoder.decode();
-
- parser.onPartBegin = function () {
- parser.onPartData = onPartData;
- parser.onPartEnd = appendEntryToFormData;
-
- headerField = '';
- headerValue = '';
- entryValue = '';
- entryName = '';
- contentType = '';
- filename = null;
- entryChunks.length = 0;
- };
-
- parser.onHeaderField = function (ui8a) {
- headerField += decoder.decode(ui8a, {stream: true});
- };
-
- parser.onHeaderValue = function (ui8a) {
- headerValue += decoder.decode(ui8a, {stream: true});
- };
-
- parser.onHeaderEnd = function () {
- headerValue += decoder.decode();
- headerField = headerField.toLowerCase();
-
- if (headerField === 'content-disposition') {
- // matches either a quoted-string or a token (RFC 2616 section 19.5.1)
- const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
-
- if (m) {
- entryName = m[2] || m[3] || '';
- }
-
- filename = _fileName(headerValue);
-
- if (filename) {
- parser.onPartData = appendToFile;
- parser.onPartEnd = appendFileToFormData;
- }
- } else if (headerField === 'content-type') {
- contentType = headerValue;
- }
-
- headerValue = '';
- headerField = '';
- };
-
- for await (const chunk of Body) {
- parser.write(chunk);
- }
-
- parser.end();
-
- return formData;
-}
-
-
-/***/ })
-
-};
diff --git a/dist/index.cjs b/dist/index.cjs
new file mode 100644
index 0000000..e819813
--- /dev/null
+++ b/dist/index.cjs
@@ -0,0 +1,30065 @@
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __defProps = Object.defineProperties;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getOwnPropSymbols = Object.getOwnPropertySymbols;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __propIsEnum = Object.prototype.propertyIsEnumerable;
+var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
+var __spreadValues = (a, b) => {
+ for (var prop2 in b || (b = {}))
+ if (__hasOwnProp.call(b, prop2))
+ __defNormalProp(a, prop2, b[prop2]);
+ if (__getOwnPropSymbols)
+ for (var prop2 of __getOwnPropSymbols(b)) {
+ if (__propIsEnum.call(b, prop2))
+ __defNormalProp(a, prop2, b[prop2]);
+ }
+ return a;
+};
+var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
+var __esm = (fn, res) => function __init() {
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
+};
+var __commonJS = (cb, mod) => function __require() {
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key2 of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key2) && key2 !== except)
+ __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
+ }
+ return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// node_modules/@actions/core/lib/utils.js
+var require_utils = __commonJS({
+ "node_modules/@actions/core/lib/utils.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.toCommandProperties = exports.toCommandValue = void 0;
+ function toCommandValue(input) {
+ if (input === null || input === void 0) {
+ return "";
+ } else if (typeof input === "string" || input instanceof String) {
+ return input;
+ }
+ return JSON.stringify(input);
+ }
+ exports.toCommandValue = toCommandValue;
+ function toCommandProperties(annotationProperties) {
+ if (!Object.keys(annotationProperties).length) {
+ return {};
+ }
+ return {
+ title: annotationProperties.title,
+ file: annotationProperties.file,
+ line: annotationProperties.startLine,
+ endLine: annotationProperties.endLine,
+ col: annotationProperties.startColumn,
+ endColumn: annotationProperties.endColumn
+ };
+ }
+ exports.toCommandProperties = toCommandProperties;
+ }
+});
+
+// node_modules/@actions/core/lib/command.js
+var require_command = __commonJS({
+ "node_modules/@actions/core/lib/command.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.issue = exports.issueCommand = void 0;
+ var os2 = __importStar(require("os"));
+ var utils_1 = require_utils();
+ function issueCommand(command, properties, message) {
+ const cmd = new Command(command, properties, message);
+ process.stdout.write(cmd.toString() + os2.EOL);
+ }
+ exports.issueCommand = issueCommand;
+ function issue(name, message = "") {
+ issueCommand(name, {}, message);
+ }
+ exports.issue = issue;
+ var CMD_STRING = "::";
+ var Command = class {
+ constructor(command, properties, message) {
+ if (!command) {
+ command = "missing.command";
+ }
+ this.command = command;
+ this.properties = properties;
+ this.message = message;
+ }
+ toString() {
+ let cmdStr = CMD_STRING + this.command;
+ if (this.properties && Object.keys(this.properties).length > 0) {
+ cmdStr += " ";
+ let first = true;
+ for (const key2 in this.properties) {
+ if (this.properties.hasOwnProperty(key2)) {
+ const val = this.properties[key2];
+ if (val) {
+ if (first) {
+ first = false;
+ } else {
+ cmdStr += ",";
+ }
+ cmdStr += `${key2}=${escapeProperty(val)}`;
+ }
+ }
+ }
+ }
+ cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
+ return cmdStr;
+ }
+ };
+ function escapeData(s2) {
+ return utils_1.toCommandValue(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
+ }
+ function escapeProperty(s2) {
+ return utils_1.toCommandValue(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C");
+ }
+ }
+});
+
+// node_modules/@actions/core/lib/file-command.js
+var require_file_command = __commonJS({
+ "node_modules/@actions/core/lib/file-command.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.issueCommand = void 0;
+ var fs3 = __importStar(require("fs"));
+ var os2 = __importStar(require("os"));
+ var utils_1 = require_utils();
+ function issueCommand(command, message) {
+ const filePath = process.env[`GITHUB_${command}`];
+ if (!filePath) {
+ throw new Error(`Unable to find environment variable for file command ${command}`);
+ }
+ if (!fs3.existsSync(filePath)) {
+ throw new Error(`Missing file at path: ${filePath}`);
+ }
+ fs3.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os2.EOL}`, {
+ encoding: "utf8"
+ });
+ }
+ exports.issueCommand = issueCommand;
+ }
+});
+
+// node_modules/@actions/http-client/proxy.js
+var require_proxy = __commonJS({
+ "node_modules/@actions/http-client/proxy.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ function getProxyUrl(reqUrl) {
+ let usingSsl = reqUrl.protocol === "https:";
+ let proxyUrl;
+ if (checkBypass(reqUrl)) {
+ return proxyUrl;
+ }
+ let proxyVar;
+ if (usingSsl) {
+ proxyVar = process.env["https_proxy"] || process.env["HTTPS_PROXY"];
+ } else {
+ proxyVar = process.env["http_proxy"] || process.env["HTTP_PROXY"];
+ }
+ if (proxyVar) {
+ proxyUrl = new URL(proxyVar);
+ }
+ return proxyUrl;
+ }
+ exports.getProxyUrl = getProxyUrl;
+ function checkBypass(reqUrl) {
+ if (!reqUrl.hostname) {
+ return false;
+ }
+ let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || "";
+ if (!noProxy) {
+ return false;
+ }
+ let reqPort;
+ if (reqUrl.port) {
+ reqPort = Number(reqUrl.port);
+ } else if (reqUrl.protocol === "http:") {
+ reqPort = 80;
+ } else if (reqUrl.protocol === "https:") {
+ reqPort = 443;
+ }
+ let upperReqHosts = [reqUrl.hostname.toUpperCase()];
+ if (typeof reqPort === "number") {
+ upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
+ }
+ for (let upperNoProxyItem of noProxy.split(",").map((x2) => x2.trim().toUpperCase()).filter((x2) => x2)) {
+ if (upperReqHosts.some((x2) => x2 === upperNoProxyItem)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ exports.checkBypass = checkBypass;
+ }
+});
+
+// node_modules/tunnel/lib/tunnel.js
+var require_tunnel = __commonJS({
+ "node_modules/tunnel/lib/tunnel.js"(exports) {
+ "use strict";
+ var net = require("net");
+ var tls = require("tls");
+ var http3 = require("http");
+ var https2 = require("https");
+ var events = require("events");
+ var assert = require("assert");
+ var util = require("util");
+ exports.httpOverHttp = httpOverHttp;
+ exports.httpsOverHttp = httpsOverHttp;
+ exports.httpOverHttps = httpOverHttps;
+ exports.httpsOverHttps = httpsOverHttps;
+ function httpOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http3.request;
+ return agent;
+ }
+ function httpsOverHttp(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = http3.request;
+ agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
+ return agent;
+ }
+ function httpOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https2.request;
+ return agent;
+ }
+ function httpsOverHttps(options) {
+ var agent = new TunnelingAgent(options);
+ agent.request = https2.request;
+ agent.createSocket = createSecureSocket;
+ agent.defaultPort = 443;
+ return agent;
+ }
+ function TunnelingAgent(options) {
+ var self2 = this;
+ self2.options = options || {};
+ self2.proxyOptions = self2.options.proxy || {};
+ self2.maxSockets = self2.options.maxSockets || http3.Agent.defaultMaxSockets;
+ self2.requests = [];
+ self2.sockets = [];
+ self2.on("free", function onFree(socket, host, port, localAddress) {
+ var options2 = toOptions(host, port, localAddress);
+ for (var i2 = 0, len = self2.requests.length; i2 < len; ++i2) {
+ var pending = self2.requests[i2];
+ if (pending.host === options2.host && pending.port === options2.port) {
+ self2.requests.splice(i2, 1);
+ pending.request.onSocket(socket);
+ return;
+ }
+ }
+ socket.destroy();
+ self2.removeSocket(socket);
+ });
+ }
+ util.inherits(TunnelingAgent, events.EventEmitter);
+ TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
+ var self2 = this;
+ var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress));
+ if (self2.sockets.length >= this.maxSockets) {
+ self2.requests.push(options);
+ return;
+ }
+ self2.createSocket(options, function(socket) {
+ socket.on("free", onFree);
+ socket.on("close", onCloseOrRemove);
+ socket.on("agentRemove", onCloseOrRemove);
+ req.onSocket(socket);
+ function onFree() {
+ self2.emit("free", socket, options);
+ }
+ function onCloseOrRemove(err) {
+ self2.removeSocket(socket);
+ socket.removeListener("free", onFree);
+ socket.removeListener("close", onCloseOrRemove);
+ socket.removeListener("agentRemove", onCloseOrRemove);
+ }
+ });
+ };
+ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
+ var self2 = this;
+ var placeholder = {};
+ self2.sockets.push(placeholder);
+ var connectOptions = mergeOptions({}, self2.proxyOptions, {
+ method: "CONNECT",
+ path: options.host + ":" + options.port,
+ agent: false,
+ headers: {
+ host: options.host + ":" + options.port
+ }
+ });
+ if (options.localAddress) {
+ connectOptions.localAddress = options.localAddress;
+ }
+ if (connectOptions.proxyAuth) {
+ connectOptions.headers = connectOptions.headers || {};
+ connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64");
+ }
+ debug("making CONNECT request");
+ var connectReq = self2.request(connectOptions);
+ connectReq.useChunkedEncodingByDefault = false;
+ connectReq.once("response", onResponse);
+ connectReq.once("upgrade", onUpgrade);
+ connectReq.once("connect", onConnect);
+ connectReq.once("error", onError);
+ connectReq.end();
+ function onResponse(res) {
+ res.upgrade = true;
+ }
+ function onUpgrade(res, socket, head) {
+ process.nextTick(function() {
+ onConnect(res, socket, head);
+ });
+ }
+ function onConnect(res, socket, head) {
+ connectReq.removeAllListeners();
+ socket.removeAllListeners();
+ if (res.statusCode !== 200) {
+ debug("tunneling socket could not be established, statusCode=%d", res.statusCode);
+ socket.destroy();
+ var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode);
+ error.code = "ECONNRESET";
+ options.request.emit("error", error);
+ self2.removeSocket(placeholder);
+ return;
+ }
+ if (head.length > 0) {
+ debug("got illegal response body from proxy");
+ socket.destroy();
+ var error = new Error("got illegal response body from proxy");
+ error.code = "ECONNRESET";
+ options.request.emit("error", error);
+ self2.removeSocket(placeholder);
+ return;
+ }
+ debug("tunneling connection has established");
+ self2.sockets[self2.sockets.indexOf(placeholder)] = socket;
+ return cb(socket);
+ }
+ function onError(cause) {
+ connectReq.removeAllListeners();
+ debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack);
+ var error = new Error("tunneling socket could not be established, cause=" + cause.message);
+ error.code = "ECONNRESET";
+ options.request.emit("error", error);
+ self2.removeSocket(placeholder);
+ }
+ };
+ TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
+ var pos = this.sockets.indexOf(socket);
+ if (pos === -1) {
+ return;
+ }
+ this.sockets.splice(pos, 1);
+ var pending = this.requests.shift();
+ if (pending) {
+ this.createSocket(pending, function(socket2) {
+ pending.request.onSocket(socket2);
+ });
+ }
+ };
+ function createSecureSocket(options, cb) {
+ var self2 = this;
+ TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) {
+ var hostHeader = options.request.getHeader("host");
+ var tlsOptions = mergeOptions({}, self2.options, {
+ socket,
+ servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host
+ });
+ var secureSocket = tls.connect(0, tlsOptions);
+ self2.sockets[self2.sockets.indexOf(socket)] = secureSocket;
+ cb(secureSocket);
+ });
+ }
+ function toOptions(host, port, localAddress) {
+ if (typeof host === "string") {
+ return {
+ host,
+ port,
+ localAddress
+ };
+ }
+ return host;
+ }
+ function mergeOptions(target) {
+ for (var i2 = 1, len = arguments.length; i2 < len; ++i2) {
+ var overrides = arguments[i2];
+ if (typeof overrides === "object") {
+ var keys2 = Object.keys(overrides);
+ for (var j = 0, keyLen = keys2.length; j < keyLen; ++j) {
+ var k = keys2[j];
+ if (overrides[k] !== void 0) {
+ target[k] = overrides[k];
+ }
+ }
+ }
+ }
+ return target;
+ }
+ var debug;
+ if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
+ debug = function() {
+ var args = Array.prototype.slice.call(arguments);
+ if (typeof args[0] === "string") {
+ args[0] = "TUNNEL: " + args[0];
+ } else {
+ args.unshift("TUNNEL:");
+ }
+ console.error.apply(console, args);
+ };
+ } else {
+ debug = function() {
+ };
+ }
+ exports.debug = debug;
+ }
+});
+
+// node_modules/tunnel/index.js
+var require_tunnel2 = __commonJS({
+ "node_modules/tunnel/index.js"(exports, module2) {
+ module2.exports = require_tunnel();
+ }
+});
+
+// node_modules/@actions/http-client/index.js
+var require_http_client = __commonJS({
+ "node_modules/@actions/http-client/index.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var http3 = require("http");
+ var https2 = require("https");
+ var pm = require_proxy();
+ var tunnel;
+ var HttpCodes;
+ (function(HttpCodes2) {
+ HttpCodes2[HttpCodes2["OK"] = 200] = "OK";
+ HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices";
+ HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently";
+ HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved";
+ HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther";
+ HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified";
+ HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy";
+ HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy";
+ HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
+ HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect";
+ HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest";
+ HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized";
+ HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired";
+ HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden";
+ HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound";
+ HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
+ HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable";
+ HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
+ HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout";
+ HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict";
+ HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone";
+ HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests";
+ HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError";
+ HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented";
+ HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
+ HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
+ HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
+ })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
+ var Headers2;
+ (function(Headers3) {
+ Headers3["Accept"] = "accept";
+ Headers3["ContentType"] = "content-type";
+ })(Headers2 = exports.Headers || (exports.Headers = {}));
+ var MediaTypes;
+ (function(MediaTypes2) {
+ MediaTypes2["ApplicationJson"] = "application/json";
+ })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
+ function getProxyUrl(serverUrl) {
+ let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
+ return proxyUrl ? proxyUrl.href : "";
+ }
+ exports.getProxyUrl = getProxyUrl;
+ var HttpRedirectCodes = [
+ HttpCodes.MovedPermanently,
+ HttpCodes.ResourceMoved,
+ HttpCodes.SeeOther,
+ HttpCodes.TemporaryRedirect,
+ HttpCodes.PermanentRedirect
+ ];
+ var HttpResponseRetryCodes = [
+ HttpCodes.BadGateway,
+ HttpCodes.ServiceUnavailable,
+ HttpCodes.GatewayTimeout
+ ];
+ var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"];
+ var ExponentialBackoffCeiling = 10;
+ var ExponentialBackoffTimeSlice = 5;
+ var HttpClientError = class extends Error {
+ constructor(message, statusCode) {
+ super(message);
+ this.name = "HttpClientError";
+ this.statusCode = statusCode;
+ Object.setPrototypeOf(this, HttpClientError.prototype);
+ }
+ };
+ exports.HttpClientError = HttpClientError;
+ var HttpClientResponse = class {
+ constructor(message) {
+ this.message = message;
+ }
+ readBody() {
+ return new Promise(async (resolve, reject) => {
+ let output = Buffer.alloc(0);
+ this.message.on("data", (chunk) => {
+ output = Buffer.concat([output, chunk]);
+ });
+ this.message.on("end", () => {
+ resolve(output.toString());
+ });
+ });
+ }
+ };
+ exports.HttpClientResponse = HttpClientResponse;
+ function isHttps(requestUrl) {
+ let parsedUrl = new URL(requestUrl);
+ return parsedUrl.protocol === "https:";
+ }
+ exports.isHttps = isHttps;
+ var HttpClient = class {
+ constructor(userAgent, handlers, requestOptions) {
+ this._ignoreSslError = false;
+ this._allowRedirects = true;
+ this._allowRedirectDowngrade = false;
+ this._maxRedirects = 50;
+ this._allowRetries = false;
+ this._maxRetries = 1;
+ this._keepAlive = false;
+ this._disposed = false;
+ this.userAgent = userAgent;
+ this.handlers = handlers || [];
+ this.requestOptions = requestOptions;
+ if (requestOptions) {
+ if (requestOptions.ignoreSslError != null) {
+ this._ignoreSslError = requestOptions.ignoreSslError;
+ }
+ this._socketTimeout = requestOptions.socketTimeout;
+ if (requestOptions.allowRedirects != null) {
+ this._allowRedirects = requestOptions.allowRedirects;
+ }
+ if (requestOptions.allowRedirectDowngrade != null) {
+ this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
+ }
+ if (requestOptions.maxRedirects != null) {
+ this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
+ }
+ if (requestOptions.keepAlive != null) {
+ this._keepAlive = requestOptions.keepAlive;
+ }
+ if (requestOptions.allowRetries != null) {
+ this._allowRetries = requestOptions.allowRetries;
+ }
+ if (requestOptions.maxRetries != null) {
+ this._maxRetries = requestOptions.maxRetries;
+ }
+ }
+ }
+ options(requestUrl, additionalHeaders) {
+ return this.request("OPTIONS", requestUrl, null, additionalHeaders || {});
+ }
+ get(requestUrl, additionalHeaders) {
+ return this.request("GET", requestUrl, null, additionalHeaders || {});
+ }
+ del(requestUrl, additionalHeaders) {
+ return this.request("DELETE", requestUrl, null, additionalHeaders || {});
+ }
+ post(requestUrl, data, additionalHeaders) {
+ return this.request("POST", requestUrl, data, additionalHeaders || {});
+ }
+ patch(requestUrl, data, additionalHeaders) {
+ return this.request("PATCH", requestUrl, data, additionalHeaders || {});
+ }
+ put(requestUrl, data, additionalHeaders) {
+ return this.request("PUT", requestUrl, data, additionalHeaders || {});
+ }
+ head(requestUrl, additionalHeaders) {
+ return this.request("HEAD", requestUrl, null, additionalHeaders || {});
+ }
+ sendStream(verb, requestUrl, stream, additionalHeaders) {
+ return this.request(verb, requestUrl, stream, additionalHeaders);
+ }
+ async getJson(requestUrl, additionalHeaders = {}) {
+ additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson);
+ let res = await this.get(requestUrl, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ }
+ async postJson(requestUrl, obj, additionalHeaders = {}) {
+ let data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson);
+ let res = await this.post(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ }
+ async putJson(requestUrl, obj, additionalHeaders = {}) {
+ let data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson);
+ let res = await this.put(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ }
+ async patchJson(requestUrl, obj, additionalHeaders = {}) {
+ let data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson);
+ let res = await this.patch(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ }
+ async request(verb, requestUrl, data, headers) {
+ if (this._disposed) {
+ throw new Error("Client has already been disposed.");
+ }
+ let parsedUrl = new URL(requestUrl);
+ let info = this._prepareRequest(verb, parsedUrl, headers);
+ let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 ? this._maxRetries + 1 : 1;
+ let numTries = 0;
+ let response;
+ while (numTries < maxTries) {
+ response = await this.requestRaw(info, data);
+ if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
+ let authenticationHandler;
+ for (let i2 = 0; i2 < this.handlers.length; i2++) {
+ if (this.handlers[i2].canHandleAuthentication(response)) {
+ authenticationHandler = this.handlers[i2];
+ break;
+ }
+ }
+ if (authenticationHandler) {
+ return authenticationHandler.handleAuthentication(this, info, data);
+ } else {
+ return response;
+ }
+ }
+ let redirectsRemaining = this._maxRedirects;
+ while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && this._allowRedirects && redirectsRemaining > 0) {
+ const redirectUrl = response.message.headers["location"];
+ if (!redirectUrl) {
+ break;
+ }
+ let parsedRedirectUrl = new URL(redirectUrl);
+ if (parsedUrl.protocol == "https:" && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
+ throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
+ }
+ await response.readBody();
+ if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
+ for (let header in headers) {
+ if (header.toLowerCase() === "authorization") {
+ delete headers[header];
+ }
+ }
+ }
+ info = this._prepareRequest(verb, parsedRedirectUrl, headers);
+ response = await this.requestRaw(info, data);
+ redirectsRemaining--;
+ }
+ if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
+ return response;
+ }
+ numTries += 1;
+ if (numTries < maxTries) {
+ await response.readBody();
+ await this._performExponentialBackoff(numTries);
+ }
+ }
+ return response;
+ }
+ dispose() {
+ if (this._agent) {
+ this._agent.destroy();
+ }
+ this._disposed = true;
+ }
+ requestRaw(info, data) {
+ return new Promise((resolve, reject) => {
+ let callbackForResult = function(err, res) {
+ if (err) {
+ reject(err);
+ }
+ resolve(res);
+ };
+ this.requestRawWithCallback(info, data, callbackForResult);
+ });
+ }
+ requestRawWithCallback(info, data, onResult) {
+ let socket;
+ if (typeof data === "string") {
+ info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8");
+ }
+ let callbackCalled = false;
+ let handleResult = (err, res) => {
+ if (!callbackCalled) {
+ callbackCalled = true;
+ onResult(err, res);
+ }
+ };
+ let req = info.httpModule.request(info.options, (msg) => {
+ let res = new HttpClientResponse(msg);
+ handleResult(null, res);
+ });
+ req.on("socket", (sock) => {
+ socket = sock;
+ });
+ req.setTimeout(this._socketTimeout || 3 * 6e4, () => {
+ if (socket) {
+ socket.end();
+ }
+ handleResult(new Error("Request timeout: " + info.options.path), null);
+ });
+ req.on("error", function(err) {
+ handleResult(err, null);
+ });
+ if (data && typeof data === "string") {
+ req.write(data, "utf8");
+ }
+ if (data && typeof data !== "string") {
+ data.on("close", function() {
+ req.end();
+ });
+ data.pipe(req);
+ } else {
+ req.end();
+ }
+ }
+ getAgent(serverUrl) {
+ let parsedUrl = new URL(serverUrl);
+ return this._getAgent(parsedUrl);
+ }
+ _prepareRequest(method, requestUrl, headers) {
+ const info = {};
+ info.parsedUrl = requestUrl;
+ const usingSsl = info.parsedUrl.protocol === "https:";
+ info.httpModule = usingSsl ? https2 : http3;
+ const defaultPort = usingSsl ? 443 : 80;
+ info.options = {};
+ info.options.host = info.parsedUrl.hostname;
+ info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort;
+ info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || "");
+ info.options.method = method;
+ info.options.headers = this._mergeHeaders(headers);
+ if (this.userAgent != null) {
+ info.options.headers["user-agent"] = this.userAgent;
+ }
+ info.options.agent = this._getAgent(info.parsedUrl);
+ if (this.handlers) {
+ this.handlers.forEach((handler4) => {
+ handler4.prepareRequest(info.options);
+ });
+ }
+ return info;
+ }
+ _mergeHeaders(headers) {
+ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+ if (this.requestOptions && this.requestOptions.headers) {
+ return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
+ }
+ return lowercaseKeys(headers || {});
+ }
+ _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
+ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+ let clientHeader;
+ if (this.requestOptions && this.requestOptions.headers) {
+ clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
+ }
+ return additionalHeaders[header] || clientHeader || _default;
+ }
+ _getAgent(parsedUrl) {
+ let agent;
+ let proxyUrl = pm.getProxyUrl(parsedUrl);
+ let useProxy = proxyUrl && proxyUrl.hostname;
+ if (this._keepAlive && useProxy) {
+ agent = this._proxyAgent;
+ }
+ if (this._keepAlive && !useProxy) {
+ agent = this._agent;
+ }
+ if (!!agent) {
+ return agent;
+ }
+ const usingSsl = parsedUrl.protocol === "https:";
+ let maxSockets = 100;
+ if (!!this.requestOptions) {
+ maxSockets = this.requestOptions.maxSockets || http3.globalAgent.maxSockets;
+ }
+ if (useProxy) {
+ if (!tunnel) {
+ tunnel = require_tunnel2();
+ }
+ const agentOptions = {
+ maxSockets,
+ keepAlive: this._keepAlive,
+ proxy: __spreadProps(__spreadValues({}, (proxyUrl.username || proxyUrl.password) && {
+ proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
+ }), {
+ host: proxyUrl.hostname,
+ port: proxyUrl.port
+ })
+ };
+ let tunnelAgent;
+ const overHttps = proxyUrl.protocol === "https:";
+ if (usingSsl) {
+ tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
+ } else {
+ tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
+ }
+ agent = tunnelAgent(agentOptions);
+ this._proxyAgent = agent;
+ }
+ if (this._keepAlive && !agent) {
+ const options = { keepAlive: this._keepAlive, maxSockets };
+ agent = usingSsl ? new https2.Agent(options) : new http3.Agent(options);
+ this._agent = agent;
+ }
+ if (!agent) {
+ agent = usingSsl ? https2.globalAgent : http3.globalAgent;
+ }
+ if (usingSsl && this._ignoreSslError) {
+ agent.options = Object.assign(agent.options || {}, {
+ rejectUnauthorized: false
+ });
+ }
+ return agent;
+ }
+ _performExponentialBackoff(retryNumber) {
+ retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
+ const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
+ return new Promise((resolve) => setTimeout(() => resolve(), ms));
+ }
+ static dateTimeDeserializer(key2, value) {
+ if (typeof value === "string") {
+ let a = new Date(value);
+ if (!isNaN(a.valueOf())) {
+ return a;
+ }
+ }
+ return value;
+ }
+ async _processResponse(res, options) {
+ return new Promise(async (resolve, reject) => {
+ const statusCode = res.message.statusCode;
+ const response = {
+ statusCode,
+ result: null,
+ headers: {}
+ };
+ if (statusCode == HttpCodes.NotFound) {
+ resolve(response);
+ }
+ let obj;
+ let contents;
+ try {
+ contents = await res.readBody();
+ if (contents && contents.length > 0) {
+ if (options && options.deserializeDates) {
+ obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
+ } else {
+ obj = JSON.parse(contents);
+ }
+ response.result = obj;
+ }
+ response.headers = res.message.headers;
+ } catch (err) {
+ }
+ if (statusCode > 299) {
+ let msg;
+ if (obj && obj.message) {
+ msg = obj.message;
+ } else if (contents && contents.length > 0) {
+ msg = contents;
+ } else {
+ msg = "Failed request: (" + statusCode + ")";
+ }
+ let err = new HttpClientError(msg, statusCode);
+ err.result = response.result;
+ reject(err);
+ } else {
+ resolve(response);
+ }
+ });
+ }
+ };
+ exports.HttpClient = HttpClient;
+ }
+});
+
+// node_modules/@actions/http-client/auth.js
+var require_auth = __commonJS({
+ "node_modules/@actions/http-client/auth.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var BasicCredentialHandler = class {
+ constructor(username, password) {
+ this.username = username;
+ this.password = password;
+ }
+ prepareRequest(options) {
+ options.headers["Authorization"] = "Basic " + Buffer.from(this.username + ":" + this.password).toString("base64");
+ }
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+ };
+ exports.BasicCredentialHandler = BasicCredentialHandler;
+ var BearerCredentialHandler = class {
+ constructor(token) {
+ this.token = token;
+ }
+ prepareRequest(options) {
+ options.headers["Authorization"] = "Bearer " + this.token;
+ }
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+ };
+ exports.BearerCredentialHandler = BearerCredentialHandler;
+ var PersonalAccessTokenCredentialHandler = class {
+ constructor(token) {
+ this.token = token;
+ }
+ prepareRequest(options) {
+ options.headers["Authorization"] = "Basic " + Buffer.from("PAT:" + this.token).toString("base64");
+ }
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+ };
+ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
+ }
+});
+
+// node_modules/@actions/core/lib/oidc-utils.js
+var require_oidc_utils = __commonJS({
+ "node_modules/@actions/core/lib/oidc-utils.js"(exports) {
+ "use strict";
+ var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P ? value : new P(function(resolve) {
+ resolve(value);
+ });
+ }
+ return new (P || (P = Promise))(function(resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e2) {
+ reject(e2);
+ }
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e2) {
+ reject(e2);
+ }
+ }
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.OidcClient = void 0;
+ var http_client_1 = require_http_client();
+ var auth_1 = require_auth();
+ var core_1 = require_core();
+ var OidcClient = class {
+ static createHttpClient(allowRetry = true, maxRetry = 10) {
+ const requestOptions = {
+ allowRetries: allowRetry,
+ maxRetries: maxRetry
+ };
+ return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
+ }
+ static getRequestToken() {
+ const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];
+ if (!token) {
+ throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");
+ }
+ return token;
+ }
+ static getIDTokenUrl() {
+ const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];
+ if (!runtimeUrl) {
+ throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");
+ }
+ return runtimeUrl;
+ }
+ static getCall(id_token_url) {
+ var _a;
+ return __awaiter(this, void 0, void 0, function* () {
+ const httpclient = OidcClient.createHttpClient();
+ const res = yield httpclient.getJson(id_token_url).catch((error) => {
+ throw new Error(`Failed to get ID Token.
+
+ Error Code : ${error.statusCode}
+
+ Error Message: ${error.result.message}`);
+ });
+ const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
+ if (!id_token) {
+ throw new Error("Response json body do not have ID Token field");
+ }
+ return id_token;
+ });
+ }
+ static getIDToken(audience) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let id_token_url = OidcClient.getIDTokenUrl();
+ if (audience) {
+ const encodedAudience = encodeURIComponent(audience);
+ id_token_url = `${id_token_url}&audience=${encodedAudience}`;
+ }
+ core_1.debug(`ID token url is ${id_token_url}`);
+ const id_token = yield OidcClient.getCall(id_token_url);
+ core_1.setSecret(id_token);
+ return id_token;
+ } catch (error) {
+ throw new Error(`Error message: ${error.message}`);
+ }
+ });
+ }
+ };
+ exports.OidcClient = OidcClient;
+ }
+});
+
+// node_modules/@actions/core/lib/core.js
+var require_core = __commonJS({
+ "node_modules/@actions/core/lib/core.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P ? value : new P(function(resolve) {
+ resolve(value);
+ });
+ }
+ return new (P || (P = Promise))(function(resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e2) {
+ reject(e2);
+ }
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e2) {
+ reject(e2);
+ }
+ }
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
+ var command_1 = require_command();
+ var file_command_1 = require_file_command();
+ var utils_1 = require_utils();
+ var os2 = __importStar(require("os"));
+ var path = __importStar(require("path"));
+ var oidc_utils_1 = require_oidc_utils();
+ var ExitCode;
+ (function(ExitCode2) {
+ ExitCode2[ExitCode2["Success"] = 0] = "Success";
+ ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
+ })(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
+ function exportVariable(name, val) {
+ const convertedVal = utils_1.toCommandValue(val);
+ process.env[name] = convertedVal;
+ const filePath = process.env["GITHUB_ENV"] || "";
+ if (filePath) {
+ const delimiter = "_GitHubActionsFileCommandDelimeter_";
+ const commandValue = `${name}<<${delimiter}${os2.EOL}${convertedVal}${os2.EOL}${delimiter}`;
+ file_command_1.issueCommand("ENV", commandValue);
+ } else {
+ command_1.issueCommand("set-env", { name }, convertedVal);
+ }
+ }
+ exports.exportVariable = exportVariable;
+ function setSecret(secret) {
+ command_1.issueCommand("add-mask", {}, secret);
+ }
+ exports.setSecret = setSecret;
+ function addPath(inputPath) {
+ const filePath = process.env["GITHUB_PATH"] || "";
+ if (filePath) {
+ file_command_1.issueCommand("PATH", inputPath);
+ } else {
+ command_1.issueCommand("add-path", {}, inputPath);
+ }
+ process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`;
+ }
+ exports.addPath = addPath;
+ function getInput(name, options) {
+ const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || "";
+ if (options && options.required && !val) {
+ throw new Error(`Input required and not supplied: ${name}`);
+ }
+ if (options && options.trimWhitespace === false) {
+ return val;
+ }
+ return val.trim();
+ }
+ exports.getInput = getInput;
+ function getMultilineInput(name, options) {
+ const inputs = getInput(name, options).split("\n").filter((x2) => x2 !== "");
+ return inputs;
+ }
+ exports.getMultilineInput = getMultilineInput;
+ function getBooleanInput(name, options) {
+ const trueValue = ["true", "True", "TRUE"];
+ const falseValue = ["false", "False", "FALSE"];
+ const val = getInput(name, options);
+ if (trueValue.includes(val))
+ return true;
+ if (falseValue.includes(val))
+ return false;
+ throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}
+Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
+ }
+ exports.getBooleanInput = getBooleanInput;
+ function setOutput(name, value) {
+ process.stdout.write(os2.EOL);
+ command_1.issueCommand("set-output", { name }, value);
+ }
+ exports.setOutput = setOutput;
+ function setCommandEcho(enabled) {
+ command_1.issue("echo", enabled ? "on" : "off");
+ }
+ exports.setCommandEcho = setCommandEcho;
+ function setFailed(message) {
+ process.exitCode = ExitCode.Failure;
+ error(message);
+ }
+ exports.setFailed = setFailed;
+ function isDebug() {
+ return process.env["RUNNER_DEBUG"] === "1";
+ }
+ exports.isDebug = isDebug;
+ function debug(message) {
+ command_1.issueCommand("debug", {}, message);
+ }
+ exports.debug = debug;
+ function error(message, properties = {}) {
+ command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
+ }
+ exports.error = error;
+ function warning(message, properties = {}) {
+ command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
+ }
+ exports.warning = warning;
+ function notice(message, properties = {}) {
+ command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
+ }
+ exports.notice = notice;
+ function info(message) {
+ process.stdout.write(message + os2.EOL);
+ }
+ exports.info = info;
+ function startGroup(name) {
+ command_1.issue("group", name);
+ }
+ exports.startGroup = startGroup;
+ function endGroup() {
+ command_1.issue("endgroup");
+ }
+ exports.endGroup = endGroup;
+ function group(name, fn) {
+ return __awaiter(this, void 0, void 0, function* () {
+ startGroup(name);
+ let result;
+ try {
+ result = yield fn();
+ } finally {
+ endGroup();
+ }
+ return result;
+ });
+ }
+ exports.group = group;
+ function saveState(name, value) {
+ command_1.issueCommand("save-state", { name }, value);
+ }
+ exports.saveState = saveState;
+ function getState(name) {
+ return process.env[`STATE_${name}`] || "";
+ }
+ exports.getState = getState;
+ function getIDToken(aud) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return yield oidc_utils_1.OidcClient.getIDToken(aud);
+ });
+ }
+ exports.getIDToken = getIDToken;
+ }
+});
+
+// node_modules/dayjs/dayjs.min.js
+var require_dayjs_min = __commonJS({
+ "node_modules/dayjs/dayjs.min.js"(exports, module2) {
+ !function(t2, e2) {
+ typeof exports == "object" && typeof module2 != "undefined" ? module2.exports = e2() : typeof define == "function" && define.amd ? define(e2) : (t2 = typeof globalThis != "undefined" ? globalThis : t2 || self).dayjs = e2();
+ }(exports, function() {
+ "use strict";
+ var t2 = 1e3, e2 = 6e4, n = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u = "hour", a = "day", o = "week", f3 = "month", h2 = "quarter", c = "year", d = "date", $ = "Invalid Date", l = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") }, m2 = function(t3, e3, n2) {
+ var r3 = String(t3);
+ return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n2) + t3;
+ }, g = { s: m2, z: function(t3) {
+ var e3 = -t3.utcOffset(), n2 = Math.abs(e3), r3 = Math.floor(n2 / 60), i3 = n2 % 60;
+ return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
+ }, m: function t3(e3, n2) {
+ if (e3.date() < n2.date())
+ return -t3(n2, e3);
+ var r3 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i3 = e3.clone().add(r3, f3), s3 = n2 - i3 < 0, u2 = e3.clone().add(r3 + (s3 ? -1 : 1), f3);
+ return +(-(r3 + (n2 - i3) / (s3 ? i3 - u2 : u2 - i3)) || 0);
+ }, a: function(t3) {
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
+ }, p: function(t3) {
+ return { M: f3, y: c, w: o, d: a, D: d, h: u, m: s2, s: i2, ms: r2, Q: h2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
+ }, u: function(t3) {
+ return t3 === void 0;
+ } }, v = "en", D = {};
+ D[v] = M;
+ var p = function(t3) {
+ return t3 instanceof _;
+ }, S2 = function t3(e3, n2, r3) {
+ var i3;
+ if (!e3)
+ return v;
+ if (typeof e3 == "string") {
+ var s3 = e3.toLowerCase();
+ D[s3] && (i3 = s3), n2 && (D[s3] = n2, i3 = s3);
+ var u2 = e3.split("-");
+ if (!i3 && u2.length > 1)
+ return t3(u2[0]);
+ } else {
+ var a2 = e3.name;
+ D[a2] = e3, i3 = a2;
+ }
+ return !r3 && i3 && (v = i3), i3 || !r3 && v;
+ }, w = function(t3, e3) {
+ if (p(t3))
+ return t3.clone();
+ var n2 = typeof e3 == "object" ? e3 : {};
+ return n2.date = t3, n2.args = arguments, new _(n2);
+ }, O = g;
+ O.l = S2, O.i = p, O.w = function(t3, e3) {
+ return w(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
+ };
+ var _ = function() {
+ function M2(t3) {
+ this.$L = S2(t3.locale, null, true), this.parse(t3);
+ }
+ var m3 = M2.prototype;
+ return m3.parse = function(t3) {
+ this.$d = function(t4) {
+ var e3 = t4.date, n2 = t4.utc;
+ if (e3 === null)
+ return new Date(NaN);
+ if (O.u(e3))
+ return new Date();
+ if (e3 instanceof Date)
+ return new Date(e3);
+ if (typeof e3 == "string" && !/Z$/i.test(e3)) {
+ var r3 = e3.match(l);
+ if (r3) {
+ var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
+ return n2 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
+ }
+ }
+ return new Date(e3);
+ }(t3), this.$x = t3.x || {}, this.init();
+ }, m3.init = function() {
+ var t3 = this.$d;
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
+ }, m3.$utils = function() {
+ return O;
+ }, m3.isValid = function() {
+ return !(this.$d.toString() === $);
+ }, m3.isSame = function(t3, e3) {
+ var n2 = w(t3);
+ return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
+ }, m3.isAfter = function(t3, e3) {
+ return w(t3) < this.startOf(e3);
+ }, m3.isBefore = function(t3, e3) {
+ return this.endOf(e3) < w(t3);
+ }, m3.$g = function(t3, e3, n2) {
+ return O.u(t3) ? this[e3] : this.set(n2, t3);
+ }, m3.unix = function() {
+ return Math.floor(this.valueOf() / 1e3);
+ }, m3.valueOf = function() {
+ return this.$d.getTime();
+ }, m3.startOf = function(t3, e3) {
+ var n2 = this, r3 = !!O.u(e3) || e3, h3 = O.p(t3), $2 = function(t4, e4) {
+ var i3 = O.w(n2.$u ? Date.UTC(n2.$y, e4, t4) : new Date(n2.$y, e4, t4), n2);
+ return r3 ? i3 : i3.endOf(a);
+ }, l2 = function(t4, e4) {
+ return O.w(n2.toDate()[t4].apply(n2.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
+ }, y2 = this.$W, M3 = this.$M, m4 = this.$D, g2 = "set" + (this.$u ? "UTC" : "");
+ switch (h3) {
+ case c:
+ return r3 ? $2(1, 0) : $2(31, 11);
+ case f3:
+ return r3 ? $2(1, M3) : $2(0, M3 + 1);
+ case o:
+ var v2 = this.$locale().weekStart || 0, D2 = (y2 < v2 ? y2 + 7 : y2) - v2;
+ return $2(r3 ? m4 - D2 : m4 + (6 - D2), M3);
+ case a:
+ case d:
+ return l2(g2 + "Hours", 0);
+ case u:
+ return l2(g2 + "Minutes", 1);
+ case s2:
+ return l2(g2 + "Seconds", 2);
+ case i2:
+ return l2(g2 + "Milliseconds", 3);
+ default:
+ return this.clone();
+ }
+ }, m3.endOf = function(t3) {
+ return this.startOf(t3, false);
+ }, m3.$set = function(t3, e3) {
+ var n2, o2 = O.p(t3), h3 = "set" + (this.$u ? "UTC" : ""), $2 = (n2 = {}, n2[a] = h3 + "Date", n2[d] = h3 + "Date", n2[f3] = h3 + "Month", n2[c] = h3 + "FullYear", n2[u] = h3 + "Hours", n2[s2] = h3 + "Minutes", n2[i2] = h3 + "Seconds", n2[r2] = h3 + "Milliseconds", n2)[o2], l2 = o2 === a ? this.$D + (e3 - this.$W) : e3;
+ if (o2 === f3 || o2 === c) {
+ var y2 = this.clone().set(d, 1);
+ y2.$d[$2](l2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
+ } else
+ $2 && this.$d[$2](l2);
+ return this.init(), this;
+ }, m3.set = function(t3, e3) {
+ return this.clone().$set(t3, e3);
+ }, m3.get = function(t3) {
+ return this[O.p(t3)]();
+ }, m3.add = function(r3, h3) {
+ var d2, $2 = this;
+ r3 = Number(r3);
+ var l2 = O.p(h3), y2 = function(t3) {
+ var e3 = w($2);
+ return O.w(e3.date(e3.date() + Math.round(t3 * r3)), $2);
+ };
+ if (l2 === f3)
+ return this.set(f3, this.$M + r3);
+ if (l2 === c)
+ return this.set(c, this.$y + r3);
+ if (l2 === a)
+ return y2(1);
+ if (l2 === o)
+ return y2(7);
+ var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n, d2[i2] = t2, d2)[l2] || 1, m4 = this.$d.getTime() + r3 * M3;
+ return O.w(m4, this);
+ }, m3.subtract = function(t3, e3) {
+ return this.add(-1 * t3, e3);
+ }, m3.format = function(t3) {
+ var e3 = this, n2 = this.$locale();
+ if (!this.isValid())
+ return n2.invalidDate || $;
+ var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = O.z(this), s3 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f4 = n2.months, h3 = function(t4, n3, i4, s4) {
+ return t4 && (t4[n3] || t4(e3, r3)) || i4[n3].substr(0, s4);
+ }, c2 = function(t4) {
+ return O.s(s3 % 12 || 12, t4, "0");
+ }, d2 = n2.meridiem || function(t4, e4, n3) {
+ var r4 = t4 < 12 ? "AM" : "PM";
+ return n3 ? r4.toLowerCase() : r4;
+ }, l2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h3(n2.monthsShort, a2, f4, 3), MMMM: h3(f4, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h3(n2.weekdaysMin, this.$W, o2, 2), ddd: h3(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s3), HH: O.s(s3, 2, "0"), h: c2(1), hh: c2(2), a: d2(s3, u2, true), A: d2(s3, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i3 };
+ return r3.replace(y, function(t4, e4) {
+ return e4 || l2[t4] || i3.replace(":", "");
+ });
+ }, m3.utcOffset = function() {
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
+ }, m3.diff = function(r3, d2, $2) {
+ var l2, y2 = O.p(d2), M3 = w(r3), m4 = (M3.utcOffset() - this.utcOffset()) * e2, g2 = this - M3, v2 = O.m(this, M3);
+ return v2 = (l2 = {}, l2[c] = v2 / 12, l2[f3] = v2, l2[h2] = v2 / 3, l2[o] = (g2 - m4) / 6048e5, l2[a] = (g2 - m4) / 864e5, l2[u] = g2 / n, l2[s2] = g2 / e2, l2[i2] = g2 / t2, l2)[y2] || g2, $2 ? v2 : O.a(v2);
+ }, m3.daysInMonth = function() {
+ return this.endOf(f3).$D;
+ }, m3.$locale = function() {
+ return D[this.$L];
+ }, m3.locale = function(t3, e3) {
+ if (!t3)
+ return this.$L;
+ var n2 = this.clone(), r3 = S2(t3, e3, true);
+ return r3 && (n2.$L = r3), n2;
+ }, m3.clone = function() {
+ return O.w(this.$d, this);
+ }, m3.toDate = function() {
+ return new Date(this.valueOf());
+ }, m3.toJSON = function() {
+ return this.isValid() ? this.toISOString() : null;
+ }, m3.toISOString = function() {
+ return this.$d.toISOString();
+ }, m3.toString = function() {
+ return this.$d.toUTCString();
+ }, M2;
+ }(), b = _.prototype;
+ return w.prototype = b, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u], ["$W", a], ["$M", f3], ["$y", c], ["$D", d]].forEach(function(t3) {
+ b[t3[1]] = function(e3) {
+ return this.$g(e3, t3[0], t3[1]);
+ };
+ }), w.extend = function(t3, e3) {
+ return t3.$i || (t3(e3, _, w), t3.$i = true), w;
+ }, w.locale = S2, w.isDayjs = p, w.unix = function(t3) {
+ return w(1e3 * t3);
+ }, w.en = D[v], w.Ls = D, w.p = {}, w;
+ });
+ }
+});
+
+// node_modules/axios/lib/helpers/bind.js
+var require_bind = __commonJS({
+ "node_modules/axios/lib/helpers/bind.js"(exports, module2) {
+ "use strict";
+ module2.exports = function bind(fn, thisArg) {
+ return function wrap() {
+ var args = new Array(arguments.length);
+ for (var i2 = 0; i2 < args.length; i2++) {
+ args[i2] = arguments[i2];
+ }
+ return fn.apply(thisArg, args);
+ };
+ };
+ }
+});
+
+// node_modules/axios/lib/utils.js
+var require_utils2 = __commonJS({
+ "node_modules/axios/lib/utils.js"(exports, module2) {
+ "use strict";
+ var bind = require_bind();
+ var toString2 = Object.prototype.toString;
+ function isArray2(val) {
+ return toString2.call(val) === "[object Array]";
+ }
+ function isUndefined(val) {
+ return typeof val === "undefined";
+ }
+ function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
+ }
+ function isArrayBuffer(val) {
+ return toString2.call(val) === "[object ArrayBuffer]";
+ }
+ function isFormData(val) {
+ return typeof FormData !== "undefined" && val instanceof FormData;
+ }
+ function isArrayBufferView(val) {
+ var result;
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = val && val.buffer && val.buffer instanceof ArrayBuffer;
+ }
+ return result;
+ }
+ function isString(val) {
+ return typeof val === "string";
+ }
+ function isNumber(val) {
+ return typeof val === "number";
+ }
+ function isObject(val) {
+ return val !== null && typeof val === "object";
+ }
+ function isPlainObject(val) {
+ if (toString2.call(val) !== "[object Object]") {
+ return false;
+ }
+ var prototype2 = Object.getPrototypeOf(val);
+ return prototype2 === null || prototype2 === Object.prototype;
+ }
+ function isDate(val) {
+ return toString2.call(val) === "[object Date]";
+ }
+ function isFile(val) {
+ return toString2.call(val) === "[object File]";
+ }
+ function isBlob2(val) {
+ return toString2.call(val) === "[object Blob]";
+ }
+ function isFunction(val) {
+ return toString2.call(val) === "[object Function]";
+ }
+ function isStream(val) {
+ return isObject(val) && isFunction(val.pipe);
+ }
+ function isURLSearchParams(val) {
+ return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
+ }
+ function trim(str) {
+ return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
+ }
+ function isStandardBrowserEnv() {
+ if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
+ return false;
+ }
+ return typeof window !== "undefined" && typeof document !== "undefined";
+ }
+ function forEach(obj, fn) {
+ if (obj === null || typeof obj === "undefined") {
+ return;
+ }
+ if (typeof obj !== "object") {
+ obj = [obj];
+ }
+ if (isArray2(obj)) {
+ for (var i2 = 0, l = obj.length; i2 < l; i2++) {
+ fn.call(null, obj[i2], i2, obj);
+ }
+ } else {
+ for (var key2 in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key2)) {
+ fn.call(null, obj[key2], key2, obj);
+ }
+ }
+ }
+ }
+ function merge() {
+ var result = {};
+ function assignValue(val, key2) {
+ if (isPlainObject(result[key2]) && isPlainObject(val)) {
+ result[key2] = merge(result[key2], val);
+ } else if (isPlainObject(val)) {
+ result[key2] = merge({}, val);
+ } else if (isArray2(val)) {
+ result[key2] = val.slice();
+ } else {
+ result[key2] = val;
+ }
+ }
+ for (var i2 = 0, l = arguments.length; i2 < l; i2++) {
+ forEach(arguments[i2], assignValue);
+ }
+ return result;
+ }
+ function extend(a, b, thisArg) {
+ forEach(b, function assignValue(val, key2) {
+ if (thisArg && typeof val === "function") {
+ a[key2] = bind(val, thisArg);
+ } else {
+ a[key2] = val;
+ }
+ });
+ return a;
+ }
+ function stripBOM(content) {
+ if (content.charCodeAt(0) === 65279) {
+ content = content.slice(1);
+ }
+ return content;
+ }
+ module2.exports = {
+ isArray: isArray2,
+ isArrayBuffer,
+ isBuffer,
+ isFormData,
+ isArrayBufferView,
+ isString,
+ isNumber,
+ isObject,
+ isPlainObject,
+ isUndefined,
+ isDate,
+ isFile,
+ isBlob: isBlob2,
+ isFunction,
+ isStream,
+ isURLSearchParams,
+ isStandardBrowserEnv,
+ forEach,
+ merge,
+ extend,
+ trim,
+ stripBOM
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/buildURL.js
+var require_buildURL = __commonJS({
+ "node_modules/axios/lib/helpers/buildURL.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ function encode(val) {
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
+ }
+ module2.exports = function buildURL(url, params, paramsSerializer) {
+ if (!params) {
+ return url;
+ }
+ var serializedParams;
+ if (paramsSerializer) {
+ serializedParams = paramsSerializer(params);
+ } else if (utils.isURLSearchParams(params)) {
+ serializedParams = params.toString();
+ } else {
+ var parts = [];
+ utils.forEach(params, function serialize(val, key2) {
+ if (val === null || typeof val === "undefined") {
+ return;
+ }
+ if (utils.isArray(val)) {
+ key2 = key2 + "[]";
+ } else {
+ val = [val];
+ }
+ utils.forEach(val, function parseValue(v) {
+ if (utils.isDate(v)) {
+ v = v.toISOString();
+ } else if (utils.isObject(v)) {
+ v = JSON.stringify(v);
+ }
+ parts.push(encode(key2) + "=" + encode(v));
+ });
+ });
+ serializedParams = parts.join("&");
+ }
+ if (serializedParams) {
+ var hashmarkIndex = url.indexOf("#");
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
+ }
+ return url;
+ };
+ }
+});
+
+// node_modules/axios/lib/core/InterceptorManager.js
+var require_InterceptorManager = __commonJS({
+ "node_modules/axios/lib/core/InterceptorManager.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ function InterceptorManager() {
+ this.handlers = [];
+ }
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled,
+ rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ };
+ InterceptorManager.prototype.eject = function eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ };
+ InterceptorManager.prototype.forEach = function forEach(fn) {
+ utils.forEach(this.handlers, function forEachHandler(h2) {
+ if (h2 !== null) {
+ fn(h2);
+ }
+ });
+ };
+ module2.exports = InterceptorManager;
+ }
+});
+
+// node_modules/axios/lib/helpers/normalizeHeaderName.js
+var require_normalizeHeaderName = __commonJS({
+ "node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ module2.exports = function normalizeHeaderName(headers, normalizedName) {
+ utils.forEach(headers, function processHeader(value, name) {
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
+ headers[normalizedName] = value;
+ delete headers[name];
+ }
+ });
+ };
+ }
+});
+
+// node_modules/axios/lib/core/enhanceError.js
+var require_enhanceError = __commonJS({
+ "node_modules/axios/lib/core/enhanceError.js"(exports, module2) {
+ "use strict";
+ module2.exports = function enhanceError(error, config, code, request, response) {
+ error.config = config;
+ if (code) {
+ error.code = code;
+ }
+ error.request = request;
+ error.response = response;
+ error.isAxiosError = true;
+ error.toJSON = function toJSON2() {
+ return {
+ message: this.message,
+ name: this.name,
+ description: this.description,
+ number: this.number,
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ config: this.config,
+ code: this.code
+ };
+ };
+ return error;
+ };
+ }
+});
+
+// node_modules/axios/lib/core/createError.js
+var require_createError = __commonJS({
+ "node_modules/axios/lib/core/createError.js"(exports, module2) {
+ "use strict";
+ var enhanceError = require_enhanceError();
+ module2.exports = function createError(message, config, code, request, response) {
+ var error = new Error(message);
+ return enhanceError(error, config, code, request, response);
+ };
+ }
+});
+
+// node_modules/axios/lib/core/settle.js
+var require_settle = __commonJS({
+ "node_modules/axios/lib/core/settle.js"(exports, module2) {
+ "use strict";
+ var createError = require_createError();
+ module2.exports = function settle(resolve, reject, response) {
+ var validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(createError("Request failed with status code " + response.status, response.config, null, response.request, response));
+ }
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/cookies.js
+var require_cookies = __commonJS({
+ "node_modules/axios/lib/helpers/cookies.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
+ return {
+ write: function write2(name, value, expires, path, domain, secure) {
+ var cookie = [];
+ cookie.push(name + "=" + encodeURIComponent(value));
+ if (utils.isNumber(expires)) {
+ cookie.push("expires=" + new Date(expires).toGMTString());
+ }
+ if (utils.isString(path)) {
+ cookie.push("path=" + path);
+ }
+ if (utils.isString(domain)) {
+ cookie.push("domain=" + domain);
+ }
+ if (secure === true) {
+ cookie.push("secure");
+ }
+ document.cookie = cookie.join("; ");
+ },
+ read: function read2(name) {
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
+ return match ? decodeURIComponent(match[3]) : null;
+ },
+ remove: function remove2(name) {
+ this.write(name, "", Date.now() - 864e5);
+ }
+ };
+ }() : function nonStandardBrowserEnv() {
+ return {
+ write: function write2() {
+ },
+ read: function read2() {
+ return null;
+ },
+ remove: function remove2() {
+ }
+ };
+ }();
+ }
+});
+
+// node_modules/axios/lib/helpers/isAbsoluteURL.js
+var require_isAbsoluteURL = __commonJS({
+ "node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module2) {
+ "use strict";
+ module2.exports = function isAbsoluteURL(url) {
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/combineURLs.js
+var require_combineURLs = __commonJS({
+ "node_modules/axios/lib/helpers/combineURLs.js"(exports, module2) {
+ "use strict";
+ module2.exports = function combineURLs(baseURL, relativeURL) {
+ return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
+ };
+ }
+});
+
+// node_modules/axios/lib/core/buildFullPath.js
+var require_buildFullPath = __commonJS({
+ "node_modules/axios/lib/core/buildFullPath.js"(exports, module2) {
+ "use strict";
+ var isAbsoluteURL = require_isAbsoluteURL();
+ var combineURLs = require_combineURLs();
+ module2.exports = function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/parseHeaders.js
+var require_parseHeaders = __commonJS({
+ "node_modules/axios/lib/helpers/parseHeaders.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var ignoreDuplicateOf = [
+ "age",
+ "authorization",
+ "content-length",
+ "content-type",
+ "etag",
+ "expires",
+ "from",
+ "host",
+ "if-modified-since",
+ "if-unmodified-since",
+ "last-modified",
+ "location",
+ "max-forwards",
+ "proxy-authorization",
+ "referer",
+ "retry-after",
+ "user-agent"
+ ];
+ module2.exports = function parseHeaders(headers) {
+ var parsed = {};
+ var key2;
+ var val;
+ var i2;
+ if (!headers) {
+ return parsed;
+ }
+ utils.forEach(headers.split("\n"), function parser(line) {
+ i2 = line.indexOf(":");
+ key2 = utils.trim(line.substr(0, i2)).toLowerCase();
+ val = utils.trim(line.substr(i2 + 1));
+ if (key2) {
+ if (parsed[key2] && ignoreDuplicateOf.indexOf(key2) >= 0) {
+ return;
+ }
+ if (key2 === "set-cookie") {
+ parsed[key2] = (parsed[key2] ? parsed[key2] : []).concat([val]);
+ } else {
+ parsed[key2] = parsed[key2] ? parsed[key2] + ", " + val : val;
+ }
+ }
+ });
+ return parsed;
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/isURLSameOrigin.js
+var require_isURLSameOrigin = __commonJS({
+ "node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
+ var urlParsingNode = document.createElement("a");
+ var originURL;
+ function resolveURL(url) {
+ var href = url;
+ if (msie) {
+ urlParsingNode.setAttribute("href", href);
+ href = urlParsingNode.href;
+ }
+ urlParsingNode.setAttribute("href", href);
+ return {
+ href: urlParsingNode.href,
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
+ host: urlParsingNode.host,
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
+ hostname: urlParsingNode.hostname,
+ port: urlParsingNode.port,
+ pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
+ };
+ }
+ originURL = resolveURL(window.location.href);
+ return function isURLSameOrigin(requestURL) {
+ var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
+ };
+ }() : function nonStandardBrowserEnv() {
+ return function isURLSameOrigin() {
+ return true;
+ };
+ }();
+ }
+});
+
+// node_modules/axios/lib/adapters/xhr.js
+var require_xhr = __commonJS({
+ "node_modules/axios/lib/adapters/xhr.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var settle = require_settle();
+ var cookies = require_cookies();
+ var buildURL = require_buildURL();
+ var buildFullPath = require_buildFullPath();
+ var parseHeaders = require_parseHeaders();
+ var isURLSameOrigin = require_isURLSameOrigin();
+ var createError = require_createError();
+ module2.exports = function xhrAdapter(config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ var requestData = config.data;
+ var requestHeaders = config.headers;
+ var responseType = config.responseType;
+ if (utils.isFormData(requestData)) {
+ delete requestHeaders["Content-Type"];
+ }
+ var request = new XMLHttpRequest();
+ if (config.auth) {
+ var username = config.auth.username || "";
+ var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
+ requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
+ }
+ var fullPath = buildFullPath(config.baseURL, config.url);
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
+ request.timeout = config.timeout;
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ var responseHeaders = "getAllResponseHeaders" in request ? parseHeaders(request.getAllResponseHeaders()) : null;
+ var responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ };
+ settle(resolve, reject, response);
+ request = null;
+ }
+ if ("onloadend" in request) {
+ request.onloadend = onloadend;
+ } else {
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
+ return;
+ }
+ setTimeout(onloadend);
+ };
+ }
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+ reject(createError("Request aborted", config, "ECONNABORTED", request));
+ request = null;
+ };
+ request.onerror = function handleError() {
+ reject(createError("Network Error", config, null, request));
+ request = null;
+ };
+ request.ontimeout = function handleTimeout() {
+ var timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
+ if (config.timeoutErrorMessage) {
+ timeoutErrorMessage = config.timeoutErrorMessage;
+ }
+ reject(createError(timeoutErrorMessage, config, config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request));
+ request = null;
+ };
+ if (utils.isStandardBrowserEnv()) {
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
+ if (xsrfValue) {
+ requestHeaders[config.xsrfHeaderName] = xsrfValue;
+ }
+ }
+ if ("setRequestHeader" in request) {
+ utils.forEach(requestHeaders, function setRequestHeader(val, key2) {
+ if (typeof requestData === "undefined" && key2.toLowerCase() === "content-type") {
+ delete requestHeaders[key2];
+ } else {
+ request.setRequestHeader(key2, val);
+ }
+ });
+ }
+ if (!utils.isUndefined(config.withCredentials)) {
+ request.withCredentials = !!config.withCredentials;
+ }
+ if (responseType && responseType !== "json") {
+ request.responseType = config.responseType;
+ }
+ if (typeof config.onDownloadProgress === "function") {
+ request.addEventListener("progress", config.onDownloadProgress);
+ }
+ if (typeof config.onUploadProgress === "function" && request.upload) {
+ request.upload.addEventListener("progress", config.onUploadProgress);
+ }
+ if (config.cancelToken) {
+ config.cancelToken.promise.then(function onCanceled(cancel) {
+ if (!request) {
+ return;
+ }
+ request.abort();
+ reject(cancel);
+ request = null;
+ });
+ }
+ if (!requestData) {
+ requestData = null;
+ }
+ request.send(requestData);
+ });
+ };
+ }
+});
+
+// node_modules/ms/index.js
+var require_ms = __commonJS({
+ "node_modules/ms/index.js"(exports, module2) {
+ var s2 = 1e3;
+ var m2 = s2 * 60;
+ var h2 = m2 * 60;
+ var d = h2 * 24;
+ var w = d * 7;
+ var y = d * 365.25;
+ module2.exports = function(val, options) {
+ options = options || {};
+ var type = typeof val;
+ if (type === "string" && val.length > 0) {
+ return parse4(val);
+ } else if (type === "number" && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
+ }
+ throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
+ };
+ function parse4(str) {
+ str = String(str);
+ if (str.length > 100) {
+ return;
+ }
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
+ if (!match) {
+ return;
+ }
+ var n = parseFloat(match[1]);
+ var type = (match[2] || "ms").toLowerCase();
+ switch (type) {
+ case "years":
+ case "year":
+ case "yrs":
+ case "yr":
+ case "y":
+ return n * y;
+ case "weeks":
+ case "week":
+ case "w":
+ return n * w;
+ case "days":
+ case "day":
+ case "d":
+ return n * d;
+ case "hours":
+ case "hour":
+ case "hrs":
+ case "hr":
+ case "h":
+ return n * h2;
+ case "minutes":
+ case "minute":
+ case "mins":
+ case "min":
+ case "m":
+ return n * m2;
+ case "seconds":
+ case "second":
+ case "secs":
+ case "sec":
+ case "s":
+ return n * s2;
+ case "milliseconds":
+ case "millisecond":
+ case "msecs":
+ case "msec":
+ case "ms":
+ return n;
+ default:
+ return void 0;
+ }
+ }
+ function fmtShort(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return Math.round(ms / d) + "d";
+ }
+ if (msAbs >= h2) {
+ return Math.round(ms / h2) + "h";
+ }
+ if (msAbs >= m2) {
+ return Math.round(ms / m2) + "m";
+ }
+ if (msAbs >= s2) {
+ return Math.round(ms / s2) + "s";
+ }
+ return ms + "ms";
+ }
+ function fmtLong(ms) {
+ var msAbs = Math.abs(ms);
+ if (msAbs >= d) {
+ return plural(ms, msAbs, d, "day");
+ }
+ if (msAbs >= h2) {
+ return plural(ms, msAbs, h2, "hour");
+ }
+ if (msAbs >= m2) {
+ return plural(ms, msAbs, m2, "minute");
+ }
+ if (msAbs >= s2) {
+ return plural(ms, msAbs, s2, "second");
+ }
+ return ms + " ms";
+ }
+ function plural(ms, msAbs, n, name) {
+ var isPlural = msAbs >= n * 1.5;
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
+ }
+ }
+});
+
+// node_modules/debug/src/common.js
+var require_common = __commonJS({
+ "node_modules/debug/src/common.js"(exports, module2) {
+ function setup(env2) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require_ms();
+ createDebug.destroy = destroy;
+ Object.keys(env2).forEach((key2) => {
+ createDebug[key2] = env2[key2];
+ });
+ createDebug.names = [];
+ createDebug.skips = [];
+ createDebug.formatters = {};
+ function selectColor(namespace) {
+ let hash2 = 0;
+ for (let i2 = 0; i2 < namespace.length; i2++) {
+ hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i2);
+ hash2 |= 0;
+ }
+ return createDebug.colors[Math.abs(hash2) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+ let namespacesCache;
+ let enabledCache;
+ function debug(...args) {
+ if (!debug.enabled) {
+ return;
+ }
+ const self2 = debug;
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self2.diff = ms;
+ self2.prev = prevTime;
+ self2.curr = curr;
+ prevTime = curr;
+ args[0] = createDebug.coerce(args[0]);
+ if (typeof args[0] !== "string") {
+ args.unshift("%O");
+ }
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ if (match === "%%") {
+ return "%";
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === "function") {
+ const val = args[index];
+ match = formatter.call(self2, val);
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+ createDebug.formatArgs.call(self2, args);
+ const logFn = self2.log || createDebug.log;
+ logFn.apply(self2, args);
+ }
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy;
+ Object.defineProperty(debug, "enabled", {
+ enumerable: true,
+ configurable: false,
+ get: () => {
+ if (enableOverride !== null) {
+ return enableOverride;
+ }
+ if (namespacesCache !== createDebug.namespaces) {
+ namespacesCache = createDebug.namespaces;
+ enabledCache = createDebug.enabled(namespace);
+ }
+ return enabledCache;
+ },
+ set: (v) => {
+ enableOverride = v;
+ }
+ });
+ if (typeof createDebug.init === "function") {
+ createDebug.init(debug);
+ }
+ return debug;
+ }
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+ createDebug.namespaces = namespaces;
+ createDebug.names = [];
+ createDebug.skips = [];
+ let i2;
+ const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
+ const len = split.length;
+ for (i2 = 0; i2 < len; i2++) {
+ if (!split[i2]) {
+ continue;
+ }
+ namespaces = split[i2].replace(/\*/g, ".*?");
+ if (namespaces[0] === "-") {
+ createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
+ } else {
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
+ }
+ }
+ }
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
+ ].join(",");
+ createDebug.enable("");
+ return namespaces;
+ }
+ function enabled(name) {
+ if (name[name.length - 1] === "*") {
+ return true;
+ }
+ let i2;
+ let len;
+ for (i2 = 0, len = createDebug.skips.length; i2 < len; i2++) {
+ if (createDebug.skips[i2].test(name)) {
+ return false;
+ }
+ }
+ for (i2 = 0, len = createDebug.names.length; i2 < len; i2++) {
+ if (createDebug.names[i2].test(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function toNamespace(regexp) {
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
+ }
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+ function destroy() {
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
+ }
+ createDebug.enable(createDebug.load());
+ return createDebug;
+ }
+ module2.exports = setup;
+ }
+});
+
+// node_modules/debug/src/browser.js
+var require_browser = __commonJS({
+ "node_modules/debug/src/browser.js"(exports, module2) {
+ exports.formatArgs = formatArgs;
+ exports.save = save;
+ exports.load = load;
+ exports.useColors = useColors;
+ exports.storage = localstorage();
+ exports.destroy = (() => {
+ let warned = false;
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
+ }
+ };
+ })();
+ exports.colors = [
+ "#0000CC",
+ "#0000FF",
+ "#0033CC",
+ "#0033FF",
+ "#0066CC",
+ "#0066FF",
+ "#0099CC",
+ "#0099FF",
+ "#00CC00",
+ "#00CC33",
+ "#00CC66",
+ "#00CC99",
+ "#00CCCC",
+ "#00CCFF",
+ "#3300CC",
+ "#3300FF",
+ "#3333CC",
+ "#3333FF",
+ "#3366CC",
+ "#3366FF",
+ "#3399CC",
+ "#3399FF",
+ "#33CC00",
+ "#33CC33",
+ "#33CC66",
+ "#33CC99",
+ "#33CCCC",
+ "#33CCFF",
+ "#6600CC",
+ "#6600FF",
+ "#6633CC",
+ "#6633FF",
+ "#66CC00",
+ "#66CC33",
+ "#9900CC",
+ "#9900FF",
+ "#9933CC",
+ "#9933FF",
+ "#99CC00",
+ "#99CC33",
+ "#CC0000",
+ "#CC0033",
+ "#CC0066",
+ "#CC0099",
+ "#CC00CC",
+ "#CC00FF",
+ "#CC3300",
+ "#CC3333",
+ "#CC3366",
+ "#CC3399",
+ "#CC33CC",
+ "#CC33FF",
+ "#CC6600",
+ "#CC6633",
+ "#CC9900",
+ "#CC9933",
+ "#CCCC00",
+ "#CCCC33",
+ "#FF0000",
+ "#FF0033",
+ "#FF0066",
+ "#FF0099",
+ "#FF00CC",
+ "#FF00FF",
+ "#FF3300",
+ "#FF3333",
+ "#FF3366",
+ "#FF3399",
+ "#FF33CC",
+ "#FF33FF",
+ "#FF6600",
+ "#FF6633",
+ "#FF9900",
+ "#FF9933",
+ "#FFCC00",
+ "#FFCC33"
+ ];
+ function useColors() {
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
+ return true;
+ }
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+ }
+ function formatArgs(args) {
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
+ if (!this.useColors) {
+ return;
+ }
+ const c = "color: " + this.color;
+ args.splice(1, 0, c, "color: inherit");
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
+ if (match === "%%") {
+ return;
+ }
+ index++;
+ if (match === "%c") {
+ lastC = index;
+ }
+ });
+ args.splice(lastC, 0, c);
+ }
+ exports.log = console.debug || console.log || (() => {
+ });
+ function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem("debug", namespaces);
+ } else {
+ exports.storage.removeItem("debug");
+ }
+ } catch (error) {
+ }
+ }
+ function load() {
+ let r2;
+ try {
+ r2 = exports.storage.getItem("debug");
+ } catch (error) {
+ }
+ if (!r2 && typeof process !== "undefined" && "env" in process) {
+ r2 = process.env.DEBUG;
+ }
+ return r2;
+ }
+ function localstorage() {
+ try {
+ return localStorage;
+ } catch (error) {
+ }
+ }
+ module2.exports = require_common()(exports);
+ var { formatters } = module2.exports;
+ formatters.j = function(v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return "[UnexpectedJSONParseError]: " + error.message;
+ }
+ };
+ }
+});
+
+// node_modules/supports-color/index.js
+var supports_color_exports = {};
+__export(supports_color_exports, {
+ createSupportsColor: () => createSupportsColor,
+ default: () => supports_color_default
+});
+function hasFlag(flag, argv = import_node_process.default.argv) {
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
+ const position = argv.indexOf(prefix + flag);
+ const terminatorPosition = argv.indexOf("--");
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
+}
+function envForceColor() {
+ if ("FORCE_COLOR" in env) {
+ if (env.FORCE_COLOR === "true") {
+ return 1;
+ }
+ if (env.FORCE_COLOR === "false") {
+ return 0;
+ }
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
+ }
+}
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+}
+function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
+ const noFlagForceColor = envForceColor();
+ if (noFlagForceColor !== void 0) {
+ flagForceColor = noFlagForceColor;
+ }
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
+ if (forceColor === 0) {
+ return 0;
+ }
+ if (sniffFlags) {
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
+ return 3;
+ }
+ if (hasFlag("color=256")) {
+ return 2;
+ }
+ }
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
+ return 0;
+ }
+ const min = forceColor || 0;
+ if (env.TERM === "dumb") {
+ return min;
+ }
+ if (import_node_process.default.platform === "win32") {
+ const osRelease = import_node_os.default.release().split(".");
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+ return 1;
+ }
+ if ("CI" in env) {
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
+ return 1;
+ }
+ return min;
+ }
+ if ("TEAMCITY_VERSION" in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
+ return 1;
+ }
+ if (env.COLORTERM === "truecolor") {
+ return 3;
+ }
+ if ("TERM_PROGRAM" in env) {
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
+ switch (env.TERM_PROGRAM) {
+ case "iTerm.app":
+ return version >= 3 ? 3 : 2;
+ case "Apple_Terminal":
+ return 2;
+ }
+ }
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+ if ("COLORTERM" in env) {
+ return 1;
+ }
+ return min;
+}
+function createSupportsColor(stream, options = {}) {
+ const level = _supportsColor(stream, __spreadValues({
+ streamIsTTY: stream && stream.isTTY
+ }, options));
+ return translateLevel(level);
+}
+var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
+var init_supports_color = __esm({
+ "node_modules/supports-color/index.js"() {
+ import_node_process = __toESM(require("node:process"), 1);
+ import_node_os = __toESM(require("node:os"), 1);
+ import_node_tty = __toESM(require("node:tty"), 1);
+ ({ env } = import_node_process.default);
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
+ flagForceColor = 0;
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
+ flagForceColor = 1;
+ }
+ supportsColor = {
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
+ };
+ supports_color_default = supportsColor;
+ }
+});
+
+// node_modules/debug/src/node.js
+var require_node = __commonJS({
+ "node_modules/debug/src/node.js"(exports, module2) {
+ var tty2 = require("tty");
+ var util = require("util");
+ exports.init = init;
+ exports.log = log;
+ exports.formatArgs = formatArgs;
+ exports.save = save;
+ exports.load = load;
+ exports.useColors = useColors;
+ exports.destroy = util.deprecate(() => {
+ }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
+ exports.colors = [6, 2, 3, 4, 5, 1];
+ try {
+ const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports));
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+ } catch (error) {
+ }
+ exports.inspectOpts = Object.keys(process.env).filter((key2) => {
+ return /^debug_/i.test(key2);
+ }).reduce((obj, key2) => {
+ const prop2 = key2.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+ let val = process.env[key2];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === "null") {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+ obj[prop2] = val;
+ return obj;
+ }, {});
+ function useColors() {
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
+ }
+ function formatArgs(args) {
+ const { namespace: name, useColors: useColors2 } = this;
+ if (useColors2) {
+ const c = this.color;
+ const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
+ args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
+ } else {
+ args[0] = getDate() + name + " " + args[0];
+ }
+ }
+ function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return "";
+ }
+ return new Date().toISOString() + " ";
+ }
+ function log(...args) {
+ return process.stderr.write(util.format(...args) + "\n");
+ }
+ function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ delete process.env.DEBUG;
+ }
+ }
+ function load() {
+ return process.env.DEBUG;
+ }
+ function init(debug) {
+ debug.inspectOpts = {};
+ const keys2 = Object.keys(exports.inspectOpts);
+ for (let i2 = 0; i2 < keys2.length; i2++) {
+ debug.inspectOpts[keys2[i2]] = exports.inspectOpts[keys2[i2]];
+ }
+ }
+ module2.exports = require_common()(exports);
+ var { formatters } = module2.exports;
+ formatters.o = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
+ };
+ formatters.O = function(v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+ };
+ }
+});
+
+// node_modules/debug/src/index.js
+var require_src = __commonJS({
+ "node_modules/debug/src/index.js"(exports, module2) {
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
+ module2.exports = require_browser();
+ } else {
+ module2.exports = require_node();
+ }
+ }
+});
+
+// node_modules/follow-redirects/debug.js
+var require_debug = __commonJS({
+ "node_modules/follow-redirects/debug.js"(exports, module2) {
+ var debug;
+ module2.exports = function() {
+ if (!debug) {
+ try {
+ debug = require_src()("follow-redirects");
+ } catch (error) {
+ }
+ if (typeof debug !== "function") {
+ debug = function() {
+ };
+ }
+ }
+ debug.apply(null, arguments);
+ };
+ }
+});
+
+// node_modules/follow-redirects/index.js
+var require_follow_redirects = __commonJS({
+ "node_modules/follow-redirects/index.js"(exports, module2) {
+ var url = require("url");
+ var URL2 = url.URL;
+ var http3 = require("http");
+ var https2 = require("https");
+ var Writable = require("stream").Writable;
+ var assert = require("assert");
+ var debug = require_debug();
+ var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
+ var eventHandlers = /* @__PURE__ */ Object.create(null);
+ events.forEach(function(event) {
+ eventHandlers[event] = function(arg1, arg2, arg3) {
+ this._redirectable.emit(event, arg1, arg2, arg3);
+ };
+ });
+ var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
+ var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded");
+ var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
+ var WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
+ function RedirectableRequest(options, responseCallback) {
+ Writable.call(this);
+ this._sanitizeOptions(options);
+ this._options = options;
+ this._ended = false;
+ this._ending = false;
+ this._redirectCount = 0;
+ this._redirects = [];
+ this._requestBodyLength = 0;
+ this._requestBodyBuffers = [];
+ if (responseCallback) {
+ this.on("response", responseCallback);
+ }
+ var self2 = this;
+ this._onNativeResponse = function(response) {
+ self2._processResponse(response);
+ };
+ this._performRequest();
+ }
+ RedirectableRequest.prototype = Object.create(Writable.prototype);
+ RedirectableRequest.prototype.abort = function() {
+ abortRequest(this._currentRequest);
+ this.emit("abort");
+ };
+ RedirectableRequest.prototype.write = function(data, encoding, callback) {
+ if (this._ending) {
+ throw new WriteAfterEndError();
+ }
+ if (!(typeof data === "string" || typeof data === "object" && "length" in data)) {
+ throw new TypeError("data should be a string, Buffer or Uint8Array");
+ }
+ if (typeof encoding === "function") {
+ callback = encoding;
+ encoding = null;
+ }
+ if (data.length === 0) {
+ if (callback) {
+ callback();
+ }
+ return;
+ }
+ if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
+ this._requestBodyLength += data.length;
+ this._requestBodyBuffers.push({ data, encoding });
+ this._currentRequest.write(data, encoding, callback);
+ } else {
+ this.emit("error", new MaxBodyLengthExceededError());
+ this.abort();
+ }
+ };
+ RedirectableRequest.prototype.end = function(data, encoding, callback) {
+ if (typeof data === "function") {
+ callback = data;
+ data = encoding = null;
+ } else if (typeof encoding === "function") {
+ callback = encoding;
+ encoding = null;
+ }
+ if (!data) {
+ this._ended = this._ending = true;
+ this._currentRequest.end(null, null, callback);
+ } else {
+ var self2 = this;
+ var currentRequest = this._currentRequest;
+ this.write(data, encoding, function() {
+ self2._ended = true;
+ currentRequest.end(null, null, callback);
+ });
+ this._ending = true;
+ }
+ };
+ RedirectableRequest.prototype.setHeader = function(name, value) {
+ this._options.headers[name] = value;
+ this._currentRequest.setHeader(name, value);
+ };
+ RedirectableRequest.prototype.removeHeader = function(name) {
+ delete this._options.headers[name];
+ this._currentRequest.removeHeader(name);
+ };
+ RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
+ var self2 = this;
+ function destroyOnTimeout(socket) {
+ socket.setTimeout(msecs);
+ socket.removeListener("timeout", socket.destroy);
+ socket.addListener("timeout", socket.destroy);
+ }
+ function startTimer(socket) {
+ if (self2._timeout) {
+ clearTimeout(self2._timeout);
+ }
+ self2._timeout = setTimeout(function() {
+ self2.emit("timeout");
+ clearTimer();
+ }, msecs);
+ destroyOnTimeout(socket);
+ }
+ function clearTimer() {
+ if (self2._timeout) {
+ clearTimeout(self2._timeout);
+ self2._timeout = null;
+ }
+ self2.removeListener("abort", clearTimer);
+ self2.removeListener("error", clearTimer);
+ self2.removeListener("response", clearTimer);
+ if (callback) {
+ self2.removeListener("timeout", callback);
+ }
+ if (!self2.socket) {
+ self2._currentRequest.removeListener("socket", startTimer);
+ }
+ }
+ if (callback) {
+ this.on("timeout", callback);
+ }
+ if (this.socket) {
+ startTimer(this.socket);
+ } else {
+ this._currentRequest.once("socket", startTimer);
+ }
+ this.on("socket", destroyOnTimeout);
+ this.on("abort", clearTimer);
+ this.on("error", clearTimer);
+ this.on("response", clearTimer);
+ return this;
+ };
+ [
+ "flushHeaders",
+ "getHeader",
+ "setNoDelay",
+ "setSocketKeepAlive"
+ ].forEach(function(method) {
+ RedirectableRequest.prototype[method] = function(a, b) {
+ return this._currentRequest[method](a, b);
+ };
+ });
+ ["aborted", "connection", "socket"].forEach(function(property) {
+ Object.defineProperty(RedirectableRequest.prototype, property, {
+ get: function() {
+ return this._currentRequest[property];
+ }
+ });
+ });
+ RedirectableRequest.prototype._sanitizeOptions = function(options) {
+ if (!options.headers) {
+ options.headers = {};
+ }
+ if (options.host) {
+ if (!options.hostname) {
+ options.hostname = options.host;
+ }
+ delete options.host;
+ }
+ if (!options.pathname && options.path) {
+ var searchPos = options.path.indexOf("?");
+ if (searchPos < 0) {
+ options.pathname = options.path;
+ } else {
+ options.pathname = options.path.substring(0, searchPos);
+ options.search = options.path.substring(searchPos);
+ }
+ }
+ };
+ RedirectableRequest.prototype._performRequest = function() {
+ var protocol = this._options.protocol;
+ var nativeProtocol = this._options.nativeProtocols[protocol];
+ if (!nativeProtocol) {
+ this.emit("error", new TypeError("Unsupported protocol " + protocol));
+ return;
+ }
+ if (this._options.agents) {
+ var scheme = protocol.substr(0, protocol.length - 1);
+ this._options.agent = this._options.agents[scheme];
+ }
+ var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
+ this._currentUrl = url.format(this._options);
+ request._redirectable = this;
+ for (var e2 = 0; e2 < events.length; e2++) {
+ request.on(events[e2], eventHandlers[events[e2]]);
+ }
+ if (this._isRedirect) {
+ var i2 = 0;
+ var self2 = this;
+ var buffers = this._requestBodyBuffers;
+ (function writeNext(error) {
+ if (request === self2._currentRequest) {
+ if (error) {
+ self2.emit("error", error);
+ } else if (i2 < buffers.length) {
+ var buffer = buffers[i2++];
+ if (!request.finished) {
+ request.write(buffer.data, buffer.encoding, writeNext);
+ }
+ } else if (self2._ended) {
+ request.end();
+ }
+ }
+ })();
+ }
+ };
+ RedirectableRequest.prototype._processResponse = function(response) {
+ var statusCode = response.statusCode;
+ if (this._options.trackRedirects) {
+ this._redirects.push({
+ url: this._currentUrl,
+ headers: response.headers,
+ statusCode
+ });
+ }
+ var location = response.headers.location;
+ if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
+ response.responseUrl = this._currentUrl;
+ response.redirects = this._redirects;
+ this.emit("response", response);
+ this._requestBodyBuffers = [];
+ return;
+ }
+ abortRequest(this._currentRequest);
+ response.destroy();
+ if (++this._redirectCount > this._options.maxRedirects) {
+ this.emit("error", new TooManyRedirectsError());
+ return;
+ }
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
+ this._options.method = "GET";
+ this._requestBodyBuffers = [];
+ removeMatchingHeaders(/^content-/i, this._options.headers);
+ }
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
+ var currentUrlParts = url.parse(this._currentUrl);
+ var currentHost = currentHostHeader || currentUrlParts.host;
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost }));
+ var redirectUrl;
+ try {
+ redirectUrl = url.resolve(currentUrl, location);
+ } catch (cause) {
+ this.emit("error", new RedirectionError(cause));
+ return;
+ }
+ debug("redirecting to", redirectUrl);
+ this._isRedirect = true;
+ var redirectUrlParts = url.parse(redirectUrl);
+ Object.assign(this._options, redirectUrlParts);
+ if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
+ removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
+ }
+ if (typeof this._options.beforeRedirect === "function") {
+ var responseDetails = { headers: response.headers };
+ try {
+ this._options.beforeRedirect.call(null, this._options, responseDetails);
+ } catch (err) {
+ this.emit("error", err);
+ return;
+ }
+ this._sanitizeOptions(this._options);
+ }
+ try {
+ this._performRequest();
+ } catch (cause) {
+ this.emit("error", new RedirectionError(cause));
+ }
+ };
+ function wrap(protocols) {
+ var exports2 = {
+ maxRedirects: 21,
+ maxBodyLength: 10 * 1024 * 1024
+ };
+ var nativeProtocols = {};
+ Object.keys(protocols).forEach(function(scheme) {
+ var protocol = scheme + ":";
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
+ var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
+ function request(input, options, callback) {
+ if (typeof input === "string") {
+ var urlStr = input;
+ try {
+ input = urlToOptions(new URL2(urlStr));
+ } catch (err) {
+ input = url.parse(urlStr);
+ }
+ } else if (URL2 && input instanceof URL2) {
+ input = urlToOptions(input);
+ } else {
+ callback = options;
+ options = input;
+ input = { protocol };
+ }
+ if (typeof options === "function") {
+ callback = options;
+ options = null;
+ }
+ options = Object.assign({
+ maxRedirects: exports2.maxRedirects,
+ maxBodyLength: exports2.maxBodyLength
+ }, input, options);
+ options.nativeProtocols = nativeProtocols;
+ assert.equal(options.protocol, protocol, "protocol mismatch");
+ debug("options", options);
+ return new RedirectableRequest(options, callback);
+ }
+ function get(input, options, callback) {
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
+ wrappedRequest.end();
+ return wrappedRequest;
+ }
+ Object.defineProperties(wrappedProtocol, {
+ request: { value: request, configurable: true, enumerable: true, writable: true },
+ get: { value: get, configurable: true, enumerable: true, writable: true }
+ });
+ });
+ return exports2;
+ }
+ function noop2() {
+ }
+ function urlToOptions(urlObject) {
+ var options = {
+ protocol: urlObject.protocol,
+ hostname: urlObject.hostname.startsWith("[") ? urlObject.hostname.slice(1, -1) : urlObject.hostname,
+ hash: urlObject.hash,
+ search: urlObject.search,
+ pathname: urlObject.pathname,
+ path: urlObject.pathname + urlObject.search,
+ href: urlObject.href
+ };
+ if (urlObject.port !== "") {
+ options.port = Number(urlObject.port);
+ }
+ return options;
+ }
+ function removeMatchingHeaders(regex, headers) {
+ var lastValue;
+ for (var header in headers) {
+ if (regex.test(header)) {
+ lastValue = headers[header];
+ delete headers[header];
+ }
+ }
+ return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
+ }
+ function createErrorType(code, defaultMessage) {
+ function CustomError(cause) {
+ Error.captureStackTrace(this, this.constructor);
+ if (!cause) {
+ this.message = defaultMessage;
+ } else {
+ this.message = defaultMessage + ": " + cause.message;
+ this.cause = cause;
+ }
+ }
+ CustomError.prototype = new Error();
+ CustomError.prototype.constructor = CustomError;
+ CustomError.prototype.name = "Error [" + code + "]";
+ CustomError.prototype.code = code;
+ return CustomError;
+ }
+ function abortRequest(request) {
+ for (var e2 = 0; e2 < events.length; e2++) {
+ request.removeListener(events[e2], eventHandlers[events[e2]]);
+ }
+ request.on("error", noop2);
+ request.abort();
+ }
+ function isSubdomain(subdomain, domain) {
+ const dot = subdomain.length - domain.length - 1;
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
+ }
+ module2.exports = wrap({ http: http3, https: https2 });
+ module2.exports.wrap = wrap;
+ }
+});
+
+// node_modules/axios/package.json
+var require_package = __commonJS({
+ "node_modules/axios/package.json"(exports, module2) {
+ module2.exports = {
+ name: "axios",
+ version: "0.21.4",
+ description: "Promise based HTTP client for the browser and node.js",
+ main: "index.js",
+ scripts: {
+ test: "grunt test",
+ start: "node ./sandbox/server.js",
+ build: "NODE_ENV=production grunt build",
+ preversion: "npm test",
+ version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
+ postversion: "git push && git push --tags",
+ examples: "node ./examples/server.js",
+ coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
+ fix: "eslint --fix lib/**/*.js"
+ },
+ repository: {
+ type: "git",
+ url: "https://github.com/axios/axios.git"
+ },
+ keywords: [
+ "xhr",
+ "http",
+ "ajax",
+ "promise",
+ "node"
+ ],
+ author: "Matt Zabriskie",
+ license: "MIT",
+ bugs: {
+ url: "https://github.com/axios/axios/issues"
+ },
+ homepage: "https://axios-http.com",
+ devDependencies: {
+ coveralls: "^3.0.0",
+ "es6-promise": "^4.2.4",
+ grunt: "^1.3.0",
+ "grunt-banner": "^0.6.0",
+ "grunt-cli": "^1.2.0",
+ "grunt-contrib-clean": "^1.1.0",
+ "grunt-contrib-watch": "^1.0.0",
+ "grunt-eslint": "^23.0.0",
+ "grunt-karma": "^4.0.0",
+ "grunt-mocha-test": "^0.13.3",
+ "grunt-ts": "^6.0.0-beta.19",
+ "grunt-webpack": "^4.0.2",
+ "istanbul-instrumenter-loader": "^1.0.0",
+ "jasmine-core": "^2.4.1",
+ karma: "^6.3.2",
+ "karma-chrome-launcher": "^3.1.0",
+ "karma-firefox-launcher": "^2.1.0",
+ "karma-jasmine": "^1.1.1",
+ "karma-jasmine-ajax": "^0.1.13",
+ "karma-safari-launcher": "^1.0.0",
+ "karma-sauce-launcher": "^4.3.6",
+ "karma-sinon": "^1.0.5",
+ "karma-sourcemap-loader": "^0.3.8",
+ "karma-webpack": "^4.0.2",
+ "load-grunt-tasks": "^3.5.2",
+ minimist: "^1.2.0",
+ mocha: "^8.2.1",
+ sinon: "^4.5.0",
+ "terser-webpack-plugin": "^4.2.3",
+ typescript: "^4.0.5",
+ "url-search-params": "^0.10.0",
+ webpack: "^4.44.2",
+ "webpack-dev-server": "^3.11.0"
+ },
+ browser: {
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js"
+ },
+ jsdelivr: "dist/axios.min.js",
+ unpkg: "dist/axios.min.js",
+ typings: "./index.d.ts",
+ dependencies: {
+ "follow-redirects": "^1.14.0"
+ },
+ bundlesize: [
+ {
+ path: "./dist/axios.min.js",
+ threshold: "5kB"
+ }
+ ]
+ };
+ }
+});
+
+// node_modules/axios/lib/adapters/http.js
+var require_http = __commonJS({
+ "node_modules/axios/lib/adapters/http.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var settle = require_settle();
+ var buildFullPath = require_buildFullPath();
+ var buildURL = require_buildURL();
+ var http3 = require("http");
+ var https2 = require("https");
+ var httpFollow = require_follow_redirects().http;
+ var httpsFollow = require_follow_redirects().https;
+ var url = require("url");
+ var zlib2 = require("zlib");
+ var pkg = require_package();
+ var createError = require_createError();
+ var enhanceError = require_enhanceError();
+ var isHttps = /https:?/;
+ function setProxy(options, proxy, location) {
+ options.hostname = proxy.host;
+ options.host = proxy.host;
+ options.port = proxy.port;
+ options.path = location;
+ if (proxy.auth) {
+ var base64 = Buffer.from(proxy.auth.username + ":" + proxy.auth.password, "utf8").toString("base64");
+ options.headers["Proxy-Authorization"] = "Basic " + base64;
+ }
+ options.beforeRedirect = function beforeRedirect(redirection) {
+ redirection.headers.host = redirection.host;
+ setProxy(redirection, proxy, redirection.href);
+ };
+ }
+ module2.exports = function httpAdapter(config) {
+ return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
+ var resolve = function resolve2(value) {
+ resolvePromise(value);
+ };
+ var reject = function reject2(value) {
+ rejectPromise(value);
+ };
+ var data = config.data;
+ var headers = config.headers;
+ if ("User-Agent" in headers || "user-agent" in headers) {
+ if (!headers["User-Agent"] && !headers["user-agent"]) {
+ delete headers["User-Agent"];
+ delete headers["user-agent"];
+ }
+ } else {
+ headers["User-Agent"] = "axios/" + pkg.version;
+ }
+ if (data && !utils.isStream(data)) {
+ if (Buffer.isBuffer(data)) {
+ } else if (utils.isArrayBuffer(data)) {
+ data = Buffer.from(new Uint8Array(data));
+ } else if (utils.isString(data)) {
+ data = Buffer.from(data, "utf-8");
+ } else {
+ return reject(createError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", config));
+ }
+ headers["Content-Length"] = data.length;
+ }
+ var auth = void 0;
+ if (config.auth) {
+ var username = config.auth.username || "";
+ var password = config.auth.password || "";
+ auth = username + ":" + password;
+ }
+ var fullPath = buildFullPath(config.baseURL, config.url);
+ var parsed = url.parse(fullPath);
+ var protocol = parsed.protocol || "http:";
+ if (!auth && parsed.auth) {
+ var urlAuth = parsed.auth.split(":");
+ var urlUsername = urlAuth[0] || "";
+ var urlPassword = urlAuth[1] || "";
+ auth = urlUsername + ":" + urlPassword;
+ }
+ if (auth) {
+ delete headers.Authorization;
+ }
+ var isHttpsRequest = isHttps.test(protocol);
+ var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
+ var options = {
+ path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ""),
+ method: config.method.toUpperCase(),
+ headers,
+ agent,
+ agents: { http: config.httpAgent, https: config.httpsAgent },
+ auth
+ };
+ if (config.socketPath) {
+ options.socketPath = config.socketPath;
+ } else {
+ options.hostname = parsed.hostname;
+ options.port = parsed.port;
+ }
+ var proxy = config.proxy;
+ if (!proxy && proxy !== false) {
+ var proxyEnv = protocol.slice(0, -1) + "_proxy";
+ var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
+ if (proxyUrl) {
+ var parsedProxyUrl = url.parse(proxyUrl);
+ var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
+ var shouldProxy = true;
+ if (noProxyEnv) {
+ var noProxy = noProxyEnv.split(",").map(function trim(s2) {
+ return s2.trim();
+ });
+ shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
+ if (!proxyElement) {
+ return false;
+ }
+ if (proxyElement === "*") {
+ return true;
+ }
+ if (proxyElement[0] === "." && parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
+ return true;
+ }
+ return parsed.hostname === proxyElement;
+ });
+ }
+ if (shouldProxy) {
+ proxy = {
+ host: parsedProxyUrl.hostname,
+ port: parsedProxyUrl.port,
+ protocol: parsedProxyUrl.protocol
+ };
+ if (parsedProxyUrl.auth) {
+ var proxyUrlAuth = parsedProxyUrl.auth.split(":");
+ proxy.auth = {
+ username: proxyUrlAuth[0],
+ password: proxyUrlAuth[1]
+ };
+ }
+ }
+ }
+ }
+ if (proxy) {
+ options.headers.host = parsed.hostname + (parsed.port ? ":" + parsed.port : "");
+ setProxy(options, proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
+ }
+ var transport;
+ var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
+ if (config.transport) {
+ transport = config.transport;
+ } else if (config.maxRedirects === 0) {
+ transport = isHttpsProxy ? https2 : http3;
+ } else {
+ if (config.maxRedirects) {
+ options.maxRedirects = config.maxRedirects;
+ }
+ transport = isHttpsProxy ? httpsFollow : httpFollow;
+ }
+ if (config.maxBodyLength > -1) {
+ options.maxBodyLength = config.maxBodyLength;
+ }
+ var req = transport.request(options, function handleResponse(res) {
+ if (req.aborted)
+ return;
+ var stream = res;
+ var lastRequest = res.req || req;
+ if (res.statusCode !== 204 && lastRequest.method !== "HEAD" && config.decompress !== false) {
+ switch (res.headers["content-encoding"]) {
+ case "gzip":
+ case "compress":
+ case "deflate":
+ stream = stream.pipe(zlib2.createUnzip());
+ delete res.headers["content-encoding"];
+ break;
+ }
+ }
+ var response = {
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: res.headers,
+ config,
+ request: lastRequest
+ };
+ if (config.responseType === "stream") {
+ response.data = stream;
+ settle(resolve, reject, response);
+ } else {
+ var responseBuffer = [];
+ var totalResponseBytes = 0;
+ stream.on("data", function handleStreamData(chunk) {
+ responseBuffer.push(chunk);
+ totalResponseBytes += chunk.length;
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
+ stream.destroy();
+ reject(createError("maxContentLength size of " + config.maxContentLength + " exceeded", config, null, lastRequest));
+ }
+ });
+ stream.on("error", function handleStreamError(err) {
+ if (req.aborted)
+ return;
+ reject(enhanceError(err, config, null, lastRequest));
+ });
+ stream.on("end", function handleStreamEnd() {
+ var responseData = Buffer.concat(responseBuffer);
+ if (config.responseType !== "arraybuffer") {
+ responseData = responseData.toString(config.responseEncoding);
+ if (!config.responseEncoding || config.responseEncoding === "utf8") {
+ responseData = utils.stripBOM(responseData);
+ }
+ }
+ response.data = responseData;
+ settle(resolve, reject, response);
+ });
+ }
+ });
+ req.on("error", function handleRequestError(err) {
+ if (req.aborted && err.code !== "ERR_FR_TOO_MANY_REDIRECTS")
+ return;
+ reject(enhanceError(err, config, null, req));
+ });
+ if (config.timeout) {
+ var timeout = parseInt(config.timeout, 10);
+ if (isNaN(timeout)) {
+ reject(createError("error trying to parse `config.timeout` to int", config, "ERR_PARSE_TIMEOUT", req));
+ return;
+ }
+ req.setTimeout(timeout, function handleRequestTimeout() {
+ req.abort();
+ reject(createError("timeout of " + timeout + "ms exceeded", config, config.transitional && config.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", req));
+ });
+ }
+ if (config.cancelToken) {
+ config.cancelToken.promise.then(function onCanceled(cancel) {
+ if (req.aborted)
+ return;
+ req.abort();
+ reject(cancel);
+ });
+ }
+ if (utils.isStream(data)) {
+ data.on("error", function handleStreamError(err) {
+ reject(enhanceError(err, config, null, req));
+ }).pipe(req);
+ } else {
+ req.end(data);
+ }
+ });
+ };
+ }
+});
+
+// node_modules/axios/lib/defaults.js
+var require_defaults = __commonJS({
+ "node_modules/axios/lib/defaults.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var normalizeHeaderName = require_normalizeHeaderName();
+ var enhanceError = require_enhanceError();
+ var DEFAULT_CONTENT_TYPE = {
+ "Content-Type": "application/x-www-form-urlencoded"
+ };
+ function setContentTypeIfUnset(headers, value) {
+ if (!utils.isUndefined(headers) && utils.isUndefined(headers["Content-Type"])) {
+ headers["Content-Type"] = value;
+ }
+ }
+ function getDefaultAdapter() {
+ var adapter2;
+ if (typeof XMLHttpRequest !== "undefined") {
+ adapter2 = require_xhr();
+ } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
+ adapter2 = require_http();
+ }
+ return adapter2;
+ }
+ function stringifySafely(rawValue, parser, encoder) {
+ if (utils.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils.trim(rawValue);
+ } catch (e2) {
+ if (e2.name !== "SyntaxError") {
+ throw e2;
+ }
+ }
+ }
+ return (encoder || JSON.stringify)(rawValue);
+ }
+ var defaults = {
+ transitional: {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+ },
+ adapter: getDefaultAdapter(),
+ transformRequest: [function transformRequest(data, headers) {
+ normalizeHeaderName(headers, "Accept");
+ normalizeHeaderName(headers, "Content-Type");
+ if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
+ return data;
+ }
+ if (utils.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils.isURLSearchParams(data)) {
+ setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
+ return data.toString();
+ }
+ if (utils.isObject(data) || headers && headers["Content-Type"] === "application/json") {
+ setContentTypeIfUnset(headers, "application/json");
+ return stringifySafely(data);
+ }
+ return data;
+ }],
+ transformResponse: [function transformResponse(data) {
+ var transitional = this.transitional;
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
+ if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) {
+ try {
+ return JSON.parse(data);
+ } catch (e2) {
+ if (strictJSONParsing) {
+ if (e2.name === "SyntaxError") {
+ throw enhanceError(e2, this, "E_JSON_PARSE");
+ }
+ throw e2;
+ }
+ }
+ }
+ return data;
+ }],
+ timeout: 0,
+ xsrfCookieName: "XSRF-TOKEN",
+ xsrfHeaderName: "X-XSRF-TOKEN",
+ maxContentLength: -1,
+ maxBodyLength: -1,
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ }
+ };
+ defaults.headers = {
+ common: {
+ "Accept": "application/json, text/plain, */*"
+ }
+ };
+ utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
+ defaults.headers[method] = {};
+ });
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
+ });
+ module2.exports = defaults;
+ }
+});
+
+// node_modules/axios/lib/core/transformData.js
+var require_transformData = __commonJS({
+ "node_modules/axios/lib/core/transformData.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var defaults = require_defaults();
+ module2.exports = function transformData(data, headers, fns) {
+ var context = this || defaults;
+ utils.forEach(fns, function transform(fn) {
+ data = fn.call(context, data, headers);
+ });
+ return data;
+ };
+ }
+});
+
+// node_modules/axios/lib/cancel/isCancel.js
+var require_isCancel = __commonJS({
+ "node_modules/axios/lib/cancel/isCancel.js"(exports, module2) {
+ "use strict";
+ module2.exports = function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+ };
+ }
+});
+
+// node_modules/axios/lib/core/dispatchRequest.js
+var require_dispatchRequest = __commonJS({
+ "node_modules/axios/lib/core/dispatchRequest.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var transformData = require_transformData();
+ var isCancel = require_isCancel();
+ var defaults = require_defaults();
+ function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+ }
+ module2.exports = function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+ config.headers = config.headers || {};
+ config.data = transformData.call(config, config.data, config.headers, config.transformRequest);
+ config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
+ utils.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
+ delete config.headers[method];
+ });
+ var adapter2 = config.adapter || defaults.adapter;
+ return adapter2(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+ response.data = transformData.call(config, response.data, response.headers, config.transformResponse);
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(config, reason.response.data, reason.response.headers, config.transformResponse);
+ }
+ }
+ return Promise.reject(reason);
+ });
+ };
+ }
+});
+
+// node_modules/axios/lib/core/mergeConfig.js
+var require_mergeConfig = __commonJS({
+ "node_modules/axios/lib/core/mergeConfig.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ module2.exports = function mergeConfig(config1, config2) {
+ config2 = config2 || {};
+ var config = {};
+ var valueFromConfig2Keys = ["url", "method", "data"];
+ var mergeDeepPropertiesKeys = ["headers", "auth", "proxy", "params"];
+ var defaultToConfig2Keys = [
+ "baseURL",
+ "transformRequest",
+ "transformResponse",
+ "paramsSerializer",
+ "timeout",
+ "timeoutMessage",
+ "withCredentials",
+ "adapter",
+ "responseType",
+ "xsrfCookieName",
+ "xsrfHeaderName",
+ "onUploadProgress",
+ "onDownloadProgress",
+ "decompress",
+ "maxContentLength",
+ "maxBodyLength",
+ "maxRedirects",
+ "transport",
+ "httpAgent",
+ "httpsAgent",
+ "cancelToken",
+ "socketPath",
+ "responseEncoding"
+ ];
+ var directMergeKeys = ["validateStatus"];
+ function getMergedValue(target, source) {
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
+ return utils.merge(target, source);
+ } else if (utils.isPlainObject(source)) {
+ return utils.merge({}, source);
+ } else if (utils.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+ function mergeDeepProperties(prop2) {
+ if (!utils.isUndefined(config2[prop2])) {
+ config[prop2] = getMergedValue(config1[prop2], config2[prop2]);
+ } else if (!utils.isUndefined(config1[prop2])) {
+ config[prop2] = getMergedValue(void 0, config1[prop2]);
+ }
+ }
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop2) {
+ if (!utils.isUndefined(config2[prop2])) {
+ config[prop2] = getMergedValue(void 0, config2[prop2]);
+ }
+ });
+ utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop2) {
+ if (!utils.isUndefined(config2[prop2])) {
+ config[prop2] = getMergedValue(void 0, config2[prop2]);
+ } else if (!utils.isUndefined(config1[prop2])) {
+ config[prop2] = getMergedValue(void 0, config1[prop2]);
+ }
+ });
+ utils.forEach(directMergeKeys, function merge(prop2) {
+ if (prop2 in config2) {
+ config[prop2] = getMergedValue(config1[prop2], config2[prop2]);
+ } else if (prop2 in config1) {
+ config[prop2] = getMergedValue(void 0, config1[prop2]);
+ }
+ });
+ var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);
+ var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key2) {
+ return axiosKeys.indexOf(key2) === -1;
+ });
+ utils.forEach(otherKeys, mergeDeepProperties);
+ return config;
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/validator.js
+var require_validator = __commonJS({
+ "node_modules/axios/lib/helpers/validator.js"(exports, module2) {
+ "use strict";
+ var pkg = require_package();
+ var validators = {};
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i2) {
+ validators[type] = function validator(thing) {
+ return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type;
+ };
+ });
+ var deprecatedWarnings = {};
+ var currentVerArr = pkg.version.split(".");
+ function isOlderVersion(version, thanVersion) {
+ var pkgVersionArr = thanVersion ? thanVersion.split(".") : currentVerArr;
+ var destVer = version.split(".");
+ for (var i2 = 0; i2 < 3; i2++) {
+ if (pkgVersionArr[i2] > destVer[i2]) {
+ return true;
+ } else if (pkgVersionArr[i2] < destVer[i2]) {
+ return false;
+ }
+ }
+ return false;
+ }
+ validators.transitional = function transitional(validator, version, message) {
+ var isDeprecated = version && isOlderVersion(version);
+ function formatMessage(opt, desc) {
+ return "[Axios v" + pkg.version + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
+ }
+ return function(value, opt, opts) {
+ if (validator === false) {
+ throw new Error(formatMessage(opt, " has been removed in " + version));
+ }
+ if (isDeprecated && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
+ }
+ return validator ? validator(value, opt, opts) : true;
+ };
+ };
+ function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== "object") {
+ throw new TypeError("options must be an object");
+ }
+ var keys2 = Object.keys(options);
+ var i2 = keys2.length;
+ while (i2-- > 0) {
+ var opt = keys2[i2];
+ var validator = schema[opt];
+ if (validator) {
+ var value = options[opt];
+ var result = value === void 0 || validator(value, opt, options);
+ if (result !== true) {
+ throw new TypeError("option " + opt + " must be " + result);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw Error("Unknown option " + opt);
+ }
+ }
+ }
+ module2.exports = {
+ isOlderVersion,
+ assertOptions,
+ validators
+ };
+ }
+});
+
+// node_modules/axios/lib/core/Axios.js
+var require_Axios = __commonJS({
+ "node_modules/axios/lib/core/Axios.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var buildURL = require_buildURL();
+ var InterceptorManager = require_InterceptorManager();
+ var dispatchRequest = require_dispatchRequest();
+ var mergeConfig = require_mergeConfig();
+ var validator = require_validator();
+ var validators = validator.validators;
+ function Axios(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager(),
+ response: new InterceptorManager()
+ };
+ }
+ Axios.prototype.request = function request(config) {
+ if (typeof config === "string") {
+ config = arguments[1] || {};
+ config.url = arguments[0];
+ } else {
+ config = config || {};
+ }
+ config = mergeConfig(this.defaults, config);
+ if (config.method) {
+ config.method = config.method.toLowerCase();
+ } else if (this.defaults.method) {
+ config.method = this.defaults.method.toLowerCase();
+ } else {
+ config.method = "get";
+ }
+ var transitional = config.transitional;
+ if (transitional !== void 0) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
+ forcedJSONParsing: validators.transitional(validators.boolean, "1.0.0"),
+ clarifyTimeoutError: validators.transitional(validators.boolean, "1.0.0")
+ }, false);
+ }
+ var requestInterceptorChain = [];
+ var synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
+ return;
+ }
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+ var responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+ var promise;
+ if (!synchronousRequestInterceptors) {
+ var chain = [dispatchRequest, void 0];
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
+ chain = chain.concat(responseInterceptorChain);
+ promise = Promise.resolve(config);
+ while (chain.length) {
+ promise = promise.then(chain.shift(), chain.shift());
+ }
+ return promise;
+ }
+ var newConfig = config;
+ while (requestInterceptorChain.length) {
+ var onFulfilled = requestInterceptorChain.shift();
+ var onRejected = requestInterceptorChain.shift();
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected(error);
+ break;
+ }
+ }
+ try {
+ promise = dispatchRequest(newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+ while (responseInterceptorChain.length) {
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
+ }
+ return promise;
+ };
+ Axios.prototype.getUri = function getUri(config) {
+ config = mergeConfig(this.defaults, config);
+ return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
+ };
+ utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
+ Axios.prototype[method] = function(url, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+ });
+ utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
+ Axios.prototype[method] = function(url, data, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ url,
+ data
+ }));
+ };
+ });
+ module2.exports = Axios;
+ }
+});
+
+// node_modules/axios/lib/cancel/Cancel.js
+var require_Cancel = __commonJS({
+ "node_modules/axios/lib/cancel/Cancel.js"(exports, module2) {
+ "use strict";
+ function Cancel(message) {
+ this.message = message;
+ }
+ Cancel.prototype.toString = function toString2() {
+ return "Cancel" + (this.message ? ": " + this.message : "");
+ };
+ Cancel.prototype.__CANCEL__ = true;
+ module2.exports = Cancel;
+ }
+});
+
+// node_modules/axios/lib/cancel/CancelToken.js
+var require_CancelToken = __commonJS({
+ "node_modules/axios/lib/cancel/CancelToken.js"(exports, module2) {
+ "use strict";
+ var Cancel = require_Cancel();
+ function CancelToken(executor) {
+ if (typeof executor !== "function") {
+ throw new TypeError("executor must be a function.");
+ }
+ var resolvePromise;
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+ var token = this;
+ executor(function cancel(message) {
+ if (token.reason) {
+ return;
+ }
+ token.reason = new Cancel(message);
+ resolvePromise(token.reason);
+ });
+ }
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ };
+ CancelToken.source = function source() {
+ var cancel;
+ var token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token,
+ cancel
+ };
+ };
+ module2.exports = CancelToken;
+ }
+});
+
+// node_modules/axios/lib/helpers/spread.js
+var require_spread = __commonJS({
+ "node_modules/axios/lib/helpers/spread.js"(exports, module2) {
+ "use strict";
+ module2.exports = function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+ };
+ }
+});
+
+// node_modules/axios/lib/helpers/isAxiosError.js
+var require_isAxiosError = __commonJS({
+ "node_modules/axios/lib/helpers/isAxiosError.js"(exports, module2) {
+ "use strict";
+ module2.exports = function isAxiosError(payload) {
+ return typeof payload === "object" && payload.isAxiosError === true;
+ };
+ }
+});
+
+// node_modules/axios/lib/axios.js
+var require_axios = __commonJS({
+ "node_modules/axios/lib/axios.js"(exports, module2) {
+ "use strict";
+ var utils = require_utils2();
+ var bind = require_bind();
+ var Axios = require_Axios();
+ var mergeConfig = require_mergeConfig();
+ var defaults = require_defaults();
+ function createInstance(defaultConfig) {
+ var context = new Axios(defaultConfig);
+ var instance = bind(Axios.prototype.request, context);
+ utils.extend(instance, Axios.prototype, context);
+ utils.extend(instance, context);
+ return instance;
+ }
+ var axios = createInstance(defaults);
+ axios.Axios = Axios;
+ axios.create = function create3(instanceConfig) {
+ return createInstance(mergeConfig(axios.defaults, instanceConfig));
+ };
+ axios.Cancel = require_Cancel();
+ axios.CancelToken = require_CancelToken();
+ axios.isCancel = require_isCancel();
+ axios.all = function all(promises) {
+ return Promise.all(promises);
+ };
+ axios.spread = require_spread();
+ axios.isAxiosError = require_isAxiosError();
+ module2.exports = axios;
+ module2.exports.default = axios;
+ }
+});
+
+// node_modules/axios/index.js
+var require_axios2 = __commonJS({
+ "node_modules/axios/index.js"(exports, module2) {
+ module2.exports = require_axios();
+ }
+});
+
+// node_modules/fast-xml-parser/src/util.js
+var require_util = __commonJS({
+ "node_modules/fast-xml-parser/src/util.js"(exports) {
+ "use strict";
+ var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
+ var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
+ var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*";
+ var regexName = new RegExp("^" + nameRegexp + "$");
+ var getAllMatches = function(string, regex) {
+ const matches2 = [];
+ let match = regex.exec(string);
+ while (match) {
+ const allmatches = [];
+ allmatches.startIndex = regex.lastIndex - match[0].length;
+ const len = match.length;
+ for (let index = 0; index < len; index++) {
+ allmatches.push(match[index]);
+ }
+ matches2.push(allmatches);
+ match = regex.exec(string);
+ }
+ return matches2;
+ };
+ var isName = function(string) {
+ const match = regexName.exec(string);
+ return !(match === null || typeof match === "undefined");
+ };
+ exports.isExist = function(v) {
+ return typeof v !== "undefined";
+ };
+ exports.isEmptyObject = function(obj) {
+ return Object.keys(obj).length === 0;
+ };
+ exports.merge = function(target, a, arrayMode) {
+ if (a) {
+ const keys2 = Object.keys(a);
+ const len = keys2.length;
+ for (let i2 = 0; i2 < len; i2++) {
+ if (arrayMode === "strict") {
+ target[keys2[i2]] = [a[keys2[i2]]];
+ } else {
+ target[keys2[i2]] = a[keys2[i2]];
+ }
+ }
+ }
+ };
+ exports.getValue = function(v) {
+ if (exports.isExist(v)) {
+ return v;
+ } else {
+ return "";
+ }
+ };
+ exports.buildOptions = function(options, defaultOptions, props) {
+ let newOptions = {};
+ if (!options) {
+ return defaultOptions;
+ }
+ for (let i2 = 0; i2 < props.length; i2++) {
+ if (options[props[i2]] !== void 0) {
+ newOptions[props[i2]] = options[props[i2]];
+ } else {
+ newOptions[props[i2]] = defaultOptions[props[i2]];
+ }
+ }
+ return newOptions;
+ };
+ exports.isTagNameInArrayMode = function(tagName15, arrayMode, parentTagName) {
+ if (arrayMode === false) {
+ return false;
+ } else if (arrayMode instanceof RegExp) {
+ return arrayMode.test(tagName15);
+ } else if (typeof arrayMode === "function") {
+ return !!arrayMode(tagName15, parentTagName);
+ }
+ return arrayMode === "strict";
+ };
+ exports.isName = isName;
+ exports.getAllMatches = getAllMatches;
+ exports.nameRegexp = nameRegexp;
+ }
+});
+
+// node_modules/fast-xml-parser/src/node2json.js
+var require_node2json = __commonJS({
+ "node_modules/fast-xml-parser/src/node2json.js"(exports) {
+ "use strict";
+ var util = require_util();
+ var convertToJson = function(node, options, parentTagName) {
+ const jObj = {};
+ if (!options.alwaysCreateTextNode && (!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) {
+ return util.isExist(node.val) ? node.val : "";
+ }
+ if (util.isExist(node.val) && !(typeof node.val === "string" && (node.val === "" || node.val === options.cdataPositionChar))) {
+ const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName);
+ jObj[options.textNodeName] = asArray ? [node.val] : node.val;
+ }
+ util.merge(jObj, node.attrsMap, options.arrayMode);
+ const keys2 = Object.keys(node.child);
+ for (let index = 0; index < keys2.length; index++) {
+ const tagName15 = keys2[index];
+ if (node.child[tagName15] && node.child[tagName15].length > 1) {
+ jObj[tagName15] = [];
+ for (let tag in node.child[tagName15]) {
+ if (node.child[tagName15].hasOwnProperty(tag)) {
+ jObj[tagName15].push(convertToJson(node.child[tagName15][tag], options, tagName15));
+ }
+ }
+ } else {
+ const result = convertToJson(node.child[tagName15][0], options, tagName15);
+ const asArray = options.arrayMode === true && typeof result === "object" || util.isTagNameInArrayMode(tagName15, options.arrayMode, parentTagName);
+ jObj[tagName15] = asArray ? [result] : result;
+ }
+ }
+ return jObj;
+ };
+ exports.convertToJson = convertToJson;
+ }
+});
+
+// node_modules/fast-xml-parser/src/xmlNode.js
+var require_xmlNode = __commonJS({
+ "node_modules/fast-xml-parser/src/xmlNode.js"(exports, module2) {
+ "use strict";
+ module2.exports = function(tagname, parent, val) {
+ this.tagname = tagname;
+ this.parent = parent;
+ this.child = {};
+ this.attrsMap = {};
+ this.val = val;
+ this.addChild = function(child) {
+ if (Array.isArray(this.child[child.tagname])) {
+ this.child[child.tagname].push(child);
+ } else {
+ this.child[child.tagname] = [child];
+ }
+ };
+ };
+ }
+});
+
+// node_modules/strnum/strnum.js
+var require_strnum = __commonJS({
+ "node_modules/strnum/strnum.js"(exports, module2) {
+ var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
+ var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;
+ if (!Number.parseInt && window.parseInt) {
+ Number.parseInt = window.parseInt;
+ }
+ if (!Number.parseFloat && window.parseFloat) {
+ Number.parseFloat = window.parseFloat;
+ }
+ var consider = {
+ hex: true,
+ leadingZeros: true,
+ decimalPoint: ".",
+ eNotation: true
+ };
+ function toNumber(str, options = {}) {
+ options = Object.assign({}, consider, options);
+ if (!str || typeof str !== "string")
+ return str;
+ let trimmedStr = str.trim();
+ if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr))
+ return str;
+ else if (options.hex && hexRegex.test(trimmedStr)) {
+ return Number.parseInt(trimmedStr, 16);
+ } else {
+ const match = numRegex.exec(trimmedStr);
+ if (match) {
+ const sign = match[1];
+ const leadingZeros = match[2];
+ let numTrimmedByZeros = trimZeros(match[3]);
+ const eNotation = match[4] || match[6];
+ if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".")
+ return str;
+ else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".")
+ return str;
+ else {
+ const num = Number(trimmedStr);
+ const numStr = "" + num;
+ if (numStr.search(/[eE]/) !== -1) {
+ if (options.eNotation)
+ return num;
+ else
+ return str;
+ } else if (eNotation) {
+ if (options.eNotation)
+ return num;
+ else
+ return str;
+ } else if (trimmedStr.indexOf(".") !== -1) {
+ if (numStr === "0" && numTrimmedByZeros === "")
+ return num;
+ else if (numStr === numTrimmedByZeros)
+ return num;
+ else if (sign && numStr === "-" + numTrimmedByZeros)
+ return num;
+ else
+ return str;
+ }
+ if (leadingZeros) {
+ if (numTrimmedByZeros === numStr)
+ return num;
+ else if (sign + numTrimmedByZeros === numStr)
+ return num;
+ else
+ return str;
+ }
+ if (trimmedStr === numStr)
+ return num;
+ else if (trimmedStr === sign + numStr)
+ return num;
+ return str;
+ }
+ } else {
+ return str;
+ }
+ }
+ }
+ function trimZeros(numStr) {
+ if (numStr && numStr.indexOf(".") !== -1) {
+ numStr = numStr.replace(/0+$/, "");
+ if (numStr === ".")
+ numStr = "0";
+ else if (numStr[0] === ".")
+ numStr = "0" + numStr;
+ else if (numStr[numStr.length - 1] === ".")
+ numStr = numStr.substr(0, numStr.length - 1);
+ return numStr;
+ }
+ return numStr;
+ }
+ module2.exports = toNumber;
+ }
+});
+
+// node_modules/fast-xml-parser/src/xmlstr2xmlnode.js
+var require_xmlstr2xmlnode = __commonJS({
+ "node_modules/fast-xml-parser/src/xmlstr2xmlnode.js"(exports) {
+ "use strict";
+ var util = require_util();
+ var buildOptions = require_util().buildOptions;
+ var xmlNode = require_xmlNode();
+ var toNumber = require_strnum();
+ var regx = "<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g, util.nameRegexp);
+ if (!Number.parseInt && window.parseInt) {
+ Number.parseInt = window.parseInt;
+ }
+ if (!Number.parseFloat && window.parseFloat) {
+ Number.parseFloat = window.parseFloat;
+ }
+ var defaultOptions = {
+ attributeNamePrefix: "@_",
+ attrNodeName: false,
+ textNodeName: "#text",
+ ignoreAttributes: true,
+ ignoreNameSpace: false,
+ allowBooleanAttributes: false,
+ parseNodeValue: true,
+ parseAttributeValue: false,
+ arrayMode: false,
+ trimValues: true,
+ cdataTagName: false,
+ cdataPositionChar: "\\c",
+ numParseOptions: {
+ hex: true,
+ leadingZeros: true
+ },
+ tagValueProcessor: function(a, tagName15) {
+ return a;
+ },
+ attrValueProcessor: function(a, attrName) {
+ return a;
+ },
+ stopNodes: [],
+ alwaysCreateTextNode: false
+ };
+ exports.defaultOptions = defaultOptions;
+ var props = [
+ "attributeNamePrefix",
+ "attrNodeName",
+ "textNodeName",
+ "ignoreAttributes",
+ "ignoreNameSpace",
+ "allowBooleanAttributes",
+ "parseNodeValue",
+ "parseAttributeValue",
+ "arrayMode",
+ "trimValues",
+ "cdataTagName",
+ "cdataPositionChar",
+ "tagValueProcessor",
+ "attrValueProcessor",
+ "parseTrueNumberOnly",
+ "numParseOptions",
+ "stopNodes",
+ "alwaysCreateTextNode"
+ ];
+ exports.props = props;
+ function processTagValue(tagName15, val, options) {
+ if (val) {
+ if (options.trimValues) {
+ val = val.trim();
+ }
+ val = options.tagValueProcessor(val, tagName15);
+ val = parseValue(val, options.parseNodeValue, options.numParseOptions);
+ }
+ return val;
+ }
+ function resolveNameSpace(tagname, options) {
+ if (options.ignoreNameSpace) {
+ const tags = tagname.split(":");
+ const prefix = tagname.charAt(0) === "/" ? "/" : "";
+ if (tags[0] === "xmlns") {
+ return "";
+ }
+ if (tags.length === 2) {
+ tagname = prefix + tags[1];
+ }
+ }
+ return tagname;
+ }
+ function parseValue(val, shouldParse, options) {
+ if (shouldParse && typeof val === "string") {
+ const newval = val.trim();
+ if (newval === "true")
+ return true;
+ else if (newval === "false")
+ return false;
+ else
+ return toNumber(val, options);
+ } else {
+ if (util.isExist(val)) {
+ return val;
+ } else {
+ return "";
+ }
+ }
+ }
+ var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])(.*?)\\3)?`, "g");
+ function buildAttributesMap(attrStr, options) {
+ if (!options.ignoreAttributes && typeof attrStr === "string") {
+ attrStr = attrStr.replace(/\r?\n/g, " ");
+ const matches2 = util.getAllMatches(attrStr, attrsRegx);
+ const len = matches2.length;
+ const attrs = {};
+ for (let i2 = 0; i2 < len; i2++) {
+ const attrName = resolveNameSpace(matches2[i2][1], options);
+ if (attrName.length) {
+ if (matches2[i2][4] !== void 0) {
+ if (options.trimValues) {
+ matches2[i2][4] = matches2[i2][4].trim();
+ }
+ matches2[i2][4] = options.attrValueProcessor(matches2[i2][4], attrName);
+ attrs[options.attributeNamePrefix + attrName] = parseValue(matches2[i2][4], options.parseAttributeValue, options.numParseOptions);
+ } else if (options.allowBooleanAttributes) {
+ attrs[options.attributeNamePrefix + attrName] = true;
+ }
+ }
+ }
+ if (!Object.keys(attrs).length) {
+ return;
+ }
+ if (options.attrNodeName) {
+ const attrCollection = {};
+ attrCollection[options.attrNodeName] = attrs;
+ return attrCollection;
+ }
+ return attrs;
+ }
+ }
+ var getTraversalObj = function(xmlData, options) {
+ xmlData = xmlData.replace(/\r\n?/g, "\n");
+ options = buildOptions(options, defaultOptions, props);
+ const xmlObj = new xmlNode("!xml");
+ let currentNode = xmlObj;
+ let textData = "";
+ for (let i2 = 0; i2 < xmlData.length; i2++) {
+ const ch = xmlData[i2];
+ if (ch === "<") {
+ if (xmlData[i2 + 1] === "/") {
+ const closeIndex = findClosingIndex(xmlData, ">", i2, "Closing Tag is not closed.");
+ let tagName15 = xmlData.substring(i2 + 2, closeIndex).trim();
+ if (options.ignoreNameSpace) {
+ const colonIndex = tagName15.indexOf(":");
+ if (colonIndex !== -1) {
+ tagName15 = tagName15.substr(colonIndex + 1);
+ }
+ }
+ if (currentNode) {
+ if (currentNode.val) {
+ currentNode.val = util.getValue(currentNode.val) + "" + processTagValue(tagName15, textData, options);
+ } else {
+ currentNode.val = processTagValue(tagName15, textData, options);
+ }
+ }
+ if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) {
+ currentNode.child = [];
+ if (currentNode.attrsMap == void 0) {
+ currentNode.attrsMap = {};
+ }
+ currentNode.val = xmlData.substr(currentNode.startIndex + 1, i2 - currentNode.startIndex - 1);
+ }
+ currentNode = currentNode.parent;
+ textData = "";
+ i2 = closeIndex;
+ } else if (xmlData[i2 + 1] === "?") {
+ i2 = findClosingIndex(xmlData, "?>", i2, "Pi Tag is not closed.");
+ } else if (xmlData.substr(i2 + 1, 3) === "!--") {
+ i2 = findClosingIndex(xmlData, "-->", i2, "Comment is not closed.");
+ } else if (xmlData.substr(i2 + 1, 2) === "!D") {
+ const closeIndex = findClosingIndex(xmlData, ">", i2, "DOCTYPE is not closed.");
+ const tagExp = xmlData.substring(i2, closeIndex);
+ if (tagExp.indexOf("[") >= 0) {
+ i2 = xmlData.indexOf("]>", i2) + 1;
+ } else {
+ i2 = closeIndex;
+ }
+ } else if (xmlData.substr(i2 + 1, 2) === "![") {
+ const closeIndex = findClosingIndex(xmlData, "]]>", i2, "CDATA is not closed.") - 2;
+ const tagExp = xmlData.substring(i2 + 9, closeIndex);
+ if (textData) {
+ currentNode.val = util.getValue(currentNode.val) + "" + processTagValue(currentNode.tagname, textData, options);
+ textData = "";
+ }
+ if (options.cdataTagName) {
+ const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp);
+ currentNode.addChild(childNode);
+ currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar;
+ if (tagExp) {
+ childNode.val = tagExp;
+ }
+ } else {
+ currentNode.val = (currentNode.val || "") + (tagExp || "");
+ }
+ i2 = closeIndex + 2;
+ } else {
+ const result = closingIndexForOpeningTag(xmlData, i2 + 1);
+ let tagExp = result.data;
+ const closeIndex = result.index;
+ const separatorIndex = tagExp.indexOf(" ");
+ let tagName15 = tagExp;
+ let shouldBuildAttributesMap = true;
+ if (separatorIndex !== -1) {
+ tagName15 = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, "");
+ tagExp = tagExp.substr(separatorIndex + 1);
+ }
+ if (options.ignoreNameSpace) {
+ const colonIndex = tagName15.indexOf(":");
+ if (colonIndex !== -1) {
+ tagName15 = tagName15.substr(colonIndex + 1);
+ shouldBuildAttributesMap = tagName15 !== result.data.substr(colonIndex + 1);
+ }
+ }
+ if (currentNode && textData) {
+ if (currentNode.tagname !== "!xml") {
+ currentNode.val = util.getValue(currentNode.val) + "" + processTagValue(currentNode.tagname, textData, options);
+ }
+ }
+ if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
+ if (tagName15[tagName15.length - 1] === "/") {
+ tagName15 = tagName15.substr(0, tagName15.length - 1);
+ tagExp = tagName15;
+ } else {
+ tagExp = tagExp.substr(0, tagExp.length - 1);
+ }
+ const childNode = new xmlNode(tagName15, currentNode, "");
+ if (tagName15 !== tagExp) {
+ childNode.attrsMap = buildAttributesMap(tagExp, options);
+ }
+ currentNode.addChild(childNode);
+ } else {
+ const childNode = new xmlNode(tagName15, currentNode);
+ if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) {
+ childNode.startIndex = closeIndex;
+ }
+ if (tagName15 !== tagExp && shouldBuildAttributesMap) {
+ childNode.attrsMap = buildAttributesMap(tagExp, options);
+ }
+ currentNode.addChild(childNode);
+ currentNode = childNode;
+ }
+ textData = "";
+ i2 = closeIndex;
+ }
+ } else {
+ textData += xmlData[i2];
+ }
+ }
+ return xmlObj;
+ };
+ function closingIndexForOpeningTag(data, i2) {
+ let attrBoundary;
+ let tagExp = "";
+ for (let index = i2; index < data.length; index++) {
+ let ch = data[index];
+ if (attrBoundary) {
+ if (ch === attrBoundary)
+ attrBoundary = "";
+ } else if (ch === '"' || ch === "'") {
+ attrBoundary = ch;
+ } else if (ch === ">") {
+ return {
+ data: tagExp,
+ index
+ };
+ } else if (ch === " ") {
+ ch = " ";
+ }
+ tagExp += ch;
+ }
+ }
+ function findClosingIndex(xmlData, str, i2, errMsg) {
+ const closingIndex = xmlData.indexOf(str, i2);
+ if (closingIndex === -1) {
+ throw new Error(errMsg);
+ } else {
+ return closingIndex + str.length - 1;
+ }
+ }
+ exports.getTraversalObj = getTraversalObj;
+ }
+});
+
+// node_modules/fast-xml-parser/src/validator.js
+var require_validator2 = __commonJS({
+ "node_modules/fast-xml-parser/src/validator.js"(exports) {
+ "use strict";
+ var util = require_util();
+ var defaultOptions = {
+ allowBooleanAttributes: false
+ };
+ var props = ["allowBooleanAttributes"];
+ exports.validate = function(xmlData, options) {
+ options = util.buildOptions(options, defaultOptions, props);
+ const tags = [];
+ let tagFound = false;
+ let reachedRoot = false;
+ if (xmlData[0] === "\uFEFF") {
+ xmlData = xmlData.substr(1);
+ }
+ for (let i2 = 0; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === "<" && xmlData[i2 + 1] === "?") {
+ i2 += 2;
+ i2 = readPI(xmlData, i2);
+ if (i2.err)
+ return i2;
+ } else if (xmlData[i2] === "<") {
+ let tagStartPos = i2;
+ i2++;
+ if (xmlData[i2] === "!") {
+ i2 = readCommentAndCDATA(xmlData, i2);
+ continue;
+ } else {
+ let closingTag = false;
+ if (xmlData[i2] === "/") {
+ closingTag = true;
+ i2++;
+ }
+ let tagName15 = "";
+ for (; i2 < xmlData.length && xmlData[i2] !== ">" && xmlData[i2] !== " " && xmlData[i2] !== " " && xmlData[i2] !== "\n" && xmlData[i2] !== "\r"; i2++) {
+ tagName15 += xmlData[i2];
+ }
+ tagName15 = tagName15.trim();
+ if (tagName15[tagName15.length - 1] === "/") {
+ tagName15 = tagName15.substring(0, tagName15.length - 1);
+ i2--;
+ }
+ if (!validateTagName(tagName15)) {
+ let msg;
+ if (tagName15.trim().length === 0) {
+ msg = "Invalid space after '<'.";
+ } else {
+ msg = "Tag '" + tagName15 + "' is an invalid name.";
+ }
+ return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i2));
+ }
+ const result = readAttributeStr(xmlData, i2);
+ if (result === false) {
+ return getErrorObject("InvalidAttr", "Attributes for '" + tagName15 + "' have open quote.", getLineNumberForPosition(xmlData, i2));
+ }
+ let attrStr = result.value;
+ i2 = result.index;
+ if (attrStr[attrStr.length - 1] === "/") {
+ const attrStrStart = i2 - attrStr.length;
+ attrStr = attrStr.substring(0, attrStr.length - 1);
+ const isValid = validateAttributeString(attrStr, options);
+ if (isValid === true) {
+ tagFound = true;
+ } else {
+ return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));
+ }
+ } else if (closingTag) {
+ if (!result.tagClosed) {
+ return getErrorObject("InvalidTag", "Closing tag '" + tagName15 + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i2));
+ } else if (attrStr.trim().length > 0) {
+ return getErrorObject("InvalidTag", "Closing tag '" + tagName15 + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
+ } else {
+ const otg = tags.pop();
+ if (tagName15 !== otg.tagName) {
+ let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);
+ return getErrorObject("InvalidTag", "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName15 + "'.", getLineNumberForPosition(xmlData, tagStartPos));
+ }
+ if (tags.length == 0) {
+ reachedRoot = true;
+ }
+ }
+ } else {
+ const isValid = validateAttributeString(attrStr, options);
+ if (isValid !== true) {
+ return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i2 - attrStr.length + isValid.err.line));
+ }
+ if (reachedRoot === true) {
+ return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i2));
+ } else {
+ tags.push({ tagName: tagName15, tagStartPos });
+ }
+ tagFound = true;
+ }
+ for (i2++; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === "<") {
+ if (xmlData[i2 + 1] === "!") {
+ i2++;
+ i2 = readCommentAndCDATA(xmlData, i2);
+ continue;
+ } else if (xmlData[i2 + 1] === "?") {
+ i2 = readPI(xmlData, ++i2);
+ if (i2.err)
+ return i2;
+ } else {
+ break;
+ }
+ } else if (xmlData[i2] === "&") {
+ const afterAmp = validateAmpersand(xmlData, i2);
+ if (afterAmp == -1)
+ return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i2));
+ i2 = afterAmp;
+ }
+ }
+ if (xmlData[i2] === "<") {
+ i2--;
+ }
+ }
+ } else {
+ if (xmlData[i2] === " " || xmlData[i2] === " " || xmlData[i2] === "\n" || xmlData[i2] === "\r") {
+ continue;
+ }
+ return getErrorObject("InvalidChar", "char '" + xmlData[i2] + "' is not expected.", getLineNumberForPosition(xmlData, i2));
+ }
+ }
+ if (!tagFound) {
+ return getErrorObject("InvalidXml", "Start tag expected.", 1);
+ } else if (tags.length == 1) {
+ return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos));
+ } else if (tags.length > 0) {
+ return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t2) => t2.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
+ }
+ return true;
+ };
+ function readPI(xmlData, i2) {
+ const start = i2;
+ for (; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] == "?" || xmlData[i2] == " ") {
+ const tagname = xmlData.substr(start, i2 - start);
+ if (i2 > 5 && tagname === "xml") {
+ return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i2));
+ } else if (xmlData[i2] == "?" && xmlData[i2 + 1] == ">") {
+ i2++;
+ break;
+ } else {
+ continue;
+ }
+ }
+ }
+ return i2;
+ }
+ function readCommentAndCDATA(xmlData, i2) {
+ if (xmlData.length > i2 + 5 && xmlData[i2 + 1] === "-" && xmlData[i2 + 2] === "-") {
+ for (i2 += 3; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === "-" && xmlData[i2 + 1] === "-" && xmlData[i2 + 2] === ">") {
+ i2 += 2;
+ break;
+ }
+ }
+ } else if (xmlData.length > i2 + 8 && xmlData[i2 + 1] === "D" && xmlData[i2 + 2] === "O" && xmlData[i2 + 3] === "C" && xmlData[i2 + 4] === "T" && xmlData[i2 + 5] === "Y" && xmlData[i2 + 6] === "P" && xmlData[i2 + 7] === "E") {
+ let angleBracketsCount = 1;
+ for (i2 += 8; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === "<") {
+ angleBracketsCount++;
+ } else if (xmlData[i2] === ">") {
+ angleBracketsCount--;
+ if (angleBracketsCount === 0) {
+ break;
+ }
+ }
+ }
+ } else if (xmlData.length > i2 + 9 && xmlData[i2 + 1] === "[" && xmlData[i2 + 2] === "C" && xmlData[i2 + 3] === "D" && xmlData[i2 + 4] === "A" && xmlData[i2 + 5] === "T" && xmlData[i2 + 6] === "A" && xmlData[i2 + 7] === "[") {
+ for (i2 += 8; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === "]" && xmlData[i2 + 1] === "]" && xmlData[i2 + 2] === ">") {
+ i2 += 2;
+ break;
+ }
+ }
+ }
+ return i2;
+ }
+ var doubleQuote = '"';
+ var singleQuote = "'";
+ function readAttributeStr(xmlData, i2) {
+ let attrStr = "";
+ let startChar = "";
+ let tagClosed = false;
+ for (; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === doubleQuote || xmlData[i2] === singleQuote) {
+ if (startChar === "") {
+ startChar = xmlData[i2];
+ } else if (startChar !== xmlData[i2]) {
+ } else {
+ startChar = "";
+ }
+ } else if (xmlData[i2] === ">") {
+ if (startChar === "") {
+ tagClosed = true;
+ break;
+ }
+ }
+ attrStr += xmlData[i2];
+ }
+ if (startChar !== "") {
+ return false;
+ }
+ return {
+ value: attrStr,
+ index: i2,
+ tagClosed
+ };
+ }
+ var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
+ function validateAttributeString(attrStr, options) {
+ const matches2 = util.getAllMatches(attrStr, validAttrStrRegxp);
+ const attrNames = {};
+ for (let i2 = 0; i2 < matches2.length; i2++) {
+ if (matches2[i2][1].length === 0) {
+ return getErrorObject("InvalidAttr", "Attribute '" + matches2[i2][2] + "' has no space in starting.", getPositionFromMatch(matches2[i2]));
+ } else if (matches2[i2][3] === void 0 && !options.allowBooleanAttributes) {
+ return getErrorObject("InvalidAttr", "boolean attribute '" + matches2[i2][2] + "' is not allowed.", getPositionFromMatch(matches2[i2]));
+ }
+ const attrName = matches2[i2][2];
+ if (!validateAttrName(attrName)) {
+ return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches2[i2]));
+ }
+ if (!attrNames.hasOwnProperty(attrName)) {
+ attrNames[attrName] = 1;
+ } else {
+ return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches2[i2]));
+ }
+ }
+ return true;
+ }
+ function validateNumberAmpersand(xmlData, i2) {
+ let re = /\d/;
+ if (xmlData[i2] === "x") {
+ i2++;
+ re = /[\da-fA-F]/;
+ }
+ for (; i2 < xmlData.length; i2++) {
+ if (xmlData[i2] === ";")
+ return i2;
+ if (!xmlData[i2].match(re))
+ break;
+ }
+ return -1;
+ }
+ function validateAmpersand(xmlData, i2) {
+ i2++;
+ if (xmlData[i2] === ";")
+ return -1;
+ if (xmlData[i2] === "#") {
+ i2++;
+ return validateNumberAmpersand(xmlData, i2);
+ }
+ let count = 0;
+ for (; i2 < xmlData.length; i2++, count++) {
+ if (xmlData[i2].match(/\w/) && count < 20)
+ continue;
+ if (xmlData[i2] === ";")
+ break;
+ return -1;
+ }
+ return i2;
+ }
+ function getErrorObject(code, message, lineNumber) {
+ return {
+ err: {
+ code,
+ msg: message,
+ line: lineNumber.line || lineNumber,
+ col: lineNumber.col
+ }
+ };
+ }
+ function validateAttrName(attrName) {
+ return util.isName(attrName);
+ }
+ function validateTagName(tagname) {
+ return util.isName(tagname);
+ }
+ function getLineNumberForPosition(xmlData, index) {
+ const lines = xmlData.substring(0, index).split(/\r?\n/);
+ return {
+ line: lines.length,
+ col: lines[lines.length - 1].length + 1
+ };
+ }
+ function getPositionFromMatch(match) {
+ return match.startIndex + match[1].length;
+ }
+ }
+});
+
+// node_modules/fast-xml-parser/src/nimndata.js
+var require_nimndata = __commonJS({
+ "node_modules/fast-xml-parser/src/nimndata.js"(exports) {
+ "use strict";
+ var char = function(a) {
+ return String.fromCharCode(a);
+ };
+ var chars = {
+ nilChar: char(176),
+ missingChar: char(201),
+ nilPremitive: char(175),
+ missingPremitive: char(200),
+ emptyChar: char(178),
+ emptyValue: char(177),
+ boundryChar: char(179),
+ objStart: char(198),
+ arrStart: char(204),
+ arrayEnd: char(185)
+ };
+ var charsArr = [
+ chars.nilChar,
+ chars.nilPremitive,
+ chars.missingChar,
+ chars.missingPremitive,
+ chars.boundryChar,
+ chars.emptyChar,
+ chars.emptyValue,
+ chars.arrayEnd,
+ chars.objStart,
+ chars.arrStart
+ ];
+ var _e = function(node, e_schema, options) {
+ if (typeof e_schema === "string") {
+ if (node && node[0] && node[0].val !== void 0) {
+ return getValue(node[0].val, e_schema);
+ } else {
+ return getValue(node, e_schema);
+ }
+ } else {
+ const hasValidData = hasData(node);
+ if (hasValidData === true) {
+ let str = "";
+ if (Array.isArray(e_schema)) {
+ str += chars.arrStart;
+ const itemSchema = e_schema[0];
+ const arr_len = node.length;
+ if (typeof itemSchema === "string") {
+ for (let arr_i = 0; arr_i < arr_len; arr_i++) {
+ const r2 = getValue(node[arr_i].val, itemSchema);
+ str = processValue(str, r2);
+ }
+ } else {
+ for (let arr_i = 0; arr_i < arr_len; arr_i++) {
+ const r2 = _e(node[arr_i], itemSchema, options);
+ str = processValue(str, r2);
+ }
+ }
+ str += chars.arrayEnd;
+ } else {
+ str += chars.objStart;
+ const keys2 = Object.keys(e_schema);
+ if (Array.isArray(node)) {
+ node = node[0];
+ }
+ for (let i2 in keys2) {
+ const key2 = keys2[i2];
+ let r2;
+ if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key2]) {
+ r2 = _e(node.attrsMap[key2], e_schema[key2], options);
+ } else if (key2 === options.textNodeName) {
+ r2 = _e(node.val, e_schema[key2], options);
+ } else {
+ r2 = _e(node.child[key2], e_schema[key2], options);
+ }
+ str = processValue(str, r2);
+ }
+ }
+ return str;
+ } else {
+ return hasValidData;
+ }
+ }
+ };
+ var getValue = function(a) {
+ switch (a) {
+ case void 0:
+ return chars.missingPremitive;
+ case null:
+ return chars.nilPremitive;
+ case "":
+ return chars.emptyValue;
+ default:
+ return a;
+ }
+ };
+ var processValue = function(str, r2) {
+ if (!isAppChar(r2[0]) && !isAppChar(str[str.length - 1])) {
+ str += chars.boundryChar;
+ }
+ return str + r2;
+ };
+ var isAppChar = function(ch) {
+ return charsArr.indexOf(ch) !== -1;
+ };
+ function hasData(jObj) {
+ if (jObj === void 0) {
+ return chars.missingChar;
+ } else if (jObj === null) {
+ return chars.nilChar;
+ } else if (jObj.child && Object.keys(jObj.child).length === 0 && (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0)) {
+ return chars.emptyChar;
+ } else {
+ return true;
+ }
+ }
+ var x2j = require_xmlstr2xmlnode();
+ var buildOptions = require_util().buildOptions;
+ var convert2nimn = function(node, e_schema, options) {
+ options = buildOptions(options, x2j.defaultOptions, x2j.props);
+ return _e(node, e_schema, options);
+ };
+ exports.convert2nimn = convert2nimn;
+ }
+});
+
+// node_modules/fast-xml-parser/src/node2json_str.js
+var require_node2json_str = __commonJS({
+ "node_modules/fast-xml-parser/src/node2json_str.js"(exports) {
+ "use strict";
+ var util = require_util();
+ var buildOptions = require_util().buildOptions;
+ var x2j = require_xmlstr2xmlnode();
+ var convertToJsonString = function(node, options) {
+ options = buildOptions(options, x2j.defaultOptions, x2j.props);
+ options.indentBy = options.indentBy || "";
+ return _cToJsonStr(node, options, 0);
+ };
+ var _cToJsonStr = function(node, options, level) {
+ let jObj = "{";
+ const keys2 = Object.keys(node.child);
+ for (let index = 0; index < keys2.length; index++) {
+ const tagname = keys2[index];
+ if (node.child[tagname] && node.child[tagname].length > 1) {
+ jObj += '"' + tagname + '" : [ ';
+ for (let tag in node.child[tagname]) {
+ jObj += _cToJsonStr(node.child[tagname][tag], options) + " , ";
+ }
+ jObj = jObj.substr(0, jObj.length - 1) + " ] ";
+ } else {
+ jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + " ,";
+ }
+ }
+ util.merge(jObj, node.attrsMap);
+ if (util.isEmptyObject(jObj)) {
+ return util.isExist(node.val) ? node.val : "";
+ } else {
+ if (util.isExist(node.val)) {
+ if (!(typeof node.val === "string" && (node.val === "" || node.val === options.cdataPositionChar))) {
+ jObj += '"' + options.textNodeName + '" : ' + stringval(node.val);
+ }
+ }
+ }
+ if (jObj[jObj.length - 1] === ",") {
+ jObj = jObj.substr(0, jObj.length - 2);
+ }
+ return jObj + "}";
+ };
+ function stringval(v) {
+ if (v === true || v === false || !isNaN(v)) {
+ return v;
+ } else {
+ return '"' + v + '"';
+ }
+ }
+ exports.convertToJsonString = convertToJsonString;
+ }
+});
+
+// node_modules/fast-xml-parser/src/json2xml.js
+var require_json2xml = __commonJS({
+ "node_modules/fast-xml-parser/src/json2xml.js"(exports, module2) {
+ "use strict";
+ var buildOptions = require_util().buildOptions;
+ var defaultOptions = {
+ attributeNamePrefix: "@_",
+ attrNodeName: false,
+ textNodeName: "#text",
+ ignoreAttributes: true,
+ cdataTagName: false,
+ cdataPositionChar: "\\c",
+ format: false,
+ indentBy: " ",
+ supressEmptyNode: false,
+ tagValueProcessor: function(a) {
+ return a;
+ },
+ attrValueProcessor: function(a) {
+ return a;
+ }
+ };
+ var props = [
+ "attributeNamePrefix",
+ "attrNodeName",
+ "textNodeName",
+ "ignoreAttributes",
+ "cdataTagName",
+ "cdataPositionChar",
+ "format",
+ "indentBy",
+ "supressEmptyNode",
+ "tagValueProcessor",
+ "attrValueProcessor",
+ "rootNodeName"
+ ];
+ function Parser2(options) {
+ this.options = buildOptions(options, defaultOptions, props);
+ if (this.options.ignoreAttributes || this.options.attrNodeName) {
+ this.isAttribute = function() {
+ return false;
+ };
+ } else {
+ this.attrPrefixLen = this.options.attributeNamePrefix.length;
+ this.isAttribute = isAttribute;
+ }
+ if (this.options.cdataTagName) {
+ this.isCDATA = isCDATA;
+ } else {
+ this.isCDATA = function() {
+ return false;
+ };
+ }
+ this.replaceCDATAstr = replaceCDATAstr;
+ this.replaceCDATAarr = replaceCDATAarr;
+ this.processTextOrObjNode = processTextOrObjNode;
+ if (this.options.format) {
+ this.indentate = indentate;
+ this.tagEndChar = ">\n";
+ this.newLine = "\n";
+ } else {
+ this.indentate = function() {
+ return "";
+ };
+ this.tagEndChar = ">";
+ this.newLine = "";
+ }
+ if (this.options.supressEmptyNode) {
+ this.buildTextNode = buildEmptyTextNode;
+ this.buildObjNode = buildEmptyObjNode;
+ } else {
+ this.buildTextNode = buildTextValNode;
+ this.buildObjNode = buildObjectNode;
+ }
+ this.buildTextValNode = buildTextValNode;
+ this.buildObjectNode = buildObjectNode;
+ }
+ Parser2.prototype.parse = function(jObj) {
+ if (Array.isArray(jObj) && this.options.rootNodeName && this.options.rootNodeName.length > 1) {
+ jObj = {
+ [this.options.rootNodeName]: jObj
+ };
+ }
+ return this.j2x(jObj, 0).val;
+ };
+ Parser2.prototype.j2x = function(jObj, level) {
+ let attrStr = "";
+ let val = "";
+ for (let key2 in jObj) {
+ if (typeof jObj[key2] === "undefined") {
+ } else if (jObj[key2] === null) {
+ val += this.indentate(level) + "<" + key2 + "/" + this.tagEndChar;
+ } else if (jObj[key2] instanceof Date) {
+ val += this.buildTextNode(jObj[key2], key2, "", level);
+ } else if (typeof jObj[key2] !== "object") {
+ const attr = this.isAttribute(key2);
+ if (attr) {
+ attrStr += " " + attr + '="' + this.options.attrValueProcessor("" + jObj[key2]) + '"';
+ } else if (this.isCDATA(key2)) {
+ if (jObj[this.options.textNodeName]) {
+ val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key2]);
+ } else {
+ val += this.replaceCDATAstr("", jObj[key2]);
+ }
+ } else {
+ if (key2 === this.options.textNodeName) {
+ if (jObj[this.options.cdataTagName]) {
+ } else {
+ val += this.options.tagValueProcessor("" + jObj[key2]);
+ }
+ } else {
+ val += this.buildTextNode(jObj[key2], key2, "", level);
+ }
+ }
+ } else if (Array.isArray(jObj[key2])) {
+ if (this.isCDATA(key2)) {
+ val += this.indentate(level);
+ if (jObj[this.options.textNodeName]) {
+ val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key2]);
+ } else {
+ val += this.replaceCDATAarr("", jObj[key2]);
+ }
+ } else {
+ const arrLen = jObj[key2].length;
+ for (let j = 0; j < arrLen; j++) {
+ const item = jObj[key2][j];
+ if (typeof item === "undefined") {
+ } else if (item === null) {
+ val += this.indentate(level) + "<" + key2 + "/" + this.tagEndChar;
+ } else if (typeof item === "object") {
+ val += this.processTextOrObjNode(item, key2, level);
+ } else {
+ val += this.buildTextNode(item, key2, "", level);
+ }
+ }
+ }
+ } else {
+ if (this.options.attrNodeName && key2 === this.options.attrNodeName) {
+ const Ks = Object.keys(jObj[key2]);
+ const L = Ks.length;
+ for (let j = 0; j < L; j++) {
+ attrStr += " " + Ks[j] + '="' + this.options.attrValueProcessor("" + jObj[key2][Ks[j]]) + '"';
+ }
+ } else {
+ val += this.processTextOrObjNode(jObj[key2], key2, level);
+ }
+ }
+ }
+ return { attrStr, val };
+ };
+ function processTextOrObjNode(object, key2, level) {
+ const result = this.j2x(object, level + 1);
+ if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {
+ return this.buildTextNode(result.val, key2, result.attrStr, level);
+ } else {
+ return this.buildObjNode(result.val, key2, result.attrStr, level);
+ }
+ }
+ function replaceCDATAstr(str, cdata) {
+ str = this.options.tagValueProcessor("" + str);
+ if (this.options.cdataPositionChar === "" || str === "") {
+ return str + "");
+ }
+ return str + this.newLine;
+ }
+ }
+ function buildObjectNode(val, key2, attrStr, level) {
+ if (attrStr && val.indexOf("<") === -1) {
+ return this.indentate(level) + "<" + key2 + attrStr + ">" + val + "" + key2 + this.tagEndChar;
+ } else {
+ return this.indentate(level) + "<" + key2 + attrStr + this.tagEndChar + val + this.indentate(level) + "" + key2 + this.tagEndChar;
+ }
+ }
+ function buildEmptyObjNode(val, key2, attrStr, level) {
+ if (val !== "") {
+ return this.buildObjectNode(val, key2, attrStr, level);
+ } else {
+ return this.indentate(level) + "<" + key2 + attrStr + "/" + this.tagEndChar;
+ }
+ }
+ function buildTextValNode(val, key2, attrStr, level) {
+ return this.indentate(level) + "<" + key2 + attrStr + ">" + this.options.tagValueProcessor(val) + "" + key2 + this.tagEndChar;
+ }
+ function buildEmptyTextNode(val, key2, attrStr, level) {
+ if (val !== "") {
+ return this.buildTextValNode(val, key2, attrStr, level);
+ } else {
+ return this.indentate(level) + "<" + key2 + attrStr + "/" + this.tagEndChar;
+ }
+ }
+ function indentate(level) {
+ return this.options.indentBy.repeat(level);
+ }
+ function isAttribute(name) {
+ if (name.startsWith(this.options.attributeNamePrefix)) {
+ return name.substr(this.attrPrefixLen);
+ } else {
+ return false;
+ }
+ }
+ function isCDATA(name) {
+ return name === this.options.cdataTagName;
+ }
+ module2.exports = Parser2;
+ }
+});
+
+// node_modules/fast-xml-parser/src/parser.js
+var require_parser = __commonJS({
+ "node_modules/fast-xml-parser/src/parser.js"(exports) {
+ "use strict";
+ var nodeToJson = require_node2json();
+ var xmlToNodeobj = require_xmlstr2xmlnode();
+ var x2xmlnode = require_xmlstr2xmlnode();
+ var buildOptions = require_util().buildOptions;
+ var validator = require_validator2();
+ exports.parse = function(xmlData, givenOptions = {}, validationOption) {
+ if (validationOption) {
+ if (validationOption === true)
+ validationOption = {};
+ const result = validator.validate(xmlData, validationOption);
+ if (result !== true) {
+ throw Error(result.err.msg);
+ }
+ }
+ if (givenOptions.parseTrueNumberOnly && givenOptions.parseNodeValue !== false && !givenOptions.numParseOptions) {
+ givenOptions.numParseOptions = {
+ leadingZeros: false
+ };
+ }
+ let options = buildOptions(givenOptions, x2xmlnode.defaultOptions, x2xmlnode.props);
+ const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options);
+ return nodeToJson.convertToJson(traversableObj, options);
+ };
+ exports.convertTonimn = require_nimndata().convert2nimn;
+ exports.getTraversalObj = xmlToNodeobj.getTraversalObj;
+ exports.convertToJson = nodeToJson.convertToJson;
+ exports.convertToJsonString = require_node2json_str().convertToJsonString;
+ exports.validate = validator.validate;
+ exports.j2xParser = require_json2xml();
+ exports.parseToNimn = function(xmlData, schema, options) {
+ return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options);
+ };
+ }
+});
+
+// node_modules/rss-to-json/dist/index.js
+var require_dist = __commonJS({
+ "node_modules/rss-to-json/dist/index.js"(exports) {
+ (() => {
+ "use strict";
+ var e2 = { 306: (e3, t3, a2) => {
+ Object.defineProperty(t3, "__esModule", { value: true });
+ const r3 = a2(861), i3 = a2(376);
+ t3.default = async (e4, t4) => {
+ var a3, n2;
+ if (!/(^http(s?):\/\/[^\s$.?#].[^\s]*)/i.test(e4))
+ return null;
+ const { data: s2 } = await i3.default(e4, t4), u = r3.parse(s2, { attributeNamePrefix: "", textNodeName: "$text", ignoreAttributes: false });
+ let o = u.rss && u.rss.channel ? u.rss.channel : u.feed;
+ Array.isArray(o) && (o = o[0]);
+ const d = { title: (a3 = o.title) !== null && a3 !== void 0 ? a3 : "", description: (n2 = o.description) !== null && n2 !== void 0 ? n2 : "", link: o.link && o.link.href ? o.link.href : o.link, image: o.image ? o.image.url : o["itunes:image"] ? o["itunes:image"].href : "", category: o.category || [], items: [] };
+ let l = o.item || o.entry;
+ l && !Array.isArray(l) && (l = [l]);
+ for (let e5 = 0; e5 < l.length; e5++) {
+ const t5 = l[e5];
+ let a4 = {}, r4 = { id: t5.guid && t5.guid.$t ? t5.guid.$t : t5.id, title: t5.title && t5.title.$text ? t5.title.$text : t5.title, description: t5.summary && t5.summary.$text ? t5.summary.$text : t5.description, link: t5.link && t5.link.href ? t5.link.href : t5.link, author: t5.author && t5.author.name ? t5.author.name : t5["dc:creator"], published: t5.created ? Date.parse(t5.created) : t5.pubDate ? Date.parse(t5.pubDate) : Date.now(), created: t5.updated ? Date.parse(t5.updated) : t5.pubDate ? Date.parse(t5.pubDate) : t5.created ? Date.parse(t5.created) : Date.now(), category: t5.category || [], content: t5.content && t5.content.$text ? t5.content.$text : t5["content:encoded"], enclosures: t5.enclosure ? Array.isArray(t5.enclosure) ? t5.enclosure : [t5.enclosure] : [] };
+ ["content:encoded", "podcast:transcript", "itunes:summary", "itunes:author", "itunes:explicit", "itunes:duration", "itunes:season", "itunes:episode", "itunes:episodeType", "itunes:image"].forEach((e6) => {
+ t5[e6] && (r4[e6.replace(":", "_")] = t5[e6]);
+ }), t5["media:thumbnail"] && (Object.assign(a4, { thumbnail: t5["media:thumbnail"] }), r4.enclosures.push(t5["media:thumbnail"])), t5["media:content"] && (Object.assign(a4, { thumbnail: t5["media:content"] }), r4.enclosures.push(t5["media:content"])), t5["media:group"] && (t5["media:group"]["media:title"] && (r4.title = t5["media:group"]["media:title"]), t5["media:group"]["media:description"] && (r4.description = t5["media:group"]["media:description"]), t5["media:group"]["media:thumbnail"] && r4.enclosures.push(t5["media:group"]["media:thumbnail"].url)), Object.assign(r4, { media: a4 }), d.items.push(r4);
+ }
+ return d;
+ };
+ }, 376: (e3) => {
+ e3.exports = require_axios2();
+ }, 861: (e3) => {
+ e3.exports = require_parser();
+ } }, t2 = {};
+ function a(r3) {
+ var i3 = t2[r3];
+ if (i3 !== void 0)
+ return i3.exports;
+ var n2 = t2[r3] = { exports: {} };
+ return e2[r3](n2, n2.exports, a), n2.exports;
+ }
+ var r2 = {};
+ (() => {
+ var e3 = r2;
+ Object.defineProperty(e3, "__esModule", { value: true }), e3.Parse = e3.parse = void 0;
+ const t3 = a(306);
+ e3.parse = t3.default;
+ const i3 = t3.default;
+ e3.Parse = i3, e3.default = t3.default;
+ })();
+ var i2 = exports;
+ for (var n in r2)
+ i2[n] = r2[n];
+ r2.__esModule && Object.defineProperty(i2, "__esModule", { value: true });
+ })();
+ }
+});
+
+// node_modules/domelementtype/lib/index.js
+var require_lib = __commonJS({
+ "node_modules/domelementtype/lib/index.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
+ var ElementType;
+ (function(ElementType2) {
+ ElementType2["Root"] = "root";
+ ElementType2["Text"] = "text";
+ ElementType2["Directive"] = "directive";
+ ElementType2["Comment"] = "comment";
+ ElementType2["Script"] = "script";
+ ElementType2["Style"] = "style";
+ ElementType2["Tag"] = "tag";
+ ElementType2["CDATA"] = "cdata";
+ ElementType2["Doctype"] = "doctype";
+ })(ElementType = exports.ElementType || (exports.ElementType = {}));
+ function isTag2(elem) {
+ return elem.type === ElementType.Tag || elem.type === ElementType.Script || elem.type === ElementType.Style;
+ }
+ exports.isTag = isTag2;
+ exports.Root = ElementType.Root;
+ exports.Text = ElementType.Text;
+ exports.Directive = ElementType.Directive;
+ exports.Comment = ElementType.Comment;
+ exports.Script = ElementType.Script;
+ exports.Style = ElementType.Style;
+ exports.Tag = ElementType.Tag;
+ exports.CDATA = ElementType.CDATA;
+ exports.Doctype = ElementType.Doctype;
+ }
+});
+
+// node_modules/domhandler/lib/node.js
+var require_node2 = __commonJS({
+ "node_modules/domhandler/lib/node.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __assign = exports && exports.__assign || function() {
+ __assign = Object.assign || function(t2) {
+ for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
+ s2 = arguments[i2];
+ for (var p in s2)
+ if (Object.prototype.hasOwnProperty.call(s2, p))
+ t2[p] = s2[p];
+ }
+ return t2;
+ };
+ return __assign.apply(this, arguments);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
+ var domelementtype_1 = require_lib();
+ var nodeTypes = /* @__PURE__ */ new Map([
+ [domelementtype_1.ElementType.Tag, 1],
+ [domelementtype_1.ElementType.Script, 1],
+ [domelementtype_1.ElementType.Style, 1],
+ [domelementtype_1.ElementType.Directive, 1],
+ [domelementtype_1.ElementType.Text, 3],
+ [domelementtype_1.ElementType.CDATA, 4],
+ [domelementtype_1.ElementType.Comment, 8],
+ [domelementtype_1.ElementType.Root, 9]
+ ]);
+ var Node3 = function() {
+ function Node4(type) {
+ this.type = type;
+ this.parent = null;
+ this.prev = null;
+ this.next = null;
+ this.startIndex = null;
+ this.endIndex = null;
+ }
+ Object.defineProperty(Node4.prototype, "nodeType", {
+ get: function() {
+ var _a;
+ return (_a = nodeTypes.get(this.type)) !== null && _a !== void 0 ? _a : 1;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Node4.prototype, "parentNode", {
+ get: function() {
+ return this.parent;
+ },
+ set: function(parent) {
+ this.parent = parent;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Node4.prototype, "previousSibling", {
+ get: function() {
+ return this.prev;
+ },
+ set: function(prev) {
+ this.prev = prev;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Node4.prototype, "nextSibling", {
+ get: function() {
+ return this.next;
+ },
+ set: function(next) {
+ this.next = next;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Node4.prototype.cloneNode = function(recursive) {
+ if (recursive === void 0) {
+ recursive = false;
+ }
+ return cloneNode(this, recursive);
+ };
+ return Node4;
+ }();
+ exports.Node = Node3;
+ var DataNode = function(_super) {
+ __extends(DataNode2, _super);
+ function DataNode2(type, data) {
+ var _this = _super.call(this, type) || this;
+ _this.data = data;
+ return _this;
+ }
+ Object.defineProperty(DataNode2.prototype, "nodeValue", {
+ get: function() {
+ return this.data;
+ },
+ set: function(data) {
+ this.data = data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return DataNode2;
+ }(Node3);
+ exports.DataNode = DataNode;
+ var Text3 = function(_super) {
+ __extends(Text4, _super);
+ function Text4(data) {
+ return _super.call(this, domelementtype_1.ElementType.Text, data) || this;
+ }
+ return Text4;
+ }(DataNode);
+ exports.Text = Text3;
+ var Comment3 = function(_super) {
+ __extends(Comment4, _super);
+ function Comment4(data) {
+ return _super.call(this, domelementtype_1.ElementType.Comment, data) || this;
+ }
+ return Comment4;
+ }(DataNode);
+ exports.Comment = Comment3;
+ var ProcessingInstruction = function(_super) {
+ __extends(ProcessingInstruction2, _super);
+ function ProcessingInstruction2(name, data) {
+ var _this = _super.call(this, domelementtype_1.ElementType.Directive, data) || this;
+ _this.name = name;
+ return _this;
+ }
+ return ProcessingInstruction2;
+ }(DataNode);
+ exports.ProcessingInstruction = ProcessingInstruction;
+ var NodeWithChildren = function(_super) {
+ __extends(NodeWithChildren2, _super);
+ function NodeWithChildren2(type, children) {
+ var _this = _super.call(this, type) || this;
+ _this.children = children;
+ return _this;
+ }
+ Object.defineProperty(NodeWithChildren2.prototype, "firstChild", {
+ get: function() {
+ var _a;
+ return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(NodeWithChildren2.prototype, "lastChild", {
+ get: function() {
+ return this.children.length > 0 ? this.children[this.children.length - 1] : null;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(NodeWithChildren2.prototype, "childNodes", {
+ get: function() {
+ return this.children;
+ },
+ set: function(children) {
+ this.children = children;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return NodeWithChildren2;
+ }(Node3);
+ exports.NodeWithChildren = NodeWithChildren;
+ var Document4 = function(_super) {
+ __extends(Document5, _super);
+ function Document5(children) {
+ return _super.call(this, domelementtype_1.ElementType.Root, children) || this;
+ }
+ return Document5;
+ }(NodeWithChildren);
+ exports.Document = Document4;
+ var Element3 = function(_super) {
+ __extends(Element4, _super);
+ function Element4(name, attribs, children, type) {
+ if (children === void 0) {
+ children = [];
+ }
+ if (type === void 0) {
+ type = name === "script" ? domelementtype_1.ElementType.Script : name === "style" ? domelementtype_1.ElementType.Style : domelementtype_1.ElementType.Tag;
+ }
+ var _this = _super.call(this, type, children) || this;
+ _this.name = name;
+ _this.attribs = attribs;
+ return _this;
+ }
+ Object.defineProperty(Element4.prototype, "tagName", {
+ get: function() {
+ return this.name;
+ },
+ set: function(name) {
+ this.name = name;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(Element4.prototype, "attributes", {
+ get: function() {
+ var _this = this;
+ return Object.keys(this.attribs).map(function(name) {
+ var _a, _b;
+ return {
+ name,
+ value: _this.attribs[name],
+ namespace: (_a = _this["x-attribsNamespace"]) === null || _a === void 0 ? void 0 : _a[name],
+ prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name]
+ };
+ });
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return Element4;
+ }(NodeWithChildren);
+ exports.Element = Element3;
+ function isTag2(node) {
+ return (0, domelementtype_1.isTag)(node);
+ }
+ exports.isTag = isTag2;
+ function isCDATA(node) {
+ return node.type === domelementtype_1.ElementType.CDATA;
+ }
+ exports.isCDATA = isCDATA;
+ function isText(node) {
+ return node.type === domelementtype_1.ElementType.Text;
+ }
+ exports.isText = isText;
+ function isComment(node) {
+ return node.type === domelementtype_1.ElementType.Comment;
+ }
+ exports.isComment = isComment;
+ function isDirective(node) {
+ return node.type === domelementtype_1.ElementType.Directive;
+ }
+ exports.isDirective = isDirective;
+ function isDocument(node) {
+ return node.type === domelementtype_1.ElementType.Root;
+ }
+ exports.isDocument = isDocument;
+ function hasChildren(node) {
+ return Object.prototype.hasOwnProperty.call(node, "children");
+ }
+ exports.hasChildren = hasChildren;
+ function cloneNode(node, recursive) {
+ if (recursive === void 0) {
+ recursive = false;
+ }
+ var result;
+ if (isText(node)) {
+ result = new Text3(node.data);
+ } else if (isComment(node)) {
+ result = new Comment3(node.data);
+ } else if (isTag2(node)) {
+ var children = recursive ? cloneChildren(node.children) : [];
+ var clone_1 = new Element3(node.name, __assign({}, node.attribs), children);
+ children.forEach(function(child) {
+ return child.parent = clone_1;
+ });
+ if (node.namespace != null) {
+ clone_1.namespace = node.namespace;
+ }
+ if (node["x-attribsNamespace"]) {
+ clone_1["x-attribsNamespace"] = __assign({}, node["x-attribsNamespace"]);
+ }
+ if (node["x-attribsPrefix"]) {
+ clone_1["x-attribsPrefix"] = __assign({}, node["x-attribsPrefix"]);
+ }
+ result = clone_1;
+ } else if (isCDATA(node)) {
+ var children = recursive ? cloneChildren(node.children) : [];
+ var clone_2 = new NodeWithChildren(domelementtype_1.ElementType.CDATA, children);
+ children.forEach(function(child) {
+ return child.parent = clone_2;
+ });
+ result = clone_2;
+ } else if (isDocument(node)) {
+ var children = recursive ? cloneChildren(node.children) : [];
+ var clone_3 = new Document4(children);
+ children.forEach(function(child) {
+ return child.parent = clone_3;
+ });
+ if (node["x-mode"]) {
+ clone_3["x-mode"] = node["x-mode"];
+ }
+ result = clone_3;
+ } else if (isDirective(node)) {
+ var instruction = new ProcessingInstruction(node.name, node.data);
+ if (node["x-name"] != null) {
+ instruction["x-name"] = node["x-name"];
+ instruction["x-publicId"] = node["x-publicId"];
+ instruction["x-systemId"] = node["x-systemId"];
+ }
+ result = instruction;
+ } else {
+ throw new Error("Not implemented yet: ".concat(node.type));
+ }
+ result.startIndex = node.startIndex;
+ result.endIndex = node.endIndex;
+ if (node.sourceCodeLocation != null) {
+ result.sourceCodeLocation = node.sourceCodeLocation;
+ }
+ return result;
+ }
+ exports.cloneNode = cloneNode;
+ function cloneChildren(childs) {
+ var children = childs.map(function(child) {
+ return cloneNode(child, true);
+ });
+ for (var i2 = 1; i2 < children.length; i2++) {
+ children[i2].prev = children[i2 - 1];
+ children[i2 - 1].next = children[i2];
+ }
+ return children;
+ }
+ }
+});
+
+// node_modules/domhandler/lib/index.js
+var require_lib2 = __commonJS({
+ "node_modules/domhandler/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
+ for (var p in m2)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m2, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.DomHandler = void 0;
+ var domelementtype_1 = require_lib();
+ var node_1 = require_node2();
+ __exportStar(require_node2(), exports);
+ var reWhitespace = /\s+/g;
+ var defaultOpts = {
+ normalizeWhitespace: false,
+ withStartIndices: false,
+ withEndIndices: false,
+ xmlMode: false
+ };
+ var DomHandler = function() {
+ function DomHandler2(callback, options, elementCB) {
+ this.dom = [];
+ this.root = new node_1.Document(this.dom);
+ this.done = false;
+ this.tagStack = [this.root];
+ this.lastNode = null;
+ this.parser = null;
+ if (typeof options === "function") {
+ elementCB = options;
+ options = defaultOpts;
+ }
+ if (typeof callback === "object") {
+ options = callback;
+ callback = void 0;
+ }
+ this.callback = callback !== null && callback !== void 0 ? callback : null;
+ this.options = options !== null && options !== void 0 ? options : defaultOpts;
+ this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
+ }
+ DomHandler2.prototype.onparserinit = function(parser) {
+ this.parser = parser;
+ };
+ DomHandler2.prototype.onreset = function() {
+ this.dom = [];
+ this.root = new node_1.Document(this.dom);
+ this.done = false;
+ this.tagStack = [this.root];
+ this.lastNode = null;
+ this.parser = null;
+ };
+ DomHandler2.prototype.onend = function() {
+ if (this.done)
+ return;
+ this.done = true;
+ this.parser = null;
+ this.handleCallback(null);
+ };
+ DomHandler2.prototype.onerror = function(error) {
+ this.handleCallback(error);
+ };
+ DomHandler2.prototype.onclosetag = function() {
+ this.lastNode = null;
+ var elem = this.tagStack.pop();
+ if (this.options.withEndIndices) {
+ elem.endIndex = this.parser.endIndex;
+ }
+ if (this.elementCB)
+ this.elementCB(elem);
+ };
+ DomHandler2.prototype.onopentag = function(name, attribs) {
+ var type = this.options.xmlMode ? domelementtype_1.ElementType.Tag : void 0;
+ var element = new node_1.Element(name, attribs, void 0, type);
+ this.addNode(element);
+ this.tagStack.push(element);
+ };
+ DomHandler2.prototype.ontext = function(data) {
+ var normalizeWhitespace = this.options.normalizeWhitespace;
+ var lastNode = this.lastNode;
+ if (lastNode && lastNode.type === domelementtype_1.ElementType.Text) {
+ if (normalizeWhitespace) {
+ lastNode.data = (lastNode.data + data).replace(reWhitespace, " ");
+ } else {
+ lastNode.data += data;
+ }
+ if (this.options.withEndIndices) {
+ lastNode.endIndex = this.parser.endIndex;
+ }
+ } else {
+ if (normalizeWhitespace) {
+ data = data.replace(reWhitespace, " ");
+ }
+ var node = new node_1.Text(data);
+ this.addNode(node);
+ this.lastNode = node;
+ }
+ };
+ DomHandler2.prototype.oncomment = function(data) {
+ if (this.lastNode && this.lastNode.type === domelementtype_1.ElementType.Comment) {
+ this.lastNode.data += data;
+ return;
+ }
+ var node = new node_1.Comment(data);
+ this.addNode(node);
+ this.lastNode = node;
+ };
+ DomHandler2.prototype.oncommentend = function() {
+ this.lastNode = null;
+ };
+ DomHandler2.prototype.oncdatastart = function() {
+ var text = new node_1.Text("");
+ var node = new node_1.NodeWithChildren(domelementtype_1.ElementType.CDATA, [text]);
+ this.addNode(node);
+ text.parent = node;
+ this.lastNode = text;
+ };
+ DomHandler2.prototype.oncdataend = function() {
+ this.lastNode = null;
+ };
+ DomHandler2.prototype.onprocessinginstruction = function(name, data) {
+ var node = new node_1.ProcessingInstruction(name, data);
+ this.addNode(node);
+ };
+ DomHandler2.prototype.handleCallback = function(error) {
+ if (typeof this.callback === "function") {
+ this.callback(error, this.dom);
+ } else if (error) {
+ throw error;
+ }
+ };
+ DomHandler2.prototype.addNode = function(node) {
+ var parent = this.tagStack[this.tagStack.length - 1];
+ var previousSibling2 = parent.children[parent.children.length - 1];
+ if (this.options.withStartIndices) {
+ node.startIndex = this.parser.startIndex;
+ }
+ if (this.options.withEndIndices) {
+ node.endIndex = this.parser.endIndex;
+ }
+ parent.children.push(node);
+ if (previousSibling2) {
+ node.prev = previousSibling2;
+ previousSibling2.next = node;
+ }
+ node.parent = parent;
+ this.lastNode = null;
+ };
+ return DomHandler2;
+ }();
+ exports.DomHandler = DomHandler;
+ exports.default = DomHandler;
+ }
+});
+
+// node_modules/nearley/lib/nearley.js
+var require_nearley = __commonJS({
+ "node_modules/nearley/lib/nearley.js"(exports, module2) {
+ (function(root, factory) {
+ if (typeof module2 === "object" && module2.exports) {
+ module2.exports = factory();
+ } else {
+ root.nearley = factory();
+ }
+ })(exports, function() {
+ function Rule(name, symbols, postprocess) {
+ this.id = ++Rule.highestId;
+ this.name = name;
+ this.symbols = symbols;
+ this.postprocess = postprocess;
+ return this;
+ }
+ Rule.highestId = 0;
+ Rule.prototype.toString = function(withCursorAt) {
+ var symbolSequence = typeof withCursorAt === "undefined" ? this.symbols.map(getSymbolShortDisplay).join(" ") : this.symbols.slice(0, withCursorAt).map(getSymbolShortDisplay).join(" ") + " \u25CF " + this.symbols.slice(withCursorAt).map(getSymbolShortDisplay).join(" ");
+ return this.name + " \u2192 " + symbolSequence;
+ };
+ function State(rule, dot, reference, wantedBy) {
+ this.rule = rule;
+ this.dot = dot;
+ this.reference = reference;
+ this.data = [];
+ this.wantedBy = wantedBy;
+ this.isComplete = this.dot === rule.symbols.length;
+ }
+ State.prototype.toString = function() {
+ return "{" + this.rule.toString(this.dot) + "}, from: " + (this.reference || 0);
+ };
+ State.prototype.nextState = function(child) {
+ var state = new State(this.rule, this.dot + 1, this.reference, this.wantedBy);
+ state.left = this;
+ state.right = child;
+ if (state.isComplete) {
+ state.data = state.build();
+ state.right = void 0;
+ }
+ return state;
+ };
+ State.prototype.build = function() {
+ var children = [];
+ var node = this;
+ do {
+ children.push(node.right.data);
+ node = node.left;
+ } while (node.left);
+ children.reverse();
+ return children;
+ };
+ State.prototype.finish = function() {
+ if (this.rule.postprocess) {
+ this.data = this.rule.postprocess(this.data, this.reference, Parser2.fail);
+ }
+ };
+ function Column(grammar, index) {
+ this.grammar = grammar;
+ this.index = index;
+ this.states = [];
+ this.wants = {};
+ this.scannable = [];
+ this.completed = {};
+ }
+ Column.prototype.process = function(nextColumn) {
+ var states = this.states;
+ var wants = this.wants;
+ var completed = this.completed;
+ for (var w = 0; w < states.length; w++) {
+ var state = states[w];
+ if (state.isComplete) {
+ state.finish();
+ if (state.data !== Parser2.fail) {
+ var wantedBy = state.wantedBy;
+ for (var i2 = wantedBy.length; i2--; ) {
+ var left = wantedBy[i2];
+ this.complete(left, state);
+ }
+ if (state.reference === this.index) {
+ var exp = state.rule.name;
+ (this.completed[exp] = this.completed[exp] || []).push(state);
+ }
+ }
+ } else {
+ var exp = state.rule.symbols[state.dot];
+ if (typeof exp !== "string") {
+ this.scannable.push(state);
+ continue;
+ }
+ if (wants[exp]) {
+ wants[exp].push(state);
+ if (completed.hasOwnProperty(exp)) {
+ var nulls = completed[exp];
+ for (var i2 = 0; i2 < nulls.length; i2++) {
+ var right = nulls[i2];
+ this.complete(state, right);
+ }
+ }
+ } else {
+ wants[exp] = [state];
+ this.predict(exp);
+ }
+ }
+ }
+ };
+ Column.prototype.predict = function(exp) {
+ var rules = this.grammar.byName[exp] || [];
+ for (var i2 = 0; i2 < rules.length; i2++) {
+ var r2 = rules[i2];
+ var wantedBy = this.wants[exp];
+ var s2 = new State(r2, 0, this.index, wantedBy);
+ this.states.push(s2);
+ }
+ };
+ Column.prototype.complete = function(left, right) {
+ var copy = left.nextState(right);
+ this.states.push(copy);
+ };
+ function Grammar(rules, start) {
+ this.rules = rules;
+ this.start = start || this.rules[0].name;
+ var byName = this.byName = {};
+ this.rules.forEach(function(rule) {
+ if (!byName.hasOwnProperty(rule.name)) {
+ byName[rule.name] = [];
+ }
+ byName[rule.name].push(rule);
+ });
+ }
+ Grammar.fromCompiled = function(rules, start) {
+ var lexer = rules.Lexer;
+ if (rules.ParserStart) {
+ start = rules.ParserStart;
+ rules = rules.ParserRules;
+ }
+ var rules = rules.map(function(r2) {
+ return new Rule(r2.name, r2.symbols, r2.postprocess);
+ });
+ var g = new Grammar(rules, start);
+ g.lexer = lexer;
+ return g;
+ };
+ function StreamLexer() {
+ this.reset("");
+ }
+ StreamLexer.prototype.reset = function(data, state) {
+ this.buffer = data;
+ this.index = 0;
+ this.line = state ? state.line : 1;
+ this.lastLineBreak = state ? -state.col : 0;
+ };
+ StreamLexer.prototype.next = function() {
+ if (this.index < this.buffer.length) {
+ var ch = this.buffer[this.index++];
+ if (ch === "\n") {
+ this.line += 1;
+ this.lastLineBreak = this.index;
+ }
+ return { value: ch };
+ }
+ };
+ StreamLexer.prototype.save = function() {
+ return {
+ line: this.line,
+ col: this.index - this.lastLineBreak
+ };
+ };
+ StreamLexer.prototype.formatError = function(token, message) {
+ var buffer = this.buffer;
+ if (typeof buffer === "string") {
+ var lines = buffer.split("\n").slice(Math.max(0, this.line - 5), this.line);
+ var nextLineBreak = buffer.indexOf("\n", this.index);
+ if (nextLineBreak === -1)
+ nextLineBreak = buffer.length;
+ var col = this.index - this.lastLineBreak;
+ var lastLineDigits = String(this.line).length;
+ message += " at line " + this.line + " col " + col + ":\n\n";
+ message += lines.map(function(line, i2) {
+ return pad(this.line - lines.length + i2 + 1, lastLineDigits) + " " + line;
+ }, this).join("\n");
+ message += "\n" + pad("", lastLineDigits + col) + "^\n";
+ return message;
+ } else {
+ return message + " at index " + (this.index - 1);
+ }
+ function pad(n, length) {
+ var s2 = String(n);
+ return Array(length - s2.length + 1).join(" ") + s2;
+ }
+ };
+ function Parser2(rules, start, options) {
+ if (rules instanceof Grammar) {
+ var grammar = rules;
+ var options = start;
+ } else {
+ var grammar = Grammar.fromCompiled(rules, start);
+ }
+ this.grammar = grammar;
+ this.options = {
+ keepHistory: false,
+ lexer: grammar.lexer || new StreamLexer()
+ };
+ for (var key2 in options || {}) {
+ this.options[key2] = options[key2];
+ }
+ this.lexer = this.options.lexer;
+ this.lexerState = void 0;
+ var column = new Column(grammar, 0);
+ var table = this.table = [column];
+ column.wants[grammar.start] = [];
+ column.predict(grammar.start);
+ column.process();
+ this.current = 0;
+ }
+ Parser2.fail = {};
+ Parser2.prototype.feed = function(chunk) {
+ var lexer = this.lexer;
+ lexer.reset(chunk, this.lexerState);
+ var token;
+ while (true) {
+ try {
+ token = lexer.next();
+ if (!token) {
+ break;
+ }
+ } catch (e2) {
+ var nextColumn = new Column(this.grammar, this.current + 1);
+ this.table.push(nextColumn);
+ var err = new Error(this.reportLexerError(e2));
+ err.offset = this.current;
+ err.token = e2.token;
+ throw err;
+ }
+ var column = this.table[this.current];
+ if (!this.options.keepHistory) {
+ delete this.table[this.current - 1];
+ }
+ var n = this.current + 1;
+ var nextColumn = new Column(this.grammar, n);
+ this.table.push(nextColumn);
+ var literal = token.text !== void 0 ? token.text : token.value;
+ var value = lexer.constructor === StreamLexer ? token.value : token;
+ var scannable = column.scannable;
+ for (var w = scannable.length; w--; ) {
+ var state = scannable[w];
+ var expect = state.rule.symbols[state.dot];
+ if (expect.test ? expect.test(value) : expect.type ? expect.type === token.type : expect.literal === literal) {
+ var next = state.nextState({ data: value, token, isToken: true, reference: n - 1 });
+ nextColumn.states.push(next);
+ }
+ }
+ nextColumn.process();
+ if (nextColumn.states.length === 0) {
+ var err = new Error(this.reportError(token));
+ err.offset = this.current;
+ err.token = token;
+ throw err;
+ }
+ if (this.options.keepHistory) {
+ column.lexerState = lexer.save();
+ }
+ this.current++;
+ }
+ if (column) {
+ this.lexerState = lexer.save();
+ }
+ this.results = this.finish();
+ return this;
+ };
+ Parser2.prototype.reportLexerError = function(lexerError) {
+ var tokenDisplay, lexerMessage;
+ var token = lexerError.token;
+ if (token) {
+ tokenDisplay = "input " + JSON.stringify(token.text[0]) + " (lexer error)";
+ lexerMessage = this.lexer.formatError(token, "Syntax error");
+ } else {
+ tokenDisplay = "input (lexer error)";
+ lexerMessage = lexerError.message;
+ }
+ return this.reportErrorCommon(lexerMessage, tokenDisplay);
+ };
+ Parser2.prototype.reportError = function(token) {
+ var tokenDisplay = (token.type ? token.type + " token: " : "") + JSON.stringify(token.value !== void 0 ? token.value : token);
+ var lexerMessage = this.lexer.formatError(token, "Syntax error");
+ return this.reportErrorCommon(lexerMessage, tokenDisplay);
+ };
+ Parser2.prototype.reportErrorCommon = function(lexerMessage, tokenDisplay) {
+ var lines = [];
+ lines.push(lexerMessage);
+ var lastColumnIndex = this.table.length - 2;
+ var lastColumn = this.table[lastColumnIndex];
+ var expectantStates = lastColumn.states.filter(function(state) {
+ var nextSymbol = state.rule.symbols[state.dot];
+ return nextSymbol && typeof nextSymbol !== "string";
+ });
+ if (expectantStates.length === 0) {
+ lines.push("Unexpected " + tokenDisplay + ". I did not expect any more input. Here is the state of my parse table:\n");
+ this.displayStateStack(lastColumn.states, lines);
+ } else {
+ lines.push("Unexpected " + tokenDisplay + ". Instead, I was expecting to see one of the following:\n");
+ var stateStacks = expectantStates.map(function(state) {
+ return this.buildFirstStateStack(state, []) || [state];
+ }, this);
+ stateStacks.forEach(function(stateStack) {
+ var state = stateStack[0];
+ var nextSymbol = state.rule.symbols[state.dot];
+ var symbolDisplay = this.getSymbolDisplay(nextSymbol);
+ lines.push("A " + symbolDisplay + " based on:");
+ this.displayStateStack(stateStack, lines);
+ }, this);
+ }
+ lines.push("");
+ return lines.join("\n");
+ };
+ Parser2.prototype.displayStateStack = function(stateStack, lines) {
+ var lastDisplay;
+ var sameDisplayCount = 0;
+ for (var j = 0; j < stateStack.length; j++) {
+ var state = stateStack[j];
+ var display = state.rule.toString(state.dot);
+ if (display === lastDisplay) {
+ sameDisplayCount++;
+ } else {
+ if (sameDisplayCount > 0) {
+ lines.push(" ^ " + sameDisplayCount + " more lines identical to this");
+ }
+ sameDisplayCount = 0;
+ lines.push(" " + display);
+ }
+ lastDisplay = display;
+ }
+ };
+ Parser2.prototype.getSymbolDisplay = function(symbol) {
+ return getSymbolLongDisplay(symbol);
+ };
+ Parser2.prototype.buildFirstStateStack = function(state, visited) {
+ if (visited.indexOf(state) !== -1) {
+ return null;
+ }
+ if (state.wantedBy.length === 0) {
+ return [state];
+ }
+ var prevState = state.wantedBy[0];
+ var childVisited = [state].concat(visited);
+ var childResult = this.buildFirstStateStack(prevState, childVisited);
+ if (childResult === null) {
+ return null;
+ }
+ return [state].concat(childResult);
+ };
+ Parser2.prototype.save = function() {
+ var column = this.table[this.current];
+ column.lexerState = this.lexerState;
+ return column;
+ };
+ Parser2.prototype.restore = function(column) {
+ var index = column.index;
+ this.current = index;
+ this.table[index] = column;
+ this.table.splice(index + 1);
+ this.lexerState = column.lexerState;
+ this.results = this.finish();
+ };
+ Parser2.prototype.rewind = function(index) {
+ if (!this.options.keepHistory) {
+ throw new Error("set option `keepHistory` to enable rewinding");
+ }
+ this.restore(this.table[index]);
+ };
+ Parser2.prototype.finish = function() {
+ var considerations = [];
+ var start = this.grammar.start;
+ var column = this.table[this.table.length - 1];
+ column.states.forEach(function(t2) {
+ if (t2.rule.name === start && t2.dot === t2.rule.symbols.length && t2.reference === 0 && t2.data !== Parser2.fail) {
+ considerations.push(t2);
+ }
+ });
+ return considerations.map(function(c) {
+ return c.data;
+ });
+ };
+ function getSymbolLongDisplay(symbol) {
+ var type = typeof symbol;
+ if (type === "string") {
+ return symbol;
+ } else if (type === "object") {
+ if (symbol.literal) {
+ return JSON.stringify(symbol.literal);
+ } else if (symbol instanceof RegExp) {
+ return "character matching " + symbol;
+ } else if (symbol.type) {
+ return symbol.type + " token";
+ } else if (symbol.test) {
+ return "token matching " + String(symbol.test);
+ } else {
+ throw new Error("Unknown symbol type: " + symbol);
+ }
+ }
+ }
+ function getSymbolShortDisplay(symbol) {
+ var type = typeof symbol;
+ if (type === "string") {
+ return symbol;
+ } else if (type === "object") {
+ if (symbol.literal) {
+ return JSON.stringify(symbol.literal);
+ } else if (symbol instanceof RegExp) {
+ return symbol.toString();
+ } else if (symbol.type) {
+ return "%" + symbol.type;
+ } else if (symbol.test) {
+ return "<" + String(symbol.test) + ">";
+ } else {
+ throw new Error("Unknown symbol type: " + symbol);
+ }
+ }
+ }
+ return {
+ Parser: Parser2,
+ Grammar,
+ Rule
+ };
+ });
+ }
+});
+
+// node_modules/moo/moo.js
+var require_moo = __commonJS({
+ "node_modules/moo/moo.js"(exports, module2) {
+ (function(root, factory) {
+ if (typeof define === "function" && define.amd) {
+ define([], factory);
+ } else if (typeof module2 === "object" && module2.exports) {
+ module2.exports = factory();
+ } else {
+ root.moo = factory();
+ }
+ })(exports, function() {
+ "use strict";
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var toString2 = Object.prototype.toString;
+ var hasSticky = typeof new RegExp().sticky === "boolean";
+ function isRegExp(o) {
+ return o && toString2.call(o) === "[object RegExp]";
+ }
+ function isObject(o) {
+ return o && typeof o === "object" && !isRegExp(o) && !Array.isArray(o);
+ }
+ function reEscape(s2) {
+ return s2.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
+ }
+ function reGroups(s2) {
+ var re = new RegExp("|" + s2);
+ return re.exec("").length - 1;
+ }
+ function reCapture(s2) {
+ return "(" + s2 + ")";
+ }
+ function reUnion(regexps) {
+ if (!regexps.length)
+ return "(?!)";
+ var source = regexps.map(function(s2) {
+ return "(?:" + s2 + ")";
+ }).join("|");
+ return "(?:" + source + ")";
+ }
+ function regexpOrLiteral(obj) {
+ if (typeof obj === "string") {
+ return "(?:" + reEscape(obj) + ")";
+ } else if (isRegExp(obj)) {
+ if (obj.ignoreCase)
+ throw new Error("RegExp /i flag not allowed");
+ if (obj.global)
+ throw new Error("RegExp /g flag is implied");
+ if (obj.sticky)
+ throw new Error("RegExp /y flag is implied");
+ if (obj.multiline)
+ throw new Error("RegExp /m flag is implied");
+ return obj.source;
+ } else {
+ throw new Error("Not a pattern: " + obj);
+ }
+ }
+ function objectToRules(object) {
+ var keys2 = Object.getOwnPropertyNames(object);
+ var result = [];
+ for (var i2 = 0; i2 < keys2.length; i2++) {
+ var key2 = keys2[i2];
+ var thing = object[key2];
+ var rules = [].concat(thing);
+ if (key2 === "include") {
+ for (var j = 0; j < rules.length; j++) {
+ result.push({ include: rules[j] });
+ }
+ continue;
+ }
+ var match = [];
+ rules.forEach(function(rule) {
+ if (isObject(rule)) {
+ if (match.length)
+ result.push(ruleOptions(key2, match));
+ result.push(ruleOptions(key2, rule));
+ match = [];
+ } else {
+ match.push(rule);
+ }
+ });
+ if (match.length)
+ result.push(ruleOptions(key2, match));
+ }
+ return result;
+ }
+ function arrayToRules(array) {
+ var result = [];
+ for (var i2 = 0; i2 < array.length; i2++) {
+ var obj = array[i2];
+ if (obj.include) {
+ var include = [].concat(obj.include);
+ for (var j = 0; j < include.length; j++) {
+ result.push({ include: include[j] });
+ }
+ continue;
+ }
+ if (!obj.type) {
+ throw new Error("Rule has no type: " + JSON.stringify(obj));
+ }
+ result.push(ruleOptions(obj.type, obj));
+ }
+ return result;
+ }
+ function ruleOptions(type, obj) {
+ if (!isObject(obj)) {
+ obj = { match: obj };
+ }
+ if (obj.include) {
+ throw new Error("Matching rules cannot also include states");
+ }
+ var options = {
+ defaultType: type,
+ lineBreaks: !!obj.error || !!obj.fallback,
+ pop: false,
+ next: null,
+ push: null,
+ error: false,
+ fallback: false,
+ value: null,
+ type: null,
+ shouldThrow: false
+ };
+ for (var key2 in obj) {
+ if (hasOwnProperty.call(obj, key2)) {
+ options[key2] = obj[key2];
+ }
+ }
+ if (typeof options.type === "string" && type !== options.type) {
+ throw new Error("Type transform cannot be a string (type '" + options.type + "' for token '" + type + "')");
+ }
+ var match = options.match;
+ options.match = Array.isArray(match) ? match : match ? [match] : [];
+ options.match.sort(function(a, b) {
+ return isRegExp(a) && isRegExp(b) ? 0 : isRegExp(b) ? -1 : isRegExp(a) ? 1 : b.length - a.length;
+ });
+ return options;
+ }
+ function toRules(spec) {
+ return Array.isArray(spec) ? arrayToRules(spec) : objectToRules(spec);
+ }
+ var defaultErrorRule = ruleOptions("error", { lineBreaks: true, shouldThrow: true });
+ function compileRules(rules, hasStates) {
+ var errorRule = null;
+ var fast = /* @__PURE__ */ Object.create(null);
+ var fastAllowed = true;
+ var unicodeFlag = null;
+ var groups = [];
+ var parts = [];
+ for (var i2 = 0; i2 < rules.length; i2++) {
+ if (rules[i2].fallback) {
+ fastAllowed = false;
+ }
+ }
+ for (var i2 = 0; i2 < rules.length; i2++) {
+ var options = rules[i2];
+ if (options.include) {
+ throw new Error("Inheritance is not allowed in stateless lexers");
+ }
+ if (options.error || options.fallback) {
+ if (errorRule) {
+ if (!options.fallback === !errorRule.fallback) {
+ throw new Error("Multiple " + (options.fallback ? "fallback" : "error") + " rules not allowed (for token '" + options.defaultType + "')");
+ } else {
+ throw new Error("fallback and error are mutually exclusive (for token '" + options.defaultType + "')");
+ }
+ }
+ errorRule = options;
+ }
+ var match = options.match.slice();
+ if (fastAllowed) {
+ while (match.length && typeof match[0] === "string" && match[0].length === 1) {
+ var word = match.shift();
+ fast[word.charCodeAt(0)] = options;
+ }
+ }
+ if (options.pop || options.push || options.next) {
+ if (!hasStates) {
+ throw new Error("State-switching options are not allowed in stateless lexers (for token '" + options.defaultType + "')");
+ }
+ if (options.fallback) {
+ throw new Error("State-switching options are not allowed on fallback tokens (for token '" + options.defaultType + "')");
+ }
+ }
+ if (match.length === 0) {
+ continue;
+ }
+ fastAllowed = false;
+ groups.push(options);
+ for (var j = 0; j < match.length; j++) {
+ var obj = match[j];
+ if (!isRegExp(obj)) {
+ continue;
+ }
+ if (unicodeFlag === null) {
+ unicodeFlag = obj.unicode;
+ } else if (unicodeFlag !== obj.unicode && options.fallback === false) {
+ throw new Error("If one rule is /u then all must be");
+ }
+ }
+ var pat = reUnion(match.map(regexpOrLiteral));
+ var regexp = new RegExp(pat);
+ if (regexp.test("")) {
+ throw new Error("RegExp matches empty string: " + regexp);
+ }
+ var groupCount = reGroups(pat);
+ if (groupCount > 0) {
+ throw new Error("RegExp has capture groups: " + regexp + "\nUse (?: \u2026 ) instead");
+ }
+ if (!options.lineBreaks && regexp.test("\n")) {
+ throw new Error("Rule should declare lineBreaks: " + regexp);
+ }
+ parts.push(reCapture(pat));
+ }
+ var fallbackRule = errorRule && errorRule.fallback;
+ var flags = hasSticky && !fallbackRule ? "ym" : "gm";
+ var suffix = hasSticky || fallbackRule ? "" : "|";
+ if (unicodeFlag === true)
+ flags += "u";
+ var combined = new RegExp(reUnion(parts) + suffix, flags);
+ return { regexp: combined, groups, fast, error: errorRule || defaultErrorRule };
+ }
+ function compile3(rules) {
+ var result = compileRules(toRules(rules));
+ return new Lexer({ start: result }, "start");
+ }
+ function checkStateGroup(g, name, map) {
+ var state = g && (g.push || g.next);
+ if (state && !map[state]) {
+ throw new Error("Missing state '" + state + "' (in token '" + g.defaultType + "' of state '" + name + "')");
+ }
+ if (g && g.pop && +g.pop !== 1) {
+ throw new Error("pop must be 1 (in token '" + g.defaultType + "' of state '" + name + "')");
+ }
+ }
+ function compileStates(states, start) {
+ var all = states.$all ? toRules(states.$all) : [];
+ delete states.$all;
+ var keys2 = Object.getOwnPropertyNames(states);
+ if (!start)
+ start = keys2[0];
+ var ruleMap = /* @__PURE__ */ Object.create(null);
+ for (var i2 = 0; i2 < keys2.length; i2++) {
+ var key2 = keys2[i2];
+ ruleMap[key2] = toRules(states[key2]).concat(all);
+ }
+ for (var i2 = 0; i2 < keys2.length; i2++) {
+ var key2 = keys2[i2];
+ var rules = ruleMap[key2];
+ var included = /* @__PURE__ */ Object.create(null);
+ for (var j = 0; j < rules.length; j++) {
+ var rule = rules[j];
+ if (!rule.include)
+ continue;
+ var splice = [j, 1];
+ if (rule.include !== key2 && !included[rule.include]) {
+ included[rule.include] = true;
+ var newRules = ruleMap[rule.include];
+ if (!newRules) {
+ throw new Error("Cannot include nonexistent state '" + rule.include + "' (in state '" + key2 + "')");
+ }
+ for (var k = 0; k < newRules.length; k++) {
+ var newRule = newRules[k];
+ if (rules.indexOf(newRule) !== -1)
+ continue;
+ splice.push(newRule);
+ }
+ }
+ rules.splice.apply(rules, splice);
+ j--;
+ }
+ }
+ var map = /* @__PURE__ */ Object.create(null);
+ for (var i2 = 0; i2 < keys2.length; i2++) {
+ var key2 = keys2[i2];
+ map[key2] = compileRules(ruleMap[key2], true);
+ }
+ for (var i2 = 0; i2 < keys2.length; i2++) {
+ var name = keys2[i2];
+ var state = map[name];
+ var groups = state.groups;
+ for (var j = 0; j < groups.length; j++) {
+ checkStateGroup(groups[j], name, map);
+ }
+ var fastKeys = Object.getOwnPropertyNames(state.fast);
+ for (var j = 0; j < fastKeys.length; j++) {
+ checkStateGroup(state.fast[fastKeys[j]], name, map);
+ }
+ }
+ return new Lexer(map, start);
+ }
+ function keywordTransform(map) {
+ var reverseMap = /* @__PURE__ */ Object.create(null);
+ var byLength = /* @__PURE__ */ Object.create(null);
+ var types3 = Object.getOwnPropertyNames(map);
+ for (var i2 = 0; i2 < types3.length; i2++) {
+ var tokenType = types3[i2];
+ var item = map[tokenType];
+ var keywordList = Array.isArray(item) ? item : [item];
+ keywordList.forEach(function(keyword) {
+ (byLength[keyword.length] = byLength[keyword.length] || []).push(keyword);
+ if (typeof keyword !== "string") {
+ throw new Error("keyword must be string (in keyword '" + tokenType + "')");
+ }
+ reverseMap[keyword] = tokenType;
+ });
+ }
+ function str(x2) {
+ return JSON.stringify(x2);
+ }
+ var source = "";
+ source += "switch (value.length) {\n";
+ for (var length in byLength) {
+ var keywords = byLength[length];
+ source += "case " + length + ":\n";
+ source += "switch (value) {\n";
+ keywords.forEach(function(keyword) {
+ var tokenType2 = reverseMap[keyword];
+ source += "case " + str(keyword) + ": return " + str(tokenType2) + "\n";
+ });
+ source += "}\n";
+ }
+ source += "}\n";
+ return Function("value", source);
+ }
+ var Lexer = function(states, state) {
+ this.startState = state;
+ this.states = states;
+ this.buffer = "";
+ this.stack = [];
+ this.reset();
+ };
+ Lexer.prototype.reset = function(data, info) {
+ this.buffer = data || "";
+ this.index = 0;
+ this.line = info ? info.line : 1;
+ this.col = info ? info.col : 1;
+ this.queuedToken = info ? info.queuedToken : null;
+ this.queuedThrow = info ? info.queuedThrow : null;
+ this.setState(info ? info.state : this.startState);
+ this.stack = info && info.stack ? info.stack.slice() : [];
+ return this;
+ };
+ Lexer.prototype.save = function() {
+ return {
+ line: this.line,
+ col: this.col,
+ state: this.state,
+ stack: this.stack.slice(),
+ queuedToken: this.queuedToken,
+ queuedThrow: this.queuedThrow
+ };
+ };
+ Lexer.prototype.setState = function(state) {
+ if (!state || this.state === state)
+ return;
+ this.state = state;
+ var info = this.states[state];
+ this.groups = info.groups;
+ this.error = info.error;
+ this.re = info.regexp;
+ this.fast = info.fast;
+ };
+ Lexer.prototype.popState = function() {
+ this.setState(this.stack.pop());
+ };
+ Lexer.prototype.pushState = function(state) {
+ this.stack.push(this.state);
+ this.setState(state);
+ };
+ var eat = hasSticky ? function(re, buffer) {
+ return re.exec(buffer);
+ } : function(re, buffer) {
+ var match = re.exec(buffer);
+ if (match[0].length === 0) {
+ return null;
+ }
+ return match;
+ };
+ Lexer.prototype._getGroup = function(match) {
+ var groupCount = this.groups.length;
+ for (var i2 = 0; i2 < groupCount; i2++) {
+ if (match[i2 + 1] !== void 0) {
+ return this.groups[i2];
+ }
+ }
+ throw new Error("Cannot find token type for matched text");
+ };
+ function tokenToString() {
+ return this.value;
+ }
+ Lexer.prototype.next = function() {
+ var index = this.index;
+ if (this.queuedGroup) {
+ var token = this._token(this.queuedGroup, this.queuedText, index);
+ this.queuedGroup = null;
+ this.queuedText = "";
+ return token;
+ }
+ var buffer = this.buffer;
+ if (index === buffer.length) {
+ return;
+ }
+ var group = this.fast[buffer.charCodeAt(index)];
+ if (group) {
+ return this._token(group, buffer.charAt(index), index);
+ }
+ var re = this.re;
+ re.lastIndex = index;
+ var match = eat(re, buffer);
+ var error = this.error;
+ if (match == null) {
+ return this._token(error, buffer.slice(index, buffer.length), index);
+ }
+ var group = this._getGroup(match);
+ var text = match[0];
+ if (error.fallback && match.index !== index) {
+ this.queuedGroup = group;
+ this.queuedText = text;
+ return this._token(error, buffer.slice(index, match.index), index);
+ }
+ return this._token(group, text, index);
+ };
+ Lexer.prototype._token = function(group, text, offset) {
+ var lineBreaks = 0;
+ if (group.lineBreaks) {
+ var matchNL = /\n/g;
+ var nl = 1;
+ if (text === "\n") {
+ lineBreaks = 1;
+ } else {
+ while (matchNL.exec(text)) {
+ lineBreaks++;
+ nl = matchNL.lastIndex;
+ }
+ }
+ }
+ var token = {
+ type: typeof group.type === "function" && group.type(text) || group.defaultType,
+ value: typeof group.value === "function" ? group.value(text) : text,
+ text,
+ toString: tokenToString,
+ offset,
+ lineBreaks,
+ line: this.line,
+ col: this.col
+ };
+ var size = text.length;
+ this.index += size;
+ this.line += lineBreaks;
+ if (lineBreaks !== 0) {
+ this.col = size - nl + 1;
+ } else {
+ this.col += size;
+ }
+ if (group.shouldThrow) {
+ throw new Error(this.formatError(token, "invalid syntax"));
+ }
+ if (group.pop)
+ this.popState();
+ else if (group.push)
+ this.pushState(group.push);
+ else if (group.next)
+ this.setState(group.next);
+ return token;
+ };
+ if (typeof Symbol !== "undefined" && Symbol.iterator) {
+ var LexerIterator = function(lexer) {
+ this.lexer = lexer;
+ };
+ LexerIterator.prototype.next = function() {
+ var token = this.lexer.next();
+ return { value: token, done: !token };
+ };
+ LexerIterator.prototype[Symbol.iterator] = function() {
+ return this;
+ };
+ Lexer.prototype[Symbol.iterator] = function() {
+ return new LexerIterator(this);
+ };
+ }
+ Lexer.prototype.formatError = function(token, message) {
+ if (token == null) {
+ var text = this.buffer.slice(this.index);
+ var token = {
+ text,
+ offset: this.index,
+ lineBreaks: text.indexOf("\n") === -1 ? 0 : 1,
+ line: this.line,
+ col: this.col
+ };
+ }
+ var start = Math.max(0, token.offset - token.col + 1);
+ var eol = token.lineBreaks ? token.text.indexOf("\n") : token.text.length;
+ var firstLine = this.buffer.substring(start, token.offset + eol);
+ message += " at line " + token.line + " col " + token.col + ":\n\n";
+ message += " " + firstLine + "\n";
+ message += " " + Array(token.col).join(" ") + "^";
+ return message;
+ };
+ Lexer.prototype.clone = function() {
+ return new Lexer(this.states, this.state);
+ };
+ Lexer.prototype.has = function(tokenType) {
+ return true;
+ };
+ return {
+ compile: compile3,
+ states: compileStates,
+ error: Object.freeze({ error: true }),
+ fallback: Object.freeze({ fallback: true }),
+ keywords: keywordTransform
+ };
+ });
+ }
+});
+
+// node_modules/parseley/lib/parseley.cjs
+var require_parseley = __commonJS({
+ "node_modules/parseley/lib/parseley.cjs"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var nearley = require_nearley();
+ var moo = require_moo();
+ function _interopNamespace(e2) {
+ if (e2 && e2.__esModule)
+ return e2;
+ var n = /* @__PURE__ */ Object.create(null);
+ if (e2) {
+ Object.keys(e2).forEach(function(k) {
+ if (k !== "default") {
+ var d = Object.getOwnPropertyDescriptor(e2, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function() {
+ return e2[k];
+ }
+ });
+ }
+ });
+ }
+ n["default"] = e2;
+ return Object.freeze(n);
+ }
+ var moo__namespace = /* @__PURE__ */ _interopNamespace(moo);
+ function id(d) {
+ return d[0];
+ }
+ var lexer = moo__namespace.compile({
+ ws: { match: /[ \t\r\n\f]+/, lineBreaks: true },
+ idn: { match: /[a-zA-Z_-][a-zA-Z0-9_-]*/ },
+ hashToken: { match: /#[a-zA-Z0-9_-]+/, value: (s2) => s2.slice(1) },
+ str1: { match: /'(?:\\['\\]|[^\n'\\])*'/, value: (s2) => s2.slice(1, -1) },
+ str2: { match: /"(?:\\["\\]|[^\n"\\])*"/, value: (s2) => s2.slice(1, -1) },
+ asterisk: "*",
+ fullstop: ".",
+ comma: ",",
+ lbr: "[",
+ rbr: "]",
+ eq: "=",
+ gt: ">",
+ vbar: "|",
+ plus: "+",
+ tilde: "~",
+ caret: "^",
+ dollar: "$"
+ });
+ function firstTokenValue(tokens) {
+ return tokens[0].value;
+ }
+ function second(tokens) {
+ return tokens[1];
+ }
+ function sumSpec([a0, a1, a2], [b0, b1, b2]) {
+ return [a0 + b0, a1 + b1, a2 + b2];
+ }
+ var grammar = {
+ Lexer: lexer,
+ ParserRules: [
+ { "name": "main", "symbols": ["_", "listSelector", "_"], "postprocess": second },
+ { "name": "mainNoList", "symbols": ["_", "complexSelector", "_"], "postprocess": second },
+ { "name": "listSelector", "symbols": ["complexSelector"], "postprocess": ([next]) => ({ type: "list", list: [next] }) },
+ { "name": "listSelector", "symbols": ["listSelector", "_", lexer.has("comma") ? { type: "comma" } : comma, "_", "complexSelector"], "postprocess": ([acc, , , , next]) => ({ type: "list", list: [...acc.list, next] }) },
+ { "name": "complexSelector", "symbols": ["compoundSelector"], "postprocess": id },
+ { "name": "complexSelector", "symbols": ["complexSelector", "__", "compoundSelector"], "postprocess": ([left, , right]) => ({
+ type: "compound",
+ list: [...right.list, { type: "combinator", combinator: " ", left, specificity: left.specificity }],
+ specificity: sumSpec(left.specificity, right.specificity)
+ }) },
+ { "name": "complexSelector", "symbols": ["complexSelector", "_", "combinator", "_", "compoundSelector"], "postprocess": ([left, , c, , right]) => ({
+ type: "compound",
+ list: [...right.list, { type: "combinator", combinator: c, left, specificity: left.specificity }],
+ specificity: sumSpec(left.specificity, right.specificity)
+ }) },
+ { "name": "combinator", "symbols": [lexer.has("gt") ? { type: "gt" } : gt], "postprocess": () => ">" },
+ { "name": "combinator", "symbols": [lexer.has("plus") ? { type: "plus" } : plus], "postprocess": () => "+" },
+ { "name": "combinator", "symbols": [lexer.has("tilde") ? { type: "tilde" } : tilde], "postprocess": () => "~" },
+ { "name": "combinator", "symbols": [lexer.has("vbar") ? { type: "vbar" } : vbar, lexer.has("vbar") ? { type: "vbar" } : vbar], "postprocess": () => "||" },
+ { "name": "compoundSelector", "symbols": ["typeSelector"], "postprocess": ([next]) => ({
+ type: "compound",
+ list: [next],
+ specificity: next.specificity
+ }) },
+ { "name": "compoundSelector", "symbols": ["subclassSelector"], "postprocess": ([next]) => ({
+ type: "compound",
+ list: [next],
+ specificity: next.specificity
+ }) },
+ { "name": "compoundSelector", "symbols": ["compoundSelector", "subclassSelector"], "postprocess": ([acc, next]) => ({
+ type: "compound",
+ list: [...acc.list, next],
+ specificity: sumSpec(acc.specificity, next.specificity)
+ }) },
+ { "name": "subclassSelector", "symbols": ["idSelector"], "postprocess": id },
+ { "name": "subclassSelector", "symbols": ["classSelector"], "postprocess": id },
+ { "name": "subclassSelector", "symbols": ["attrSelector"], "postprocess": id },
+ { "name": "attrSelector", "symbols": ["attrPresenceSelector"], "postprocess": id },
+ { "name": "attrSelector", "symbols": ["attrValueSelector"], "postprocess": id },
+ { "name": "typeSelector", "symbols": ["tagSelector"], "postprocess": id },
+ { "name": "typeSelector", "symbols": ["uniSelector"], "postprocess": id },
+ {
+ "name": "attrPresenceSelector",
+ "symbols": [lexer.has("lbr") ? { type: "lbr" } : lbr, "_", "wqname", "_", lexer.has("rbr") ? { type: "rbr" } : rbr],
+ "postprocess": ([, , wqname]) => ({
+ type: "attrPresence",
+ name: wqname.name,
+ namespace: wqname.namespace,
+ specificity: [0, 1, 0]
+ })
+ },
+ {
+ "name": "attrValueSelector",
+ "symbols": [lexer.has("lbr") ? { type: "lbr" } : lbr, "_", "wqname", "_", "attrMatcher", "_", "attrValue", "_", lexer.has("rbr") ? { type: "rbr" } : rbr],
+ "postprocess": ([, , wqname, , matcher, , v]) => ({
+ type: "attrValue",
+ name: wqname.name,
+ namespace: wqname.namespace,
+ matcher,
+ value: v.value,
+ modifier: v.modifier,
+ specificity: [0, 1, 0]
+ })
+ },
+ { "name": "attrMatcher", "symbols": [lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "=" },
+ { "name": "attrMatcher", "symbols": [lexer.has("tilde") ? { type: "tilde" } : tilde, lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "~=" },
+ { "name": "attrMatcher", "symbols": [lexer.has("vbar") ? { type: "vbar" } : vbar, lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "|=" },
+ { "name": "attrMatcher", "symbols": [lexer.has("caret") ? { type: "caret" } : caret, lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "^=" },
+ { "name": "attrMatcher", "symbols": [lexer.has("dollar") ? { type: "dollar" } : dollar, lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "$=" },
+ { "name": "attrMatcher", "symbols": [lexer.has("asterisk") ? { type: "asterisk" } : asterisk, lexer.has("eq") ? { type: "eq" } : eq], "postprocess": () => "*=" },
+ { "name": "attrValue", "symbols": ["str"], "postprocess": ([v]) => ({ value: v, modifier: null }) },
+ { "name": "attrValue", "symbols": ["idn"], "postprocess": ([v]) => ({ value: v, modifier: null }) },
+ { "name": "attrValue", "symbols": ["str", "_", "attrModifier"], "postprocess": ([v, , mod]) => ({ value: v, modifier: mod }) },
+ { "name": "attrValue", "symbols": ["idn", "__", "attrModifier"], "postprocess": ([v, , mod]) => ({ value: v, modifier: mod }) },
+ { "name": "attrModifier", "symbols": [{ "literal": "i" }], "postprocess": () => "i" },
+ { "name": "attrModifier", "symbols": [{ "literal": "I" }], "postprocess": () => "i" },
+ { "name": "attrModifier", "symbols": [{ "literal": "s" }], "postprocess": () => "s" },
+ { "name": "attrModifier", "symbols": [{ "literal": "S" }], "postprocess": () => "s" },
+ { "name": "idSelector", "symbols": [lexer.has("hashToken") ? { type: "hashToken" } : hashToken], "postprocess": ([{ value: name }]) => ({ type: "id", name, specificity: [1, 0, 0] }) },
+ { "name": "classSelector", "symbols": [lexer.has("fullstop") ? { type: "fullstop" } : fullstop, "idn"], "postprocess": ([, name]) => ({ type: "class", name, specificity: [0, 1, 0] }) },
+ {
+ "name": "tagSelector",
+ "symbols": ["wqname"],
+ "postprocess": ([wqname]) => ({
+ type: "tag",
+ name: wqname.name,
+ namespace: wqname.namespace,
+ specificity: [0, 0, 1]
+ })
+ },
+ { "name": "uniSelector", "symbols": [lexer.has("asterisk") ? { type: "asterisk" } : asterisk], "postprocess": () => ({ type: "universal", namespace: null, specificity: [0, 0, 0] }) },
+ { "name": "uniSelector", "symbols": ["ns", lexer.has("asterisk") ? { type: "asterisk" } : asterisk], "postprocess": ([ns]) => ({ type: "universal", namespace: ns, specificity: [0, 0, 0] }) },
+ { "name": "wqname", "symbols": ["idn"], "postprocess": ([name]) => ({ name, namespace: null }) },
+ { "name": "wqname", "symbols": ["ns", "idn"], "postprocess": ([ns, name]) => ({ name, namespace: ns }) },
+ { "name": "ns", "symbols": [lexer.has("vbar") ? { type: "vbar" } : vbar], "postprocess": () => "" },
+ { "name": "ns", "symbols": ["idn", lexer.has("vbar") ? { type: "vbar" } : vbar], "postprocess": id },
+ { "name": "str", "symbols": [lexer.has("str1") ? { type: "str1" } : str1], "postprocess": firstTokenValue },
+ { "name": "str", "symbols": [lexer.has("str2") ? { type: "str2" } : str2], "postprocess": firstTokenValue },
+ { "name": "idn", "symbols": [lexer.has("idn") ? { type: "idn" } : idn], "postprocess": firstTokenValue },
+ { "name": "_$ebnf$1", "symbols": [lexer.has("ws") ? { type: "ws" } : ws], "postprocess": id },
+ { "name": "_$ebnf$1", "symbols": [], "postprocess": () => null },
+ { "name": "_", "symbols": ["_$ebnf$1"], "postprocess": () => null },
+ { "name": "__", "symbols": [lexer.has("ws") ? { type: "ws" } : ws], "postprocess": () => null }
+ ],
+ ParserStart: "main"
+ };
+ var ast = /* @__PURE__ */ Object.freeze({
+ __proto__: null
+ });
+ var compiledRulesNoList = __spreadProps(__spreadValues({}, grammar), { ParserStart: "mainNoList" });
+ function parse4(str) {
+ return _parse(grammar, str);
+ }
+ function parse1(str) {
+ return _parse(compiledRulesNoList, str);
+ }
+ function _parse(compiledRules1, str) {
+ const parser = new nearley.Parser(nearley.Grammar.fromCompiled(compiledRules1));
+ parser.feed(str);
+ if (parser.results.length === 0) {
+ throw new Error("Failed to parse - input string might be incomplete.");
+ }
+ return parser.results[0];
+ }
+ function serialize(selector) {
+ if (!selector.type) {
+ throw new Error("This is not an AST node.");
+ }
+ switch (selector.type) {
+ case "universal":
+ return _serNs(selector.namespace) + "*";
+ case "tag":
+ return _serNs(selector.namespace) + selector.name;
+ case "class":
+ return "." + selector.name;
+ case "id":
+ return "#" + selector.name;
+ case "attrPresence":
+ return `[${_serNs(selector.namespace)}${selector.name}]`;
+ case "attrValue":
+ return `[${_serNs(selector.namespace)}${selector.name}${selector.matcher}${_serStr(selector.value)}${selector.modifier ? selector.modifier : ""}]`;
+ case "combinator":
+ return serialize(selector.left) + selector.combinator;
+ case "compound":
+ return selector.list.reduce((acc, node) => {
+ if (node.type === "combinator") {
+ return serialize(node) + acc;
+ } else {
+ return acc + serialize(node);
+ }
+ }, "");
+ case "list":
+ return selector.list.map(serialize).join(",");
+ }
+ }
+ function _serNs(ns) {
+ return ns || ns === "" ? ns + "|" : "";
+ }
+ function _serStr(str) {
+ if (str.indexOf('"') === -1) {
+ return `"${str}"`;
+ } else if (str.indexOf("'") === -1) {
+ return `'${str}'`;
+ } else {
+ return `"${str.replace('"', '\\"')}"`;
+ }
+ }
+ function normalize(selector) {
+ if (!selector.type) {
+ throw new Error("This is not an AST node.");
+ }
+ switch (selector.type) {
+ case "compound": {
+ selector.list.forEach(normalize);
+ selector.list.sort((a, b) => _compareArrays(_getSelectorPriority(a), _getSelectorPriority(b)));
+ break;
+ }
+ case "combinator": {
+ normalize(selector.left);
+ break;
+ }
+ case "list": {
+ selector.list.forEach(normalize);
+ selector.list.sort((a, b) => serialize(a) < serialize(b) ? -1 : 1);
+ break;
+ }
+ }
+ return selector;
+ }
+ function _getSelectorPriority(selector) {
+ switch (selector.type) {
+ case "universal":
+ return [1];
+ case "tag":
+ return [1];
+ case "id":
+ return [2];
+ case "class":
+ return [3, selector.name];
+ case "attrPresence":
+ return [4, serialize(selector)];
+ case "attrValue":
+ return [5, serialize(selector)];
+ case "combinator":
+ return [15, serialize(selector)];
+ }
+ }
+ function compareSelectors(a, b) {
+ return _compareArrays(a.specificity, b.specificity);
+ }
+ function compareSpecificity(a, b) {
+ return _compareArrays(a, b);
+ }
+ function _compareArrays(a, b) {
+ if (!Array.isArray(a) || !Array.isArray(b)) {
+ throw new Error("Arguments must be arrays.");
+ }
+ const shorter = a.length < b.length ? a.length : b.length;
+ for (let i2 = 0; i2 < shorter; i2++) {
+ if (a[i2] === b[i2]) {
+ continue;
+ }
+ return a[i2] < b[i2] ? -1 : 1;
+ }
+ return a.length - b.length;
+ }
+ exports.Ast = ast;
+ exports.compareSelectors = compareSelectors;
+ exports.compareSpecificity = compareSpecificity;
+ exports.normalize = normalize;
+ exports.parse = parse4;
+ exports.parse1 = parse1;
+ exports.serialize = serialize;
+ }
+});
+
+// node_modules/selderee/lib/selderee.cjs
+var require_selderee = __commonJS({
+ "node_modules/selderee/lib/selderee.cjs"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var parseley = require_parseley();
+ function _interopNamespace(e2) {
+ if (e2 && e2.__esModule)
+ return e2;
+ var n = /* @__PURE__ */ Object.create(null);
+ if (e2) {
+ Object.keys(e2).forEach(function(k) {
+ if (k !== "default") {
+ var d = Object.getOwnPropertyDescriptor(e2, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function() {
+ return e2[k];
+ }
+ });
+ }
+ });
+ }
+ n["default"] = e2;
+ return Object.freeze(n);
+ }
+ var parseley__namespace = /* @__PURE__ */ _interopNamespace(parseley);
+ var Ast = /* @__PURE__ */ Object.freeze({
+ __proto__: null
+ });
+ var Types = /* @__PURE__ */ Object.freeze({
+ __proto__: null
+ });
+ var treeify = (nodes) => "\u25BD\n" + treeifyArray(nodes, thinLines);
+ var thinLines = [["\u251C\u2500", "\u2502 "], ["\u2514\u2500", " "]];
+ var heavyLines = [["\u2520\u2500", "\u2503 "], ["\u2516\u2500", " "]];
+ var doubleLines = [["\u255F\u2500", "\u2551 "], ["\u2559\u2500", " "]];
+ function treeifyArray(nodes, tpl = heavyLines) {
+ return prefixItems(tpl, nodes.map((n) => treeifyNode(n)));
+ }
+ function treeifyNode(node) {
+ switch (node.type) {
+ case "terminal": {
+ const vctr = node.valueContainer;
+ return `\u25C1 #${vctr.index} ${JSON.stringify(vctr.specificity)} ${vctr.value}`;
+ }
+ case "tagName":
+ return `\u25FB Tag name
+${treeifyArray(node.variants, doubleLines)}`;
+ case "attrValue":
+ return `\u25A3 Attr value: ${node.name}
+${treeifyArray(node.matchers, doubleLines)}`;
+ case "attrPresence":
+ return `\u25E8 Attr presence: ${node.name}
+${treeifyArray(node.cont)}`;
+ case "pushElement":
+ return `\u25C9 Push element: ${node.combinator}
+${treeifyArray(node.cont, thinLines)}`;
+ case "popElement":
+ return `\u25CC Pop element
+${treeifyArray(node.cont, thinLines)}`;
+ case "variant":
+ return `\u25C7 = ${node.value}
+${treeifyArray(node.cont)}`;
+ case "matcher":
+ return `\u25C8 ${node.matcher} "${node.value}"${node.modifier || ""}
+${treeifyArray(node.cont)}`;
+ }
+ }
+ function prefixItems(tpl, items) {
+ return items.map((item, i2, { length }) => prefixItem(tpl, item, i2 === length - 1)).join("\n");
+ }
+ function prefixItem(tpl, item, tail = true) {
+ const tpl1 = tpl[tail ? 1 : 0];
+ return tpl1[0] + item.split("\n").join("\n" + tpl1[1]);
+ }
+ var TreeifyBuilder = /* @__PURE__ */ Object.freeze({
+ __proto__: null,
+ treeify
+ });
+ var DecisionTree = class {
+ constructor(input) {
+ this.branches = weave(toAstTerminalPairs(input));
+ }
+ build(builder) {
+ return builder(this.branches);
+ }
+ };
+ function toAstTerminalPairs(array) {
+ const len = array.length;
+ const results = new Array(len);
+ for (let i2 = 0; i2 < len; i2++) {
+ const [selectorString, val] = array[i2];
+ const ast = preprocess(parseley__namespace.parse1(selectorString));
+ results[i2] = {
+ ast,
+ terminal: {
+ type: "terminal",
+ valueContainer: { index: i2, value: val, specificity: ast.specificity }
+ }
+ };
+ }
+ return results;
+ }
+ function preprocess(ast) {
+ reduceSelectorVariants(ast);
+ parseley__namespace.normalize(ast);
+ return ast;
+ }
+ function reduceSelectorVariants(ast) {
+ const newList = [];
+ ast.list.forEach((sel) => {
+ switch (sel.type) {
+ case "class":
+ newList.push({
+ matcher: "~=",
+ modifier: null,
+ name: "class",
+ namespace: null,
+ specificity: sel.specificity,
+ type: "attrValue",
+ value: sel.name
+ });
+ break;
+ case "id":
+ newList.push({
+ matcher: "=",
+ modifier: null,
+ name: "id",
+ namespace: null,
+ specificity: sel.specificity,
+ type: "attrValue",
+ value: sel.name
+ });
+ break;
+ case "combinator":
+ reduceSelectorVariants(sel.left);
+ newList.push(sel);
+ break;
+ case "universal":
+ break;
+ default:
+ newList.push(sel);
+ break;
+ }
+ });
+ ast.list = newList;
+ }
+ function weave(items) {
+ const branches = [];
+ while (items.length) {
+ const topKind = findTopKey(items, (sel) => true, getSelectorKind);
+ const { matches: matches2, nonmatches, empty } = breakByKind(items, topKind);
+ items = nonmatches;
+ if (matches2.length) {
+ branches.push(branchOfKind(topKind, matches2));
+ }
+ if (empty.length) {
+ branches.push(...terminate(empty));
+ }
+ }
+ return branches;
+ }
+ function terminate(items) {
+ const results = [];
+ for (const item of items) {
+ const terminal = item.terminal;
+ if (terminal.type === "terminal") {
+ results.push(terminal);
+ } else {
+ const { matches: matches2, rest } = partition(terminal.cont, (node) => node.type === "terminal");
+ matches2.forEach((node) => results.push(node));
+ if (rest.length) {
+ terminal.cont = rest;
+ results.push(terminal);
+ }
+ }
+ }
+ return results;
+ }
+ function breakByKind(items, selectedKind) {
+ const matches2 = [];
+ const nonmatches = [];
+ const empty = [];
+ for (const item of items) {
+ const simpsels = item.ast.list;
+ if (simpsels.length) {
+ const isMatch = simpsels.some((node) => getSelectorKind(node) === selectedKind);
+ (isMatch ? matches2 : nonmatches).push(item);
+ } else {
+ empty.push(item);
+ }
+ }
+ return { matches: matches2, nonmatches, empty };
+ }
+ function getSelectorKind(sel) {
+ switch (sel.type) {
+ case "attrPresence":
+ return `attrPresence ${sel.name}`;
+ case "attrValue":
+ return `attrValue ${sel.name}`;
+ case "combinator":
+ return `combinator ${sel.combinator}`;
+ default:
+ return sel.type;
+ }
+ }
+ function branchOfKind(kind, items) {
+ if (kind === "tag") {
+ return tagNameBranch(items);
+ }
+ if (kind.startsWith("attrValue ")) {
+ return attrValueBranch(kind.substring(10), items);
+ }
+ if (kind.startsWith("attrPresence ")) {
+ return attrPresenceBranch(kind.substring(13), items);
+ }
+ if (kind === "combinator >") {
+ return combinatorBranch(">", items);
+ }
+ if (kind === "combinator +") {
+ return combinatorBranch("+", items);
+ }
+ throw new Error(`Unsupported selector kind: ${kind}`);
+ }
+ function tagNameBranch(items) {
+ const groups = spliceAndGroup(items, (x2) => x2.type === "tag", (x2) => x2.name);
+ const variants = Object.entries(groups).map(([name, group]) => ({
+ type: "variant",
+ value: name,
+ cont: weave(group.items)
+ }));
+ return {
+ type: "tagName",
+ variants
+ };
+ }
+ function attrPresenceBranch(name, items) {
+ for (const item of items) {
+ spliceSimpleSelector(item, (x2) => x2.type === "attrPresence" && x2.name === name);
+ }
+ return {
+ type: "attrPresence",
+ name,
+ cont: weave(items)
+ };
+ }
+ function attrValueBranch(name, items) {
+ const groups = spliceAndGroup(items, (x2) => x2.type === "attrValue" && x2.name === name, (x2) => `${x2.matcher} ${x2.modifier || ""} ${x2.value}`);
+ const matchers = [];
+ for (const group of Object.values(groups)) {
+ const sel = group.oneSimpleSelector;
+ const predicate = getAttrPredicate(sel);
+ const continuation = weave(group.items);
+ matchers.push({
+ type: "matcher",
+ matcher: sel.matcher,
+ modifier: sel.modifier,
+ value: sel.value,
+ predicate,
+ cont: continuation
+ });
+ }
+ return {
+ type: "attrValue",
+ name,
+ matchers
+ };
+ }
+ function getAttrPredicate(sel) {
+ if (sel.modifier === "i") {
+ const expected = sel.value.toLowerCase();
+ switch (sel.matcher) {
+ case "=":
+ return (actual) => expected === actual.toLowerCase();
+ case "~=":
+ return (actual) => actual.toLowerCase().split(/[ \t]+/).includes(expected);
+ case "^=":
+ return (actual) => actual.toLowerCase().startsWith(expected);
+ case "$=":
+ return (actual) => actual.toLowerCase().endsWith(expected);
+ case "*=":
+ return (actual) => actual.toLowerCase().includes(expected);
+ case "|=":
+ return (actual) => {
+ const lower2 = actual.toLowerCase();
+ return expected === lower2 || lower2.startsWith(expected) && lower2[expected.length] === "-";
+ };
+ }
+ } else {
+ const expected = sel.value;
+ switch (sel.matcher) {
+ case "=":
+ return (actual) => expected === actual;
+ case "~=":
+ return (actual) => actual.split(/[ \t]+/).includes(expected);
+ case "^=":
+ return (actual) => actual.startsWith(expected);
+ case "$=":
+ return (actual) => actual.endsWith(expected);
+ case "*=":
+ return (actual) => actual.includes(expected);
+ case "|=":
+ return (actual) => expected === actual || actual.startsWith(expected) && actual[expected.length] === "-";
+ }
+ }
+ }
+ function combinatorBranch(combinator, items) {
+ const groups = spliceAndGroup(items, (x2) => x2.type === "combinator" && x2.combinator === combinator, (x2) => parseley__namespace.serialize(x2.left));
+ const leftItems = [];
+ for (const group of Object.values(groups)) {
+ const rightCont = weave(group.items);
+ const leftAst = group.oneSimpleSelector.left;
+ leftItems.push({
+ ast: leftAst,
+ terminal: { type: "popElement", cont: rightCont }
+ });
+ }
+ return {
+ type: "pushElement",
+ combinator,
+ cont: weave(leftItems)
+ };
+ }
+ function spliceAndGroup(items, predicate, keyCallback) {
+ const groups = {};
+ while (items.length) {
+ const bestKey = findTopKey(items, predicate, keyCallback);
+ const bestKeyPredicate = (sel) => predicate(sel) && keyCallback(sel) === bestKey;
+ const hasBestKeyPredicate = (item) => item.ast.list.some(bestKeyPredicate);
+ const { matches: matches2, rest } = partition1(items, hasBestKeyPredicate);
+ let oneSimpleSelector = null;
+ for (const item of matches2) {
+ const splicedNode = spliceSimpleSelector(item, bestKeyPredicate);
+ if (!oneSimpleSelector) {
+ oneSimpleSelector = splicedNode;
+ }
+ }
+ if (oneSimpleSelector == null) {
+ throw new Error("No simple selector is found.");
+ }
+ groups[bestKey] = { oneSimpleSelector, items: matches2 };
+ items = rest;
+ }
+ return groups;
+ }
+ function spliceSimpleSelector(item, predicate) {
+ const simpsels = item.ast.list;
+ const matches2 = new Array(simpsels.length);
+ let firstIndex = -1;
+ for (let i2 = simpsels.length; i2-- > 0; ) {
+ if (predicate(simpsels[i2])) {
+ matches2[i2] = true;
+ firstIndex = i2;
+ }
+ }
+ if (firstIndex == -1) {
+ throw new Error(`Couldn't find the required simple selector.`);
+ }
+ const result = simpsels[firstIndex];
+ item.ast.list = simpsels.filter((sel, i2) => !matches2[i2]);
+ return result;
+ }
+ function findTopKey(items, predicate, keyCallback) {
+ const candidates = {};
+ for (const item of items) {
+ const candidates1 = {};
+ for (const node of item.ast.list.filter(predicate)) {
+ candidates1[keyCallback(node)] = true;
+ }
+ for (const key2 of Object.keys(candidates1)) {
+ if (candidates[key2]) {
+ candidates[key2]++;
+ } else {
+ candidates[key2] = 1;
+ }
+ }
+ }
+ let topKind = "";
+ let topCounter = 0;
+ for (const entry of Object.entries(candidates)) {
+ if (entry[1] > topCounter) {
+ topKind = entry[0];
+ topCounter = entry[1];
+ }
+ }
+ return topKind;
+ }
+ function partition(src, predicate) {
+ const matches2 = [];
+ const rest = [];
+ for (const x2 of src) {
+ if (predicate(x2)) {
+ matches2.push(x2);
+ } else {
+ rest.push(x2);
+ }
+ }
+ return { matches: matches2, rest };
+ }
+ function partition1(src, predicate) {
+ const matches2 = [];
+ const rest = [];
+ for (const x2 of src) {
+ if (predicate(x2)) {
+ matches2.push(x2);
+ } else {
+ rest.push(x2);
+ }
+ }
+ return { matches: matches2, rest };
+ }
+ var Picker = class {
+ constructor(f3) {
+ this.f = f3;
+ }
+ pickAll(el) {
+ return this.f(el);
+ }
+ pick1(el, preferFirst = false) {
+ const results = this.f(el);
+ const len = results.length;
+ if (len === 0) {
+ return null;
+ }
+ if (len === 1) {
+ return results[0].value;
+ }
+ const comparator = preferFirst ? comparatorPreferFirst : comparatorPreferLast;
+ let result = results[0];
+ for (let i2 = 1; i2 < len; i2++) {
+ const next = results[i2];
+ if (comparator(result, next)) {
+ result = next;
+ }
+ }
+ return result.value;
+ }
+ };
+ function comparatorPreferFirst(acc, next) {
+ const diff = parseley.compareSpecificity(next.specificity, acc.specificity);
+ return diff > 0 || diff === 0 && next.index < acc.index;
+ }
+ function comparatorPreferLast(acc, next) {
+ const diff = parseley.compareSpecificity(next.specificity, acc.specificity);
+ return diff > 0 || diff === 0 && next.index > acc.index;
+ }
+ exports.Ast = Ast;
+ exports.DecisionTree = DecisionTree;
+ exports.Picker = Picker;
+ exports.Treeify = TreeifyBuilder;
+ exports.Types = Types;
+ }
+});
+
+// node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.cjs
+var require_hp2_builder = __commonJS({
+ "node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.cjs"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var domhandler = require_lib2();
+ var selderee = require_selderee();
+ function hp2Builder(nodes) {
+ return new selderee.Picker(handleArray(nodes));
+ }
+ function handleArray(nodes) {
+ const matchers = nodes.map(handleNode);
+ return (el, ...tail) => flatMap(matchers, (m2) => m2(el, ...tail));
+ }
+ function handleNode(node) {
+ switch (node.type) {
+ case "terminal": {
+ const result = [node.valueContainer];
+ return (el, ...tail) => result;
+ }
+ case "tagName":
+ return handleTagName(node);
+ case "attrValue":
+ return handleAttrValueName(node);
+ case "attrPresence":
+ return handleAttrPresenceName(node);
+ case "pushElement":
+ return handlePushElementNode(node);
+ case "popElement":
+ return handlePopElementNode(node);
+ }
+ }
+ function handleTagName(node) {
+ const variants = {};
+ for (const variant of node.variants) {
+ variants[variant.value] = handleArray(variant.cont);
+ }
+ return (el, ...tail) => {
+ const continuation = variants[el.name];
+ return continuation ? continuation(el, ...tail) : [];
+ };
+ }
+ function handleAttrPresenceName(node) {
+ const attrName = node.name;
+ const continuation = handleArray(node.cont);
+ return (el, ...tail) => Object.prototype.hasOwnProperty.call(el.attribs, attrName) ? continuation(el, ...tail) : [];
+ }
+ function handleAttrValueName(node) {
+ const callbacks = [];
+ for (const matcher of node.matchers) {
+ const predicate = matcher.predicate;
+ const continuation = handleArray(matcher.cont);
+ callbacks.push((attr, el, ...tail) => predicate(attr) ? continuation(el, ...tail) : []);
+ }
+ const attrName = node.name;
+ return (el, ...tail) => {
+ const attr = el.attribs[attrName];
+ return attr || attr === "" ? flatMap(callbacks, (cb) => cb(attr, el, ...tail)) : [];
+ };
+ }
+ function handlePushElementNode(node) {
+ const continuation = handleArray(node.cont);
+ const leftElementGetter = node.combinator === "+" ? getPrecedingElement : getParentElement;
+ return (el, ...tail) => {
+ const next = leftElementGetter(el);
+ if (next === null) {
+ return [];
+ }
+ return continuation(next, el, ...tail);
+ };
+ }
+ var getPrecedingElement = (el) => {
+ const prev = el.prev;
+ if (prev === null) {
+ return null;
+ }
+ return domhandler.isTag(prev) ? prev : getPrecedingElement(prev);
+ };
+ var getParentElement = (el) => {
+ const parent = el.parent;
+ return parent && domhandler.isTag(parent) ? parent : null;
+ };
+ function handlePopElementNode(node) {
+ const continuation = handleArray(node.cont);
+ return (el, next, ...tail) => continuation(next, ...tail);
+ }
+ function flatMap(items, mapper) {
+ return [].concat(...amap(items, mapper));
+ }
+ function amap(items, mapper) {
+ const len = items.length;
+ const res = new Array(len);
+ for (let i2 = 0; i2 < len; i2++) {
+ res[i2] = mapper(items[i2]);
+ }
+ return res;
+ }
+ exports.hp2Builder = hp2Builder;
+ }
+});
+
+// node_modules/deepmerge/dist/cjs.js
+var require_cjs = __commonJS({
+ "node_modules/deepmerge/dist/cjs.js"(exports, module2) {
+ "use strict";
+ var isMergeableObject = function isMergeableObject2(value) {
+ return isNonNullObject(value) && !isSpecial(value);
+ };
+ function isNonNullObject(value) {
+ return !!value && typeof value === "object";
+ }
+ function isSpecial(value) {
+ var stringValue = Object.prototype.toString.call(value);
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
+ }
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
+ function isReactElement(value) {
+ return value.$$typeof === REACT_ELEMENT_TYPE;
+ }
+ function emptyTarget(val) {
+ return Array.isArray(val) ? [] : {};
+ }
+ function cloneUnlessOtherwiseSpecified(value, options) {
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
+ }
+ function defaultArrayMerge(target, source, options) {
+ return target.concat(source).map(function(element) {
+ return cloneUnlessOtherwiseSpecified(element, options);
+ });
+ }
+ function getMergeFunction(key2, options) {
+ if (!options.customMerge) {
+ return deepmerge;
+ }
+ var customMerge = options.customMerge(key2);
+ return typeof customMerge === "function" ? customMerge : deepmerge;
+ }
+ function getEnumerableOwnPropertySymbols(target) {
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
+ return target.propertyIsEnumerable(symbol);
+ }) : [];
+ }
+ function getKeys2(target) {
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
+ }
+ function propertyIsOnObject(object, property) {
+ try {
+ return property in object;
+ } catch (_) {
+ return false;
+ }
+ }
+ function propertyIsUnsafe(target, key2) {
+ return propertyIsOnObject(target, key2) && !(Object.hasOwnProperty.call(target, key2) && Object.propertyIsEnumerable.call(target, key2));
+ }
+ function mergeObject(target, source, options) {
+ var destination = {};
+ if (options.isMergeableObject(target)) {
+ getKeys2(target).forEach(function(key2) {
+ destination[key2] = cloneUnlessOtherwiseSpecified(target[key2], options);
+ });
+ }
+ getKeys2(source).forEach(function(key2) {
+ if (propertyIsUnsafe(target, key2)) {
+ return;
+ }
+ if (propertyIsOnObject(target, key2) && options.isMergeableObject(source[key2])) {
+ destination[key2] = getMergeFunction(key2, options)(target[key2], source[key2], options);
+ } else {
+ destination[key2] = cloneUnlessOtherwiseSpecified(source[key2], options);
+ }
+ });
+ return destination;
+ }
+ function deepmerge(target, source, options) {
+ options = options || {};
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
+ var sourceIsArray = Array.isArray(source);
+ var targetIsArray = Array.isArray(target);
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
+ if (!sourceAndTargetTypesMatch) {
+ return cloneUnlessOtherwiseSpecified(source, options);
+ } else if (sourceIsArray) {
+ return options.arrayMerge(target, source, options);
+ } else {
+ return mergeObject(target, source, options);
+ }
+ }
+ deepmerge.all = function deepmergeAll(array, options) {
+ if (!Array.isArray(array)) {
+ throw new Error("first argument should be an array");
+ }
+ return array.reduce(function(prev, next) {
+ return deepmerge(prev, next, options);
+ }, {});
+ };
+ var deepmerge_1 = deepmerge;
+ module2.exports = deepmerge_1;
+ }
+});
+
+// node_modules/he/he.js
+var require_he = __commonJS({
+ "node_modules/he/he.js"(exports, module2) {
+ (function(root) {
+ var freeExports = typeof exports == "object" && exports;
+ var freeModule = typeof module2 == "object" && module2 && module2.exports == freeExports && module2;
+ var freeGlobal = typeof global == "object" && global;
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
+ root = freeGlobal;
+ }
+ var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
+ var regexAsciiWhitelist = /[\x01-\x7F]/g;
+ var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
+ var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
+ var encodeMap = { "\xAD": "shy", "\u200C": "zwnj", "\u200D": "zwj", "\u200E": "lrm", "\u2063": "ic", "\u2062": "it", "\u2061": "af", "\u200F": "rlm", "\u200B": "ZeroWidthSpace", "\u2060": "NoBreak", "\u0311": "DownBreve", "\u20DB": "tdot", "\u20DC": "DotDot", " ": "Tab", "\n": "NewLine", "\u2008": "puncsp", "\u205F": "MediumSpace", "\u2009": "thinsp", "\u200A": "hairsp", "\u2004": "emsp13", "\u2002": "ensp", "\u2005": "emsp14", "\u2003": "emsp", "\u2007": "numsp", "\xA0": "nbsp", "\u205F\u200A": "ThickSpace", "\u203E": "oline", "_": "lowbar", "\u2010": "dash", "\u2013": "ndash", "\u2014": "mdash", "\u2015": "horbar", ",": "comma", ";": "semi", "\u204F": "bsemi", ":": "colon", "\u2A74": "Colone", "!": "excl", "\xA1": "iexcl", "?": "quest", "\xBF": "iquest", ".": "period", "\u2025": "nldr", "\u2026": "mldr", "\xB7": "middot", "'": "apos", "\u2018": "lsquo", "\u2019": "rsquo", "\u201A": "sbquo", "\u2039": "lsaquo", "\u203A": "rsaquo", '"': "quot", "\u201C": "ldquo", "\u201D": "rdquo", "\u201E": "bdquo", "\xAB": "laquo", "\xBB": "raquo", "(": "lpar", ")": "rpar", "[": "lsqb", "]": "rsqb", "{": "lcub", "}": "rcub", "\u2308": "lceil", "\u2309": "rceil", "\u230A": "lfloor", "\u230B": "rfloor", "\u2985": "lopar", "\u2986": "ropar", "\u298B": "lbrke", "\u298C": "rbrke", "\u298D": "lbrkslu", "\u298E": "rbrksld", "\u298F": "lbrksld", "\u2990": "rbrkslu", "\u2991": "langd", "\u2992": "rangd", "\u2993": "lparlt", "\u2994": "rpargt", "\u2995": "gtlPar", "\u2996": "ltrPar", "\u27E6": "lobrk", "\u27E7": "robrk", "\u27E8": "lang", "\u27E9": "rang", "\u27EA": "Lang", "\u27EB": "Rang", "\u27EC": "loang", "\u27ED": "roang", "\u2772": "lbbrk", "\u2773": "rbbrk", "\u2016": "Vert", "\xA7": "sect", "\xB6": "para", "@": "commat", "*": "ast", "/": "sol", "undefined": null, "&": "amp", "#": "num", "%": "percnt", "\u2030": "permil", "\u2031": "pertenk", "\u2020": "dagger", "\u2021": "Dagger", "\u2022": "bull", "\u2043": "hybull", "\u2032": "prime", "\u2033": "Prime", "\u2034": "tprime", "\u2057": "qprime", "\u2035": "bprime", "\u2041": "caret", "`": "grave", "\xB4": "acute", "\u02DC": "tilde", "^": "Hat", "\xAF": "macr", "\u02D8": "breve", "\u02D9": "dot", "\xA8": "die", "\u02DA": "ring", "\u02DD": "dblac", "\xB8": "cedil", "\u02DB": "ogon", "\u02C6": "circ", "\u02C7": "caron", "\xB0": "deg", "\xA9": "copy", "\xAE": "reg", "\u2117": "copysr", "\u2118": "wp", "\u211E": "rx", "\u2127": "mho", "\u2129": "iiota", "\u2190": "larr", "\u219A": "nlarr", "\u2192": "rarr", "\u219B": "nrarr", "\u2191": "uarr", "\u2193": "darr", "\u2194": "harr", "\u21AE": "nharr", "\u2195": "varr", "\u2196": "nwarr", "\u2197": "nearr", "\u2198": "searr", "\u2199": "swarr", "\u219D": "rarrw", "\u219D\u0338": "nrarrw", "\u219E": "Larr", "\u219F": "Uarr", "\u21A0": "Rarr", "\u21A1": "Darr", "\u21A2": "larrtl", "\u21A3": "rarrtl", "\u21A4": "mapstoleft", "\u21A5": "mapstoup", "\u21A6": "map", "\u21A7": "mapstodown", "\u21A9": "larrhk", "\u21AA": "rarrhk", "\u21AB": "larrlp", "\u21AC": "rarrlp", "\u21AD": "harrw", "\u21B0": "lsh", "\u21B1": "rsh", "\u21B2": "ldsh", "\u21B3": "rdsh", "\u21B5": "crarr", "\u21B6": "cularr", "\u21B7": "curarr", "\u21BA": "olarr", "\u21BB": "orarr", "\u21BC": "lharu", "\u21BD": "lhard", "\u21BE": "uharr", "\u21BF": "uharl", "\u21C0": "rharu", "\u21C1": "rhard", "\u21C2": "dharr", "\u21C3": "dharl", "\u21C4": "rlarr", "\u21C5": "udarr", "\u21C6": "lrarr", "\u21C7": "llarr", "\u21C8": "uuarr", "\u21C9": "rrarr", "\u21CA": "ddarr", "\u21CB": "lrhar", "\u21CC": "rlhar", "\u21D0": "lArr", "\u21CD": "nlArr", "\u21D1": "uArr", "\u21D2": "rArr", "\u21CF": "nrArr", "\u21D3": "dArr", "\u21D4": "iff", "\u21CE": "nhArr", "\u21D5": "vArr", "\u21D6": "nwArr", "\u21D7": "neArr", "\u21D8": "seArr", "\u21D9": "swArr", "\u21DA": "lAarr", "\u21DB": "rAarr", "\u21DD": "zigrarr", "\u21E4": "larrb", "\u21E5": "rarrb", "\u21F5": "duarr", "\u21FD": "loarr", "\u21FE": "roarr", "\u21FF": "hoarr", "\u2200": "forall", "\u2201": "comp", "\u2202": "part", "\u2202\u0338": "npart", "\u2203": "exist", "\u2204": "nexist", "\u2205": "empty", "\u2207": "Del", "\u2208": "in", "\u2209": "notin", "\u220B": "ni", "\u220C": "notni", "\u03F6": "bepsi", "\u220F": "prod", "\u2210": "coprod", "\u2211": "sum", "+": "plus", "\xB1": "pm", "\xF7": "div", "\xD7": "times", "<": "lt", "\u226E": "nlt", "<\u20D2": "nvlt", "=": "equals", "\u2260": "ne", "=\u20E5": "bne", "\u2A75": "Equal", ">": "gt", "\u226F": "ngt", ">\u20D2": "nvgt", "\xAC": "not", "|": "vert", "\xA6": "brvbar", "\u2212": "minus", "\u2213": "mp", "\u2214": "plusdo", "\u2044": "frasl", "\u2216": "setmn", "\u2217": "lowast", "\u2218": "compfn", "\u221A": "Sqrt", "\u221D": "prop", "\u221E": "infin", "\u221F": "angrt", "\u2220": "ang", "\u2220\u20D2": "nang", "\u2221": "angmsd", "\u2222": "angsph", "\u2223": "mid", "\u2224": "nmid", "\u2225": "par", "\u2226": "npar", "\u2227": "and", "\u2228": "or", "\u2229": "cap", "\u2229\uFE00": "caps", "\u222A": "cup", "\u222A\uFE00": "cups", "\u222B": "int", "\u222C": "Int", "\u222D": "tint", "\u2A0C": "qint", "\u222E": "oint", "\u222F": "Conint", "\u2230": "Cconint", "\u2231": "cwint", "\u2232": "cwconint", "\u2233": "awconint", "\u2234": "there4", "\u2235": "becaus", "\u2236": "ratio", "\u2237": "Colon", "\u2238": "minusd", "\u223A": "mDDot", "\u223B": "homtht", "\u223C": "sim", "\u2241": "nsim", "\u223C\u20D2": "nvsim", "\u223D": "bsim", "\u223D\u0331": "race", "\u223E": "ac", "\u223E\u0333": "acE", "\u223F": "acd", "\u2240": "wr", "\u2242": "esim", "\u2242\u0338": "nesim", "\u2243": "sime", "\u2244": "nsime", "\u2245": "cong", "\u2247": "ncong", "\u2246": "simne", "\u2248": "ap", "\u2249": "nap", "\u224A": "ape", "\u224B": "apid", "\u224B\u0338": "napid", "\u224C": "bcong", "\u224D": "CupCap", "\u226D": "NotCupCap", "\u224D\u20D2": "nvap", "\u224E": "bump", "\u224E\u0338": "nbump", "\u224F": "bumpe", "\u224F\u0338": "nbumpe", "\u2250": "doteq", "\u2250\u0338": "nedot", "\u2251": "eDot", "\u2252": "efDot", "\u2253": "erDot", "\u2254": "colone", "\u2255": "ecolon", "\u2256": "ecir", "\u2257": "cire", "\u2259": "wedgeq", "\u225A": "veeeq", "\u225C": "trie", "\u225F": "equest", "\u2261": "equiv", "\u2262": "nequiv", "\u2261\u20E5": "bnequiv", "\u2264": "le", "\u2270": "nle", "\u2264\u20D2": "nvle", "\u2265": "ge", "\u2271": "nge", "\u2265\u20D2": "nvge", "\u2266": "lE", "\u2266\u0338": "nlE", "\u2267": "gE", "\u2267\u0338": "ngE", "\u2268\uFE00": "lvnE", "\u2268": "lnE", "\u2269": "gnE", "\u2269\uFE00": "gvnE", "\u226A": "ll", "\u226A\u0338": "nLtv", "\u226A\u20D2": "nLt", "\u226B": "gg", "\u226B\u0338": "nGtv", "\u226B\u20D2": "nGt", "\u226C": "twixt", "\u2272": "lsim", "\u2274": "nlsim", "\u2273": "gsim", "\u2275": "ngsim", "\u2276": "lg", "\u2278": "ntlg", "\u2277": "gl", "\u2279": "ntgl", "\u227A": "pr", "\u2280": "npr", "\u227B": "sc", "\u2281": "nsc", "\u227C": "prcue", "\u22E0": "nprcue", "\u227D": "sccue", "\u22E1": "nsccue", "\u227E": "prsim", "\u227F": "scsim", "\u227F\u0338": "NotSucceedsTilde", "\u2282": "sub", "\u2284": "nsub", "\u2282\u20D2": "vnsub", "\u2283": "sup", "\u2285": "nsup", "\u2283\u20D2": "vnsup", "\u2286": "sube", "\u2288": "nsube", "\u2287": "supe", "\u2289": "nsupe", "\u228A\uFE00": "vsubne", "\u228A": "subne", "\u228B\uFE00": "vsupne", "\u228B": "supne", "\u228D": "cupdot", "\u228E": "uplus", "\u228F": "sqsub", "\u228F\u0338": "NotSquareSubset", "\u2290": "sqsup", "\u2290\u0338": "NotSquareSuperset", "\u2291": "sqsube", "\u22E2": "nsqsube", "\u2292": "sqsupe", "\u22E3": "nsqsupe", "\u2293": "sqcap", "\u2293\uFE00": "sqcaps", "\u2294": "sqcup", "\u2294\uFE00": "sqcups", "\u2295": "oplus", "\u2296": "ominus", "\u2297": "otimes", "\u2298": "osol", "\u2299": "odot", "\u229A": "ocir", "\u229B": "oast", "\u229D": "odash", "\u229E": "plusb", "\u229F": "minusb", "\u22A0": "timesb", "\u22A1": "sdotb", "\u22A2": "vdash", "\u22AC": "nvdash", "\u22A3": "dashv", "\u22A4": "top", "\u22A5": "bot", "\u22A7": "models", "\u22A8": "vDash", "\u22AD": "nvDash", "\u22A9": "Vdash", "\u22AE": "nVdash", "\u22AA": "Vvdash", "\u22AB": "VDash", "\u22AF": "nVDash", "\u22B0": "prurel", "\u22B2": "vltri", "\u22EA": "nltri", "\u22B3": "vrtri", "\u22EB": "nrtri", "\u22B4": "ltrie", "\u22EC": "nltrie", "\u22B4\u20D2": "nvltrie", "\u22B5": "rtrie", "\u22ED": "nrtrie", "\u22B5\u20D2": "nvrtrie", "\u22B6": "origof", "\u22B7": "imof", "\u22B8": "mumap", "\u22B9": "hercon", "\u22BA": "intcal", "\u22BB": "veebar", "\u22BD": "barvee", "\u22BE": "angrtvb", "\u22BF": "lrtri", "\u22C0": "Wedge", "\u22C1": "Vee", "\u22C2": "xcap", "\u22C3": "xcup", "\u22C4": "diam", "\u22C5": "sdot", "\u22C6": "Star", "\u22C7": "divonx", "\u22C8": "bowtie", "\u22C9": "ltimes", "\u22CA": "rtimes", "\u22CB": "lthree", "\u22CC": "rthree", "\u22CD": "bsime", "\u22CE": "cuvee", "\u22CF": "cuwed", "\u22D0": "Sub", "\u22D1": "Sup", "\u22D2": "Cap", "\u22D3": "Cup", "\u22D4": "fork", "\u22D5": "epar", "\u22D6": "ltdot", "\u22D7": "gtdot", "\u22D8": "Ll", "\u22D8\u0338": "nLl", "\u22D9": "Gg", "\u22D9\u0338": "nGg", "\u22DA\uFE00": "lesg", "\u22DA": "leg", "\u22DB": "gel", "\u22DB\uFE00": "gesl", "\u22DE": "cuepr", "\u22DF": "cuesc", "\u22E6": "lnsim", "\u22E7": "gnsim", "\u22E8": "prnsim", "\u22E9": "scnsim", "\u22EE": "vellip", "\u22EF": "ctdot", "\u22F0": "utdot", "\u22F1": "dtdot", "\u22F2": "disin", "\u22F3": "isinsv", "\u22F4": "isins", "\u22F5": "isindot", "\u22F5\u0338": "notindot", "\u22F6": "notinvc", "\u22F7": "notinvb", "\u22F9": "isinE", "\u22F9\u0338": "notinE", "\u22FA": "nisd", "\u22FB": "xnis", "\u22FC": "nis", "\u22FD": "notnivc", "\u22FE": "notnivb", "\u2305": "barwed", "\u2306": "Barwed", "\u230C": "drcrop", "\u230D": "dlcrop", "\u230E": "urcrop", "\u230F": "ulcrop", "\u2310": "bnot", "\u2312": "profline", "\u2313": "profsurf", "\u2315": "telrec", "\u2316": "target", "\u231C": "ulcorn", "\u231D": "urcorn", "\u231E": "dlcorn", "\u231F": "drcorn", "\u2322": "frown", "\u2323": "smile", "\u232D": "cylcty", "\u232E": "profalar", "\u2336": "topbot", "\u233D": "ovbar", "\u233F": "solbar", "\u237C": "angzarr", "\u23B0": "lmoust", "\u23B1": "rmoust", "\u23B4": "tbrk", "\u23B5": "bbrk", "\u23B6": "bbrktbrk", "\u23DC": "OverParenthesis", "\u23DD": "UnderParenthesis", "\u23DE": "OverBrace", "\u23DF": "UnderBrace", "\u23E2": "trpezium", "\u23E7": "elinters", "\u2423": "blank", "\u2500": "boxh", "\u2502": "boxv", "\u250C": "boxdr", "\u2510": "boxdl", "\u2514": "boxur", "\u2518": "boxul", "\u251C": "boxvr", "\u2524": "boxvl", "\u252C": "boxhd", "\u2534": "boxhu", "\u253C": "boxvh", "\u2550": "boxH", "\u2551": "boxV", "\u2552": "boxdR", "\u2553": "boxDr", "\u2554": "boxDR", "\u2555": "boxdL", "\u2556": "boxDl", "\u2557": "boxDL", "\u2558": "boxuR", "\u2559": "boxUr", "\u255A": "boxUR", "\u255B": "boxuL", "\u255C": "boxUl", "\u255D": "boxUL", "\u255E": "boxvR", "\u255F": "boxVr", "\u2560": "boxVR", "\u2561": "boxvL", "\u2562": "boxVl", "\u2563": "boxVL", "\u2564": "boxHd", "\u2565": "boxhD", "\u2566": "boxHD", "\u2567": "boxHu", "\u2568": "boxhU", "\u2569": "boxHU", "\u256A": "boxvH", "\u256B": "boxVh", "\u256C": "boxVH", "\u2580": "uhblk", "\u2584": "lhblk", "\u2588": "block", "\u2591": "blk14", "\u2592": "blk12", "\u2593": "blk34", "\u25A1": "squ", "\u25AA": "squf", "\u25AB": "EmptyVerySmallSquare", "\u25AD": "rect", "\u25AE": "marker", "\u25B1": "fltns", "\u25B3": "xutri", "\u25B4": "utrif", "\u25B5": "utri", "\u25B8": "rtrif", "\u25B9": "rtri", "\u25BD": "xdtri", "\u25BE": "dtrif", "\u25BF": "dtri", "\u25C2": "ltrif", "\u25C3": "ltri", "\u25CA": "loz", "\u25CB": "cir", "\u25EC": "tridot", "\u25EF": "xcirc", "\u25F8": "ultri", "\u25F9": "urtri", "\u25FA": "lltri", "\u25FB": "EmptySmallSquare", "\u25FC": "FilledSmallSquare", "\u2605": "starf", "\u2606": "star", "\u260E": "phone", "\u2640": "female", "\u2642": "male", "\u2660": "spades", "\u2663": "clubs", "\u2665": "hearts", "\u2666": "diams", "\u266A": "sung", "\u2713": "check", "\u2717": "cross", "\u2720": "malt", "\u2736": "sext", "\u2758": "VerticalSeparator", "\u27C8": "bsolhsub", "\u27C9": "suphsol", "\u27F5": "xlarr", "\u27F6": "xrarr", "\u27F7": "xharr", "\u27F8": "xlArr", "\u27F9": "xrArr", "\u27FA": "xhArr", "\u27FC": "xmap", "\u27FF": "dzigrarr", "\u2902": "nvlArr", "\u2903": "nvrArr", "\u2904": "nvHarr", "\u2905": "Map", "\u290C": "lbarr", "\u290D": "rbarr", "\u290E": "lBarr", "\u290F": "rBarr", "\u2910": "RBarr", "\u2911": "DDotrahd", "\u2912": "UpArrowBar", "\u2913": "DownArrowBar", "\u2916": "Rarrtl", "\u2919": "latail", "\u291A": "ratail", "\u291B": "lAtail", "\u291C": "rAtail", "\u291D": "larrfs", "\u291E": "rarrfs", "\u291F": "larrbfs", "\u2920": "rarrbfs", "\u2923": "nwarhk", "\u2924": "nearhk", "\u2925": "searhk", "\u2926": "swarhk", "\u2927": "nwnear", "\u2928": "toea", "\u2929": "tosa", "\u292A": "swnwar", "\u2933": "rarrc", "\u2933\u0338": "nrarrc", "\u2935": "cudarrr", "\u2936": "ldca", "\u2937": "rdca", "\u2938": "cudarrl", "\u2939": "larrpl", "\u293C": "curarrm", "\u293D": "cularrp", "\u2945": "rarrpl", "\u2948": "harrcir", "\u2949": "Uarrocir", "\u294A": "lurdshar", "\u294B": "ldrushar", "\u294E": "LeftRightVector", "\u294F": "RightUpDownVector", "\u2950": "DownLeftRightVector", "\u2951": "LeftUpDownVector", "\u2952": "LeftVectorBar", "\u2953": "RightVectorBar", "\u2954": "RightUpVectorBar", "\u2955": "RightDownVectorBar", "\u2956": "DownLeftVectorBar", "\u2957": "DownRightVectorBar", "\u2958": "LeftUpVectorBar", "\u2959": "LeftDownVectorBar", "\u295A": "LeftTeeVector", "\u295B": "RightTeeVector", "\u295C": "RightUpTeeVector", "\u295D": "RightDownTeeVector", "\u295E": "DownLeftTeeVector", "\u295F": "DownRightTeeVector", "\u2960": "LeftUpTeeVector", "\u2961": "LeftDownTeeVector", "\u2962": "lHar", "\u2963": "uHar", "\u2964": "rHar", "\u2965": "dHar", "\u2966": "luruhar", "\u2967": "ldrdhar", "\u2968": "ruluhar", "\u2969": "rdldhar", "\u296A": "lharul", "\u296B": "llhard", "\u296C": "rharul", "\u296D": "lrhard", "\u296E": "udhar", "\u296F": "duhar", "\u2970": "RoundImplies", "\u2971": "erarr", "\u2972": "simrarr", "\u2973": "larrsim", "\u2974": "rarrsim", "\u2975": "rarrap", "\u2976": "ltlarr", "\u2978": "gtrarr", "\u2979": "subrarr", "\u297B": "suplarr", "\u297C": "lfisht", "\u297D": "rfisht", "\u297E": "ufisht", "\u297F": "dfisht", "\u299A": "vzigzag", "\u299C": "vangrt", "\u299D": "angrtvbd", "\u29A4": "ange", "\u29A5": "range", "\u29A6": "dwangle", "\u29A7": "uwangle", "\u29A8": "angmsdaa", "\u29A9": "angmsdab", "\u29AA": "angmsdac", "\u29AB": "angmsdad", "\u29AC": "angmsdae", "\u29AD": "angmsdaf", "\u29AE": "angmsdag", "\u29AF": "angmsdah", "\u29B0": "bemptyv", "\u29B1": "demptyv", "\u29B2": "cemptyv", "\u29B3": "raemptyv", "\u29B4": "laemptyv", "\u29B5": "ohbar", "\u29B6": "omid", "\u29B7": "opar", "\u29B9": "operp", "\u29BB": "olcross", "\u29BC": "odsold", "\u29BE": "olcir", "\u29BF": "ofcir", "\u29C0": "olt", "\u29C1": "ogt", "\u29C2": "cirscir", "\u29C3": "cirE", "\u29C4": "solb", "\u29C5": "bsolb", "\u29C9": "boxbox", "\u29CD": "trisb", "\u29CE": "rtriltri", "\u29CF": "LeftTriangleBar", "\u29CF\u0338": "NotLeftTriangleBar", "\u29D0": "RightTriangleBar", "\u29D0\u0338": "NotRightTriangleBar", "\u29DC": "iinfin", "\u29DD": "infintie", "\u29DE": "nvinfin", "\u29E3": "eparsl", "\u29E4": "smeparsl", "\u29E5": "eqvparsl", "\u29EB": "lozf", "\u29F4": "RuleDelayed", "\u29F6": "dsol", "\u2A00": "xodot", "\u2A01": "xoplus", "\u2A02": "xotime", "\u2A04": "xuplus", "\u2A06": "xsqcup", "\u2A0D": "fpartint", "\u2A10": "cirfnint", "\u2A11": "awint", "\u2A12": "rppolint", "\u2A13": "scpolint", "\u2A14": "npolint", "\u2A15": "pointint", "\u2A16": "quatint", "\u2A17": "intlarhk", "\u2A22": "pluscir", "\u2A23": "plusacir", "\u2A24": "simplus", "\u2A25": "plusdu", "\u2A26": "plussim", "\u2A27": "plustwo", "\u2A29": "mcomma", "\u2A2A": "minusdu", "\u2A2D": "loplus", "\u2A2E": "roplus", "\u2A2F": "Cross", "\u2A30": "timesd", "\u2A31": "timesbar", "\u2A33": "smashp", "\u2A34": "lotimes", "\u2A35": "rotimes", "\u2A36": "otimesas", "\u2A37": "Otimes", "\u2A38": "odiv", "\u2A39": "triplus", "\u2A3A": "triminus", "\u2A3B": "tritime", "\u2A3C": "iprod", "\u2A3F": "amalg", "\u2A40": "capdot", "\u2A42": "ncup", "\u2A43": "ncap", "\u2A44": "capand", "\u2A45": "cupor", "\u2A46": "cupcap", "\u2A47": "capcup", "\u2A48": "cupbrcap", "\u2A49": "capbrcup", "\u2A4A": "cupcup", "\u2A4B": "capcap", "\u2A4C": "ccups", "\u2A4D": "ccaps", "\u2A50": "ccupssm", "\u2A53": "And", "\u2A54": "Or", "\u2A55": "andand", "\u2A56": "oror", "\u2A57": "orslope", "\u2A58": "andslope", "\u2A5A": "andv", "\u2A5B": "orv", "\u2A5C": "andd", "\u2A5D": "ord", "\u2A5F": "wedbar", "\u2A66": "sdote", "\u2A6A": "simdot", "\u2A6D": "congdot", "\u2A6D\u0338": "ncongdot", "\u2A6E": "easter", "\u2A6F": "apacir", "\u2A70": "apE", "\u2A70\u0338": "napE", "\u2A71": "eplus", "\u2A72": "pluse", "\u2A73": "Esim", "\u2A77": "eDDot", "\u2A78": "equivDD", "\u2A79": "ltcir", "\u2A7A": "gtcir", "\u2A7B": "ltquest", "\u2A7C": "gtquest", "\u2A7D": "les", "\u2A7D\u0338": "nles", "\u2A7E": "ges", "\u2A7E\u0338": "nges", "\u2A7F": "lesdot", "\u2A80": "gesdot", "\u2A81": "lesdoto", "\u2A82": "gesdoto", "\u2A83": "lesdotor", "\u2A84": "gesdotol", "\u2A85": "lap", "\u2A86": "gap", "\u2A87": "lne", "\u2A88": "gne", "\u2A89": "lnap", "\u2A8A": "gnap", "\u2A8B": "lEg", "\u2A8C": "gEl", "\u2A8D": "lsime", "\u2A8E": "gsime", "\u2A8F": "lsimg", "\u2A90": "gsiml", "\u2A91": "lgE", "\u2A92": "glE", "\u2A93": "lesges", "\u2A94": "gesles", "\u2A95": "els", "\u2A96": "egs", "\u2A97": "elsdot", "\u2A98": "egsdot", "\u2A99": "el", "\u2A9A": "eg", "\u2A9D": "siml", "\u2A9E": "simg", "\u2A9F": "simlE", "\u2AA0": "simgE", "\u2AA1": "LessLess", "\u2AA1\u0338": "NotNestedLessLess", "\u2AA2": "GreaterGreater", "\u2AA2\u0338": "NotNestedGreaterGreater", "\u2AA4": "glj", "\u2AA5": "gla", "\u2AA6": "ltcc", "\u2AA7": "gtcc", "\u2AA8": "lescc", "\u2AA9": "gescc", "\u2AAA": "smt", "\u2AAB": "lat", "\u2AAC": "smte", "\u2AAC\uFE00": "smtes", "\u2AAD": "late", "\u2AAD\uFE00": "lates", "\u2AAE": "bumpE", "\u2AAF": "pre", "\u2AAF\u0338": "npre", "\u2AB0": "sce", "\u2AB0\u0338": "nsce", "\u2AB3": "prE", "\u2AB4": "scE", "\u2AB5": "prnE", "\u2AB6": "scnE", "\u2AB7": "prap", "\u2AB8": "scap", "\u2AB9": "prnap", "\u2ABA": "scnap", "\u2ABB": "Pr", "\u2ABC": "Sc", "\u2ABD": "subdot", "\u2ABE": "supdot", "\u2ABF": "subplus", "\u2AC0": "supplus", "\u2AC1": "submult", "\u2AC2": "supmult", "\u2AC3": "subedot", "\u2AC4": "supedot", "\u2AC5": "subE", "\u2AC5\u0338": "nsubE", "\u2AC6": "supE", "\u2AC6\u0338": "nsupE", "\u2AC7": "subsim", "\u2AC8": "supsim", "\u2ACB\uFE00": "vsubnE", "\u2ACB": "subnE", "\u2ACC\uFE00": "vsupnE", "\u2ACC": "supnE", "\u2ACF": "csub", "\u2AD0": "csup", "\u2AD1": "csube", "\u2AD2": "csupe", "\u2AD3": "subsup", "\u2AD4": "supsub", "\u2AD5": "subsub", "\u2AD6": "supsup", "\u2AD7": "suphsub", "\u2AD8": "supdsub", "\u2AD9": "forkv", "\u2ADA": "topfork", "\u2ADB": "mlcp", "\u2AE4": "Dashv", "\u2AE6": "Vdashl", "\u2AE7": "Barv", "\u2AE8": "vBar", "\u2AE9": "vBarv", "\u2AEB": "Vbar", "\u2AEC": "Not", "\u2AED": "bNot", "\u2AEE": "rnmid", "\u2AEF": "cirmid", "\u2AF0": "midcir", "\u2AF1": "topcir", "\u2AF2": "nhpar", "\u2AF3": "parsim", "\u2AFD": "parsl", "\u2AFD\u20E5": "nparsl", "\u266D": "flat", "\u266E": "natur", "\u266F": "sharp", "\xA4": "curren", "\xA2": "cent", "$": "dollar", "\xA3": "pound", "\xA5": "yen", "\u20AC": "euro", "\xB9": "sup1", "\xBD": "half", "\u2153": "frac13", "\xBC": "frac14", "\u2155": "frac15", "\u2159": "frac16", "\u215B": "frac18", "\xB2": "sup2", "\u2154": "frac23", "\u2156": "frac25", "\xB3": "sup3", "\xBE": "frac34", "\u2157": "frac35", "\u215C": "frac38", "\u2158": "frac45", "\u215A": "frac56", "\u215D": "frac58", "\u215E": "frac78", "\u{1D4B6}": "ascr", "\u{1D552}": "aopf", "\u{1D51E}": "afr", "\u{1D538}": "Aopf", "\u{1D504}": "Afr", "\u{1D49C}": "Ascr", "\xAA": "ordf", "\xE1": "aacute", "\xC1": "Aacute", "\xE0": "agrave", "\xC0": "Agrave", "\u0103": "abreve", "\u0102": "Abreve", "\xE2": "acirc", "\xC2": "Acirc", "\xE5": "aring", "\xC5": "angst", "\xE4": "auml", "\xC4": "Auml", "\xE3": "atilde", "\xC3": "Atilde", "\u0105": "aogon", "\u0104": "Aogon", "\u0101": "amacr", "\u0100": "Amacr", "\xE6": "aelig", "\xC6": "AElig", "\u{1D4B7}": "bscr", "\u{1D553}": "bopf", "\u{1D51F}": "bfr", "\u{1D539}": "Bopf", "\u212C": "Bscr", "\u{1D505}": "Bfr", "\u{1D520}": "cfr", "\u{1D4B8}": "cscr", "\u{1D554}": "copf", "\u212D": "Cfr", "\u{1D49E}": "Cscr", "\u2102": "Copf", "\u0107": "cacute", "\u0106": "Cacute", "\u0109": "ccirc", "\u0108": "Ccirc", "\u010D": "ccaron", "\u010C": "Ccaron", "\u010B": "cdot", "\u010A": "Cdot", "\xE7": "ccedil", "\xC7": "Ccedil", "\u2105": "incare", "\u{1D521}": "dfr", "\u2146": "dd", "\u{1D555}": "dopf", "\u{1D4B9}": "dscr", "\u{1D49F}": "Dscr", "\u{1D507}": "Dfr", "\u2145": "DD", "\u{1D53B}": "Dopf", "\u010F": "dcaron", "\u010E": "Dcaron", "\u0111": "dstrok", "\u0110": "Dstrok", "\xF0": "eth", "\xD0": "ETH", "\u2147": "ee", "\u212F": "escr", "\u{1D522}": "efr", "\u{1D556}": "eopf", "\u2130": "Escr", "\u{1D508}": "Efr", "\u{1D53C}": "Eopf", "\xE9": "eacute", "\xC9": "Eacute", "\xE8": "egrave", "\xC8": "Egrave", "\xEA": "ecirc", "\xCA": "Ecirc", "\u011B": "ecaron", "\u011A": "Ecaron", "\xEB": "euml", "\xCB": "Euml", "\u0117": "edot", "\u0116": "Edot", "\u0119": "eogon", "\u0118": "Eogon", "\u0113": "emacr", "\u0112": "Emacr", "\u{1D523}": "ffr", "\u{1D557}": "fopf", "\u{1D4BB}": "fscr", "\u{1D509}": "Ffr", "\u{1D53D}": "Fopf", "\u2131": "Fscr", "\uFB00": "fflig", "\uFB03": "ffilig", "\uFB04": "ffllig", "\uFB01": "filig", "fj": "fjlig", "\uFB02": "fllig", "\u0192": "fnof", "\u210A": "gscr", "\u{1D558}": "gopf", "\u{1D524}": "gfr", "\u{1D4A2}": "Gscr", "\u{1D53E}": "Gopf", "\u{1D50A}": "Gfr", "\u01F5": "gacute", "\u011F": "gbreve", "\u011E": "Gbreve", "\u011D": "gcirc", "\u011C": "Gcirc", "\u0121": "gdot", "\u0120": "Gdot", "\u0122": "Gcedil", "\u{1D525}": "hfr", "\u210E": "planckh", "\u{1D4BD}": "hscr", "\u{1D559}": "hopf", "\u210B": "Hscr", "\u210C": "Hfr", "\u210D": "Hopf", "\u0125": "hcirc", "\u0124": "Hcirc", "\u210F": "hbar", "\u0127": "hstrok", "\u0126": "Hstrok", "\u{1D55A}": "iopf", "\u{1D526}": "ifr", "\u{1D4BE}": "iscr", "\u2148": "ii", "\u{1D540}": "Iopf", "\u2110": "Iscr", "\u2111": "Im", "\xED": "iacute", "\xCD": "Iacute", "\xEC": "igrave", "\xCC": "Igrave", "\xEE": "icirc", "\xCE": "Icirc", "\xEF": "iuml", "\xCF": "Iuml", "\u0129": "itilde", "\u0128": "Itilde", "\u0130": "Idot", "\u012F": "iogon", "\u012E": "Iogon", "\u012B": "imacr", "\u012A": "Imacr", "\u0133": "ijlig", "\u0132": "IJlig", "\u0131": "imath", "\u{1D4BF}": "jscr", "\u{1D55B}": "jopf", "\u{1D527}": "jfr", "\u{1D4A5}": "Jscr", "\u{1D50D}": "Jfr", "\u{1D541}": "Jopf", "\u0135": "jcirc", "\u0134": "Jcirc", "\u0237": "jmath", "\u{1D55C}": "kopf", "\u{1D4C0}": "kscr", "\u{1D528}": "kfr", "\u{1D4A6}": "Kscr", "\u{1D542}": "Kopf", "\u{1D50E}": "Kfr", "\u0137": "kcedil", "\u0136": "Kcedil", "\u{1D529}": "lfr", "\u{1D4C1}": "lscr", "\u2113": "ell", "\u{1D55D}": "lopf", "\u2112": "Lscr", "\u{1D50F}": "Lfr", "\u{1D543}": "Lopf", "\u013A": "lacute", "\u0139": "Lacute", "\u013E": "lcaron", "\u013D": "Lcaron", "\u013C": "lcedil", "\u013B": "Lcedil", "\u0142": "lstrok", "\u0141": "Lstrok", "\u0140": "lmidot", "\u013F": "Lmidot", "\u{1D52A}": "mfr", "\u{1D55E}": "mopf", "\u{1D4C2}": "mscr", "\u{1D510}": "Mfr", "\u{1D544}": "Mopf", "\u2133": "Mscr", "\u{1D52B}": "nfr", "\u{1D55F}": "nopf", "\u{1D4C3}": "nscr", "\u2115": "Nopf", "\u{1D4A9}": "Nscr", "\u{1D511}": "Nfr", "\u0144": "nacute", "\u0143": "Nacute", "\u0148": "ncaron", "\u0147": "Ncaron", "\xF1": "ntilde", "\xD1": "Ntilde", "\u0146": "ncedil", "\u0145": "Ncedil", "\u2116": "numero", "\u014B": "eng", "\u014A": "ENG", "\u{1D560}": "oopf", "\u{1D52C}": "ofr", "\u2134": "oscr", "\u{1D4AA}": "Oscr", "\u{1D512}": "Ofr", "\u{1D546}": "Oopf", "\xBA": "ordm", "\xF3": "oacute", "\xD3": "Oacute", "\xF2": "ograve", "\xD2": "Ograve", "\xF4": "ocirc", "\xD4": "Ocirc", "\xF6": "ouml", "\xD6": "Ouml", "\u0151": "odblac", "\u0150": "Odblac", "\xF5": "otilde", "\xD5": "Otilde", "\xF8": "oslash", "\xD8": "Oslash", "\u014D": "omacr", "\u014C": "Omacr", "\u0153": "oelig", "\u0152": "OElig", "\u{1D52D}": "pfr", "\u{1D4C5}": "pscr", "\u{1D561}": "popf", "\u2119": "Popf", "\u{1D513}": "Pfr", "\u{1D4AB}": "Pscr", "\u{1D562}": "qopf", "\u{1D52E}": "qfr", "\u{1D4C6}": "qscr", "\u{1D4AC}": "Qscr", "\u{1D514}": "Qfr", "\u211A": "Qopf", "\u0138": "kgreen", "\u{1D52F}": "rfr", "\u{1D563}": "ropf", "\u{1D4C7}": "rscr", "\u211B": "Rscr", "\u211C": "Re", "\u211D": "Ropf", "\u0155": "racute", "\u0154": "Racute", "\u0159": "rcaron", "\u0158": "Rcaron", "\u0157": "rcedil", "\u0156": "Rcedil", "\u{1D564}": "sopf", "\u{1D4C8}": "sscr", "\u{1D530}": "sfr", "\u{1D54A}": "Sopf", "\u{1D516}": "Sfr", "\u{1D4AE}": "Sscr", "\u24C8": "oS", "\u015B": "sacute", "\u015A": "Sacute", "\u015D": "scirc", "\u015C": "Scirc", "\u0161": "scaron", "\u0160": "Scaron", "\u015F": "scedil", "\u015E": "Scedil", "\xDF": "szlig", "\u{1D531}": "tfr", "\u{1D4C9}": "tscr", "\u{1D565}": "topf", "\u{1D4AF}": "Tscr", "\u{1D517}": "Tfr", "\u{1D54B}": "Topf", "\u0165": "tcaron", "\u0164": "Tcaron", "\u0163": "tcedil", "\u0162": "Tcedil", "\u2122": "trade", "\u0167": "tstrok", "\u0166": "Tstrok", "\u{1D4CA}": "uscr", "\u{1D566}": "uopf", "\u{1D532}": "ufr", "\u{1D54C}": "Uopf", "\u{1D518}": "Ufr", "\u{1D4B0}": "Uscr", "\xFA": "uacute", "\xDA": "Uacute", "\xF9": "ugrave", "\xD9": "Ugrave", "\u016D": "ubreve", "\u016C": "Ubreve", "\xFB": "ucirc", "\xDB": "Ucirc", "\u016F": "uring", "\u016E": "Uring", "\xFC": "uuml", "\xDC": "Uuml", "\u0171": "udblac", "\u0170": "Udblac", "\u0169": "utilde", "\u0168": "Utilde", "\u0173": "uogon", "\u0172": "Uogon", "\u016B": "umacr", "\u016A": "Umacr", "\u{1D533}": "vfr", "\u{1D567}": "vopf", "\u{1D4CB}": "vscr", "\u{1D519}": "Vfr", "\u{1D54D}": "Vopf", "\u{1D4B1}": "Vscr", "\u{1D568}": "wopf", "\u{1D4CC}": "wscr", "\u{1D534}": "wfr", "\u{1D4B2}": "Wscr", "\u{1D54E}": "Wopf", "\u{1D51A}": "Wfr", "\u0175": "wcirc", "\u0174": "Wcirc", "\u{1D535}": "xfr", "\u{1D4CD}": "xscr", "\u{1D569}": "xopf", "\u{1D54F}": "Xopf", "\u{1D51B}": "Xfr", "\u{1D4B3}": "Xscr", "\u{1D536}": "yfr", "\u{1D4CE}": "yscr", "\u{1D56A}": "yopf", "\u{1D4B4}": "Yscr", "\u{1D51C}": "Yfr", "\u{1D550}": "Yopf", "\xFD": "yacute", "\xDD": "Yacute", "\u0177": "ycirc", "\u0176": "Ycirc", "\xFF": "yuml", "\u0178": "Yuml", "\u{1D4CF}": "zscr", "\u{1D537}": "zfr", "\u{1D56B}": "zopf", "\u2128": "Zfr", "\u2124": "Zopf", "\u{1D4B5}": "Zscr", "\u017A": "zacute", "\u0179": "Zacute", "\u017E": "zcaron", "\u017D": "Zcaron", "\u017C": "zdot", "\u017B": "Zdot", "\u01B5": "imped", "\xFE": "thorn", "\xDE": "THORN", "\u0149": "napos", "\u03B1": "alpha", "\u0391": "Alpha", "\u03B2": "beta", "\u0392": "Beta", "\u03B3": "gamma", "\u0393": "Gamma", "\u03B4": "delta", "\u0394": "Delta", "\u03B5": "epsi", "\u03F5": "epsiv", "\u0395": "Epsilon", "\u03DD": "gammad", "\u03DC": "Gammad", "\u03B6": "zeta", "\u0396": "Zeta", "\u03B7": "eta", "\u0397": "Eta", "\u03B8": "theta", "\u03D1": "thetav", "\u0398": "Theta", "\u03B9": "iota", "\u0399": "Iota", "\u03BA": "kappa", "\u03F0": "kappav", "\u039A": "Kappa", "\u03BB": "lambda", "\u039B": "Lambda", "\u03BC": "mu", "\xB5": "micro", "\u039C": "Mu", "\u03BD": "nu", "\u039D": "Nu", "\u03BE": "xi", "\u039E": "Xi", "\u03BF": "omicron", "\u039F": "Omicron", "\u03C0": "pi", "\u03D6": "piv", "\u03A0": "Pi", "\u03C1": "rho", "\u03F1": "rhov", "\u03A1": "Rho", "\u03C3": "sigma", "\u03A3": "Sigma", "\u03C2": "sigmaf", "\u03C4": "tau", "\u03A4": "Tau", "\u03C5": "upsi", "\u03A5": "Upsilon", "\u03D2": "Upsi", "\u03C6": "phi", "\u03D5": "phiv", "\u03A6": "Phi", "\u03C7": "chi", "\u03A7": "Chi", "\u03C8": "psi", "\u03A8": "Psi", "\u03C9": "omega", "\u03A9": "ohm", "\u0430": "acy", "\u0410": "Acy", "\u0431": "bcy", "\u0411": "Bcy", "\u0432": "vcy", "\u0412": "Vcy", "\u0433": "gcy", "\u0413": "Gcy", "\u0453": "gjcy", "\u0403": "GJcy", "\u0434": "dcy", "\u0414": "Dcy", "\u0452": "djcy", "\u0402": "DJcy", "\u0435": "iecy", "\u0415": "IEcy", "\u0451": "iocy", "\u0401": "IOcy", "\u0454": "jukcy", "\u0404": "Jukcy", "\u0436": "zhcy", "\u0416": "ZHcy", "\u0437": "zcy", "\u0417": "Zcy", "\u0455": "dscy", "\u0405": "DScy", "\u0438": "icy", "\u0418": "Icy", "\u0456": "iukcy", "\u0406": "Iukcy", "\u0457": "yicy", "\u0407": "YIcy", "\u0439": "jcy", "\u0419": "Jcy", "\u0458": "jsercy", "\u0408": "Jsercy", "\u043A": "kcy", "\u041A": "Kcy", "\u045C": "kjcy", "\u040C": "KJcy", "\u043B": "lcy", "\u041B": "Lcy", "\u0459": "ljcy", "\u0409": "LJcy", "\u043C": "mcy", "\u041C": "Mcy", "\u043D": "ncy", "\u041D": "Ncy", "\u045A": "njcy", "\u040A": "NJcy", "\u043E": "ocy", "\u041E": "Ocy", "\u043F": "pcy", "\u041F": "Pcy", "\u0440": "rcy", "\u0420": "Rcy", "\u0441": "scy", "\u0421": "Scy", "\u0442": "tcy", "\u0422": "Tcy", "\u045B": "tshcy", "\u040B": "TSHcy", "\u0443": "ucy", "\u0423": "Ucy", "\u045E": "ubrcy", "\u040E": "Ubrcy", "\u0444": "fcy", "\u0424": "Fcy", "\u0445": "khcy", "\u0425": "KHcy", "\u0446": "tscy", "\u0426": "TScy", "\u0447": "chcy", "\u0427": "CHcy", "\u045F": "dzcy", "\u040F": "DZcy", "\u0448": "shcy", "\u0428": "SHcy", "\u0449": "shchcy", "\u0429": "SHCHcy", "\u044A": "hardcy", "\u042A": "HARDcy", "\u044B": "ycy", "\u042B": "Ycy", "\u044C": "softcy", "\u042C": "SOFTcy", "\u044D": "ecy", "\u042D": "Ecy", "\u044E": "yucy", "\u042E": "YUcy", "\u044F": "yacy", "\u042F": "YAcy", "\u2135": "aleph", "\u2136": "beth", "\u2137": "gimel", "\u2138": "daleth" };
+ var regexEscape = /["&'<>`]/g;
+ var escapeMap = {
+ '"': """,
+ "&": "&",
+ "'": "'",
+ "<": "<",
+ ">": ">",
+ "`": "`"
+ };
+ var regexInvalidEntity = /(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
+ var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+ var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|([0-9]+)(;?)|[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
+ var decodeMap = { "aacute": "\xE1", "Aacute": "\xC1", "abreve": "\u0103", "Abreve": "\u0102", "ac": "\u223E", "acd": "\u223F", "acE": "\u223E\u0333", "acirc": "\xE2", "Acirc": "\xC2", "acute": "\xB4", "acy": "\u0430", "Acy": "\u0410", "aelig": "\xE6", "AElig": "\xC6", "af": "\u2061", "afr": "\u{1D51E}", "Afr": "\u{1D504}", "agrave": "\xE0", "Agrave": "\xC0", "alefsym": "\u2135", "aleph": "\u2135", "alpha": "\u03B1", "Alpha": "\u0391", "amacr": "\u0101", "Amacr": "\u0100", "amalg": "\u2A3F", "amp": "&", "AMP": "&", "and": "\u2227", "And": "\u2A53", "andand": "\u2A55", "andd": "\u2A5C", "andslope": "\u2A58", "andv": "\u2A5A", "ang": "\u2220", "ange": "\u29A4", "angle": "\u2220", "angmsd": "\u2221", "angmsdaa": "\u29A8", "angmsdab": "\u29A9", "angmsdac": "\u29AA", "angmsdad": "\u29AB", "angmsdae": "\u29AC", "angmsdaf": "\u29AD", "angmsdag": "\u29AE", "angmsdah": "\u29AF", "angrt": "\u221F", "angrtvb": "\u22BE", "angrtvbd": "\u299D", "angsph": "\u2222", "angst": "\xC5", "angzarr": "\u237C", "aogon": "\u0105", "Aogon": "\u0104", "aopf": "\u{1D552}", "Aopf": "\u{1D538}", "ap": "\u2248", "apacir": "\u2A6F", "ape": "\u224A", "apE": "\u2A70", "apid": "\u224B", "apos": "'", "ApplyFunction": "\u2061", "approx": "\u2248", "approxeq": "\u224A", "aring": "\xE5", "Aring": "\xC5", "ascr": "\u{1D4B6}", "Ascr": "\u{1D49C}", "Assign": "\u2254", "ast": "*", "asymp": "\u2248", "asympeq": "\u224D", "atilde": "\xE3", "Atilde": "\xC3", "auml": "\xE4", "Auml": "\xC4", "awconint": "\u2233", "awint": "\u2A11", "backcong": "\u224C", "backepsilon": "\u03F6", "backprime": "\u2035", "backsim": "\u223D", "backsimeq": "\u22CD", "Backslash": "\u2216", "Barv": "\u2AE7", "barvee": "\u22BD", "barwed": "\u2305", "Barwed": "\u2306", "barwedge": "\u2305", "bbrk": "\u23B5", "bbrktbrk": "\u23B6", "bcong": "\u224C", "bcy": "\u0431", "Bcy": "\u0411", "bdquo": "\u201E", "becaus": "\u2235", "because": "\u2235", "Because": "\u2235", "bemptyv": "\u29B0", "bepsi": "\u03F6", "bernou": "\u212C", "Bernoullis": "\u212C", "beta": "\u03B2", "Beta": "\u0392", "beth": "\u2136", "between": "\u226C", "bfr": "\u{1D51F}", "Bfr": "\u{1D505}", "bigcap": "\u22C2", "bigcirc": "\u25EF", "bigcup": "\u22C3", "bigodot": "\u2A00", "bigoplus": "\u2A01", "bigotimes": "\u2A02", "bigsqcup": "\u2A06", "bigstar": "\u2605", "bigtriangledown": "\u25BD", "bigtriangleup": "\u25B3", "biguplus": "\u2A04", "bigvee": "\u22C1", "bigwedge": "\u22C0", "bkarow": "\u290D", "blacklozenge": "\u29EB", "blacksquare": "\u25AA", "blacktriangle": "\u25B4", "blacktriangledown": "\u25BE", "blacktriangleleft": "\u25C2", "blacktriangleright": "\u25B8", "blank": "\u2423", "blk12": "\u2592", "blk14": "\u2591", "blk34": "\u2593", "block": "\u2588", "bne": "=\u20E5", "bnequiv": "\u2261\u20E5", "bnot": "\u2310", "bNot": "\u2AED", "bopf": "\u{1D553}", "Bopf": "\u{1D539}", "bot": "\u22A5", "bottom": "\u22A5", "bowtie": "\u22C8", "boxbox": "\u29C9", "boxdl": "\u2510", "boxdL": "\u2555", "boxDl": "\u2556", "boxDL": "\u2557", "boxdr": "\u250C", "boxdR": "\u2552", "boxDr": "\u2553", "boxDR": "\u2554", "boxh": "\u2500", "boxH": "\u2550", "boxhd": "\u252C", "boxhD": "\u2565", "boxHd": "\u2564", "boxHD": "\u2566", "boxhu": "\u2534", "boxhU": "\u2568", "boxHu": "\u2567", "boxHU": "\u2569", "boxminus": "\u229F", "boxplus": "\u229E", "boxtimes": "\u22A0", "boxul": "\u2518", "boxuL": "\u255B", "boxUl": "\u255C", "boxUL": "\u255D", "boxur": "\u2514", "boxuR": "\u2558", "boxUr": "\u2559", "boxUR": "\u255A", "boxv": "\u2502", "boxV": "\u2551", "boxvh": "\u253C", "boxvH": "\u256A", "boxVh": "\u256B", "boxVH": "\u256C", "boxvl": "\u2524", "boxvL": "\u2561", "boxVl": "\u2562", "boxVL": "\u2563", "boxvr": "\u251C", "boxvR": "\u255E", "boxVr": "\u255F", "boxVR": "\u2560", "bprime": "\u2035", "breve": "\u02D8", "Breve": "\u02D8", "brvbar": "\xA6", "bscr": "\u{1D4B7}", "Bscr": "\u212C", "bsemi": "\u204F", "bsim": "\u223D", "bsime": "\u22CD", "bsol": "\\", "bsolb": "\u29C5", "bsolhsub": "\u27C8", "bull": "\u2022", "bullet": "\u2022", "bump": "\u224E", "bumpe": "\u224F", "bumpE": "\u2AAE", "bumpeq": "\u224F", "Bumpeq": "\u224E", "cacute": "\u0107", "Cacute": "\u0106", "cap": "\u2229", "Cap": "\u22D2", "capand": "\u2A44", "capbrcup": "\u2A49", "capcap": "\u2A4B", "capcup": "\u2A47", "capdot": "\u2A40", "CapitalDifferentialD": "\u2145", "caps": "\u2229\uFE00", "caret": "\u2041", "caron": "\u02C7", "Cayleys": "\u212D", "ccaps": "\u2A4D", "ccaron": "\u010D", "Ccaron": "\u010C", "ccedil": "\xE7", "Ccedil": "\xC7", "ccirc": "\u0109", "Ccirc": "\u0108", "Cconint": "\u2230", "ccups": "\u2A4C", "ccupssm": "\u2A50", "cdot": "\u010B", "Cdot": "\u010A", "cedil": "\xB8", "Cedilla": "\xB8", "cemptyv": "\u29B2", "cent": "\xA2", "centerdot": "\xB7", "CenterDot": "\xB7", "cfr": "\u{1D520}", "Cfr": "\u212D", "chcy": "\u0447", "CHcy": "\u0427", "check": "\u2713", "checkmark": "\u2713", "chi": "\u03C7", "Chi": "\u03A7", "cir": "\u25CB", "circ": "\u02C6", "circeq": "\u2257", "circlearrowleft": "\u21BA", "circlearrowright": "\u21BB", "circledast": "\u229B", "circledcirc": "\u229A", "circleddash": "\u229D", "CircleDot": "\u2299", "circledR": "\xAE", "circledS": "\u24C8", "CircleMinus": "\u2296", "CirclePlus": "\u2295", "CircleTimes": "\u2297", "cire": "\u2257", "cirE": "\u29C3", "cirfnint": "\u2A10", "cirmid": "\u2AEF", "cirscir": "\u29C2", "ClockwiseContourIntegral": "\u2232", "CloseCurlyDoubleQuote": "\u201D", "CloseCurlyQuote": "\u2019", "clubs": "\u2663", "clubsuit": "\u2663", "colon": ":", "Colon": "\u2237", "colone": "\u2254", "Colone": "\u2A74", "coloneq": "\u2254", "comma": ",", "commat": "@", "comp": "\u2201", "compfn": "\u2218", "complement": "\u2201", "complexes": "\u2102", "cong": "\u2245", "congdot": "\u2A6D", "Congruent": "\u2261", "conint": "\u222E", "Conint": "\u222F", "ContourIntegral": "\u222E", "copf": "\u{1D554}", "Copf": "\u2102", "coprod": "\u2210", "Coproduct": "\u2210", "copy": "\xA9", "COPY": "\xA9", "copysr": "\u2117", "CounterClockwiseContourIntegral": "\u2233", "crarr": "\u21B5", "cross": "\u2717", "Cross": "\u2A2F", "cscr": "\u{1D4B8}", "Cscr": "\u{1D49E}", "csub": "\u2ACF", "csube": "\u2AD1", "csup": "\u2AD0", "csupe": "\u2AD2", "ctdot": "\u22EF", "cudarrl": "\u2938", "cudarrr": "\u2935", "cuepr": "\u22DE", "cuesc": "\u22DF", "cularr": "\u21B6", "cularrp": "\u293D", "cup": "\u222A", "Cup": "\u22D3", "cupbrcap": "\u2A48", "cupcap": "\u2A46", "CupCap": "\u224D", "cupcup": "\u2A4A", "cupdot": "\u228D", "cupor": "\u2A45", "cups": "\u222A\uFE00", "curarr": "\u21B7", "curarrm": "\u293C", "curlyeqprec": "\u22DE", "curlyeqsucc": "\u22DF", "curlyvee": "\u22CE", "curlywedge": "\u22CF", "curren": "\xA4", "curvearrowleft": "\u21B6", "curvearrowright": "\u21B7", "cuvee": "\u22CE", "cuwed": "\u22CF", "cwconint": "\u2232", "cwint": "\u2231", "cylcty": "\u232D", "dagger": "\u2020", "Dagger": "\u2021", "daleth": "\u2138", "darr": "\u2193", "dArr": "\u21D3", "Darr": "\u21A1", "dash": "\u2010", "dashv": "\u22A3", "Dashv": "\u2AE4", "dbkarow": "\u290F", "dblac": "\u02DD", "dcaron": "\u010F", "Dcaron": "\u010E", "dcy": "\u0434", "Dcy": "\u0414", "dd": "\u2146", "DD": "\u2145", "ddagger": "\u2021", "ddarr": "\u21CA", "DDotrahd": "\u2911", "ddotseq": "\u2A77", "deg": "\xB0", "Del": "\u2207", "delta": "\u03B4", "Delta": "\u0394", "demptyv": "\u29B1", "dfisht": "\u297F", "dfr": "\u{1D521}", "Dfr": "\u{1D507}", "dHar": "\u2965", "dharl": "\u21C3", "dharr": "\u21C2", "DiacriticalAcute": "\xB4", "DiacriticalDot": "\u02D9", "DiacriticalDoubleAcute": "\u02DD", "DiacriticalGrave": "`", "DiacriticalTilde": "\u02DC", "diam": "\u22C4", "diamond": "\u22C4", "Diamond": "\u22C4", "diamondsuit": "\u2666", "diams": "\u2666", "die": "\xA8", "DifferentialD": "\u2146", "digamma": "\u03DD", "disin": "\u22F2", "div": "\xF7", "divide": "\xF7", "divideontimes": "\u22C7", "divonx": "\u22C7", "djcy": "\u0452", "DJcy": "\u0402", "dlcorn": "\u231E", "dlcrop": "\u230D", "dollar": "$", "dopf": "\u{1D555}", "Dopf": "\u{1D53B}", "dot": "\u02D9", "Dot": "\xA8", "DotDot": "\u20DC", "doteq": "\u2250", "doteqdot": "\u2251", "DotEqual": "\u2250", "dotminus": "\u2238", "dotplus": "\u2214", "dotsquare": "\u22A1", "doublebarwedge": "\u2306", "DoubleContourIntegral": "\u222F", "DoubleDot": "\xA8", "DoubleDownArrow": "\u21D3", "DoubleLeftArrow": "\u21D0", "DoubleLeftRightArrow": "\u21D4", "DoubleLeftTee": "\u2AE4", "DoubleLongLeftArrow": "\u27F8", "DoubleLongLeftRightArrow": "\u27FA", "DoubleLongRightArrow": "\u27F9", "DoubleRightArrow": "\u21D2", "DoubleRightTee": "\u22A8", "DoubleUpArrow": "\u21D1", "DoubleUpDownArrow": "\u21D5", "DoubleVerticalBar": "\u2225", "downarrow": "\u2193", "Downarrow": "\u21D3", "DownArrow": "\u2193", "DownArrowBar": "\u2913", "DownArrowUpArrow": "\u21F5", "DownBreve": "\u0311", "downdownarrows": "\u21CA", "downharpoonleft": "\u21C3", "downharpoonright": "\u21C2", "DownLeftRightVector": "\u2950", "DownLeftTeeVector": "\u295E", "DownLeftVector": "\u21BD", "DownLeftVectorBar": "\u2956", "DownRightTeeVector": "\u295F", "DownRightVector": "\u21C1", "DownRightVectorBar": "\u2957", "DownTee": "\u22A4", "DownTeeArrow": "\u21A7", "drbkarow": "\u2910", "drcorn": "\u231F", "drcrop": "\u230C", "dscr": "\u{1D4B9}", "Dscr": "\u{1D49F}", "dscy": "\u0455", "DScy": "\u0405", "dsol": "\u29F6", "dstrok": "\u0111", "Dstrok": "\u0110", "dtdot": "\u22F1", "dtri": "\u25BF", "dtrif": "\u25BE", "duarr": "\u21F5", "duhar": "\u296F", "dwangle": "\u29A6", "dzcy": "\u045F", "DZcy": "\u040F", "dzigrarr": "\u27FF", "eacute": "\xE9", "Eacute": "\xC9", "easter": "\u2A6E", "ecaron": "\u011B", "Ecaron": "\u011A", "ecir": "\u2256", "ecirc": "\xEA", "Ecirc": "\xCA", "ecolon": "\u2255", "ecy": "\u044D", "Ecy": "\u042D", "eDDot": "\u2A77", "edot": "\u0117", "eDot": "\u2251", "Edot": "\u0116", "ee": "\u2147", "efDot": "\u2252", "efr": "\u{1D522}", "Efr": "\u{1D508}", "eg": "\u2A9A", "egrave": "\xE8", "Egrave": "\xC8", "egs": "\u2A96", "egsdot": "\u2A98", "el": "\u2A99", "Element": "\u2208", "elinters": "\u23E7", "ell": "\u2113", "els": "\u2A95", "elsdot": "\u2A97", "emacr": "\u0113", "Emacr": "\u0112", "empty": "\u2205", "emptyset": "\u2205", "EmptySmallSquare": "\u25FB", "emptyv": "\u2205", "EmptyVerySmallSquare": "\u25AB", "emsp": "\u2003", "emsp13": "\u2004", "emsp14": "\u2005", "eng": "\u014B", "ENG": "\u014A", "ensp": "\u2002", "eogon": "\u0119", "Eogon": "\u0118", "eopf": "\u{1D556}", "Eopf": "\u{1D53C}", "epar": "\u22D5", "eparsl": "\u29E3", "eplus": "\u2A71", "epsi": "\u03B5", "epsilon": "\u03B5", "Epsilon": "\u0395", "epsiv": "\u03F5", "eqcirc": "\u2256", "eqcolon": "\u2255", "eqsim": "\u2242", "eqslantgtr": "\u2A96", "eqslantless": "\u2A95", "Equal": "\u2A75", "equals": "=", "EqualTilde": "\u2242", "equest": "\u225F", "Equilibrium": "\u21CC", "equiv": "\u2261", "equivDD": "\u2A78", "eqvparsl": "\u29E5", "erarr": "\u2971", "erDot": "\u2253", "escr": "\u212F", "Escr": "\u2130", "esdot": "\u2250", "esim": "\u2242", "Esim": "\u2A73", "eta": "\u03B7", "Eta": "\u0397", "eth": "\xF0", "ETH": "\xD0", "euml": "\xEB", "Euml": "\xCB", "euro": "\u20AC", "excl": "!", "exist": "\u2203", "Exists": "\u2203", "expectation": "\u2130", "exponentiale": "\u2147", "ExponentialE": "\u2147", "fallingdotseq": "\u2252", "fcy": "\u0444", "Fcy": "\u0424", "female": "\u2640", "ffilig": "\uFB03", "fflig": "\uFB00", "ffllig": "\uFB04", "ffr": "\u{1D523}", "Ffr": "\u{1D509}", "filig": "\uFB01", "FilledSmallSquare": "\u25FC", "FilledVerySmallSquare": "\u25AA", "fjlig": "fj", "flat": "\u266D", "fllig": "\uFB02", "fltns": "\u25B1", "fnof": "\u0192", "fopf": "\u{1D557}", "Fopf": "\u{1D53D}", "forall": "\u2200", "ForAll": "\u2200", "fork": "\u22D4", "forkv": "\u2AD9", "Fouriertrf": "\u2131", "fpartint": "\u2A0D", "frac12": "\xBD", "frac13": "\u2153", "frac14": "\xBC", "frac15": "\u2155", "frac16": "\u2159", "frac18": "\u215B", "frac23": "\u2154", "frac25": "\u2156", "frac34": "\xBE", "frac35": "\u2157", "frac38": "\u215C", "frac45": "\u2158", "frac56": "\u215A", "frac58": "\u215D", "frac78": "\u215E", "frasl": "\u2044", "frown": "\u2322", "fscr": "\u{1D4BB}", "Fscr": "\u2131", "gacute": "\u01F5", "gamma": "\u03B3", "Gamma": "\u0393", "gammad": "\u03DD", "Gammad": "\u03DC", "gap": "\u2A86", "gbreve": "\u011F", "Gbreve": "\u011E", "Gcedil": "\u0122", "gcirc": "\u011D", "Gcirc": "\u011C", "gcy": "\u0433", "Gcy": "\u0413", "gdot": "\u0121", "Gdot": "\u0120", "ge": "\u2265", "gE": "\u2267", "gel": "\u22DB", "gEl": "\u2A8C", "geq": "\u2265", "geqq": "\u2267", "geqslant": "\u2A7E", "ges": "\u2A7E", "gescc": "\u2AA9", "gesdot": "\u2A80", "gesdoto": "\u2A82", "gesdotol": "\u2A84", "gesl": "\u22DB\uFE00", "gesles": "\u2A94", "gfr": "\u{1D524}", "Gfr": "\u{1D50A}", "gg": "\u226B", "Gg": "\u22D9", "ggg": "\u22D9", "gimel": "\u2137", "gjcy": "\u0453", "GJcy": "\u0403", "gl": "\u2277", "gla": "\u2AA5", "glE": "\u2A92", "glj": "\u2AA4", "gnap": "\u2A8A", "gnapprox": "\u2A8A", "gne": "\u2A88", "gnE": "\u2269", "gneq": "\u2A88", "gneqq": "\u2269", "gnsim": "\u22E7", "gopf": "\u{1D558}", "Gopf": "\u{1D53E}", "grave": "`", "GreaterEqual": "\u2265", "GreaterEqualLess": "\u22DB", "GreaterFullEqual": "\u2267", "GreaterGreater": "\u2AA2", "GreaterLess": "\u2277", "GreaterSlantEqual": "\u2A7E", "GreaterTilde": "\u2273", "gscr": "\u210A", "Gscr": "\u{1D4A2}", "gsim": "\u2273", "gsime": "\u2A8E", "gsiml": "\u2A90", "gt": ">", "Gt": "\u226B", "GT": ">", "gtcc": "\u2AA7", "gtcir": "\u2A7A", "gtdot": "\u22D7", "gtlPar": "\u2995", "gtquest": "\u2A7C", "gtrapprox": "\u2A86", "gtrarr": "\u2978", "gtrdot": "\u22D7", "gtreqless": "\u22DB", "gtreqqless": "\u2A8C", "gtrless": "\u2277", "gtrsim": "\u2273", "gvertneqq": "\u2269\uFE00", "gvnE": "\u2269\uFE00", "Hacek": "\u02C7", "hairsp": "\u200A", "half": "\xBD", "hamilt": "\u210B", "hardcy": "\u044A", "HARDcy": "\u042A", "harr": "\u2194", "hArr": "\u21D4", "harrcir": "\u2948", "harrw": "\u21AD", "Hat": "^", "hbar": "\u210F", "hcirc": "\u0125", "Hcirc": "\u0124", "hearts": "\u2665", "heartsuit": "\u2665", "hellip": "\u2026", "hercon": "\u22B9", "hfr": "\u{1D525}", "Hfr": "\u210C", "HilbertSpace": "\u210B", "hksearow": "\u2925", "hkswarow": "\u2926", "hoarr": "\u21FF", "homtht": "\u223B", "hookleftarrow": "\u21A9", "hookrightarrow": "\u21AA", "hopf": "\u{1D559}", "Hopf": "\u210D", "horbar": "\u2015", "HorizontalLine": "\u2500", "hscr": "\u{1D4BD}", "Hscr": "\u210B", "hslash": "\u210F", "hstrok": "\u0127", "Hstrok": "\u0126", "HumpDownHump": "\u224E", "HumpEqual": "\u224F", "hybull": "\u2043", "hyphen": "\u2010", "iacute": "\xED", "Iacute": "\xCD", "ic": "\u2063", "icirc": "\xEE", "Icirc": "\xCE", "icy": "\u0438", "Icy": "\u0418", "Idot": "\u0130", "iecy": "\u0435", "IEcy": "\u0415", "iexcl": "\xA1", "iff": "\u21D4", "ifr": "\u{1D526}", "Ifr": "\u2111", "igrave": "\xEC", "Igrave": "\xCC", "ii": "\u2148", "iiiint": "\u2A0C", "iiint": "\u222D", "iinfin": "\u29DC", "iiota": "\u2129", "ijlig": "\u0133", "IJlig": "\u0132", "Im": "\u2111", "imacr": "\u012B", "Imacr": "\u012A", "image": "\u2111", "ImaginaryI": "\u2148", "imagline": "\u2110", "imagpart": "\u2111", "imath": "\u0131", "imof": "\u22B7", "imped": "\u01B5", "Implies": "\u21D2", "in": "\u2208", "incare": "\u2105", "infin": "\u221E", "infintie": "\u29DD", "inodot": "\u0131", "int": "\u222B", "Int": "\u222C", "intcal": "\u22BA", "integers": "\u2124", "Integral": "\u222B", "intercal": "\u22BA", "Intersection": "\u22C2", "intlarhk": "\u2A17", "intprod": "\u2A3C", "InvisibleComma": "\u2063", "InvisibleTimes": "\u2062", "iocy": "\u0451", "IOcy": "\u0401", "iogon": "\u012F", "Iogon": "\u012E", "iopf": "\u{1D55A}", "Iopf": "\u{1D540}", "iota": "\u03B9", "Iota": "\u0399", "iprod": "\u2A3C", "iquest": "\xBF", "iscr": "\u{1D4BE}", "Iscr": "\u2110", "isin": "\u2208", "isindot": "\u22F5", "isinE": "\u22F9", "isins": "\u22F4", "isinsv": "\u22F3", "isinv": "\u2208", "it": "\u2062", "itilde": "\u0129", "Itilde": "\u0128", "iukcy": "\u0456", "Iukcy": "\u0406", "iuml": "\xEF", "Iuml": "\xCF", "jcirc": "\u0135", "Jcirc": "\u0134", "jcy": "\u0439", "Jcy": "\u0419", "jfr": "\u{1D527}", "Jfr": "\u{1D50D}", "jmath": "\u0237", "jopf": "\u{1D55B}", "Jopf": "\u{1D541}", "jscr": "\u{1D4BF}", "Jscr": "\u{1D4A5}", "jsercy": "\u0458", "Jsercy": "\u0408", "jukcy": "\u0454", "Jukcy": "\u0404", "kappa": "\u03BA", "Kappa": "\u039A", "kappav": "\u03F0", "kcedil": "\u0137", "Kcedil": "\u0136", "kcy": "\u043A", "Kcy": "\u041A", "kfr": "\u{1D528}", "Kfr": "\u{1D50E}", "kgreen": "\u0138", "khcy": "\u0445", "KHcy": "\u0425", "kjcy": "\u045C", "KJcy": "\u040C", "kopf": "\u{1D55C}", "Kopf": "\u{1D542}", "kscr": "\u{1D4C0}", "Kscr": "\u{1D4A6}", "lAarr": "\u21DA", "lacute": "\u013A", "Lacute": "\u0139", "laemptyv": "\u29B4", "lagran": "\u2112", "lambda": "\u03BB", "Lambda": "\u039B", "lang": "\u27E8", "Lang": "\u27EA", "langd": "\u2991", "langle": "\u27E8", "lap": "\u2A85", "Laplacetrf": "\u2112", "laquo": "\xAB", "larr": "\u2190", "lArr": "\u21D0", "Larr": "\u219E", "larrb": "\u21E4", "larrbfs": "\u291F", "larrfs": "\u291D", "larrhk": "\u21A9", "larrlp": "\u21AB", "larrpl": "\u2939", "larrsim": "\u2973", "larrtl": "\u21A2", "lat": "\u2AAB", "latail": "\u2919", "lAtail": "\u291B", "late": "\u2AAD", "lates": "\u2AAD\uFE00", "lbarr": "\u290C", "lBarr": "\u290E", "lbbrk": "\u2772", "lbrace": "{", "lbrack": "[", "lbrke": "\u298B", "lbrksld": "\u298F", "lbrkslu": "\u298D", "lcaron": "\u013E", "Lcaron": "\u013D", "lcedil": "\u013C", "Lcedil": "\u013B", "lceil": "\u2308", "lcub": "{", "lcy": "\u043B", "Lcy": "\u041B", "ldca": "\u2936", "ldquo": "\u201C", "ldquor": "\u201E", "ldrdhar": "\u2967", "ldrushar": "\u294B", "ldsh": "\u21B2", "le": "\u2264", "lE": "\u2266", "LeftAngleBracket": "\u27E8", "leftarrow": "\u2190", "Leftarrow": "\u21D0", "LeftArrow": "\u2190", "LeftArrowBar": "\u21E4", "LeftArrowRightArrow": "\u21C6", "leftarrowtail": "\u21A2", "LeftCeiling": "\u2308", "LeftDoubleBracket": "\u27E6", "LeftDownTeeVector": "\u2961", "LeftDownVector": "\u21C3", "LeftDownVectorBar": "\u2959", "LeftFloor": "\u230A", "leftharpoondown": "\u21BD", "leftharpoonup": "\u21BC", "leftleftarrows": "\u21C7", "leftrightarrow": "\u2194", "Leftrightarrow": "\u21D4", "LeftRightArrow": "\u2194", "leftrightarrows": "\u21C6", "leftrightharpoons": "\u21CB", "leftrightsquigarrow": "\u21AD", "LeftRightVector": "\u294E", "LeftTee": "\u22A3", "LeftTeeArrow": "\u21A4", "LeftTeeVector": "\u295A", "leftthreetimes": "\u22CB", "LeftTriangle": "\u22B2", "LeftTriangleBar": "\u29CF", "LeftTriangleEqual": "\u22B4", "LeftUpDownVector": "\u2951", "LeftUpTeeVector": "\u2960", "LeftUpVector": "\u21BF", "LeftUpVectorBar": "\u2958", "LeftVector": "\u21BC", "LeftVectorBar": "\u2952", "leg": "\u22DA", "lEg": "\u2A8B", "leq": "\u2264", "leqq": "\u2266", "leqslant": "\u2A7D", "les": "\u2A7D", "lescc": "\u2AA8", "lesdot": "\u2A7F", "lesdoto": "\u2A81", "lesdotor": "\u2A83", "lesg": "\u22DA\uFE00", "lesges": "\u2A93", "lessapprox": "\u2A85", "lessdot": "\u22D6", "lesseqgtr": "\u22DA", "lesseqqgtr": "\u2A8B", "LessEqualGreater": "\u22DA", "LessFullEqual": "\u2266", "LessGreater": "\u2276", "lessgtr": "\u2276", "LessLess": "\u2AA1", "lesssim": "\u2272", "LessSlantEqual": "\u2A7D", "LessTilde": "\u2272", "lfisht": "\u297C", "lfloor": "\u230A", "lfr": "\u{1D529}", "Lfr": "\u{1D50F}", "lg": "\u2276", "lgE": "\u2A91", "lHar": "\u2962", "lhard": "\u21BD", "lharu": "\u21BC", "lharul": "\u296A", "lhblk": "\u2584", "ljcy": "\u0459", "LJcy": "\u0409", "ll": "\u226A", "Ll": "\u22D8", "llarr": "\u21C7", "llcorner": "\u231E", "Lleftarrow": "\u21DA", "llhard": "\u296B", "lltri": "\u25FA", "lmidot": "\u0140", "Lmidot": "\u013F", "lmoust": "\u23B0", "lmoustache": "\u23B0", "lnap": "\u2A89", "lnapprox": "\u2A89", "lne": "\u2A87", "lnE": "\u2268", "lneq": "\u2A87", "lneqq": "\u2268", "lnsim": "\u22E6", "loang": "\u27EC", "loarr": "\u21FD", "lobrk": "\u27E6", "longleftarrow": "\u27F5", "Longleftarrow": "\u27F8", "LongLeftArrow": "\u27F5", "longleftrightarrow": "\u27F7", "Longleftrightarrow": "\u27FA", "LongLeftRightArrow": "\u27F7", "longmapsto": "\u27FC", "longrightarrow": "\u27F6", "Longrightarrow": "\u27F9", "LongRightArrow": "\u27F6", "looparrowleft": "\u21AB", "looparrowright": "\u21AC", "lopar": "\u2985", "lopf": "\u{1D55D}", "Lopf": "\u{1D543}", "loplus": "\u2A2D", "lotimes": "\u2A34", "lowast": "\u2217", "lowbar": "_", "LowerLeftArrow": "\u2199", "LowerRightArrow": "\u2198", "loz": "\u25CA", "lozenge": "\u25CA", "lozf": "\u29EB", "lpar": "(", "lparlt": "\u2993", "lrarr": "\u21C6", "lrcorner": "\u231F", "lrhar": "\u21CB", "lrhard": "\u296D", "lrm": "\u200E", "lrtri": "\u22BF", "lsaquo": "\u2039", "lscr": "\u{1D4C1}", "Lscr": "\u2112", "lsh": "\u21B0", "Lsh": "\u21B0", "lsim": "\u2272", "lsime": "\u2A8D", "lsimg": "\u2A8F", "lsqb": "[", "lsquo": "\u2018", "lsquor": "\u201A", "lstrok": "\u0142", "Lstrok": "\u0141", "lt": "<", "Lt": "\u226A", "LT": "<", "ltcc": "\u2AA6", "ltcir": "\u2A79", "ltdot": "\u22D6", "lthree": "\u22CB", "ltimes": "\u22C9", "ltlarr": "\u2976", "ltquest": "\u2A7B", "ltri": "\u25C3", "ltrie": "\u22B4", "ltrif": "\u25C2", "ltrPar": "\u2996", "lurdshar": "\u294A", "luruhar": "\u2966", "lvertneqq": "\u2268\uFE00", "lvnE": "\u2268\uFE00", "macr": "\xAF", "male": "\u2642", "malt": "\u2720", "maltese": "\u2720", "map": "\u21A6", "Map": "\u2905", "mapsto": "\u21A6", "mapstodown": "\u21A7", "mapstoleft": "\u21A4", "mapstoup": "\u21A5", "marker": "\u25AE", "mcomma": "\u2A29", "mcy": "\u043C", "Mcy": "\u041C", "mdash": "\u2014", "mDDot": "\u223A", "measuredangle": "\u2221", "MediumSpace": "\u205F", "Mellintrf": "\u2133", "mfr": "\u{1D52A}", "Mfr": "\u{1D510}", "mho": "\u2127", "micro": "\xB5", "mid": "\u2223", "midast": "*", "midcir": "\u2AF0", "middot": "\xB7", "minus": "\u2212", "minusb": "\u229F", "minusd": "\u2238", "minusdu": "\u2A2A", "MinusPlus": "\u2213", "mlcp": "\u2ADB", "mldr": "\u2026", "mnplus": "\u2213", "models": "\u22A7", "mopf": "\u{1D55E}", "Mopf": "\u{1D544}", "mp": "\u2213", "mscr": "\u{1D4C2}", "Mscr": "\u2133", "mstpos": "\u223E", "mu": "\u03BC", "Mu": "\u039C", "multimap": "\u22B8", "mumap": "\u22B8", "nabla": "\u2207", "nacute": "\u0144", "Nacute": "\u0143", "nang": "\u2220\u20D2", "nap": "\u2249", "napE": "\u2A70\u0338", "napid": "\u224B\u0338", "napos": "\u0149", "napprox": "\u2249", "natur": "\u266E", "natural": "\u266E", "naturals": "\u2115", "nbsp": "\xA0", "nbump": "\u224E\u0338", "nbumpe": "\u224F\u0338", "ncap": "\u2A43", "ncaron": "\u0148", "Ncaron": "\u0147", "ncedil": "\u0146", "Ncedil": "\u0145", "ncong": "\u2247", "ncongdot": "\u2A6D\u0338", "ncup": "\u2A42", "ncy": "\u043D", "Ncy": "\u041D", "ndash": "\u2013", "ne": "\u2260", "nearhk": "\u2924", "nearr": "\u2197", "neArr": "\u21D7", "nearrow": "\u2197", "nedot": "\u2250\u0338", "NegativeMediumSpace": "\u200B", "NegativeThickSpace": "\u200B", "NegativeThinSpace": "\u200B", "NegativeVeryThinSpace": "\u200B", "nequiv": "\u2262", "nesear": "\u2928", "nesim": "\u2242\u0338", "NestedGreaterGreater": "\u226B", "NestedLessLess": "\u226A", "NewLine": "\n", "nexist": "\u2204", "nexists": "\u2204", "nfr": "\u{1D52B}", "Nfr": "\u{1D511}", "nge": "\u2271", "ngE": "\u2267\u0338", "ngeq": "\u2271", "ngeqq": "\u2267\u0338", "ngeqslant": "\u2A7E\u0338", "nges": "\u2A7E\u0338", "nGg": "\u22D9\u0338", "ngsim": "\u2275", "ngt": "\u226F", "nGt": "\u226B\u20D2", "ngtr": "\u226F", "nGtv": "\u226B\u0338", "nharr": "\u21AE", "nhArr": "\u21CE", "nhpar": "\u2AF2", "ni": "\u220B", "nis": "\u22FC", "nisd": "\u22FA", "niv": "\u220B", "njcy": "\u045A", "NJcy": "\u040A", "nlarr": "\u219A", "nlArr": "\u21CD", "nldr": "\u2025", "nle": "\u2270", "nlE": "\u2266\u0338", "nleftarrow": "\u219A", "nLeftarrow": "\u21CD", "nleftrightarrow": "\u21AE", "nLeftrightarrow": "\u21CE", "nleq": "\u2270", "nleqq": "\u2266\u0338", "nleqslant": "\u2A7D\u0338", "nles": "\u2A7D\u0338", "nless": "\u226E", "nLl": "\u22D8\u0338", "nlsim": "\u2274", "nlt": "\u226E", "nLt": "\u226A\u20D2", "nltri": "\u22EA", "nltrie": "\u22EC", "nLtv": "\u226A\u0338", "nmid": "\u2224", "NoBreak": "\u2060", "NonBreakingSpace": "\xA0", "nopf": "\u{1D55F}", "Nopf": "\u2115", "not": "\xAC", "Not": "\u2AEC", "NotCongruent": "\u2262", "NotCupCap": "\u226D", "NotDoubleVerticalBar": "\u2226", "NotElement": "\u2209", "NotEqual": "\u2260", "NotEqualTilde": "\u2242\u0338", "NotExists": "\u2204", "NotGreater": "\u226F", "NotGreaterEqual": "\u2271", "NotGreaterFullEqual": "\u2267\u0338", "NotGreaterGreater": "\u226B\u0338", "NotGreaterLess": "\u2279", "NotGreaterSlantEqual": "\u2A7E\u0338", "NotGreaterTilde": "\u2275", "NotHumpDownHump": "\u224E\u0338", "NotHumpEqual": "\u224F\u0338", "notin": "\u2209", "notindot": "\u22F5\u0338", "notinE": "\u22F9\u0338", "notinva": "\u2209", "notinvb": "\u22F7", "notinvc": "\u22F6", "NotLeftTriangle": "\u22EA", "NotLeftTriangleBar": "\u29CF\u0338", "NotLeftTriangleEqual": "\u22EC", "NotLess": "\u226E", "NotLessEqual": "\u2270", "NotLessGreater": "\u2278", "NotLessLess": "\u226A\u0338", "NotLessSlantEqual": "\u2A7D\u0338", "NotLessTilde": "\u2274", "NotNestedGreaterGreater": "\u2AA2\u0338", "NotNestedLessLess": "\u2AA1\u0338", "notni": "\u220C", "notniva": "\u220C", "notnivb": "\u22FE", "notnivc": "\u22FD", "NotPrecedes": "\u2280", "NotPrecedesEqual": "\u2AAF\u0338", "NotPrecedesSlantEqual": "\u22E0", "NotReverseElement": "\u220C", "NotRightTriangle": "\u22EB", "NotRightTriangleBar": "\u29D0\u0338", "NotRightTriangleEqual": "\u22ED", "NotSquareSubset": "\u228F\u0338", "NotSquareSubsetEqual": "\u22E2", "NotSquareSuperset": "\u2290\u0338", "NotSquareSupersetEqual": "\u22E3", "NotSubset": "\u2282\u20D2", "NotSubsetEqual": "\u2288", "NotSucceeds": "\u2281", "NotSucceedsEqual": "\u2AB0\u0338", "NotSucceedsSlantEqual": "\u22E1", "NotSucceedsTilde": "\u227F\u0338", "NotSuperset": "\u2283\u20D2", "NotSupersetEqual": "\u2289", "NotTilde": "\u2241", "NotTildeEqual": "\u2244", "NotTildeFullEqual": "\u2247", "NotTildeTilde": "\u2249", "NotVerticalBar": "\u2224", "npar": "\u2226", "nparallel": "\u2226", "nparsl": "\u2AFD\u20E5", "npart": "\u2202\u0338", "npolint": "\u2A14", "npr": "\u2280", "nprcue": "\u22E0", "npre": "\u2AAF\u0338", "nprec": "\u2280", "npreceq": "\u2AAF\u0338", "nrarr": "\u219B", "nrArr": "\u21CF", "nrarrc": "\u2933\u0338", "nrarrw": "\u219D\u0338", "nrightarrow": "\u219B", "nRightarrow": "\u21CF", "nrtri": "\u22EB", "nrtrie": "\u22ED", "nsc": "\u2281", "nsccue": "\u22E1", "nsce": "\u2AB0\u0338", "nscr": "\u{1D4C3}", "Nscr": "\u{1D4A9}", "nshortmid": "\u2224", "nshortparallel": "\u2226", "nsim": "\u2241", "nsime": "\u2244", "nsimeq": "\u2244", "nsmid": "\u2224", "nspar": "\u2226", "nsqsube": "\u22E2", "nsqsupe": "\u22E3", "nsub": "\u2284", "nsube": "\u2288", "nsubE": "\u2AC5\u0338", "nsubset": "\u2282\u20D2", "nsubseteq": "\u2288", "nsubseteqq": "\u2AC5\u0338", "nsucc": "\u2281", "nsucceq": "\u2AB0\u0338", "nsup": "\u2285", "nsupe": "\u2289", "nsupE": "\u2AC6\u0338", "nsupset": "\u2283\u20D2", "nsupseteq": "\u2289", "nsupseteqq": "\u2AC6\u0338", "ntgl": "\u2279", "ntilde": "\xF1", "Ntilde": "\xD1", "ntlg": "\u2278", "ntriangleleft": "\u22EA", "ntrianglelefteq": "\u22EC", "ntriangleright": "\u22EB", "ntrianglerighteq": "\u22ED", "nu": "\u03BD", "Nu": "\u039D", "num": "#", "numero": "\u2116", "numsp": "\u2007", "nvap": "\u224D\u20D2", "nvdash": "\u22AC", "nvDash": "\u22AD", "nVdash": "\u22AE", "nVDash": "\u22AF", "nvge": "\u2265\u20D2", "nvgt": ">\u20D2", "nvHarr": "\u2904", "nvinfin": "\u29DE", "nvlArr": "\u2902", "nvle": "\u2264\u20D2", "nvlt": "<\u20D2", "nvltrie": "\u22B4\u20D2", "nvrArr": "\u2903", "nvrtrie": "\u22B5\u20D2", "nvsim": "\u223C\u20D2", "nwarhk": "\u2923", "nwarr": "\u2196", "nwArr": "\u21D6", "nwarrow": "\u2196", "nwnear": "\u2927", "oacute": "\xF3", "Oacute": "\xD3", "oast": "\u229B", "ocir": "\u229A", "ocirc": "\xF4", "Ocirc": "\xD4", "ocy": "\u043E", "Ocy": "\u041E", "odash": "\u229D", "odblac": "\u0151", "Odblac": "\u0150", "odiv": "\u2A38", "odot": "\u2299", "odsold": "\u29BC", "oelig": "\u0153", "OElig": "\u0152", "ofcir": "\u29BF", "ofr": "\u{1D52C}", "Ofr": "\u{1D512}", "ogon": "\u02DB", "ograve": "\xF2", "Ograve": "\xD2", "ogt": "\u29C1", "ohbar": "\u29B5", "ohm": "\u03A9", "oint": "\u222E", "olarr": "\u21BA", "olcir": "\u29BE", "olcross": "\u29BB", "oline": "\u203E", "olt": "\u29C0", "omacr": "\u014D", "Omacr": "\u014C", "omega": "\u03C9", "Omega": "\u03A9", "omicron": "\u03BF", "Omicron": "\u039F", "omid": "\u29B6", "ominus": "\u2296", "oopf": "\u{1D560}", "Oopf": "\u{1D546}", "opar": "\u29B7", "OpenCurlyDoubleQuote": "\u201C", "OpenCurlyQuote": "\u2018", "operp": "\u29B9", "oplus": "\u2295", "or": "\u2228", "Or": "\u2A54", "orarr": "\u21BB", "ord": "\u2A5D", "order": "\u2134", "orderof": "\u2134", "ordf": "\xAA", "ordm": "\xBA", "origof": "\u22B6", "oror": "\u2A56", "orslope": "\u2A57", "orv": "\u2A5B", "oS": "\u24C8", "oscr": "\u2134", "Oscr": "\u{1D4AA}", "oslash": "\xF8", "Oslash": "\xD8", "osol": "\u2298", "otilde": "\xF5", "Otilde": "\xD5", "otimes": "\u2297", "Otimes": "\u2A37", "otimesas": "\u2A36", "ouml": "\xF6", "Ouml": "\xD6", "ovbar": "\u233D", "OverBar": "\u203E", "OverBrace": "\u23DE", "OverBracket": "\u23B4", "OverParenthesis": "\u23DC", "par": "\u2225", "para": "\xB6", "parallel": "\u2225", "parsim": "\u2AF3", "parsl": "\u2AFD", "part": "\u2202", "PartialD": "\u2202", "pcy": "\u043F", "Pcy": "\u041F", "percnt": "%", "period": ".", "permil": "\u2030", "perp": "\u22A5", "pertenk": "\u2031", "pfr": "\u{1D52D}", "Pfr": "\u{1D513}", "phi": "\u03C6", "Phi": "\u03A6", "phiv": "\u03D5", "phmmat": "\u2133", "phone": "\u260E", "pi": "\u03C0", "Pi": "\u03A0", "pitchfork": "\u22D4", "piv": "\u03D6", "planck": "\u210F", "planckh": "\u210E", "plankv": "\u210F", "plus": "+", "plusacir": "\u2A23", "plusb": "\u229E", "pluscir": "\u2A22", "plusdo": "\u2214", "plusdu": "\u2A25", "pluse": "\u2A72", "PlusMinus": "\xB1", "plusmn": "\xB1", "plussim": "\u2A26", "plustwo": "\u2A27", "pm": "\xB1", "Poincareplane": "\u210C", "pointint": "\u2A15", "popf": "\u{1D561}", "Popf": "\u2119", "pound": "\xA3", "pr": "\u227A", "Pr": "\u2ABB", "prap": "\u2AB7", "prcue": "\u227C", "pre": "\u2AAF", "prE": "\u2AB3", "prec": "\u227A", "precapprox": "\u2AB7", "preccurlyeq": "\u227C", "Precedes": "\u227A", "PrecedesEqual": "\u2AAF", "PrecedesSlantEqual": "\u227C", "PrecedesTilde": "\u227E", "preceq": "\u2AAF", "precnapprox": "\u2AB9", "precneqq": "\u2AB5", "precnsim": "\u22E8", "precsim": "\u227E", "prime": "\u2032", "Prime": "\u2033", "primes": "\u2119", "prnap": "\u2AB9", "prnE": "\u2AB5", "prnsim": "\u22E8", "prod": "\u220F", "Product": "\u220F", "profalar": "\u232E", "profline": "\u2312", "profsurf": "\u2313", "prop": "\u221D", "Proportion": "\u2237", "Proportional": "\u221D", "propto": "\u221D", "prsim": "\u227E", "prurel": "\u22B0", "pscr": "\u{1D4C5}", "Pscr": "\u{1D4AB}", "psi": "\u03C8", "Psi": "\u03A8", "puncsp": "\u2008", "qfr": "\u{1D52E}", "Qfr": "\u{1D514}", "qint": "\u2A0C", "qopf": "\u{1D562}", "Qopf": "\u211A", "qprime": "\u2057", "qscr": "\u{1D4C6}", "Qscr": "\u{1D4AC}", "quaternions": "\u210D", "quatint": "\u2A16", "quest": "?", "questeq": "\u225F", "quot": '"', "QUOT": '"', "rAarr": "\u21DB", "race": "\u223D\u0331", "racute": "\u0155", "Racute": "\u0154", "radic": "\u221A", "raemptyv": "\u29B3", "rang": "\u27E9", "Rang": "\u27EB", "rangd": "\u2992", "range": "\u29A5", "rangle": "\u27E9", "raquo": "\xBB", "rarr": "\u2192", "rArr": "\u21D2", "Rarr": "\u21A0", "rarrap": "\u2975", "rarrb": "\u21E5", "rarrbfs": "\u2920", "rarrc": "\u2933", "rarrfs": "\u291E", "rarrhk": "\u21AA", "rarrlp": "\u21AC", "rarrpl": "\u2945", "rarrsim": "\u2974", "rarrtl": "\u21A3", "Rarrtl": "\u2916", "rarrw": "\u219D", "ratail": "\u291A", "rAtail": "\u291C", "ratio": "\u2236", "rationals": "\u211A", "rbarr": "\u290D", "rBarr": "\u290F", "RBarr": "\u2910", "rbbrk": "\u2773", "rbrace": "}", "rbrack": "]", "rbrke": "\u298C", "rbrksld": "\u298E", "rbrkslu": "\u2990", "rcaron": "\u0159", "Rcaron": "\u0158", "rcedil": "\u0157", "Rcedil": "\u0156", "rceil": "\u2309", "rcub": "}", "rcy": "\u0440", "Rcy": "\u0420", "rdca": "\u2937", "rdldhar": "\u2969", "rdquo": "\u201D", "rdquor": "\u201D", "rdsh": "\u21B3", "Re": "\u211C", "real": "\u211C", "realine": "\u211B", "realpart": "\u211C", "reals": "\u211D", "rect": "\u25AD", "reg": "\xAE", "REG": "\xAE", "ReverseElement": "\u220B", "ReverseEquilibrium": "\u21CB", "ReverseUpEquilibrium": "\u296F", "rfisht": "\u297D", "rfloor": "\u230B", "rfr": "\u{1D52F}", "Rfr": "\u211C", "rHar": "\u2964", "rhard": "\u21C1", "rharu": "\u21C0", "rharul": "\u296C", "rho": "\u03C1", "Rho": "\u03A1", "rhov": "\u03F1", "RightAngleBracket": "\u27E9", "rightarrow": "\u2192", "Rightarrow": "\u21D2", "RightArrow": "\u2192", "RightArrowBar": "\u21E5", "RightArrowLeftArrow": "\u21C4", "rightarrowtail": "\u21A3", "RightCeiling": "\u2309", "RightDoubleBracket": "\u27E7", "RightDownTeeVector": "\u295D", "RightDownVector": "\u21C2", "RightDownVectorBar": "\u2955", "RightFloor": "\u230B", "rightharpoondown": "\u21C1", "rightharpoonup": "\u21C0", "rightleftarrows": "\u21C4", "rightleftharpoons": "\u21CC", "rightrightarrows": "\u21C9", "rightsquigarrow": "\u219D", "RightTee": "\u22A2", "RightTeeArrow": "\u21A6", "RightTeeVector": "\u295B", "rightthreetimes": "\u22CC", "RightTriangle": "\u22B3", "RightTriangleBar": "\u29D0", "RightTriangleEqual": "\u22B5", "RightUpDownVector": "\u294F", "RightUpTeeVector": "\u295C", "RightUpVector": "\u21BE", "RightUpVectorBar": "\u2954", "RightVector": "\u21C0", "RightVectorBar": "\u2953", "ring": "\u02DA", "risingdotseq": "\u2253", "rlarr": "\u21C4", "rlhar": "\u21CC", "rlm": "\u200F", "rmoust": "\u23B1", "rmoustache": "\u23B1", "rnmid": "\u2AEE", "roang": "\u27ED", "roarr": "\u21FE", "robrk": "\u27E7", "ropar": "\u2986", "ropf": "\u{1D563}", "Ropf": "\u211D", "roplus": "\u2A2E", "rotimes": "\u2A35", "RoundImplies": "\u2970", "rpar": ")", "rpargt": "\u2994", "rppolint": "\u2A12", "rrarr": "\u21C9", "Rrightarrow": "\u21DB", "rsaquo": "\u203A", "rscr": "\u{1D4C7}", "Rscr": "\u211B", "rsh": "\u21B1", "Rsh": "\u21B1", "rsqb": "]", "rsquo": "\u2019", "rsquor": "\u2019", "rthree": "\u22CC", "rtimes": "\u22CA", "rtri": "\u25B9", "rtrie": "\u22B5", "rtrif": "\u25B8", "rtriltri": "\u29CE", "RuleDelayed": "\u29F4", "ruluhar": "\u2968", "rx": "\u211E", "sacute": "\u015B", "Sacute": "\u015A", "sbquo": "\u201A", "sc": "\u227B", "Sc": "\u2ABC", "scap": "\u2AB8", "scaron": "\u0161", "Scaron": "\u0160", "sccue": "\u227D", "sce": "\u2AB0", "scE": "\u2AB4", "scedil": "\u015F", "Scedil": "\u015E", "scirc": "\u015D", "Scirc": "\u015C", "scnap": "\u2ABA", "scnE": "\u2AB6", "scnsim": "\u22E9", "scpolint": "\u2A13", "scsim": "\u227F", "scy": "\u0441", "Scy": "\u0421", "sdot": "\u22C5", "sdotb": "\u22A1", "sdote": "\u2A66", "searhk": "\u2925", "searr": "\u2198", "seArr": "\u21D8", "searrow": "\u2198", "sect": "\xA7", "semi": ";", "seswar": "\u2929", "setminus": "\u2216", "setmn": "\u2216", "sext": "\u2736", "sfr": "\u{1D530}", "Sfr": "\u{1D516}", "sfrown": "\u2322", "sharp": "\u266F", "shchcy": "\u0449", "SHCHcy": "\u0429", "shcy": "\u0448", "SHcy": "\u0428", "ShortDownArrow": "\u2193", "ShortLeftArrow": "\u2190", "shortmid": "\u2223", "shortparallel": "\u2225", "ShortRightArrow": "\u2192", "ShortUpArrow": "\u2191", "shy": "\xAD", "sigma": "\u03C3", "Sigma": "\u03A3", "sigmaf": "\u03C2", "sigmav": "\u03C2", "sim": "\u223C", "simdot": "\u2A6A", "sime": "\u2243", "simeq": "\u2243", "simg": "\u2A9E", "simgE": "\u2AA0", "siml": "\u2A9D", "simlE": "\u2A9F", "simne": "\u2246", "simplus": "\u2A24", "simrarr": "\u2972", "slarr": "\u2190", "SmallCircle": "\u2218", "smallsetminus": "\u2216", "smashp": "\u2A33", "smeparsl": "\u29E4", "smid": "\u2223", "smile": "\u2323", "smt": "\u2AAA", "smte": "\u2AAC", "smtes": "\u2AAC\uFE00", "softcy": "\u044C", "SOFTcy": "\u042C", "sol": "/", "solb": "\u29C4", "solbar": "\u233F", "sopf": "\u{1D564}", "Sopf": "\u{1D54A}", "spades": "\u2660", "spadesuit": "\u2660", "spar": "\u2225", "sqcap": "\u2293", "sqcaps": "\u2293\uFE00", "sqcup": "\u2294", "sqcups": "\u2294\uFE00", "Sqrt": "\u221A", "sqsub": "\u228F", "sqsube": "\u2291", "sqsubset": "\u228F", "sqsubseteq": "\u2291", "sqsup": "\u2290", "sqsupe": "\u2292", "sqsupset": "\u2290", "sqsupseteq": "\u2292", "squ": "\u25A1", "square": "\u25A1", "Square": "\u25A1", "SquareIntersection": "\u2293", "SquareSubset": "\u228F", "SquareSubsetEqual": "\u2291", "SquareSuperset": "\u2290", "SquareSupersetEqual": "\u2292", "SquareUnion": "\u2294", "squarf": "\u25AA", "squf": "\u25AA", "srarr": "\u2192", "sscr": "\u{1D4C8}", "Sscr": "\u{1D4AE}", "ssetmn": "\u2216", "ssmile": "\u2323", "sstarf": "\u22C6", "star": "\u2606", "Star": "\u22C6", "starf": "\u2605", "straightepsilon": "\u03F5", "straightphi": "\u03D5", "strns": "\xAF", "sub": "\u2282", "Sub": "\u22D0", "subdot": "\u2ABD", "sube": "\u2286", "subE": "\u2AC5", "subedot": "\u2AC3", "submult": "\u2AC1", "subne": "\u228A", "subnE": "\u2ACB", "subplus": "\u2ABF", "subrarr": "\u2979", "subset": "\u2282", "Subset": "\u22D0", "subseteq": "\u2286", "subseteqq": "\u2AC5", "SubsetEqual": "\u2286", "subsetneq": "\u228A", "subsetneqq": "\u2ACB", "subsim": "\u2AC7", "subsub": "\u2AD5", "subsup": "\u2AD3", "succ": "\u227B", "succapprox": "\u2AB8", "succcurlyeq": "\u227D", "Succeeds": "\u227B", "SucceedsEqual": "\u2AB0", "SucceedsSlantEqual": "\u227D", "SucceedsTilde": "\u227F", "succeq": "\u2AB0", "succnapprox": "\u2ABA", "succneqq": "\u2AB6", "succnsim": "\u22E9", "succsim": "\u227F", "SuchThat": "\u220B", "sum": "\u2211", "Sum": "\u2211", "sung": "\u266A", "sup": "\u2283", "Sup": "\u22D1", "sup1": "\xB9", "sup2": "\xB2", "sup3": "\xB3", "supdot": "\u2ABE", "supdsub": "\u2AD8", "supe": "\u2287", "supE": "\u2AC6", "supedot": "\u2AC4", "Superset": "\u2283", "SupersetEqual": "\u2287", "suphsol": "\u27C9", "suphsub": "\u2AD7", "suplarr": "\u297B", "supmult": "\u2AC2", "supne": "\u228B", "supnE": "\u2ACC", "supplus": "\u2AC0", "supset": "\u2283", "Supset": "\u22D1", "supseteq": "\u2287", "supseteqq": "\u2AC6", "supsetneq": "\u228B", "supsetneqq": "\u2ACC", "supsim": "\u2AC8", "supsub": "\u2AD4", "supsup": "\u2AD6", "swarhk": "\u2926", "swarr": "\u2199", "swArr": "\u21D9", "swarrow": "\u2199", "swnwar": "\u292A", "szlig": "\xDF", "Tab": " ", "target": "\u2316", "tau": "\u03C4", "Tau": "\u03A4", "tbrk": "\u23B4", "tcaron": "\u0165", "Tcaron": "\u0164", "tcedil": "\u0163", "Tcedil": "\u0162", "tcy": "\u0442", "Tcy": "\u0422", "tdot": "\u20DB", "telrec": "\u2315", "tfr": "\u{1D531}", "Tfr": "\u{1D517}", "there4": "\u2234", "therefore": "\u2234", "Therefore": "\u2234", "theta": "\u03B8", "Theta": "\u0398", "thetasym": "\u03D1", "thetav": "\u03D1", "thickapprox": "\u2248", "thicksim": "\u223C", "ThickSpace": "\u205F\u200A", "thinsp": "\u2009", "ThinSpace": "\u2009", "thkap": "\u2248", "thksim": "\u223C", "thorn": "\xFE", "THORN": "\xDE", "tilde": "\u02DC", "Tilde": "\u223C", "TildeEqual": "\u2243", "TildeFullEqual": "\u2245", "TildeTilde": "\u2248", "times": "\xD7", "timesb": "\u22A0", "timesbar": "\u2A31", "timesd": "\u2A30", "tint": "\u222D", "toea": "\u2928", "top": "\u22A4", "topbot": "\u2336", "topcir": "\u2AF1", "topf": "\u{1D565}", "Topf": "\u{1D54B}", "topfork": "\u2ADA", "tosa": "\u2929", "tprime": "\u2034", "trade": "\u2122", "TRADE": "\u2122", "triangle": "\u25B5", "triangledown": "\u25BF", "triangleleft": "\u25C3", "trianglelefteq": "\u22B4", "triangleq": "\u225C", "triangleright": "\u25B9", "trianglerighteq": "\u22B5", "tridot": "\u25EC", "trie": "\u225C", "triminus": "\u2A3A", "TripleDot": "\u20DB", "triplus": "\u2A39", "trisb": "\u29CD", "tritime": "\u2A3B", "trpezium": "\u23E2", "tscr": "\u{1D4C9}", "Tscr": "\u{1D4AF}", "tscy": "\u0446", "TScy": "\u0426", "tshcy": "\u045B", "TSHcy": "\u040B", "tstrok": "\u0167", "Tstrok": "\u0166", "twixt": "\u226C", "twoheadleftarrow": "\u219E", "twoheadrightarrow": "\u21A0", "uacute": "\xFA", "Uacute": "\xDA", "uarr": "\u2191", "uArr": "\u21D1", "Uarr": "\u219F", "Uarrocir": "\u2949", "ubrcy": "\u045E", "Ubrcy": "\u040E", "ubreve": "\u016D", "Ubreve": "\u016C", "ucirc": "\xFB", "Ucirc": "\xDB", "ucy": "\u0443", "Ucy": "\u0423", "udarr": "\u21C5", "udblac": "\u0171", "Udblac": "\u0170", "udhar": "\u296E", "ufisht": "\u297E", "ufr": "\u{1D532}", "Ufr": "\u{1D518}", "ugrave": "\xF9", "Ugrave": "\xD9", "uHar": "\u2963", "uharl": "\u21BF", "uharr": "\u21BE", "uhblk": "\u2580", "ulcorn": "\u231C", "ulcorner": "\u231C", "ulcrop": "\u230F", "ultri": "\u25F8", "umacr": "\u016B", "Umacr": "\u016A", "uml": "\xA8", "UnderBar": "_", "UnderBrace": "\u23DF", "UnderBracket": "\u23B5", "UnderParenthesis": "\u23DD", "Union": "\u22C3", "UnionPlus": "\u228E", "uogon": "\u0173", "Uogon": "\u0172", "uopf": "\u{1D566}", "Uopf": "\u{1D54C}", "uparrow": "\u2191", "Uparrow": "\u21D1", "UpArrow": "\u2191", "UpArrowBar": "\u2912", "UpArrowDownArrow": "\u21C5", "updownarrow": "\u2195", "Updownarrow": "\u21D5", "UpDownArrow": "\u2195", "UpEquilibrium": "\u296E", "upharpoonleft": "\u21BF", "upharpoonright": "\u21BE", "uplus": "\u228E", "UpperLeftArrow": "\u2196", "UpperRightArrow": "\u2197", "upsi": "\u03C5", "Upsi": "\u03D2", "upsih": "\u03D2", "upsilon": "\u03C5", "Upsilon": "\u03A5", "UpTee": "\u22A5", "UpTeeArrow": "\u21A5", "upuparrows": "\u21C8", "urcorn": "\u231D", "urcorner": "\u231D", "urcrop": "\u230E", "uring": "\u016F", "Uring": "\u016E", "urtri": "\u25F9", "uscr": "\u{1D4CA}", "Uscr": "\u{1D4B0}", "utdot": "\u22F0", "utilde": "\u0169", "Utilde": "\u0168", "utri": "\u25B5", "utrif": "\u25B4", "uuarr": "\u21C8", "uuml": "\xFC", "Uuml": "\xDC", "uwangle": "\u29A7", "vangrt": "\u299C", "varepsilon": "\u03F5", "varkappa": "\u03F0", "varnothing": "\u2205", "varphi": "\u03D5", "varpi": "\u03D6", "varpropto": "\u221D", "varr": "\u2195", "vArr": "\u21D5", "varrho": "\u03F1", "varsigma": "\u03C2", "varsubsetneq": "\u228A\uFE00", "varsubsetneqq": "\u2ACB\uFE00", "varsupsetneq": "\u228B\uFE00", "varsupsetneqq": "\u2ACC\uFE00", "vartheta": "\u03D1", "vartriangleleft": "\u22B2", "vartriangleright": "\u22B3", "vBar": "\u2AE8", "Vbar": "\u2AEB", "vBarv": "\u2AE9", "vcy": "\u0432", "Vcy": "\u0412", "vdash": "\u22A2", "vDash": "\u22A8", "Vdash": "\u22A9", "VDash": "\u22AB", "Vdashl": "\u2AE6", "vee": "\u2228", "Vee": "\u22C1", "veebar": "\u22BB", "veeeq": "\u225A", "vellip": "\u22EE", "verbar": "|", "Verbar": "\u2016", "vert": "|", "Vert": "\u2016", "VerticalBar": "\u2223", "VerticalLine": "|", "VerticalSeparator": "\u2758", "VerticalTilde": "\u2240", "VeryThinSpace": "\u200A", "vfr": "\u{1D533}", "Vfr": "\u{1D519}", "vltri": "\u22B2", "vnsub": "\u2282\u20D2", "vnsup": "\u2283\u20D2", "vopf": "\u{1D567}", "Vopf": "\u{1D54D}", "vprop": "\u221D", "vrtri": "\u22B3", "vscr": "\u{1D4CB}", "Vscr": "\u{1D4B1}", "vsubne": "\u228A\uFE00", "vsubnE": "\u2ACB\uFE00", "vsupne": "\u228B\uFE00", "vsupnE": "\u2ACC\uFE00", "Vvdash": "\u22AA", "vzigzag": "\u299A", "wcirc": "\u0175", "Wcirc": "\u0174", "wedbar": "\u2A5F", "wedge": "\u2227", "Wedge": "\u22C0", "wedgeq": "\u2259", "weierp": "\u2118", "wfr": "\u{1D534}", "Wfr": "\u{1D51A}", "wopf": "\u{1D568}", "Wopf": "\u{1D54E}", "wp": "\u2118", "wr": "\u2240", "wreath": "\u2240", "wscr": "\u{1D4CC}", "Wscr": "\u{1D4B2}", "xcap": "\u22C2", "xcirc": "\u25EF", "xcup": "\u22C3", "xdtri": "\u25BD", "xfr": "\u{1D535}", "Xfr": "\u{1D51B}", "xharr": "\u27F7", "xhArr": "\u27FA", "xi": "\u03BE", "Xi": "\u039E", "xlarr": "\u27F5", "xlArr": "\u27F8", "xmap": "\u27FC", "xnis": "\u22FB", "xodot": "\u2A00", "xopf": "\u{1D569}", "Xopf": "\u{1D54F}", "xoplus": "\u2A01", "xotime": "\u2A02", "xrarr": "\u27F6", "xrArr": "\u27F9", "xscr": "\u{1D4CD}", "Xscr": "\u{1D4B3}", "xsqcup": "\u2A06", "xuplus": "\u2A04", "xutri": "\u25B3", "xvee": "\u22C1", "xwedge": "\u22C0", "yacute": "\xFD", "Yacute": "\xDD", "yacy": "\u044F", "YAcy": "\u042F", "ycirc": "\u0177", "Ycirc": "\u0176", "ycy": "\u044B", "Ycy": "\u042B", "yen": "\xA5", "yfr": "\u{1D536}", "Yfr": "\u{1D51C}", "yicy": "\u0457", "YIcy": "\u0407", "yopf": "\u{1D56A}", "Yopf": "\u{1D550}", "yscr": "\u{1D4CE}", "Yscr": "\u{1D4B4}", "yucy": "\u044E", "YUcy": "\u042E", "yuml": "\xFF", "Yuml": "\u0178", "zacute": "\u017A", "Zacute": "\u0179", "zcaron": "\u017E", "Zcaron": "\u017D", "zcy": "\u0437", "Zcy": "\u0417", "zdot": "\u017C", "Zdot": "\u017B", "zeetrf": "\u2128", "ZeroWidthSpace": "\u200B", "zeta": "\u03B6", "Zeta": "\u0396", "zfr": "\u{1D537}", "Zfr": "\u2128", "zhcy": "\u0436", "ZHcy": "\u0416", "zigrarr": "\u21DD", "zopf": "\u{1D56B}", "Zopf": "\u2124", "zscr": "\u{1D4CF}", "Zscr": "\u{1D4B5}", "zwj": "\u200D", "zwnj": "\u200C" };
+ var decodeMapLegacy = { "aacute": "\xE1", "Aacute": "\xC1", "acirc": "\xE2", "Acirc": "\xC2", "acute": "\xB4", "aelig": "\xE6", "AElig": "\xC6", "agrave": "\xE0", "Agrave": "\xC0", "amp": "&", "AMP": "&", "aring": "\xE5", "Aring": "\xC5", "atilde": "\xE3", "Atilde": "\xC3", "auml": "\xE4", "Auml": "\xC4", "brvbar": "\xA6", "ccedil": "\xE7", "Ccedil": "\xC7", "cedil": "\xB8", "cent": "\xA2", "copy": "\xA9", "COPY": "\xA9", "curren": "\xA4", "deg": "\xB0", "divide": "\xF7", "eacute": "\xE9", "Eacute": "\xC9", "ecirc": "\xEA", "Ecirc": "\xCA", "egrave": "\xE8", "Egrave": "\xC8", "eth": "\xF0", "ETH": "\xD0", "euml": "\xEB", "Euml": "\xCB", "frac12": "\xBD", "frac14": "\xBC", "frac34": "\xBE", "gt": ">", "GT": ">", "iacute": "\xED", "Iacute": "\xCD", "icirc": "\xEE", "Icirc": "\xCE", "iexcl": "\xA1", "igrave": "\xEC", "Igrave": "\xCC", "iquest": "\xBF", "iuml": "\xEF", "Iuml": "\xCF", "laquo": "\xAB", "lt": "<", "LT": "<", "macr": "\xAF", "micro": "\xB5", "middot": "\xB7", "nbsp": "\xA0", "not": "\xAC", "ntilde": "\xF1", "Ntilde": "\xD1", "oacute": "\xF3", "Oacute": "\xD3", "ocirc": "\xF4", "Ocirc": "\xD4", "ograve": "\xF2", "Ograve": "\xD2", "ordf": "\xAA", "ordm": "\xBA", "oslash": "\xF8", "Oslash": "\xD8", "otilde": "\xF5", "Otilde": "\xD5", "ouml": "\xF6", "Ouml": "\xD6", "para": "\xB6", "plusmn": "\xB1", "pound": "\xA3", "quot": '"', "QUOT": '"', "raquo": "\xBB", "reg": "\xAE", "REG": "\xAE", "sect": "\xA7", "shy": "\xAD", "sup1": "\xB9", "sup2": "\xB2", "sup3": "\xB3", "szlig": "\xDF", "thorn": "\xFE", "THORN": "\xDE", "times": "\xD7", "uacute": "\xFA", "Uacute": "\xDA", "ucirc": "\xFB", "Ucirc": "\xDB", "ugrave": "\xF9", "Ugrave": "\xD9", "uml": "\xA8", "uuml": "\xFC", "Uuml": "\xDC", "yacute": "\xFD", "Yacute": "\xDD", "yen": "\xA5", "yuml": "\xFF" };
+ var decodeMapNumeric = { "0": "\uFFFD", "128": "\u20AC", "130": "\u201A", "131": "\u0192", "132": "\u201E", "133": "\u2026", "134": "\u2020", "135": "\u2021", "136": "\u02C6", "137": "\u2030", "138": "\u0160", "139": "\u2039", "140": "\u0152", "142": "\u017D", "145": "\u2018", "146": "\u2019", "147": "\u201C", "148": "\u201D", "149": "\u2022", "150": "\u2013", "151": "\u2014", "152": "\u02DC", "153": "\u2122", "154": "\u0161", "155": "\u203A", "156": "\u0153", "158": "\u017E", "159": "\u0178" };
+ var invalidReferenceCodePoints = [1, 2, 3, 4, 5, 6, 7, 8, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 64976, 64977, 64978, 64979, 64980, 64981, 64982, 64983, 64984, 64985, 64986, 64987, 64988, 64989, 64990, 64991, 64992, 64993, 64994, 64995, 64996, 64997, 64998, 64999, 65e3, 65001, 65002, 65003, 65004, 65005, 65006, 65007, 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111];
+ var stringFromCharCode = String.fromCharCode;
+ var object = {};
+ var hasOwnProperty = object.hasOwnProperty;
+ var has = function(object2, propertyName) {
+ return hasOwnProperty.call(object2, propertyName);
+ };
+ var contains = function(array, value) {
+ var index = -1;
+ var length = array.length;
+ while (++index < length) {
+ if (array[index] == value) {
+ return true;
+ }
+ }
+ return false;
+ };
+ var merge = function(options, defaults) {
+ if (!options) {
+ return defaults;
+ }
+ var result = {};
+ var key3;
+ for (key3 in defaults) {
+ result[key3] = has(options, key3) ? options[key3] : defaults[key3];
+ }
+ return result;
+ };
+ var codePointToSymbol = function(codePoint, strict) {
+ var output = "";
+ if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
+ if (strict) {
+ parseError("character reference outside the permissible Unicode range");
+ }
+ return "\uFFFD";
+ }
+ if (has(decodeMapNumeric, codePoint)) {
+ if (strict) {
+ parseError("disallowed character reference");
+ }
+ return decodeMapNumeric[codePoint];
+ }
+ if (strict && contains(invalidReferenceCodePoints, codePoint)) {
+ parseError("disallowed character reference");
+ }
+ if (codePoint > 65535) {
+ codePoint -= 65536;
+ output += stringFromCharCode(codePoint >>> 10 & 1023 | 55296);
+ codePoint = 56320 | codePoint & 1023;
+ }
+ output += stringFromCharCode(codePoint);
+ return output;
+ };
+ var hexEscape = function(codePoint) {
+ return "" + codePoint.toString(16).toUpperCase() + ";";
+ };
+ var decEscape = function(codePoint) {
+ return "" + codePoint + ";";
+ };
+ var parseError = function(message) {
+ throw Error("Parse error: " + message);
+ };
+ var encode = function(string, options) {
+ options = merge(options, encode.options);
+ var strict = options.strict;
+ if (strict && regexInvalidRawCodePoint.test(string)) {
+ parseError("forbidden code point");
+ }
+ var encodeEverything = options.encodeEverything;
+ var useNamedReferences = options.useNamedReferences;
+ var allowUnsafeSymbols = options.allowUnsafeSymbols;
+ var escapeCodePoint = options.decimal ? decEscape : hexEscape;
+ var escapeBmpSymbol = function(symbol) {
+ return escapeCodePoint(symbol.charCodeAt(0));
+ };
+ if (encodeEverything) {
+ string = string.replace(regexAsciiWhitelist, function(symbol) {
+ if (useNamedReferences && has(encodeMap, symbol)) {
+ return "&" + encodeMap[symbol] + ";";
+ }
+ return escapeBmpSymbol(symbol);
+ });
+ if (useNamedReferences) {
+ string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj");
+ }
+ if (useNamedReferences) {
+ string = string.replace(regexEncodeNonAscii, function(string2) {
+ return "&" + encodeMap[string2] + ";";
+ });
+ }
+ } else if (useNamedReferences) {
+ if (!allowUnsafeSymbols) {
+ string = string.replace(regexEscape, function(string2) {
+ return "&" + encodeMap[string2] + ";";
+ });
+ }
+ string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒");
+ string = string.replace(regexEncodeNonAscii, function(string2) {
+ return "&" + encodeMap[string2] + ";";
+ });
+ } else if (!allowUnsafeSymbols) {
+ string = string.replace(regexEscape, escapeBmpSymbol);
+ }
+ return string.replace(regexAstralSymbols, function($0) {
+ var high = $0.charCodeAt(0);
+ var low = $0.charCodeAt(1);
+ var codePoint = (high - 55296) * 1024 + low - 56320 + 65536;
+ return escapeCodePoint(codePoint);
+ }).replace(regexBmpWhitelist, escapeBmpSymbol);
+ };
+ encode.options = {
+ "allowUnsafeSymbols": false,
+ "encodeEverything": false,
+ "strict": false,
+ "useNamedReferences": false,
+ "decimal": false
+ };
+ var decode = function(html, options) {
+ options = merge(options, decode.options);
+ var strict = options.strict;
+ if (strict && regexInvalidEntity.test(html)) {
+ parseError("malformed character reference");
+ }
+ return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
+ var codePoint;
+ var semicolon;
+ var decDigits;
+ var hexDigits;
+ var reference;
+ var next;
+ if ($1) {
+ reference = $1;
+ return decodeMap[reference];
+ }
+ if ($2) {
+ reference = $2;
+ next = $3;
+ if (next && options.isAttributeValue) {
+ if (strict && next == "=") {
+ parseError("`&` did not start a character reference");
+ }
+ return $0;
+ } else {
+ if (strict) {
+ parseError("named character reference was not terminated by a semicolon");
+ }
+ return decodeMapLegacy[reference] + (next || "");
+ }
+ }
+ if ($4) {
+ decDigits = $4;
+ semicolon = $5;
+ if (strict && !semicolon) {
+ parseError("character reference was not terminated by a semicolon");
+ }
+ codePoint = parseInt(decDigits, 10);
+ return codePointToSymbol(codePoint, strict);
+ }
+ if ($6) {
+ hexDigits = $6;
+ semicolon = $7;
+ if (strict && !semicolon) {
+ parseError("character reference was not terminated by a semicolon");
+ }
+ codePoint = parseInt(hexDigits, 16);
+ return codePointToSymbol(codePoint, strict);
+ }
+ if (strict) {
+ parseError("named character reference was not terminated by a semicolon");
+ }
+ return $0;
+ });
+ };
+ decode.options = {
+ "isAttributeValue": false,
+ "strict": false
+ };
+ var escape2 = function(string) {
+ return string.replace(regexEscape, function($0) {
+ return escapeMap[$0];
+ });
+ };
+ var he = {
+ "version": "1.2.0",
+ "encode": encode,
+ "decode": decode,
+ "escape": escape2,
+ "unescape": decode
+ };
+ if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
+ define(function() {
+ return he;
+ });
+ } else if (freeExports && !freeExports.nodeType) {
+ if (freeModule) {
+ freeModule.exports = he;
+ } else {
+ for (var key2 in he) {
+ has(he, key2) && (freeExports[key2] = he[key2]);
+ }
+ }
+ } else {
+ root.he = he;
+ }
+ })(exports);
+ }
+});
+
+// node_modules/entities/lib/maps/decode.json
+var require_decode = __commonJS({
+ "node_modules/entities/lib/maps/decode.json"(exports, module2) {
+ module2.exports = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 };
+ }
+});
+
+// node_modules/entities/lib/decode_codepoint.js
+var require_decode_codepoint = __commonJS({
+ "node_modules/entities/lib/decode_codepoint.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var decode_json_1 = __importDefault(require_decode());
+ var fromCodePoint = String.fromCodePoint || function(codePoint) {
+ var output = "";
+ if (codePoint > 65535) {
+ codePoint -= 65536;
+ output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
+ codePoint = 56320 | codePoint & 1023;
+ }
+ output += String.fromCharCode(codePoint);
+ return output;
+ };
+ function decodeCodePoint(codePoint) {
+ if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
+ return "\uFFFD";
+ }
+ if (codePoint in decode_json_1.default) {
+ codePoint = decode_json_1.default[codePoint];
+ }
+ return fromCodePoint(codePoint);
+ }
+ exports.default = decodeCodePoint;
+ }
+});
+
+// node_modules/entities/lib/maps/entities.json
+var require_entities = __commonJS({
+ "node_modules/entities/lib/maps/entities.json"(exports, module2) {
+ module2.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}", Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220", ange: "\u29A4", angle: "\u2220", angmsdaa: "\u29A8", angmsdab: "\u29A9", angmsdac: "\u29AA", angmsdad: "\u29AB", angmsdae: "\u29AC", angmsdaf: "\u29AD", angmsdag: "\u29AE", angmsdah: "\u29AF", angmsd: "\u2221", angrt: "\u221F", angrtvb: "\u22BE", angrtvbd: "\u299D", angsph: "\u2222", angst: "\xC5", angzarr: "\u237C", Aogon: "\u0104", aogon: "\u0105", Aopf: "\u{1D538}", aopf: "\u{1D552}", apacir: "\u2A6F", ap: "\u2248", apE: "\u2A70", ape: "\u224A", apid: "\u224B", apos: "'", ApplyFunction: "\u2061", approx: "\u2248", approxeq: "\u224A", Aring: "\xC5", aring: "\xE5", Ascr: "\u{1D49C}", ascr: "\u{1D4B6}", Assign: "\u2254", ast: "*", asymp: "\u2248", asympeq: "\u224D", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", awconint: "\u2233", awint: "\u2A11", backcong: "\u224C", backepsilon: "\u03F6", backprime: "\u2035", backsim: "\u223D", backsimeq: "\u22CD", Backslash: "\u2216", Barv: "\u2AE7", barvee: "\u22BD", barwed: "\u2305", Barwed: "\u2306", barwedge: "\u2305", bbrk: "\u23B5", bbrktbrk: "\u23B6", bcong: "\u224C", Bcy: "\u0411", bcy: "\u0431", bdquo: "\u201E", becaus: "\u2235", because: "\u2235", Because: "\u2235", bemptyv: "\u29B0", bepsi: "\u03F6", bernou: "\u212C", Bernoullis: "\u212C", Beta: "\u0392", beta: "\u03B2", beth: "\u2136", between: "\u226C", Bfr: "\u{1D505}", bfr: "\u{1D51F}", bigcap: "\u22C2", bigcirc: "\u25EF", bigcup: "\u22C3", bigodot: "\u2A00", bigoplus: "\u2A01", bigotimes: "\u2A02", bigsqcup: "\u2A06", bigstar: "\u2605", bigtriangledown: "\u25BD", bigtriangleup: "\u25B3", biguplus: "\u2A04", bigvee: "\u22C1", bigwedge: "\u22C0", bkarow: "\u290D", blacklozenge: "\u29EB", blacksquare: "\u25AA", blacktriangle: "\u25B4", blacktriangledown: "\u25BE", blacktriangleleft: "\u25C2", blacktriangleright: "\u25B8", blank: "\u2423", blk12: "\u2592", blk14: "\u2591", blk34: "\u2593", block: "\u2588", bne: "=\u20E5", bnequiv: "\u2261\u20E5", bNot: "\u2AED", bnot: "\u2310", Bopf: "\u{1D539}", bopf: "\u{1D553}", bot: "\u22A5", bottom: "\u22A5", bowtie: "\u22C8", boxbox: "\u29C9", boxdl: "\u2510", boxdL: "\u2555", boxDl: "\u2556", boxDL: "\u2557", boxdr: "\u250C", boxdR: "\u2552", boxDr: "\u2553", boxDR: "\u2554", boxh: "\u2500", boxH: "\u2550", boxhd: "\u252C", boxHd: "\u2564", boxhD: "\u2565", boxHD: "\u2566", boxhu: "\u2534", boxHu: "\u2567", boxhU: "\u2568", boxHU: "\u2569", boxminus: "\u229F", boxplus: "\u229E", boxtimes: "\u22A0", boxul: "\u2518", boxuL: "\u255B", boxUl: "\u255C", boxUL: "\u255D", boxur: "\u2514", boxuR: "\u2558", boxUr: "\u2559", boxUR: "\u255A", boxv: "\u2502", boxV: "\u2551", boxvh: "\u253C", boxvH: "\u256A", boxVh: "\u256B", boxVH: "\u256C", boxvl: "\u2524", boxvL: "\u2561", boxVl: "\u2562", boxVL: "\u2563", boxvr: "\u251C", boxvR: "\u255E", boxVr: "\u255F", boxVR: "\u2560", bprime: "\u2035", breve: "\u02D8", Breve: "\u02D8", brvbar: "\xA6", bscr: "\u{1D4B7}", Bscr: "\u212C", bsemi: "\u204F", bsim: "\u223D", bsime: "\u22CD", bsolb: "\u29C5", bsol: "\\", bsolhsub: "\u27C8", bull: "\u2022", bullet: "\u2022", bump: "\u224E", bumpE: "\u2AAE", bumpe: "\u224F", Bumpeq: "\u224E", bumpeq: "\u224F", Cacute: "\u0106", cacute: "\u0107", capand: "\u2A44", capbrcup: "\u2A49", capcap: "\u2A4B", cap: "\u2229", Cap: "\u22D2", capcup: "\u2A47", capdot: "\u2A40", CapitalDifferentialD: "\u2145", caps: "\u2229\uFE00", caret: "\u2041", caron: "\u02C7", Cayleys: "\u212D", ccaps: "\u2A4D", Ccaron: "\u010C", ccaron: "\u010D", Ccedil: "\xC7", ccedil: "\xE7", Ccirc: "\u0108", ccirc: "\u0109", Cconint: "\u2230", ccups: "\u2A4C", ccupssm: "\u2A50", Cdot: "\u010A", cdot: "\u010B", cedil: "\xB8", Cedilla: "\xB8", cemptyv: "\u29B2", cent: "\xA2", centerdot: "\xB7", CenterDot: "\xB7", cfr: "\u{1D520}", Cfr: "\u212D", CHcy: "\u0427", chcy: "\u0447", check: "\u2713", checkmark: "\u2713", Chi: "\u03A7", chi: "\u03C7", circ: "\u02C6", circeq: "\u2257", circlearrowleft: "\u21BA", circlearrowright: "\u21BB", circledast: "\u229B", circledcirc: "\u229A", circleddash: "\u229D", CircleDot: "\u2299", circledR: "\xAE", circledS: "\u24C8", CircleMinus: "\u2296", CirclePlus: "\u2295", CircleTimes: "\u2297", cir: "\u25CB", cirE: "\u29C3", cire: "\u2257", cirfnint: "\u2A10", cirmid: "\u2AEF", cirscir: "\u29C2", ClockwiseContourIntegral: "\u2232", CloseCurlyDoubleQuote: "\u201D", CloseCurlyQuote: "\u2019", clubs: "\u2663", clubsuit: "\u2663", colon: ":", Colon: "\u2237", Colone: "\u2A74", colone: "\u2254", coloneq: "\u2254", comma: ",", commat: "@", comp: "\u2201", compfn: "\u2218", complement: "\u2201", complexes: "\u2102", cong: "\u2245", congdot: "\u2A6D", Congruent: "\u2261", conint: "\u222E", Conint: "\u222F", ContourIntegral: "\u222E", copf: "\u{1D554}", Copf: "\u2102", coprod: "\u2210", Coproduct: "\u2210", copy: "\xA9", COPY: "\xA9", copysr: "\u2117", CounterClockwiseContourIntegral: "\u2233", crarr: "\u21B5", cross: "\u2717", Cross: "\u2A2F", Cscr: "\u{1D49E}", cscr: "\u{1D4B8}", csub: "\u2ACF", csube: "\u2AD1", csup: "\u2AD0", csupe: "\u2AD2", ctdot: "\u22EF", cudarrl: "\u2938", cudarrr: "\u2935", cuepr: "\u22DE", cuesc: "\u22DF", cularr: "\u21B6", cularrp: "\u293D", cupbrcap: "\u2A48", cupcap: "\u2A46", CupCap: "\u224D", cup: "\u222A", Cup: "\u22D3", cupcup: "\u2A4A", cupdot: "\u228D", cupor: "\u2A45", cups: "\u222A\uFE00", curarr: "\u21B7", curarrm: "\u293C", curlyeqprec: "\u22DE", curlyeqsucc: "\u22DF", curlyvee: "\u22CE", curlywedge: "\u22CF", curren: "\xA4", curvearrowleft: "\u21B6", curvearrowright: "\u21B7", cuvee: "\u22CE", cuwed: "\u22CF", cwconint: "\u2232", cwint: "\u2231", cylcty: "\u232D", dagger: "\u2020", Dagger: "\u2021", daleth: "\u2138", darr: "\u2193", Darr: "\u21A1", dArr: "\u21D3", dash: "\u2010", Dashv: "\u2AE4", dashv: "\u22A3", dbkarow: "\u290F", dblac: "\u02DD", Dcaron: "\u010E", dcaron: "\u010F", Dcy: "\u0414", dcy: "\u0434", ddagger: "\u2021", ddarr: "\u21CA", DD: "\u2145", dd: "\u2146", DDotrahd: "\u2911", ddotseq: "\u2A77", deg: "\xB0", Del: "\u2207", Delta: "\u0394", delta: "\u03B4", demptyv: "\u29B1", dfisht: "\u297F", Dfr: "\u{1D507}", dfr: "\u{1D521}", dHar: "\u2965", dharl: "\u21C3", dharr: "\u21C2", DiacriticalAcute: "\xB4", DiacriticalDot: "\u02D9", DiacriticalDoubleAcute: "\u02DD", DiacriticalGrave: "`", DiacriticalTilde: "\u02DC", diam: "\u22C4", diamond: "\u22C4", Diamond: "\u22C4", diamondsuit: "\u2666", diams: "\u2666", die: "\xA8", DifferentialD: "\u2146", digamma: "\u03DD", disin: "\u22F2", div: "\xF7", divide: "\xF7", divideontimes: "\u22C7", divonx: "\u22C7", DJcy: "\u0402", djcy: "\u0452", dlcorn: "\u231E", dlcrop: "\u230D", dollar: "$", Dopf: "\u{1D53B}", dopf: "\u{1D555}", Dot: "\xA8", dot: "\u02D9", DotDot: "\u20DC", doteq: "\u2250", doteqdot: "\u2251", DotEqual: "\u2250", dotminus: "\u2238", dotplus: "\u2214", dotsquare: "\u22A1", doublebarwedge: "\u2306", DoubleContourIntegral: "\u222F", DoubleDot: "\xA8", DoubleDownArrow: "\u21D3", DoubleLeftArrow: "\u21D0", DoubleLeftRightArrow: "\u21D4", DoubleLeftTee: "\u2AE4", DoubleLongLeftArrow: "\u27F8", DoubleLongLeftRightArrow: "\u27FA", DoubleLongRightArrow: "\u27F9", DoubleRightArrow: "\u21D2", DoubleRightTee: "\u22A8", DoubleUpArrow: "\u21D1", DoubleUpDownArrow: "\u21D5", DoubleVerticalBar: "\u2225", DownArrowBar: "\u2913", downarrow: "\u2193", DownArrow: "\u2193", Downarrow: "\u21D3", DownArrowUpArrow: "\u21F5", DownBreve: "\u0311", downdownarrows: "\u21CA", downharpoonleft: "\u21C3", downharpoonright: "\u21C2", DownLeftRightVector: "\u2950", DownLeftTeeVector: "\u295E", DownLeftVectorBar: "\u2956", DownLeftVector: "\u21BD", DownRightTeeVector: "\u295F", DownRightVectorBar: "\u2957", DownRightVector: "\u21C1", DownTeeArrow: "\u21A7", DownTee: "\u22A4", drbkarow: "\u2910", drcorn: "\u231F", drcrop: "\u230C", Dscr: "\u{1D49F}", dscr: "\u{1D4B9}", DScy: "\u0405", dscy: "\u0455", dsol: "\u29F6", Dstrok: "\u0110", dstrok: "\u0111", dtdot: "\u22F1", dtri: "\u25BF", dtrif: "\u25BE", duarr: "\u21F5", duhar: "\u296F", dwangle: "\u29A6", DZcy: "\u040F", dzcy: "\u045F", dzigrarr: "\u27FF", Eacute: "\xC9", eacute: "\xE9", easter: "\u2A6E", Ecaron: "\u011A", ecaron: "\u011B", Ecirc: "\xCA", ecirc: "\xEA", ecir: "\u2256", ecolon: "\u2255", Ecy: "\u042D", ecy: "\u044D", eDDot: "\u2A77", Edot: "\u0116", edot: "\u0117", eDot: "\u2251", ee: "\u2147", efDot: "\u2252", Efr: "\u{1D508}", efr: "\u{1D522}", eg: "\u2A9A", Egrave: "\xC8", egrave: "\xE8", egs: "\u2A96", egsdot: "\u2A98", el: "\u2A99", Element: "\u2208", elinters: "\u23E7", ell: "\u2113", els: "\u2A95", elsdot: "\u2A97", Emacr: "\u0112", emacr: "\u0113", empty: "\u2205", emptyset: "\u2205", EmptySmallSquare: "\u25FB", emptyv: "\u2205", EmptyVerySmallSquare: "\u25AB", emsp13: "\u2004", emsp14: "\u2005", emsp: "\u2003", ENG: "\u014A", eng: "\u014B", ensp: "\u2002", Eogon: "\u0118", eogon: "\u0119", Eopf: "\u{1D53C}", eopf: "\u{1D556}", epar: "\u22D5", eparsl: "\u29E3", eplus: "\u2A71", epsi: "\u03B5", Epsilon: "\u0395", epsilon: "\u03B5", epsiv: "\u03F5", eqcirc: "\u2256", eqcolon: "\u2255", eqsim: "\u2242", eqslantgtr: "\u2A96", eqslantless: "\u2A95", Equal: "\u2A75", equals: "=", EqualTilde: "\u2242", equest: "\u225F", Equilibrium: "\u21CC", equiv: "\u2261", equivDD: "\u2A78", eqvparsl: "\u29E5", erarr: "\u2971", erDot: "\u2253", escr: "\u212F", Escr: "\u2130", esdot: "\u2250", Esim: "\u2A73", esim: "\u2242", Eta: "\u0397", eta: "\u03B7", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", euro: "\u20AC", excl: "!", exist: "\u2203", Exists: "\u2203", expectation: "\u2130", exponentiale: "\u2147", ExponentialE: "\u2147", fallingdotseq: "\u2252", Fcy: "\u0424", fcy: "\u0444", female: "\u2640", ffilig: "\uFB03", fflig: "\uFB00", ffllig: "\uFB04", Ffr: "\u{1D509}", ffr: "\u{1D523}", filig: "\uFB01", FilledSmallSquare: "\u25FC", FilledVerySmallSquare: "\u25AA", fjlig: "fj", flat: "\u266D", fllig: "\uFB02", fltns: "\u25B1", fnof: "\u0192", Fopf: "\u{1D53D}", fopf: "\u{1D557}", forall: "\u2200", ForAll: "\u2200", fork: "\u22D4", forkv: "\u2AD9", Fouriertrf: "\u2131", fpartint: "\u2A0D", frac12: "\xBD", frac13: "\u2153", frac14: "\xBC", frac15: "\u2155", frac16: "\u2159", frac18: "\u215B", frac23: "\u2154", frac25: "\u2156", frac34: "\xBE", frac35: "\u2157", frac38: "\u215C", frac45: "\u2158", frac56: "\u215A", frac58: "\u215D", frac78: "\u215E", frasl: "\u2044", frown: "\u2322", fscr: "\u{1D4BB}", Fscr: "\u2131", gacute: "\u01F5", Gamma: "\u0393", gamma: "\u03B3", Gammad: "\u03DC", gammad: "\u03DD", gap: "\u2A86", Gbreve: "\u011E", gbreve: "\u011F", Gcedil: "\u0122", Gcirc: "\u011C", gcirc: "\u011D", Gcy: "\u0413", gcy: "\u0433", Gdot: "\u0120", gdot: "\u0121", ge: "\u2265", gE: "\u2267", gEl: "\u2A8C", gel: "\u22DB", geq: "\u2265", geqq: "\u2267", geqslant: "\u2A7E", gescc: "\u2AA9", ges: "\u2A7E", gesdot: "\u2A80", gesdoto: "\u2A82", gesdotol: "\u2A84", gesl: "\u22DB\uFE00", gesles: "\u2A94", Gfr: "\u{1D50A}", gfr: "\u{1D524}", gg: "\u226B", Gg: "\u22D9", ggg: "\u22D9", gimel: "\u2137", GJcy: "\u0403", gjcy: "\u0453", gla: "\u2AA5", gl: "\u2277", glE: "\u2A92", glj: "\u2AA4", gnap: "\u2A8A", gnapprox: "\u2A8A", gne: "\u2A88", gnE: "\u2269", gneq: "\u2A88", gneqq: "\u2269", gnsim: "\u22E7", Gopf: "\u{1D53E}", gopf: "\u{1D558}", grave: "`", GreaterEqual: "\u2265", GreaterEqualLess: "\u22DB", GreaterFullEqual: "\u2267", GreaterGreater: "\u2AA2", GreaterLess: "\u2277", GreaterSlantEqual: "\u2A7E", GreaterTilde: "\u2273", Gscr: "\u{1D4A2}", gscr: "\u210A", gsim: "\u2273", gsime: "\u2A8E", gsiml: "\u2A90", gtcc: "\u2AA7", gtcir: "\u2A7A", gt: ">", GT: ">", Gt: "\u226B", gtdot: "\u22D7", gtlPar: "\u2995", gtquest: "\u2A7C", gtrapprox: "\u2A86", gtrarr: "\u2978", gtrdot: "\u22D7", gtreqless: "\u22DB", gtreqqless: "\u2A8C", gtrless: "\u2277", gtrsim: "\u2273", gvertneqq: "\u2269\uFE00", gvnE: "\u2269\uFE00", Hacek: "\u02C7", hairsp: "\u200A", half: "\xBD", hamilt: "\u210B", HARDcy: "\u042A", hardcy: "\u044A", harrcir: "\u2948", harr: "\u2194", hArr: "\u21D4", harrw: "\u21AD", Hat: "^", hbar: "\u210F", Hcirc: "\u0124", hcirc: "\u0125", hearts: "\u2665", heartsuit: "\u2665", hellip: "\u2026", hercon: "\u22B9", hfr: "\u{1D525}", Hfr: "\u210C", HilbertSpace: "\u210B", hksearow: "\u2925", hkswarow: "\u2926", hoarr: "\u21FF", homtht: "\u223B", hookleftarrow: "\u21A9", hookrightarrow: "\u21AA", hopf: "\u{1D559}", Hopf: "\u210D", horbar: "\u2015", HorizontalLine: "\u2500", hscr: "\u{1D4BD}", Hscr: "\u210B", hslash: "\u210F", Hstrok: "\u0126", hstrok: "\u0127", HumpDownHump: "\u224E", HumpEqual: "\u224F", hybull: "\u2043", hyphen: "\u2010", Iacute: "\xCD", iacute: "\xED", ic: "\u2063", Icirc: "\xCE", icirc: "\xEE", Icy: "\u0418", icy: "\u0438", Idot: "\u0130", IEcy: "\u0415", iecy: "\u0435", iexcl: "\xA1", iff: "\u21D4", ifr: "\u{1D526}", Ifr: "\u2111", Igrave: "\xCC", igrave: "\xEC", ii: "\u2148", iiiint: "\u2A0C", iiint: "\u222D", iinfin: "\u29DC", iiota: "\u2129", IJlig: "\u0132", ijlig: "\u0133", Imacr: "\u012A", imacr: "\u012B", image: "\u2111", ImaginaryI: "\u2148", imagline: "\u2110", imagpart: "\u2111", imath: "\u0131", Im: "\u2111", imof: "\u22B7", imped: "\u01B5", Implies: "\u21D2", incare: "\u2105", in: "\u2208", infin: "\u221E", infintie: "\u29DD", inodot: "\u0131", intcal: "\u22BA", int: "\u222B", Int: "\u222C", integers: "\u2124", Integral: "\u222B", intercal: "\u22BA", Intersection: "\u22C2", intlarhk: "\u2A17", intprod: "\u2A3C", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "\u0401", iocy: "\u0451", Iogon: "\u012E", iogon: "\u012F", Iopf: "\u{1D540}", iopf: "\u{1D55A}", Iota: "\u0399", iota: "\u03B9", iprod: "\u2A3C", iquest: "\xBF", iscr: "\u{1D4BE}", Iscr: "\u2110", isin: "\u2208", isindot: "\u22F5", isinE: "\u22F9", isins: "\u22F4", isinsv: "\u22F3", isinv: "\u2208", it: "\u2062", Itilde: "\u0128", itilde: "\u0129", Iukcy: "\u0406", iukcy: "\u0456", Iuml: "\xCF", iuml: "\xEF", Jcirc: "\u0134", jcirc: "\u0135", Jcy: "\u0419", jcy: "\u0439", Jfr: "\u{1D50D}", jfr: "\u{1D527}", jmath: "\u0237", Jopf: "\u{1D541}", jopf: "\u{1D55B}", Jscr: "\u{1D4A5}", jscr: "\u{1D4BF}", Jsercy: "\u0408", jsercy: "\u0458", Jukcy: "\u0404", jukcy: "\u0454", Kappa: "\u039A", kappa: "\u03BA", kappav: "\u03F0", Kcedil: "\u0136", kcedil: "\u0137", Kcy: "\u041A", kcy: "\u043A", Kfr: "\u{1D50E}", kfr: "\u{1D528}", kgreen: "\u0138", KHcy: "\u0425", khcy: "\u0445", KJcy: "\u040C", kjcy: "\u045C", Kopf: "\u{1D542}", kopf: "\u{1D55C}", Kscr: "\u{1D4A6}", kscr: "\u{1D4C0}", lAarr: "\u21DA", Lacute: "\u0139", lacute: "\u013A", laemptyv: "\u29B4", lagran: "\u2112", Lambda: "\u039B", lambda: "\u03BB", lang: "\u27E8", Lang: "\u27EA", langd: "\u2991", langle: "\u27E8", lap: "\u2A85", Laplacetrf: "\u2112", laquo: "\xAB", larrb: "\u21E4", larrbfs: "\u291F", larr: "\u2190", Larr: "\u219E", lArr: "\u21D0", larrfs: "\u291D", larrhk: "\u21A9", larrlp: "\u21AB", larrpl: "\u2939", larrsim: "\u2973", larrtl: "\u21A2", latail: "\u2919", lAtail: "\u291B", lat: "\u2AAB", late: "\u2AAD", lates: "\u2AAD\uFE00", lbarr: "\u290C", lBarr: "\u290E", lbbrk: "\u2772", lbrace: "{", lbrack: "[", lbrke: "\u298B", lbrksld: "\u298F", lbrkslu: "\u298D", Lcaron: "\u013D", lcaron: "\u013E", Lcedil: "\u013B", lcedil: "\u013C", lceil: "\u2308", lcub: "{", Lcy: "\u041B", lcy: "\u043B", ldca: "\u2936", ldquo: "\u201C", ldquor: "\u201E", ldrdhar: "\u2967", ldrushar: "\u294B", ldsh: "\u21B2", le: "\u2264", lE: "\u2266", LeftAngleBracket: "\u27E8", LeftArrowBar: "\u21E4", leftarrow: "\u2190", LeftArrow: "\u2190", Leftarrow: "\u21D0", LeftArrowRightArrow: "\u21C6", leftarrowtail: "\u21A2", LeftCeiling: "\u2308", LeftDoubleBracket: "\u27E6", LeftDownTeeVector: "\u2961", LeftDownVectorBar: "\u2959", LeftDownVector: "\u21C3", LeftFloor: "\u230A", leftharpoondown: "\u21BD", leftharpoonup: "\u21BC", leftleftarrows: "\u21C7", leftrightarrow: "\u2194", LeftRightArrow: "\u2194", Leftrightarrow: "\u21D4", leftrightarrows: "\u21C6", leftrightharpoons: "\u21CB", leftrightsquigarrow: "\u21AD", LeftRightVector: "\u294E", LeftTeeArrow: "\u21A4", LeftTee: "\u22A3", LeftTeeVector: "\u295A", leftthreetimes: "\u22CB", LeftTriangleBar: "\u29CF", LeftTriangle: "\u22B2", LeftTriangleEqual: "\u22B4", LeftUpDownVector: "\u2951", LeftUpTeeVector: "\u2960", LeftUpVectorBar: "\u2958", LeftUpVector: "\u21BF", LeftVectorBar: "\u2952", LeftVector: "\u21BC", lEg: "\u2A8B", leg: "\u22DA", leq: "\u2264", leqq: "\u2266", leqslant: "\u2A7D", lescc: "\u2AA8", les: "\u2A7D", lesdot: "\u2A7F", lesdoto: "\u2A81", lesdotor: "\u2A83", lesg: "\u22DA\uFE00", lesges: "\u2A93", lessapprox: "\u2A85", lessdot: "\u22D6", lesseqgtr: "\u22DA", lesseqqgtr: "\u2A8B", LessEqualGreater: "\u22DA", LessFullEqual: "\u2266", LessGreater: "\u2276", lessgtr: "\u2276", LessLess: "\u2AA1", lesssim: "\u2272", LessSlantEqual: "\u2A7D", LessTilde: "\u2272", lfisht: "\u297C", lfloor: "\u230A", Lfr: "\u{1D50F}", lfr: "\u{1D529}", lg: "\u2276", lgE: "\u2A91", lHar: "\u2962", lhard: "\u21BD", lharu: "\u21BC", lharul: "\u296A", lhblk: "\u2584", LJcy: "\u0409", ljcy: "\u0459", llarr: "\u21C7", ll: "\u226A", Ll: "\u22D8", llcorner: "\u231E", Lleftarrow: "\u21DA", llhard: "\u296B", lltri: "\u25FA", Lmidot: "\u013F", lmidot: "\u0140", lmoustache: "\u23B0", lmoust: "\u23B0", lnap: "\u2A89", lnapprox: "\u2A89", lne: "\u2A87", lnE: "\u2268", lneq: "\u2A87", lneqq: "\u2268", lnsim: "\u22E6", loang: "\u27EC", loarr: "\u21FD", lobrk: "\u27E6", longleftarrow: "\u27F5", LongLeftArrow: "\u27F5", Longleftarrow: "\u27F8", longleftrightarrow: "\u27F7", LongLeftRightArrow: "\u27F7", Longleftrightarrow: "\u27FA", longmapsto: "\u27FC", longrightarrow: "\u27F6", LongRightArrow: "\u27F6", Longrightarrow: "\u27F9", looparrowleft: "\u21AB", looparrowright: "\u21AC", lopar: "\u2985", Lopf: "\u{1D543}", lopf: "\u{1D55D}", loplus: "\u2A2D", lotimes: "\u2A34", lowast: "\u2217", lowbar: "_", LowerLeftArrow: "\u2199", LowerRightArrow: "\u2198", loz: "\u25CA", lozenge: "\u25CA", lozf: "\u29EB", lpar: "(", lparlt: "\u2993", lrarr: "\u21C6", lrcorner: "\u231F", lrhar: "\u21CB", lrhard: "\u296D", lrm: "\u200E", lrtri: "\u22BF", lsaquo: "\u2039", lscr: "\u{1D4C1}", Lscr: "\u2112", lsh: "\u21B0", Lsh: "\u21B0", lsim: "\u2272", lsime: "\u2A8D", lsimg: "\u2A8F", lsqb: "[", lsquo: "\u2018", lsquor: "\u201A", Lstrok: "\u0141", lstrok: "\u0142", ltcc: "\u2AA6", ltcir: "\u2A79", lt: "<", LT: "<", Lt: "\u226A", ltdot: "\u22D6", lthree: "\u22CB", ltimes: "\u22C9", ltlarr: "\u2976", ltquest: "\u2A7B", ltri: "\u25C3", ltrie: "\u22B4", ltrif: "\u25C2", ltrPar: "\u2996", lurdshar: "\u294A", luruhar: "\u2966", lvertneqq: "\u2268\uFE00", lvnE: "\u2268\uFE00", macr: "\xAF", male: "\u2642", malt: "\u2720", maltese: "\u2720", Map: "\u2905", map: "\u21A6", mapsto: "\u21A6", mapstodown: "\u21A7", mapstoleft: "\u21A4", mapstoup: "\u21A5", marker: "\u25AE", mcomma: "\u2A29", Mcy: "\u041C", mcy: "\u043C", mdash: "\u2014", mDDot: "\u223A", measuredangle: "\u2221", MediumSpace: "\u205F", Mellintrf: "\u2133", Mfr: "\u{1D510}", mfr: "\u{1D52A}", mho: "\u2127", micro: "\xB5", midast: "*", midcir: "\u2AF0", mid: "\u2223", middot: "\xB7", minusb: "\u229F", minus: "\u2212", minusd: "\u2238", minusdu: "\u2A2A", MinusPlus: "\u2213", mlcp: "\u2ADB", mldr: "\u2026", mnplus: "\u2213", models: "\u22A7", Mopf: "\u{1D544}", mopf: "\u{1D55E}", mp: "\u2213", mscr: "\u{1D4C2}", Mscr: "\u2133", mstpos: "\u223E", Mu: "\u039C", mu: "\u03BC", multimap: "\u22B8", mumap: "\u22B8", nabla: "\u2207", Nacute: "\u0143", nacute: "\u0144", nang: "\u2220\u20D2", nap: "\u2249", napE: "\u2A70\u0338", napid: "\u224B\u0338", napos: "\u0149", napprox: "\u2249", natural: "\u266E", naturals: "\u2115", natur: "\u266E", nbsp: "\xA0", nbump: "\u224E\u0338", nbumpe: "\u224F\u0338", ncap: "\u2A43", Ncaron: "\u0147", ncaron: "\u0148", Ncedil: "\u0145", ncedil: "\u0146", ncong: "\u2247", ncongdot: "\u2A6D\u0338", ncup: "\u2A42", Ncy: "\u041D", ncy: "\u043D", ndash: "\u2013", nearhk: "\u2924", nearr: "\u2197", neArr: "\u21D7", nearrow: "\u2197", ne: "\u2260", nedot: "\u2250\u0338", NegativeMediumSpace: "\u200B", NegativeThickSpace: "\u200B", NegativeThinSpace: "\u200B", NegativeVeryThinSpace: "\u200B", nequiv: "\u2262", nesear: "\u2928", nesim: "\u2242\u0338", NestedGreaterGreater: "\u226B", NestedLessLess: "\u226A", NewLine: "\n", nexist: "\u2204", nexists: "\u2204", Nfr: "\u{1D511}", nfr: "\u{1D52B}", ngE: "\u2267\u0338", nge: "\u2271", ngeq: "\u2271", ngeqq: "\u2267\u0338", ngeqslant: "\u2A7E\u0338", nges: "\u2A7E\u0338", nGg: "\u22D9\u0338", ngsim: "\u2275", nGt: "\u226B\u20D2", ngt: "\u226F", ngtr: "\u226F", nGtv: "\u226B\u0338", nharr: "\u21AE", nhArr: "\u21CE", nhpar: "\u2AF2", ni: "\u220B", nis: "\u22FC", nisd: "\u22FA", niv: "\u220B", NJcy: "\u040A", njcy: "\u045A", nlarr: "\u219A", nlArr: "\u21CD", nldr: "\u2025", nlE: "\u2266\u0338", nle: "\u2270", nleftarrow: "\u219A", nLeftarrow: "\u21CD", nleftrightarrow: "\u21AE", nLeftrightarrow: "\u21CE", nleq: "\u2270", nleqq: "\u2266\u0338", nleqslant: "\u2A7D\u0338", nles: "\u2A7D\u0338", nless: "\u226E", nLl: "\u22D8\u0338", nlsim: "\u2274", nLt: "\u226A\u20D2", nlt: "\u226E", nltri: "\u22EA", nltrie: "\u22EC", nLtv: "\u226A\u0338", nmid: "\u2224", NoBreak: "\u2060", NonBreakingSpace: "\xA0", nopf: "\u{1D55F}", Nopf: "\u2115", Not: "\u2AEC", not: "\xAC", NotCongruent: "\u2262", NotCupCap: "\u226D", NotDoubleVerticalBar: "\u2226", NotElement: "\u2209", NotEqual: "\u2260", NotEqualTilde: "\u2242\u0338", NotExists: "\u2204", NotGreater: "\u226F", NotGreaterEqual: "\u2271", NotGreaterFullEqual: "\u2267\u0338", NotGreaterGreater: "\u226B\u0338", NotGreaterLess: "\u2279", NotGreaterSlantEqual: "\u2A7E\u0338", NotGreaterTilde: "\u2275", NotHumpDownHump: "\u224E\u0338", NotHumpEqual: "\u224F\u0338", notin: "\u2209", notindot: "\u22F5\u0338", notinE: "\u22F9\u0338", notinva: "\u2209", notinvb: "\u22F7", notinvc: "\u22F6", NotLeftTriangleBar: "\u29CF\u0338", NotLeftTriangle: "\u22EA", NotLeftTriangleEqual: "\u22EC", NotLess: "\u226E", NotLessEqual: "\u2270", NotLessGreater: "\u2278", NotLessLess: "\u226A\u0338", NotLessSlantEqual: "\u2A7D\u0338", NotLessTilde: "\u2274", NotNestedGreaterGreater: "\u2AA2\u0338", NotNestedLessLess: "\u2AA1\u0338", notni: "\u220C", notniva: "\u220C", notnivb: "\u22FE", notnivc: "\u22FD", NotPrecedes: "\u2280", NotPrecedesEqual: "\u2AAF\u0338", NotPrecedesSlantEqual: "\u22E0", NotReverseElement: "\u220C", NotRightTriangleBar: "\u29D0\u0338", NotRightTriangle: "\u22EB", NotRightTriangleEqual: "\u22ED", NotSquareSubset: "\u228F\u0338", NotSquareSubsetEqual: "\u22E2", NotSquareSuperset: "\u2290\u0338", NotSquareSupersetEqual: "\u22E3", NotSubset: "\u2282\u20D2", NotSubsetEqual: "\u2288", NotSucceeds: "\u2281", NotSucceedsEqual: "\u2AB0\u0338", NotSucceedsSlantEqual: "\u22E1", NotSucceedsTilde: "\u227F\u0338", NotSuperset: "\u2283\u20D2", NotSupersetEqual: "\u2289", NotTilde: "\u2241", NotTildeEqual: "\u2244", NotTildeFullEqual: "\u2247", NotTildeTilde: "\u2249", NotVerticalBar: "\u2224", nparallel: "\u2226", npar: "\u2226", nparsl: "\u2AFD\u20E5", npart: "\u2202\u0338", npolint: "\u2A14", npr: "\u2280", nprcue: "\u22E0", nprec: "\u2280", npreceq: "\u2AAF\u0338", npre: "\u2AAF\u0338", nrarrc: "\u2933\u0338", nrarr: "\u219B", nrArr: "\u21CF", nrarrw: "\u219D\u0338", nrightarrow: "\u219B", nRightarrow: "\u21CF", nrtri: "\u22EB", nrtrie: "\u22ED", nsc: "\u2281", nsccue: "\u22E1", nsce: "\u2AB0\u0338", Nscr: "\u{1D4A9}", nscr: "\u{1D4C3}", nshortmid: "\u2224", nshortparallel: "\u2226", nsim: "\u2241", nsime: "\u2244", nsimeq: "\u2244", nsmid: "\u2224", nspar: "\u2226", nsqsube: "\u22E2", nsqsupe: "\u22E3", nsub: "\u2284", nsubE: "\u2AC5\u0338", nsube: "\u2288", nsubset: "\u2282\u20D2", nsubseteq: "\u2288", nsubseteqq: "\u2AC5\u0338", nsucc: "\u2281", nsucceq: "\u2AB0\u0338", nsup: "\u2285", nsupE: "\u2AC6\u0338", nsupe: "\u2289", nsupset: "\u2283\u20D2", nsupseteq: "\u2289", nsupseteqq: "\u2AC6\u0338", ntgl: "\u2279", Ntilde: "\xD1", ntilde: "\xF1", ntlg: "\u2278", ntriangleleft: "\u22EA", ntrianglelefteq: "\u22EC", ntriangleright: "\u22EB", ntrianglerighteq: "\u22ED", Nu: "\u039D", nu: "\u03BD", num: "#", numero: "\u2116", numsp: "\u2007", nvap: "\u224D\u20D2", nvdash: "\u22AC", nvDash: "\u22AD", nVdash: "\u22AE", nVDash: "\u22AF", nvge: "\u2265\u20D2", nvgt: ">\u20D2", nvHarr: "\u2904", nvinfin: "\u29DE", nvlArr: "\u2902", nvle: "\u2264\u20D2", nvlt: "<\u20D2", nvltrie: "\u22B4\u20D2", nvrArr: "\u2903", nvrtrie: "\u22B5\u20D2", nvsim: "\u223C\u20D2", nwarhk: "\u2923", nwarr: "\u2196", nwArr: "\u21D6", nwarrow: "\u2196", nwnear: "\u2927", Oacute: "\xD3", oacute: "\xF3", oast: "\u229B", Ocirc: "\xD4", ocirc: "\xF4", ocir: "\u229A", Ocy: "\u041E", ocy: "\u043E", odash: "\u229D", Odblac: "\u0150", odblac: "\u0151", odiv: "\u2A38", odot: "\u2299", odsold: "\u29BC", OElig: "\u0152", oelig: "\u0153", ofcir: "\u29BF", Ofr: "\u{1D512}", ofr: "\u{1D52C}", ogon: "\u02DB", Ograve: "\xD2", ograve: "\xF2", ogt: "\u29C1", ohbar: "\u29B5", ohm: "\u03A9", oint: "\u222E", olarr: "\u21BA", olcir: "\u29BE", olcross: "\u29BB", oline: "\u203E", olt: "\u29C0", Omacr: "\u014C", omacr: "\u014D", Omega: "\u03A9", omega: "\u03C9", Omicron: "\u039F", omicron: "\u03BF", omid: "\u29B6", ominus: "\u2296", Oopf: "\u{1D546}", oopf: "\u{1D560}", opar: "\u29B7", OpenCurlyDoubleQuote: "\u201C", OpenCurlyQuote: "\u2018", operp: "\u29B9", oplus: "\u2295", orarr: "\u21BB", Or: "\u2A54", or: "\u2228", ord: "\u2A5D", order: "\u2134", orderof: "\u2134", ordf: "\xAA", ordm: "\xBA", origof: "\u22B6", oror: "\u2A56", orslope: "\u2A57", orv: "\u2A5B", oS: "\u24C8", Oscr: "\u{1D4AA}", oscr: "\u2134", Oslash: "\xD8", oslash: "\xF8", osol: "\u2298", Otilde: "\xD5", otilde: "\xF5", otimesas: "\u2A36", Otimes: "\u2A37", otimes: "\u2297", Ouml: "\xD6", ouml: "\xF6", ovbar: "\u233D", OverBar: "\u203E", OverBrace: "\u23DE", OverBracket: "\u23B4", OverParenthesis: "\u23DC", para: "\xB6", parallel: "\u2225", par: "\u2225", parsim: "\u2AF3", parsl: "\u2AFD", part: "\u2202", PartialD: "\u2202", Pcy: "\u041F", pcy: "\u043F", percnt: "%", period: ".", permil: "\u2030", perp: "\u22A5", pertenk: "\u2031", Pfr: "\u{1D513}", pfr: "\u{1D52D}", Phi: "\u03A6", phi: "\u03C6", phiv: "\u03D5", phmmat: "\u2133", phone: "\u260E", Pi: "\u03A0", pi: "\u03C0", pitchfork: "\u22D4", piv: "\u03D6", planck: "\u210F", planckh: "\u210E", plankv: "\u210F", plusacir: "\u2A23", plusb: "\u229E", pluscir: "\u2A22", plus: "+", plusdo: "\u2214", plusdu: "\u2A25", pluse: "\u2A72", PlusMinus: "\xB1", plusmn: "\xB1", plussim: "\u2A26", plustwo: "\u2A27", pm: "\xB1", Poincareplane: "\u210C", pointint: "\u2A15", popf: "\u{1D561}", Popf: "\u2119", pound: "\xA3", prap: "\u2AB7", Pr: "\u2ABB", pr: "\u227A", prcue: "\u227C", precapprox: "\u2AB7", prec: "\u227A", preccurlyeq: "\u227C", Precedes: "\u227A", PrecedesEqual: "\u2AAF", PrecedesSlantEqual: "\u227C", PrecedesTilde: "\u227E", preceq: "\u2AAF", precnapprox: "\u2AB9", precneqq: "\u2AB5", precnsim: "\u22E8", pre: "\u2AAF", prE: "\u2AB3", precsim: "\u227E", prime: "\u2032", Prime: "\u2033", primes: "\u2119", prnap: "\u2AB9", prnE: "\u2AB5", prnsim: "\u22E8", prod: "\u220F", Product: "\u220F", profalar: "\u232E", profline: "\u2312", profsurf: "\u2313", prop: "\u221D", Proportional: "\u221D", Proportion: "\u2237", propto: "\u221D", prsim: "\u227E", prurel: "\u22B0", Pscr: "\u{1D4AB}", pscr: "\u{1D4C5}", Psi: "\u03A8", psi: "\u03C8", puncsp: "\u2008", Qfr: "\u{1D514}", qfr: "\u{1D52E}", qint: "\u2A0C", qopf: "\u{1D562}", Qopf: "\u211A", qprime: "\u2057", Qscr: "\u{1D4AC}", qscr: "\u{1D4C6}", quaternions: "\u210D", quatint: "\u2A16", quest: "?", questeq: "\u225F", quot: '"', QUOT: '"', rAarr: "\u21DB", race: "\u223D\u0331", Racute: "\u0154", racute: "\u0155", radic: "\u221A", raemptyv: "\u29B3", rang: "\u27E9", Rang: "\u27EB", rangd: "\u2992", range: "\u29A5", rangle: "\u27E9", raquo: "\xBB", rarrap: "\u2975", rarrb: "\u21E5", rarrbfs: "\u2920", rarrc: "\u2933", rarr: "\u2192", Rarr: "\u21A0", rArr: "\u21D2", rarrfs: "\u291E", rarrhk: "\u21AA", rarrlp: "\u21AC", rarrpl: "\u2945", rarrsim: "\u2974", Rarrtl: "\u2916", rarrtl: "\u21A3", rarrw: "\u219D", ratail: "\u291A", rAtail: "\u291C", ratio: "\u2236", rationals: "\u211A", rbarr: "\u290D", rBarr: "\u290F", RBarr: "\u2910", rbbrk: "\u2773", rbrace: "}", rbrack: "]", rbrke: "\u298C", rbrksld: "\u298E", rbrkslu: "\u2990", Rcaron: "\u0158", rcaron: "\u0159", Rcedil: "\u0156", rcedil: "\u0157", rceil: "\u2309", rcub: "}", Rcy: "\u0420", rcy: "\u0440", rdca: "\u2937", rdldhar: "\u2969", rdquo: "\u201D", rdquor: "\u201D", rdsh: "\u21B3", real: "\u211C", realine: "\u211B", realpart: "\u211C", reals: "\u211D", Re: "\u211C", rect: "\u25AD", reg: "\xAE", REG: "\xAE", ReverseElement: "\u220B", ReverseEquilibrium: "\u21CB", ReverseUpEquilibrium: "\u296F", rfisht: "\u297D", rfloor: "\u230B", rfr: "\u{1D52F}", Rfr: "\u211C", rHar: "\u2964", rhard: "\u21C1", rharu: "\u21C0", rharul: "\u296C", Rho: "\u03A1", rho: "\u03C1", rhov: "\u03F1", RightAngleBracket: "\u27E9", RightArrowBar: "\u21E5", rightarrow: "\u2192", RightArrow: "\u2192", Rightarrow: "\u21D2", RightArrowLeftArrow: "\u21C4", rightarrowtail: "\u21A3", RightCeiling: "\u2309", RightDoubleBracket: "\u27E7", RightDownTeeVector: "\u295D", RightDownVectorBar: "\u2955", RightDownVector: "\u21C2", RightFloor: "\u230B", rightharpoondown: "\u21C1", rightharpoonup: "\u21C0", rightleftarrows: "\u21C4", rightleftharpoons: "\u21CC", rightrightarrows: "\u21C9", rightsquigarrow: "\u219D", RightTeeArrow: "\u21A6", RightTee: "\u22A2", RightTeeVector: "\u295B", rightthreetimes: "\u22CC", RightTriangleBar: "\u29D0", RightTriangle: "\u22B3", RightTriangleEqual: "\u22B5", RightUpDownVector: "\u294F", RightUpTeeVector: "\u295C", RightUpVectorBar: "\u2954", RightUpVector: "\u21BE", RightVectorBar: "\u2953", RightVector: "\u21C0", ring: "\u02DA", risingdotseq: "\u2253", rlarr: "\u21C4", rlhar: "\u21CC", rlm: "\u200F", rmoustache: "\u23B1", rmoust: "\u23B1", rnmid: "\u2AEE", roang: "\u27ED", roarr: "\u21FE", robrk: "\u27E7", ropar: "\u2986", ropf: "\u{1D563}", Ropf: "\u211D", roplus: "\u2A2E", rotimes: "\u2A35", RoundImplies: "\u2970", rpar: ")", rpargt: "\u2994", rppolint: "\u2A12", rrarr: "\u21C9", Rrightarrow: "\u21DB", rsaquo: "\u203A", rscr: "\u{1D4C7}", Rscr: "\u211B", rsh: "\u21B1", Rsh: "\u21B1", rsqb: "]", rsquo: "\u2019", rsquor: "\u2019", rthree: "\u22CC", rtimes: "\u22CA", rtri: "\u25B9", rtrie: "\u22B5", rtrif: "\u25B8", rtriltri: "\u29CE", RuleDelayed: "\u29F4", ruluhar: "\u2968", rx: "\u211E", Sacute: "\u015A", sacute: "\u015B", sbquo: "\u201A", scap: "\u2AB8", Scaron: "\u0160", scaron: "\u0161", Sc: "\u2ABC", sc: "\u227B", sccue: "\u227D", sce: "\u2AB0", scE: "\u2AB4", Scedil: "\u015E", scedil: "\u015F", Scirc: "\u015C", scirc: "\u015D", scnap: "\u2ABA", scnE: "\u2AB6", scnsim: "\u22E9", scpolint: "\u2A13", scsim: "\u227F", Scy: "\u0421", scy: "\u0441", sdotb: "\u22A1", sdot: "\u22C5", sdote: "\u2A66", searhk: "\u2925", searr: "\u2198", seArr: "\u21D8", searrow: "\u2198", sect: "\xA7", semi: ";", seswar: "\u2929", setminus: "\u2216", setmn: "\u2216", sext: "\u2736", Sfr: "\u{1D516}", sfr: "\u{1D530}", sfrown: "\u2322", sharp: "\u266F", SHCHcy: "\u0429", shchcy: "\u0449", SHcy: "\u0428", shcy: "\u0448", ShortDownArrow: "\u2193", ShortLeftArrow: "\u2190", shortmid: "\u2223", shortparallel: "\u2225", ShortRightArrow: "\u2192", ShortUpArrow: "\u2191", shy: "\xAD", Sigma: "\u03A3", sigma: "\u03C3", sigmaf: "\u03C2", sigmav: "\u03C2", sim: "\u223C", simdot: "\u2A6A", sime: "\u2243", simeq: "\u2243", simg: "\u2A9E", simgE: "\u2AA0", siml: "\u2A9D", simlE: "\u2A9F", simne: "\u2246", simplus: "\u2A24", simrarr: "\u2972", slarr: "\u2190", SmallCircle: "\u2218", smallsetminus: "\u2216", smashp: "\u2A33", smeparsl: "\u29E4", smid: "\u2223", smile: "\u2323", smt: "\u2AAA", smte: "\u2AAC", smtes: "\u2AAC\uFE00", SOFTcy: "\u042C", softcy: "\u044C", solbar: "\u233F", solb: "\u29C4", sol: "/", Sopf: "\u{1D54A}", sopf: "\u{1D564}", spades: "\u2660", spadesuit: "\u2660", spar: "\u2225", sqcap: "\u2293", sqcaps: "\u2293\uFE00", sqcup: "\u2294", sqcups: "\u2294\uFE00", Sqrt: "\u221A", sqsub: "\u228F", sqsube: "\u2291", sqsubset: "\u228F", sqsubseteq: "\u2291", sqsup: "\u2290", sqsupe: "\u2292", sqsupset: "\u2290", sqsupseteq: "\u2292", square: "\u25A1", Square: "\u25A1", SquareIntersection: "\u2293", SquareSubset: "\u228F", SquareSubsetEqual: "\u2291", SquareSuperset: "\u2290", SquareSupersetEqual: "\u2292", SquareUnion: "\u2294", squarf: "\u25AA", squ: "\u25A1", squf: "\u25AA", srarr: "\u2192", Sscr: "\u{1D4AE}", sscr: "\u{1D4C8}", ssetmn: "\u2216", ssmile: "\u2323", sstarf: "\u22C6", Star: "\u22C6", star: "\u2606", starf: "\u2605", straightepsilon: "\u03F5", straightphi: "\u03D5", strns: "\xAF", sub: "\u2282", Sub: "\u22D0", subdot: "\u2ABD", subE: "\u2AC5", sube: "\u2286", subedot: "\u2AC3", submult: "\u2AC1", subnE: "\u2ACB", subne: "\u228A", subplus: "\u2ABF", subrarr: "\u2979", subset: "\u2282", Subset: "\u22D0", subseteq: "\u2286", subseteqq: "\u2AC5", SubsetEqual: "\u2286", subsetneq: "\u228A", subsetneqq: "\u2ACB", subsim: "\u2AC7", subsub: "\u2AD5", subsup: "\u2AD3", succapprox: "\u2AB8", succ: "\u227B", succcurlyeq: "\u227D", Succeeds: "\u227B", SucceedsEqual: "\u2AB0", SucceedsSlantEqual: "\u227D", SucceedsTilde: "\u227F", succeq: "\u2AB0", succnapprox: "\u2ABA", succneqq: "\u2AB6", succnsim: "\u22E9", succsim: "\u227F", SuchThat: "\u220B", sum: "\u2211", Sum: "\u2211", sung: "\u266A", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", sup: "\u2283", Sup: "\u22D1", supdot: "\u2ABE", supdsub: "\u2AD8", supE: "\u2AC6", supe: "\u2287", supedot: "\u2AC4", Superset: "\u2283", SupersetEqual: "\u2287", suphsol: "\u27C9", suphsub: "\u2AD7", suplarr: "\u297B", supmult: "\u2AC2", supnE: "\u2ACC", supne: "\u228B", supplus: "\u2AC0", supset: "\u2283", Supset: "\u22D1", supseteq: "\u2287", supseteqq: "\u2AC6", supsetneq: "\u228B", supsetneqq: "\u2ACC", supsim: "\u2AC8", supsub: "\u2AD4", supsup: "\u2AD6", swarhk: "\u2926", swarr: "\u2199", swArr: "\u21D9", swarrow: "\u2199", swnwar: "\u292A", szlig: "\xDF", Tab: " ", target: "\u2316", Tau: "\u03A4", tau: "\u03C4", tbrk: "\u23B4", Tcaron: "\u0164", tcaron: "\u0165", Tcedil: "\u0162", tcedil: "\u0163", Tcy: "\u0422", tcy: "\u0442", tdot: "\u20DB", telrec: "\u2315", Tfr: "\u{1D517}", tfr: "\u{1D531}", there4: "\u2234", therefore: "\u2234", Therefore: "\u2234", Theta: "\u0398", theta: "\u03B8", thetasym: "\u03D1", thetav: "\u03D1", thickapprox: "\u2248", thicksim: "\u223C", ThickSpace: "\u205F\u200A", ThinSpace: "\u2009", thinsp: "\u2009", thkap: "\u2248", thksim: "\u223C", THORN: "\xDE", thorn: "\xFE", tilde: "\u02DC", Tilde: "\u223C", TildeEqual: "\u2243", TildeFullEqual: "\u2245", TildeTilde: "\u2248", timesbar: "\u2A31", timesb: "\u22A0", times: "\xD7", timesd: "\u2A30", tint: "\u222D", toea: "\u2928", topbot: "\u2336", topcir: "\u2AF1", top: "\u22A4", Topf: "\u{1D54B}", topf: "\u{1D565}", topfork: "\u2ADA", tosa: "\u2929", tprime: "\u2034", trade: "\u2122", TRADE: "\u2122", triangle: "\u25B5", triangledown: "\u25BF", triangleleft: "\u25C3", trianglelefteq: "\u22B4", triangleq: "\u225C", triangleright: "\u25B9", trianglerighteq: "\u22B5", tridot: "\u25EC", trie: "\u225C", triminus: "\u2A3A", TripleDot: "\u20DB", triplus: "\u2A39", trisb: "\u29CD", tritime: "\u2A3B", trpezium: "\u23E2", Tscr: "\u{1D4AF}", tscr: "\u{1D4C9}", TScy: "\u0426", tscy: "\u0446", TSHcy: "\u040B", tshcy: "\u045B", Tstrok: "\u0166", tstrok: "\u0167", twixt: "\u226C", twoheadleftarrow: "\u219E", twoheadrightarrow: "\u21A0", Uacute: "\xDA", uacute: "\xFA", uarr: "\u2191", Uarr: "\u219F", uArr: "\u21D1", Uarrocir: "\u2949", Ubrcy: "\u040E", ubrcy: "\u045E", Ubreve: "\u016C", ubreve: "\u016D", Ucirc: "\xDB", ucirc: "\xFB", Ucy: "\u0423", ucy: "\u0443", udarr: "\u21C5", Udblac: "\u0170", udblac: "\u0171", udhar: "\u296E", ufisht: "\u297E", Ufr: "\u{1D518}", ufr: "\u{1D532}", Ugrave: "\xD9", ugrave: "\xF9", uHar: "\u2963", uharl: "\u21BF", uharr: "\u21BE", uhblk: "\u2580", ulcorn: "\u231C", ulcorner: "\u231C", ulcrop: "\u230F", ultri: "\u25F8", Umacr: "\u016A", umacr: "\u016B", uml: "\xA8", UnderBar: "_", UnderBrace: "\u23DF", UnderBracket: "\u23B5", UnderParenthesis: "\u23DD", Union: "\u22C3", UnionPlus: "\u228E", Uogon: "\u0172", uogon: "\u0173", Uopf: "\u{1D54C}", uopf: "\u{1D566}", UpArrowBar: "\u2912", uparrow: "\u2191", UpArrow: "\u2191", Uparrow: "\u21D1", UpArrowDownArrow: "\u21C5", updownarrow: "\u2195", UpDownArrow: "\u2195", Updownarrow: "\u21D5", UpEquilibrium: "\u296E", upharpoonleft: "\u21BF", upharpoonright: "\u21BE", uplus: "\u228E", UpperLeftArrow: "\u2196", UpperRightArrow: "\u2197", upsi: "\u03C5", Upsi: "\u03D2", upsih: "\u03D2", Upsilon: "\u03A5", upsilon: "\u03C5", UpTeeArrow: "\u21A5", UpTee: "\u22A5", upuparrows: "\u21C8", urcorn: "\u231D", urcorner: "\u231D", urcrop: "\u230E", Uring: "\u016E", uring: "\u016F", urtri: "\u25F9", Uscr: "\u{1D4B0}", uscr: "\u{1D4CA}", utdot: "\u22F0", Utilde: "\u0168", utilde: "\u0169", utri: "\u25B5", utrif: "\u25B4", uuarr: "\u21C8", Uuml: "\xDC", uuml: "\xFC", uwangle: "\u29A7", vangrt: "\u299C", varepsilon: "\u03F5", varkappa: "\u03F0", varnothing: "\u2205", varphi: "\u03D5", varpi: "\u03D6", varpropto: "\u221D", varr: "\u2195", vArr: "\u21D5", varrho: "\u03F1", varsigma: "\u03C2", varsubsetneq: "\u228A\uFE00", varsubsetneqq: "\u2ACB\uFE00", varsupsetneq: "\u228B\uFE00", varsupsetneqq: "\u2ACC\uFE00", vartheta: "\u03D1", vartriangleleft: "\u22B2", vartriangleright: "\u22B3", vBar: "\u2AE8", Vbar: "\u2AEB", vBarv: "\u2AE9", Vcy: "\u0412", vcy: "\u0432", vdash: "\u22A2", vDash: "\u22A8", Vdash: "\u22A9", VDash: "\u22AB", Vdashl: "\u2AE6", veebar: "\u22BB", vee: "\u2228", Vee: "\u22C1", veeeq: "\u225A", vellip: "\u22EE", verbar: "|", Verbar: "\u2016", vert: "|", Vert: "\u2016", VerticalBar: "\u2223", VerticalLine: "|", VerticalSeparator: "\u2758", VerticalTilde: "\u2240", VeryThinSpace: "\u200A", Vfr: "\u{1D519}", vfr: "\u{1D533}", vltri: "\u22B2", vnsub: "\u2282\u20D2", vnsup: "\u2283\u20D2", Vopf: "\u{1D54D}", vopf: "\u{1D567}", vprop: "\u221D", vrtri: "\u22B3", Vscr: "\u{1D4B1}", vscr: "\u{1D4CB}", vsubnE: "\u2ACB\uFE00", vsubne: "\u228A\uFE00", vsupnE: "\u2ACC\uFE00", vsupne: "\u228B\uFE00", Vvdash: "\u22AA", vzigzag: "\u299A", Wcirc: "\u0174", wcirc: "\u0175", wedbar: "\u2A5F", wedge: "\u2227", Wedge: "\u22C0", wedgeq: "\u2259", weierp: "\u2118", Wfr: "\u{1D51A}", wfr: "\u{1D534}", Wopf: "\u{1D54E}", wopf: "\u{1D568}", wp: "\u2118", wr: "\u2240", wreath: "\u2240", Wscr: "\u{1D4B2}", wscr: "\u{1D4CC}", xcap: "\u22C2", xcirc: "\u25EF", xcup: "\u22C3", xdtri: "\u25BD", Xfr: "\u{1D51B}", xfr: "\u{1D535}", xharr: "\u27F7", xhArr: "\u27FA", Xi: "\u039E", xi: "\u03BE", xlarr: "\u27F5", xlArr: "\u27F8", xmap: "\u27FC", xnis: "\u22FB", xodot: "\u2A00", Xopf: "\u{1D54F}", xopf: "\u{1D569}", xoplus: "\u2A01", xotime: "\u2A02", xrarr: "\u27F6", xrArr: "\u27F9", Xscr: "\u{1D4B3}", xscr: "\u{1D4CD}", xsqcup: "\u2A06", xuplus: "\u2A04", xutri: "\u25B3", xvee: "\u22C1", xwedge: "\u22C0", Yacute: "\xDD", yacute: "\xFD", YAcy: "\u042F", yacy: "\u044F", Ycirc: "\u0176", ycirc: "\u0177", Ycy: "\u042B", ycy: "\u044B", yen: "\xA5", Yfr: "\u{1D51C}", yfr: "\u{1D536}", YIcy: "\u0407", yicy: "\u0457", Yopf: "\u{1D550}", yopf: "\u{1D56A}", Yscr: "\u{1D4B4}", yscr: "\u{1D4CE}", YUcy: "\u042E", yucy: "\u044E", yuml: "\xFF", Yuml: "\u0178", Zacute: "\u0179", zacute: "\u017A", Zcaron: "\u017D", zcaron: "\u017E", Zcy: "\u0417", zcy: "\u0437", Zdot: "\u017B", zdot: "\u017C", zeetrf: "\u2128", ZeroWidthSpace: "\u200B", Zeta: "\u0396", zeta: "\u03B6", zfr: "\u{1D537}", Zfr: "\u2128", ZHcy: "\u0416", zhcy: "\u0436", zigrarr: "\u21DD", zopf: "\u{1D56B}", Zopf: "\u2124", Zscr: "\u{1D4B5}", zscr: "\u{1D4CF}", zwj: "\u200D", zwnj: "\u200C" };
+ }
+});
+
+// node_modules/entities/lib/maps/legacy.json
+var require_legacy = __commonJS({
+ "node_modules/entities/lib/maps/legacy.json"(exports, module2) {
+ module2.exports = { Aacute: "\xC1", aacute: "\xE1", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", AElig: "\xC6", aelig: "\xE6", Agrave: "\xC0", agrave: "\xE0", amp: "&", AMP: "&", Aring: "\xC5", aring: "\xE5", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", brvbar: "\xA6", Ccedil: "\xC7", ccedil: "\xE7", cedil: "\xB8", cent: "\xA2", copy: "\xA9", COPY: "\xA9", curren: "\xA4", deg: "\xB0", divide: "\xF7", Eacute: "\xC9", eacute: "\xE9", Ecirc: "\xCA", ecirc: "\xEA", Egrave: "\xC8", egrave: "\xE8", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", frac12: "\xBD", frac14: "\xBC", frac34: "\xBE", gt: ">", GT: ">", Iacute: "\xCD", iacute: "\xED", Icirc: "\xCE", icirc: "\xEE", iexcl: "\xA1", Igrave: "\xCC", igrave: "\xEC", iquest: "\xBF", Iuml: "\xCF", iuml: "\xEF", laquo: "\xAB", lt: "<", LT: "<", macr: "\xAF", micro: "\xB5", middot: "\xB7", nbsp: "\xA0", not: "\xAC", Ntilde: "\xD1", ntilde: "\xF1", Oacute: "\xD3", oacute: "\xF3", Ocirc: "\xD4", ocirc: "\xF4", Ograve: "\xD2", ograve: "\xF2", ordf: "\xAA", ordm: "\xBA", Oslash: "\xD8", oslash: "\xF8", Otilde: "\xD5", otilde: "\xF5", Ouml: "\xD6", ouml: "\xF6", para: "\xB6", plusmn: "\xB1", pound: "\xA3", quot: '"', QUOT: '"', raquo: "\xBB", reg: "\xAE", REG: "\xAE", sect: "\xA7", shy: "\xAD", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", szlig: "\xDF", THORN: "\xDE", thorn: "\xFE", times: "\xD7", Uacute: "\xDA", uacute: "\xFA", Ucirc: "\xDB", ucirc: "\xFB", Ugrave: "\xD9", ugrave: "\xF9", uml: "\xA8", Uuml: "\xDC", uuml: "\xFC", Yacute: "\xDD", yacute: "\xFD", yen: "\xA5", yuml: "\xFF" };
+ }
+});
+
+// node_modules/entities/lib/maps/xml.json
+var require_xml = __commonJS({
+ "node_modules/entities/lib/maps/xml.json"(exports, module2) {
+ module2.exports = { amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' };
+ }
+});
+
+// node_modules/htmlparser2/lib/Tokenizer.js
+var require_Tokenizer = __commonJS({
+ "node_modules/htmlparser2/lib/Tokenizer.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var decode_codepoint_1 = __importDefault(require_decode_codepoint());
+ var entities_json_1 = __importDefault(require_entities());
+ var legacy_json_1 = __importDefault(require_legacy());
+ var xml_json_1 = __importDefault(require_xml());
+ function whitespace(c) {
+ return c === " " || c === "\n" || c === " " || c === "\f" || c === "\r";
+ }
+ function isASCIIAlpha(c) {
+ return c >= "a" && c <= "z" || c >= "A" && c <= "Z";
+ }
+ function ifElseState(upper, SUCCESS, FAILURE) {
+ var lower2 = upper.toLowerCase();
+ if (upper === lower2) {
+ return function(t2, c) {
+ if (c === lower2) {
+ t2._state = SUCCESS;
+ } else {
+ t2._state = FAILURE;
+ t2._index--;
+ }
+ };
+ }
+ return function(t2, c) {
+ if (c === lower2 || c === upper) {
+ t2._state = SUCCESS;
+ } else {
+ t2._state = FAILURE;
+ t2._index--;
+ }
+ };
+ }
+ function consumeSpecialNameChar(upper, NEXT_STATE) {
+ var lower2 = upper.toLowerCase();
+ return function(t2, c) {
+ if (c === lower2 || c === upper) {
+ t2._state = NEXT_STATE;
+ } else {
+ t2._state = 3;
+ t2._index--;
+ }
+ };
+ }
+ var stateBeforeCdata1 = ifElseState("C", 24, 16);
+ var stateBeforeCdata2 = ifElseState("D", 25, 16);
+ var stateBeforeCdata3 = ifElseState("A", 26, 16);
+ var stateBeforeCdata4 = ifElseState("T", 27, 16);
+ var stateBeforeCdata5 = ifElseState("A", 28, 16);
+ var stateBeforeScript1 = consumeSpecialNameChar("R", 35);
+ var stateBeforeScript2 = consumeSpecialNameChar("I", 36);
+ var stateBeforeScript3 = consumeSpecialNameChar("P", 37);
+ var stateBeforeScript4 = consumeSpecialNameChar("T", 38);
+ var stateAfterScript1 = ifElseState("R", 40, 1);
+ var stateAfterScript2 = ifElseState("I", 41, 1);
+ var stateAfterScript3 = ifElseState("P", 42, 1);
+ var stateAfterScript4 = ifElseState("T", 43, 1);
+ var stateBeforeStyle1 = consumeSpecialNameChar("Y", 45);
+ var stateBeforeStyle2 = consumeSpecialNameChar("L", 46);
+ var stateBeforeStyle3 = consumeSpecialNameChar("E", 47);
+ var stateAfterStyle1 = ifElseState("Y", 49, 1);
+ var stateAfterStyle2 = ifElseState("L", 50, 1);
+ var stateAfterStyle3 = ifElseState("E", 51, 1);
+ var stateBeforeSpecialT = consumeSpecialNameChar("I", 54);
+ var stateBeforeTitle1 = consumeSpecialNameChar("T", 55);
+ var stateBeforeTitle2 = consumeSpecialNameChar("L", 56);
+ var stateBeforeTitle3 = consumeSpecialNameChar("E", 57);
+ var stateAfterSpecialTEnd = ifElseState("I", 58, 1);
+ var stateAfterTitle1 = ifElseState("T", 59, 1);
+ var stateAfterTitle2 = ifElseState("L", 60, 1);
+ var stateAfterTitle3 = ifElseState("E", 61, 1);
+ var stateBeforeEntity = ifElseState("#", 63, 64);
+ var stateBeforeNumericEntity = ifElseState("X", 66, 65);
+ var Tokenizer = function() {
+ function Tokenizer2(options, cbs) {
+ var _a;
+ this._state = 1;
+ this.buffer = "";
+ this.sectionStart = 0;
+ this._index = 0;
+ this.bufferOffset = 0;
+ this.baseState = 1;
+ this.special = 1;
+ this.running = true;
+ this.ended = false;
+ this.cbs = cbs;
+ this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode);
+ this.decodeEntities = (_a = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a !== void 0 ? _a : true;
+ }
+ Tokenizer2.prototype.reset = function() {
+ this._state = 1;
+ this.buffer = "";
+ this.sectionStart = 0;
+ this._index = 0;
+ this.bufferOffset = 0;
+ this.baseState = 1;
+ this.special = 1;
+ this.running = true;
+ this.ended = false;
+ };
+ Tokenizer2.prototype.write = function(chunk) {
+ if (this.ended)
+ this.cbs.onerror(Error(".write() after done!"));
+ this.buffer += chunk;
+ this.parse();
+ };
+ Tokenizer2.prototype.end = function(chunk) {
+ if (this.ended)
+ this.cbs.onerror(Error(".end() after done!"));
+ if (chunk)
+ this.write(chunk);
+ this.ended = true;
+ if (this.running)
+ this.finish();
+ };
+ Tokenizer2.prototype.pause = function() {
+ this.running = false;
+ };
+ Tokenizer2.prototype.resume = function() {
+ this.running = true;
+ if (this._index < this.buffer.length) {
+ this.parse();
+ }
+ if (this.ended) {
+ this.finish();
+ }
+ };
+ Tokenizer2.prototype.getAbsoluteIndex = function() {
+ return this.bufferOffset + this._index;
+ };
+ Tokenizer2.prototype.stateText = function(c) {
+ if (c === "<") {
+ if (this._index > this.sectionStart) {
+ this.cbs.ontext(this.getSection());
+ }
+ this._state = 2;
+ this.sectionStart = this._index;
+ } else if (this.decodeEntities && c === "&" && (this.special === 1 || this.special === 4)) {
+ if (this._index > this.sectionStart) {
+ this.cbs.ontext(this.getSection());
+ }
+ this.baseState = 1;
+ this._state = 62;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.isTagStartChar = function(c) {
+ return isASCIIAlpha(c) || this.xmlMode && !whitespace(c) && c !== "/" && c !== ">";
+ };
+ Tokenizer2.prototype.stateBeforeTagName = function(c) {
+ if (c === "/") {
+ this._state = 5;
+ } else if (c === "<") {
+ this.cbs.ontext(this.getSection());
+ this.sectionStart = this._index;
+ } else if (c === ">" || this.special !== 1 || whitespace(c)) {
+ this._state = 1;
+ } else if (c === "!") {
+ this._state = 15;
+ this.sectionStart = this._index + 1;
+ } else if (c === "?") {
+ this._state = 17;
+ this.sectionStart = this._index + 1;
+ } else if (!this.isTagStartChar(c)) {
+ this._state = 1;
+ } else {
+ this._state = !this.xmlMode && (c === "s" || c === "S") ? 32 : !this.xmlMode && (c === "t" || c === "T") ? 52 : 3;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInTagName = function(c) {
+ if (c === "/" || c === ">" || whitespace(c)) {
+ this.emitToken("onopentagname");
+ this._state = 8;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeClosingTagName = function(c) {
+ if (whitespace(c)) {
+ } else if (c === ">") {
+ this._state = 1;
+ } else if (this.special !== 1) {
+ if (this.special !== 4 && (c === "s" || c === "S")) {
+ this._state = 33;
+ } else if (this.special === 4 && (c === "t" || c === "T")) {
+ this._state = 53;
+ } else {
+ this._state = 1;
+ this._index--;
+ }
+ } else if (!this.isTagStartChar(c)) {
+ this._state = 20;
+ this.sectionStart = this._index;
+ } else {
+ this._state = 6;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInClosingTagName = function(c) {
+ if (c === ">" || whitespace(c)) {
+ this.emitToken("onclosetag");
+ this._state = 7;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateAfterClosingTagName = function(c) {
+ if (c === ">") {
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeAttributeName = function(c) {
+ if (c === ">") {
+ this.cbs.onopentagend();
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ } else if (c === "/") {
+ this._state = 4;
+ } else if (!whitespace(c)) {
+ this._state = 9;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInSelfClosingTag = function(c) {
+ if (c === ">") {
+ this.cbs.onselfclosingtag();
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ this.special = 1;
+ } else if (!whitespace(c)) {
+ this._state = 8;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateInAttributeName = function(c) {
+ if (c === "=" || c === "/" || c === ">" || whitespace(c)) {
+ this.cbs.onattribname(this.getSection());
+ this.sectionStart = -1;
+ this._state = 10;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateAfterAttributeName = function(c) {
+ if (c === "=") {
+ this._state = 11;
+ } else if (c === "/" || c === ">") {
+ this.cbs.onattribend(void 0);
+ this._state = 8;
+ this._index--;
+ } else if (!whitespace(c)) {
+ this.cbs.onattribend(void 0);
+ this._state = 9;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeAttributeValue = function(c) {
+ if (c === '"') {
+ this._state = 12;
+ this.sectionStart = this._index + 1;
+ } else if (c === "'") {
+ this._state = 13;
+ this.sectionStart = this._index + 1;
+ } else if (!whitespace(c)) {
+ this._state = 14;
+ this.sectionStart = this._index;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.handleInAttributeValue = function(c, quote) {
+ if (c === quote) {
+ this.emitToken("onattribdata");
+ this.cbs.onattribend(quote);
+ this._state = 8;
+ } else if (this.decodeEntities && c === "&") {
+ this.emitToken("onattribdata");
+ this.baseState = this._state;
+ this._state = 62;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInAttributeValueDoubleQuotes = function(c) {
+ this.handleInAttributeValue(c, '"');
+ };
+ Tokenizer2.prototype.stateInAttributeValueSingleQuotes = function(c) {
+ this.handleInAttributeValue(c, "'");
+ };
+ Tokenizer2.prototype.stateInAttributeValueNoQuotes = function(c) {
+ if (whitespace(c) || c === ">") {
+ this.emitToken("onattribdata");
+ this.cbs.onattribend(null);
+ this._state = 8;
+ this._index--;
+ } else if (this.decodeEntities && c === "&") {
+ this.emitToken("onattribdata");
+ this.baseState = this._state;
+ this._state = 62;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeDeclaration = function(c) {
+ this._state = c === "[" ? 23 : c === "-" ? 18 : 16;
+ };
+ Tokenizer2.prototype.stateInDeclaration = function(c) {
+ if (c === ">") {
+ this.cbs.ondeclaration(this.getSection());
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateInProcessingInstruction = function(c) {
+ if (c === ">") {
+ this.cbs.onprocessinginstruction(this.getSection());
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeComment = function(c) {
+ if (c === "-") {
+ this._state = 19;
+ this.sectionStart = this._index + 1;
+ } else {
+ this._state = 16;
+ }
+ };
+ Tokenizer2.prototype.stateInComment = function(c) {
+ if (c === "-")
+ this._state = 21;
+ };
+ Tokenizer2.prototype.stateInSpecialComment = function(c) {
+ if (c === ">") {
+ this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index));
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateAfterComment1 = function(c) {
+ if (c === "-") {
+ this._state = 22;
+ } else {
+ this._state = 19;
+ }
+ };
+ Tokenizer2.prototype.stateAfterComment2 = function(c) {
+ if (c === ">") {
+ this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2));
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ } else if (c !== "-") {
+ this._state = 19;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeCdata6 = function(c) {
+ if (c === "[") {
+ this._state = 29;
+ this.sectionStart = this._index + 1;
+ } else {
+ this._state = 16;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateInCdata = function(c) {
+ if (c === "]")
+ this._state = 30;
+ };
+ Tokenizer2.prototype.stateAfterCdata1 = function(c) {
+ if (c === "]")
+ this._state = 31;
+ else
+ this._state = 29;
+ };
+ Tokenizer2.prototype.stateAfterCdata2 = function(c) {
+ if (c === ">") {
+ this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2));
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ } else if (c !== "]") {
+ this._state = 29;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeSpecialS = function(c) {
+ if (c === "c" || c === "C") {
+ this._state = 34;
+ } else if (c === "t" || c === "T") {
+ this._state = 44;
+ } else {
+ this._state = 3;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeSpecialSEnd = function(c) {
+ if (this.special === 2 && (c === "c" || c === "C")) {
+ this._state = 39;
+ } else if (this.special === 3 && (c === "t" || c === "T")) {
+ this._state = 48;
+ } else
+ this._state = 1;
+ };
+ Tokenizer2.prototype.stateBeforeSpecialLast = function(c, special) {
+ if (c === "/" || c === ">" || whitespace(c)) {
+ this.special = special;
+ }
+ this._state = 3;
+ this._index--;
+ };
+ Tokenizer2.prototype.stateAfterSpecialLast = function(c, sectionStartOffset) {
+ if (c === ">" || whitespace(c)) {
+ this.special = 1;
+ this._state = 6;
+ this.sectionStart = this._index - sectionStartOffset;
+ this._index--;
+ } else
+ this._state = 1;
+ };
+ Tokenizer2.prototype.parseFixedEntity = function(map) {
+ if (map === void 0) {
+ map = this.xmlMode ? xml_json_1.default : entities_json_1.default;
+ }
+ if (this.sectionStart + 1 < this._index) {
+ var entity = this.buffer.substring(this.sectionStart + 1, this._index);
+ if (Object.prototype.hasOwnProperty.call(map, entity)) {
+ this.emitPartial(map[entity]);
+ this.sectionStart = this._index + 1;
+ }
+ }
+ };
+ Tokenizer2.prototype.parseLegacyEntity = function() {
+ var start = this.sectionStart + 1;
+ var limit = Math.min(this._index - start, 6);
+ while (limit >= 2) {
+ var entity = this.buffer.substr(start, limit);
+ if (Object.prototype.hasOwnProperty.call(legacy_json_1.default, entity)) {
+ this.emitPartial(legacy_json_1.default[entity]);
+ this.sectionStart += limit + 1;
+ return;
+ }
+ limit--;
+ }
+ };
+ Tokenizer2.prototype.stateInNamedEntity = function(c) {
+ if (c === ";") {
+ this.parseFixedEntity();
+ if (this.baseState === 1 && this.sectionStart + 1 < this._index && !this.xmlMode) {
+ this.parseLegacyEntity();
+ }
+ this._state = this.baseState;
+ } else if ((c < "0" || c > "9") && !isASCIIAlpha(c)) {
+ if (this.xmlMode || this.sectionStart + 1 === this._index) {
+ } else if (this.baseState !== 1) {
+ if (c !== "=") {
+ this.parseFixedEntity(legacy_json_1.default);
+ }
+ } else {
+ this.parseLegacyEntity();
+ }
+ this._state = this.baseState;
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.decodeNumericEntity = function(offset, base, strict) {
+ var sectionStart = this.sectionStart + offset;
+ if (sectionStart !== this._index) {
+ var entity = this.buffer.substring(sectionStart, this._index);
+ var parsed = parseInt(entity, base);
+ this.emitPartial(decode_codepoint_1.default(parsed));
+ this.sectionStart = strict ? this._index + 1 : this._index;
+ }
+ this._state = this.baseState;
+ };
+ Tokenizer2.prototype.stateInNumericEntity = function(c) {
+ if (c === ";") {
+ this.decodeNumericEntity(2, 10, true);
+ } else if (c < "0" || c > "9") {
+ if (!this.xmlMode) {
+ this.decodeNumericEntity(2, 10, false);
+ } else {
+ this._state = this.baseState;
+ }
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.stateInHexEntity = function(c) {
+ if (c === ";") {
+ this.decodeNumericEntity(3, 16, true);
+ } else if ((c < "a" || c > "f") && (c < "A" || c > "F") && (c < "0" || c > "9")) {
+ if (!this.xmlMode) {
+ this.decodeNumericEntity(3, 16, false);
+ } else {
+ this._state = this.baseState;
+ }
+ this._index--;
+ }
+ };
+ Tokenizer2.prototype.cleanup = function() {
+ if (this.sectionStart < 0) {
+ this.buffer = "";
+ this.bufferOffset += this._index;
+ this._index = 0;
+ } else if (this.running) {
+ if (this._state === 1) {
+ if (this.sectionStart !== this._index) {
+ this.cbs.ontext(this.buffer.substr(this.sectionStart));
+ }
+ this.buffer = "";
+ this.bufferOffset += this._index;
+ this._index = 0;
+ } else if (this.sectionStart === this._index) {
+ this.buffer = "";
+ this.bufferOffset += this._index;
+ this._index = 0;
+ } else {
+ this.buffer = this.buffer.substr(this.sectionStart);
+ this._index -= this.sectionStart;
+ this.bufferOffset += this.sectionStart;
+ }
+ this.sectionStart = 0;
+ }
+ };
+ Tokenizer2.prototype.parse = function() {
+ while (this._index < this.buffer.length && this.running) {
+ var c = this.buffer.charAt(this._index);
+ if (this._state === 1) {
+ this.stateText(c);
+ } else if (this._state === 12) {
+ this.stateInAttributeValueDoubleQuotes(c);
+ } else if (this._state === 9) {
+ this.stateInAttributeName(c);
+ } else if (this._state === 19) {
+ this.stateInComment(c);
+ } else if (this._state === 20) {
+ this.stateInSpecialComment(c);
+ } else if (this._state === 8) {
+ this.stateBeforeAttributeName(c);
+ } else if (this._state === 3) {
+ this.stateInTagName(c);
+ } else if (this._state === 6) {
+ this.stateInClosingTagName(c);
+ } else if (this._state === 2) {
+ this.stateBeforeTagName(c);
+ } else if (this._state === 10) {
+ this.stateAfterAttributeName(c);
+ } else if (this._state === 13) {
+ this.stateInAttributeValueSingleQuotes(c);
+ } else if (this._state === 11) {
+ this.stateBeforeAttributeValue(c);
+ } else if (this._state === 5) {
+ this.stateBeforeClosingTagName(c);
+ } else if (this._state === 7) {
+ this.stateAfterClosingTagName(c);
+ } else if (this._state === 32) {
+ this.stateBeforeSpecialS(c);
+ } else if (this._state === 21) {
+ this.stateAfterComment1(c);
+ } else if (this._state === 14) {
+ this.stateInAttributeValueNoQuotes(c);
+ } else if (this._state === 4) {
+ this.stateInSelfClosingTag(c);
+ } else if (this._state === 16) {
+ this.stateInDeclaration(c);
+ } else if (this._state === 15) {
+ this.stateBeforeDeclaration(c);
+ } else if (this._state === 22) {
+ this.stateAfterComment2(c);
+ } else if (this._state === 18) {
+ this.stateBeforeComment(c);
+ } else if (this._state === 33) {
+ this.stateBeforeSpecialSEnd(c);
+ } else if (this._state === 53) {
+ stateAfterSpecialTEnd(this, c);
+ } else if (this._state === 39) {
+ stateAfterScript1(this, c);
+ } else if (this._state === 40) {
+ stateAfterScript2(this, c);
+ } else if (this._state === 41) {
+ stateAfterScript3(this, c);
+ } else if (this._state === 34) {
+ stateBeforeScript1(this, c);
+ } else if (this._state === 35) {
+ stateBeforeScript2(this, c);
+ } else if (this._state === 36) {
+ stateBeforeScript3(this, c);
+ } else if (this._state === 37) {
+ stateBeforeScript4(this, c);
+ } else if (this._state === 38) {
+ this.stateBeforeSpecialLast(c, 2);
+ } else if (this._state === 42) {
+ stateAfterScript4(this, c);
+ } else if (this._state === 43) {
+ this.stateAfterSpecialLast(c, 6);
+ } else if (this._state === 44) {
+ stateBeforeStyle1(this, c);
+ } else if (this._state === 29) {
+ this.stateInCdata(c);
+ } else if (this._state === 45) {
+ stateBeforeStyle2(this, c);
+ } else if (this._state === 46) {
+ stateBeforeStyle3(this, c);
+ } else if (this._state === 47) {
+ this.stateBeforeSpecialLast(c, 3);
+ } else if (this._state === 48) {
+ stateAfterStyle1(this, c);
+ } else if (this._state === 49) {
+ stateAfterStyle2(this, c);
+ } else if (this._state === 50) {
+ stateAfterStyle3(this, c);
+ } else if (this._state === 51) {
+ this.stateAfterSpecialLast(c, 5);
+ } else if (this._state === 52) {
+ stateBeforeSpecialT(this, c);
+ } else if (this._state === 54) {
+ stateBeforeTitle1(this, c);
+ } else if (this._state === 55) {
+ stateBeforeTitle2(this, c);
+ } else if (this._state === 56) {
+ stateBeforeTitle3(this, c);
+ } else if (this._state === 57) {
+ this.stateBeforeSpecialLast(c, 4);
+ } else if (this._state === 58) {
+ stateAfterTitle1(this, c);
+ } else if (this._state === 59) {
+ stateAfterTitle2(this, c);
+ } else if (this._state === 60) {
+ stateAfterTitle3(this, c);
+ } else if (this._state === 61) {
+ this.stateAfterSpecialLast(c, 5);
+ } else if (this._state === 17) {
+ this.stateInProcessingInstruction(c);
+ } else if (this._state === 64) {
+ this.stateInNamedEntity(c);
+ } else if (this._state === 23) {
+ stateBeforeCdata1(this, c);
+ } else if (this._state === 62) {
+ stateBeforeEntity(this, c);
+ } else if (this._state === 24) {
+ stateBeforeCdata2(this, c);
+ } else if (this._state === 25) {
+ stateBeforeCdata3(this, c);
+ } else if (this._state === 30) {
+ this.stateAfterCdata1(c);
+ } else if (this._state === 31) {
+ this.stateAfterCdata2(c);
+ } else if (this._state === 26) {
+ stateBeforeCdata4(this, c);
+ } else if (this._state === 27) {
+ stateBeforeCdata5(this, c);
+ } else if (this._state === 28) {
+ this.stateBeforeCdata6(c);
+ } else if (this._state === 66) {
+ this.stateInHexEntity(c);
+ } else if (this._state === 65) {
+ this.stateInNumericEntity(c);
+ } else if (this._state === 63) {
+ stateBeforeNumericEntity(this, c);
+ } else {
+ this.cbs.onerror(Error("unknown _state"), this._state);
+ }
+ this._index++;
+ }
+ this.cleanup();
+ };
+ Tokenizer2.prototype.finish = function() {
+ if (this.sectionStart < this._index) {
+ this.handleTrailingData();
+ }
+ this.cbs.onend();
+ };
+ Tokenizer2.prototype.handleTrailingData = function() {
+ var data = this.buffer.substr(this.sectionStart);
+ if (this._state === 29 || this._state === 30 || this._state === 31) {
+ this.cbs.oncdata(data);
+ } else if (this._state === 19 || this._state === 21 || this._state === 22) {
+ this.cbs.oncomment(data);
+ } else if (this._state === 64 && !this.xmlMode) {
+ this.parseLegacyEntity();
+ if (this.sectionStart < this._index) {
+ this._state = this.baseState;
+ this.handleTrailingData();
+ }
+ } else if (this._state === 65 && !this.xmlMode) {
+ this.decodeNumericEntity(2, 10, false);
+ if (this.sectionStart < this._index) {
+ this._state = this.baseState;
+ this.handleTrailingData();
+ }
+ } else if (this._state === 66 && !this.xmlMode) {
+ this.decodeNumericEntity(3, 16, false);
+ if (this.sectionStart < this._index) {
+ this._state = this.baseState;
+ this.handleTrailingData();
+ }
+ } else if (this._state !== 3 && this._state !== 8 && this._state !== 11 && this._state !== 10 && this._state !== 9 && this._state !== 13 && this._state !== 12 && this._state !== 14 && this._state !== 6) {
+ this.cbs.ontext(data);
+ }
+ };
+ Tokenizer2.prototype.getSection = function() {
+ return this.buffer.substring(this.sectionStart, this._index);
+ };
+ Tokenizer2.prototype.emitToken = function(name) {
+ this.cbs[name](this.getSection());
+ this.sectionStart = -1;
+ };
+ Tokenizer2.prototype.emitPartial = function(value) {
+ if (this.baseState !== 1) {
+ this.cbs.onattribdata(value);
+ } else {
+ this.cbs.ontext(value);
+ }
+ };
+ return Tokenizer2;
+ }();
+ exports.default = Tokenizer;
+ }
+});
+
+// node_modules/htmlparser2/lib/Parser.js
+var require_Parser = __commonJS({
+ "node_modules/htmlparser2/lib/Parser.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Parser = void 0;
+ var Tokenizer_1 = __importDefault(require_Tokenizer());
+ var formTags = /* @__PURE__ */ new Set([
+ "input",
+ "option",
+ "optgroup",
+ "select",
+ "button",
+ "datalist",
+ "textarea"
+ ]);
+ var pTag = /* @__PURE__ */ new Set(["p"]);
+ var openImpliesClose = {
+ tr: /* @__PURE__ */ new Set(["tr", "th", "td"]),
+ th: /* @__PURE__ */ new Set(["th"]),
+ td: /* @__PURE__ */ new Set(["thead", "th", "td"]),
+ body: /* @__PURE__ */ new Set(["head", "link", "script"]),
+ li: /* @__PURE__ */ new Set(["li"]),
+ p: pTag,
+ h1: pTag,
+ h2: pTag,
+ h3: pTag,
+ h4: pTag,
+ h5: pTag,
+ h6: pTag,
+ select: formTags,
+ input: formTags,
+ output: formTags,
+ button: formTags,
+ datalist: formTags,
+ textarea: formTags,
+ option: /* @__PURE__ */ new Set(["option"]),
+ optgroup: /* @__PURE__ */ new Set(["optgroup", "option"]),
+ dd: /* @__PURE__ */ new Set(["dt", "dd"]),
+ dt: /* @__PURE__ */ new Set(["dt", "dd"]),
+ address: pTag,
+ article: pTag,
+ aside: pTag,
+ blockquote: pTag,
+ details: pTag,
+ div: pTag,
+ dl: pTag,
+ fieldset: pTag,
+ figcaption: pTag,
+ figure: pTag,
+ footer: pTag,
+ form: pTag,
+ header: pTag,
+ hr: pTag,
+ main: pTag,
+ nav: pTag,
+ ol: pTag,
+ pre: pTag,
+ section: pTag,
+ table: pTag,
+ ul: pTag,
+ rt: /* @__PURE__ */ new Set(["rt", "rp"]),
+ rp: /* @__PURE__ */ new Set(["rt", "rp"]),
+ tbody: /* @__PURE__ */ new Set(["thead", "tbody"]),
+ tfoot: /* @__PURE__ */ new Set(["thead", "tbody"])
+ };
+ var voidElements2 = /* @__PURE__ */ new Set([
+ "area",
+ "base",
+ "basefont",
+ "br",
+ "col",
+ "command",
+ "embed",
+ "frame",
+ "hr",
+ "img",
+ "input",
+ "isindex",
+ "keygen",
+ "link",
+ "meta",
+ "param",
+ "source",
+ "track",
+ "wbr"
+ ]);
+ var foreignContextElements = /* @__PURE__ */ new Set(["math", "svg"]);
+ var htmlIntegrationElements = /* @__PURE__ */ new Set([
+ "mi",
+ "mo",
+ "mn",
+ "ms",
+ "mtext",
+ "annotation-xml",
+ "foreignObject",
+ "desc",
+ "title"
+ ]);
+ var reNameEnd = /\s|\//;
+ var Parser2 = function() {
+ function Parser3(cbs, options) {
+ if (options === void 0) {
+ options = {};
+ }
+ var _a, _b, _c, _d, _e;
+ this.startIndex = 0;
+ this.endIndex = null;
+ this.tagname = "";
+ this.attribname = "";
+ this.attribvalue = "";
+ this.attribs = null;
+ this.stack = [];
+ this.foreignContext = [];
+ this.options = options;
+ this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
+ this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;
+ this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;
+ this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);
+ (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);
+ }
+ Parser3.prototype.updatePosition = function(initialOffset) {
+ if (this.endIndex === null) {
+ if (this.tokenizer.sectionStart <= initialOffset) {
+ this.startIndex = 0;
+ } else {
+ this.startIndex = this.tokenizer.sectionStart - initialOffset;
+ }
+ } else {
+ this.startIndex = this.endIndex + 1;
+ }
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ };
+ Parser3.prototype.ontext = function(data) {
+ var _a, _b;
+ this.updatePosition(1);
+ this.endIndex--;
+ (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);
+ };
+ Parser3.prototype.onopentagname = function(name) {
+ var _a, _b;
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ this.tagname = name;
+ if (!this.options.xmlMode && Object.prototype.hasOwnProperty.call(openImpliesClose, name)) {
+ var el = void 0;
+ while (this.stack.length > 0 && openImpliesClose[name].has(el = this.stack[this.stack.length - 1])) {
+ this.onclosetag(el);
+ }
+ }
+ if (this.options.xmlMode || !voidElements2.has(name)) {
+ this.stack.push(name);
+ if (foreignContextElements.has(name)) {
+ this.foreignContext.push(true);
+ } else if (htmlIntegrationElements.has(name)) {
+ this.foreignContext.push(false);
+ }
+ }
+ (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);
+ if (this.cbs.onopentag)
+ this.attribs = {};
+ };
+ Parser3.prototype.onopentagend = function() {
+ var _a, _b;
+ this.updatePosition(1);
+ if (this.attribs) {
+ (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs);
+ this.attribs = null;
+ }
+ if (!this.options.xmlMode && this.cbs.onclosetag && voidElements2.has(this.tagname)) {
+ this.cbs.onclosetag(this.tagname);
+ }
+ this.tagname = "";
+ };
+ Parser3.prototype.onclosetag = function(name) {
+ this.updatePosition(1);
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ if (foreignContextElements.has(name) || htmlIntegrationElements.has(name)) {
+ this.foreignContext.pop();
+ }
+ if (this.stack.length && (this.options.xmlMode || !voidElements2.has(name))) {
+ var pos = this.stack.lastIndexOf(name);
+ if (pos !== -1) {
+ if (this.cbs.onclosetag) {
+ pos = this.stack.length - pos;
+ while (pos--) {
+ this.cbs.onclosetag(this.stack.pop());
+ }
+ } else
+ this.stack.length = pos;
+ } else if (name === "p" && !this.options.xmlMode) {
+ this.onopentagname(name);
+ this.closeCurrentTag();
+ }
+ } else if (!this.options.xmlMode && (name === "br" || name === "p")) {
+ this.onopentagname(name);
+ this.closeCurrentTag();
+ }
+ };
+ Parser3.prototype.onselfclosingtag = function() {
+ if (this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1]) {
+ this.closeCurrentTag();
+ } else {
+ this.onopentagend();
+ }
+ };
+ Parser3.prototype.closeCurrentTag = function() {
+ var _a, _b;
+ var name = this.tagname;
+ this.onopentagend();
+ if (this.stack[this.stack.length - 1] === name) {
+ (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name);
+ this.stack.pop();
+ }
+ };
+ Parser3.prototype.onattribname = function(name) {
+ if (this.lowerCaseAttributeNames) {
+ name = name.toLowerCase();
+ }
+ this.attribname = name;
+ };
+ Parser3.prototype.onattribdata = function(value) {
+ this.attribvalue += value;
+ };
+ Parser3.prototype.onattribend = function(quote) {
+ var _a, _b;
+ (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);
+ if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
+ this.attribs[this.attribname] = this.attribvalue;
+ }
+ this.attribname = "";
+ this.attribvalue = "";
+ };
+ Parser3.prototype.getInstructionName = function(value) {
+ var idx = value.search(reNameEnd);
+ var name = idx < 0 ? value : value.substr(0, idx);
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ return name;
+ };
+ Parser3.prototype.ondeclaration = function(value) {
+ if (this.cbs.onprocessinginstruction) {
+ var name_1 = this.getInstructionName(value);
+ this.cbs.onprocessinginstruction("!" + name_1, "!" + value);
+ }
+ };
+ Parser3.prototype.onprocessinginstruction = function(value) {
+ if (this.cbs.onprocessinginstruction) {
+ var name_2 = this.getInstructionName(value);
+ this.cbs.onprocessinginstruction("?" + name_2, "?" + value);
+ }
+ };
+ Parser3.prototype.oncomment = function(value) {
+ var _a, _b, _c, _d;
+ this.updatePosition(4);
+ (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);
+ (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
+ };
+ Parser3.prototype.oncdata = function(value) {
+ var _a, _b, _c, _d, _e, _f;
+ this.updatePosition(1);
+ if (this.options.xmlMode || this.options.recognizeCDATA) {
+ (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
+ (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
+ (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
+ } else {
+ this.oncomment("[CDATA[" + value + "]]");
+ }
+ };
+ Parser3.prototype.onerror = function(err) {
+ var _a, _b;
+ (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);
+ };
+ Parser3.prototype.onend = function() {
+ var _a, _b;
+ if (this.cbs.onclosetag) {
+ for (var i2 = this.stack.length; i2 > 0; this.cbs.onclosetag(this.stack[--i2]))
+ ;
+ }
+ (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);
+ };
+ Parser3.prototype.reset = function() {
+ var _a, _b, _c, _d;
+ (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);
+ this.tokenizer.reset();
+ this.tagname = "";
+ this.attribname = "";
+ this.attribs = null;
+ this.stack = [];
+ (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);
+ };
+ Parser3.prototype.parseComplete = function(data) {
+ this.reset();
+ this.end(data);
+ };
+ Parser3.prototype.write = function(chunk) {
+ this.tokenizer.write(chunk);
+ };
+ Parser3.prototype.end = function(chunk) {
+ this.tokenizer.end(chunk);
+ };
+ Parser3.prototype.pause = function() {
+ this.tokenizer.pause();
+ };
+ Parser3.prototype.resume = function() {
+ this.tokenizer.resume();
+ };
+ Parser3.prototype.parseChunk = function(chunk) {
+ this.write(chunk);
+ };
+ Parser3.prototype.done = function(chunk) {
+ this.end(chunk);
+ };
+ return Parser3;
+ }();
+ exports.Parser = Parser2;
+ }
+});
+
+// node_modules/entities/lib/decode.js
+var require_decode2 = __commonJS({
+ "node_modules/entities/lib/decode.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;
+ var entities_json_1 = __importDefault(require_entities());
+ var legacy_json_1 = __importDefault(require_legacy());
+ var xml_json_1 = __importDefault(require_xml());
+ var decode_codepoint_1 = __importDefault(require_decode_codepoint());
+ var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
+ exports.decodeXML = getStrictDecoder(xml_json_1.default);
+ exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
+ function getStrictDecoder(map) {
+ var replace2 = getReplacer(map);
+ return function(str) {
+ return String(str).replace(strictEntityRe, replace2);
+ };
+ }
+ var sorter = function(a, b) {
+ return a < b ? 1 : -1;
+ };
+ exports.decodeHTML = function() {
+ var legacy = Object.keys(legacy_json_1.default).sort(sorter);
+ var keys2 = Object.keys(entities_json_1.default).sort(sorter);
+ for (var i2 = 0, j = 0; i2 < keys2.length; i2++) {
+ if (legacy[j] === keys2[i2]) {
+ keys2[i2] += ";?";
+ j++;
+ } else {
+ keys2[i2] += ";";
+ }
+ }
+ var re = new RegExp("&(?:" + keys2.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
+ var replace2 = getReplacer(entities_json_1.default);
+ function replacer(str) {
+ if (str.substr(-1) !== ";")
+ str += ";";
+ return replace2(str);
+ }
+ return function(str) {
+ return String(str).replace(re, replacer);
+ };
+ }();
+ function getReplacer(map) {
+ return function replace2(str) {
+ if (str.charAt(1) === "#") {
+ var secondChar = str.charAt(2);
+ if (secondChar === "X" || secondChar === "x") {
+ return decode_codepoint_1.default(parseInt(str.substr(3), 16));
+ }
+ return decode_codepoint_1.default(parseInt(str.substr(2), 10));
+ }
+ return map[str.slice(1, -1)] || str;
+ };
+ }
+ }
+});
+
+// node_modules/entities/lib/encode.js
+var require_encode = __commonJS({
+ "node_modules/entities/lib/encode.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;
+ var xml_json_1 = __importDefault(require_xml());
+ var inverseXML = getInverseObj(xml_json_1.default);
+ var xmlReplacer = getInverseReplacer(inverseXML);
+ exports.encodeXML = getASCIIEncoder(inverseXML);
+ var entities_json_1 = __importDefault(require_entities());
+ var inverseHTML = getInverseObj(entities_json_1.default);
+ var htmlReplacer = getInverseReplacer(inverseHTML);
+ exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
+ exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);
+ function getInverseObj(obj) {
+ return Object.keys(obj).sort().reduce(function(inverse, name) {
+ inverse[obj[name]] = "&" + name + ";";
+ return inverse;
+ }, {});
+ }
+ function getInverseReplacer(inverse) {
+ var single = [];
+ var multiple = [];
+ for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {
+ var k = _a[_i];
+ if (k.length === 1) {
+ single.push("\\" + k);
+ } else {
+ multiple.push(k);
+ }
+ }
+ single.sort();
+ for (var start = 0; start < single.length - 1; start++) {
+ var end = start;
+ while (end < single.length - 1 && single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {
+ end += 1;
+ }
+ var count = 1 + end - start;
+ if (count < 3)
+ continue;
+ single.splice(start, count, single[start] + "-" + single[end]);
+ }
+ multiple.unshift("[" + single.join("") + "]");
+ return new RegExp(multiple.join("|"), "g");
+ }
+ var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;
+ var getCodePoint = String.prototype.codePointAt != null ? function(str) {
+ return str.codePointAt(0);
+ } : function(c) {
+ return (c.charCodeAt(0) - 55296) * 1024 + c.charCodeAt(1) - 56320 + 65536;
+ };
+ function singleCharReplacer(c) {
+ return "" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)).toString(16).toUpperCase() + ";";
+ }
+ function getInverse(inverse, re) {
+ return function(data) {
+ return data.replace(re, function(name) {
+ return inverse[name];
+ }).replace(reNonASCII, singleCharReplacer);
+ };
+ }
+ var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g");
+ function escape2(data) {
+ return data.replace(reEscapeChars, singleCharReplacer);
+ }
+ exports.escape = escape2;
+ function escapeUTF8(data) {
+ return data.replace(xmlReplacer, singleCharReplacer);
+ }
+ exports.escapeUTF8 = escapeUTF8;
+ function getASCIIEncoder(obj) {
+ return function(data) {
+ return data.replace(reEscapeChars, function(c) {
+ return obj[c] || singleCharReplacer(c);
+ });
+ };
+ }
+ }
+});
+
+// node_modules/entities/lib/index.js
+var require_lib3 = __commonJS({
+ "node_modules/entities/lib/index.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
+ var decode_1 = require_decode2();
+ var encode_1 = require_encode();
+ function decode(data, level) {
+ return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data);
+ }
+ exports.decode = decode;
+ function decodeStrict(data, level) {
+ return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data);
+ }
+ exports.decodeStrict = decodeStrict;
+ function encode(data, level) {
+ return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data);
+ }
+ exports.encode = encode;
+ var encode_2 = require_encode();
+ Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() {
+ return encode_2.encodeXML;
+ } });
+ Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() {
+ return encode_2.encodeHTML;
+ } });
+ Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() {
+ return encode_2.encodeNonAsciiHTML;
+ } });
+ Object.defineProperty(exports, "escape", { enumerable: true, get: function() {
+ return encode_2.escape;
+ } });
+ Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() {
+ return encode_2.escapeUTF8;
+ } });
+ Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() {
+ return encode_2.encodeHTML;
+ } });
+ Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() {
+ return encode_2.encodeHTML;
+ } });
+ var decode_2 = require_decode2();
+ Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() {
+ return decode_2.decodeXML;
+ } });
+ Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() {
+ return decode_2.decodeHTML;
+ } });
+ Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() {
+ return decode_2.decodeHTMLStrict;
+ } });
+ Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() {
+ return decode_2.decodeHTML;
+ } });
+ Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() {
+ return decode_2.decodeHTML;
+ } });
+ Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() {
+ return decode_2.decodeHTMLStrict;
+ } });
+ Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() {
+ return decode_2.decodeHTMLStrict;
+ } });
+ Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() {
+ return decode_2.decodeXML;
+ } });
+ }
+});
+
+// node_modules/dom-serializer/lib/foreignNames.js
+var require_foreignNames = __commonJS({
+ "node_modules/dom-serializer/lib/foreignNames.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.attributeNames = exports.elementNames = void 0;
+ exports.elementNames = /* @__PURE__ */ new Map([
+ ["altglyph", "altGlyph"],
+ ["altglyphdef", "altGlyphDef"],
+ ["altglyphitem", "altGlyphItem"],
+ ["animatecolor", "animateColor"],
+ ["animatemotion", "animateMotion"],
+ ["animatetransform", "animateTransform"],
+ ["clippath", "clipPath"],
+ ["feblend", "feBlend"],
+ ["fecolormatrix", "feColorMatrix"],
+ ["fecomponenttransfer", "feComponentTransfer"],
+ ["fecomposite", "feComposite"],
+ ["feconvolvematrix", "feConvolveMatrix"],
+ ["fediffuselighting", "feDiffuseLighting"],
+ ["fedisplacementmap", "feDisplacementMap"],
+ ["fedistantlight", "feDistantLight"],
+ ["fedropshadow", "feDropShadow"],
+ ["feflood", "feFlood"],
+ ["fefunca", "feFuncA"],
+ ["fefuncb", "feFuncB"],
+ ["fefuncg", "feFuncG"],
+ ["fefuncr", "feFuncR"],
+ ["fegaussianblur", "feGaussianBlur"],
+ ["feimage", "feImage"],
+ ["femerge", "feMerge"],
+ ["femergenode", "feMergeNode"],
+ ["femorphology", "feMorphology"],
+ ["feoffset", "feOffset"],
+ ["fepointlight", "fePointLight"],
+ ["fespecularlighting", "feSpecularLighting"],
+ ["fespotlight", "feSpotLight"],
+ ["fetile", "feTile"],
+ ["feturbulence", "feTurbulence"],
+ ["foreignobject", "foreignObject"],
+ ["glyphref", "glyphRef"],
+ ["lineargradient", "linearGradient"],
+ ["radialgradient", "radialGradient"],
+ ["textpath", "textPath"]
+ ]);
+ exports.attributeNames = /* @__PURE__ */ new Map([
+ ["definitionurl", "definitionURL"],
+ ["attributename", "attributeName"],
+ ["attributetype", "attributeType"],
+ ["basefrequency", "baseFrequency"],
+ ["baseprofile", "baseProfile"],
+ ["calcmode", "calcMode"],
+ ["clippathunits", "clipPathUnits"],
+ ["diffuseconstant", "diffuseConstant"],
+ ["edgemode", "edgeMode"],
+ ["filterunits", "filterUnits"],
+ ["glyphref", "glyphRef"],
+ ["gradienttransform", "gradientTransform"],
+ ["gradientunits", "gradientUnits"],
+ ["kernelmatrix", "kernelMatrix"],
+ ["kernelunitlength", "kernelUnitLength"],
+ ["keypoints", "keyPoints"],
+ ["keysplines", "keySplines"],
+ ["keytimes", "keyTimes"],
+ ["lengthadjust", "lengthAdjust"],
+ ["limitingconeangle", "limitingConeAngle"],
+ ["markerheight", "markerHeight"],
+ ["markerunits", "markerUnits"],
+ ["markerwidth", "markerWidth"],
+ ["maskcontentunits", "maskContentUnits"],
+ ["maskunits", "maskUnits"],
+ ["numoctaves", "numOctaves"],
+ ["pathlength", "pathLength"],
+ ["patterncontentunits", "patternContentUnits"],
+ ["patterntransform", "patternTransform"],
+ ["patternunits", "patternUnits"],
+ ["pointsatx", "pointsAtX"],
+ ["pointsaty", "pointsAtY"],
+ ["pointsatz", "pointsAtZ"],
+ ["preservealpha", "preserveAlpha"],
+ ["preserveaspectratio", "preserveAspectRatio"],
+ ["primitiveunits", "primitiveUnits"],
+ ["refx", "refX"],
+ ["refy", "refY"],
+ ["repeatcount", "repeatCount"],
+ ["repeatdur", "repeatDur"],
+ ["requiredextensions", "requiredExtensions"],
+ ["requiredfeatures", "requiredFeatures"],
+ ["specularconstant", "specularConstant"],
+ ["specularexponent", "specularExponent"],
+ ["spreadmethod", "spreadMethod"],
+ ["startoffset", "startOffset"],
+ ["stddeviation", "stdDeviation"],
+ ["stitchtiles", "stitchTiles"],
+ ["surfacescale", "surfaceScale"],
+ ["systemlanguage", "systemLanguage"],
+ ["tablevalues", "tableValues"],
+ ["targetx", "targetX"],
+ ["targety", "targetY"],
+ ["textlength", "textLength"],
+ ["viewbox", "viewBox"],
+ ["viewtarget", "viewTarget"],
+ ["xchannelselector", "xChannelSelector"],
+ ["ychannelselector", "yChannelSelector"],
+ ["zoomandpan", "zoomAndPan"]
+ ]);
+ }
+});
+
+// node_modules/dom-serializer/lib/index.js
+var require_lib4 = __commonJS({
+ "node_modules/dom-serializer/lib/index.js"(exports) {
+ "use strict";
+ var __assign = exports && exports.__assign || function() {
+ __assign = Object.assign || function(t2) {
+ for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
+ s2 = arguments[i2];
+ for (var p in s2)
+ if (Object.prototype.hasOwnProperty.call(s2, p))
+ t2[p] = s2[p];
+ }
+ return t2;
+ };
+ return __assign.apply(this, arguments);
+ };
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var ElementType = __importStar(require_lib());
+ var entities_1 = require_lib3();
+ var foreignNames_1 = require_foreignNames();
+ var unencodedElements = /* @__PURE__ */ new Set([
+ "style",
+ "script",
+ "xmp",
+ "iframe",
+ "noembed",
+ "noframes",
+ "plaintext",
+ "noscript"
+ ]);
+ function formatAttributes(attributes, opts) {
+ if (!attributes)
+ return;
+ return Object.keys(attributes).map(function(key2) {
+ var _a, _b;
+ var value = (_a = attributes[key2]) !== null && _a !== void 0 ? _a : "";
+ if (opts.xmlMode === "foreign") {
+ key2 = (_b = foreignNames_1.attributeNames.get(key2)) !== null && _b !== void 0 ? _b : key2;
+ }
+ if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
+ return key2;
+ }
+ return key2 + '="' + (opts.decodeEntities !== false ? entities_1.encodeXML(value) : value.replace(/"/g, """)) + '"';
+ }).join(" ");
+ }
+ var singleTag = /* @__PURE__ */ new Set([
+ "area",
+ "base",
+ "basefont",
+ "br",
+ "col",
+ "command",
+ "embed",
+ "frame",
+ "hr",
+ "img",
+ "input",
+ "isindex",
+ "keygen",
+ "link",
+ "meta",
+ "param",
+ "source",
+ "track",
+ "wbr"
+ ]);
+ function render(node, options) {
+ if (options === void 0) {
+ options = {};
+ }
+ var nodes = "length" in node ? node : [node];
+ var output = "";
+ for (var i2 = 0; i2 < nodes.length; i2++) {
+ output += renderNode(nodes[i2], options);
+ }
+ return output;
+ }
+ exports.default = render;
+ function renderNode(node, options) {
+ switch (node.type) {
+ case ElementType.Root:
+ return render(node.children, options);
+ case ElementType.Directive:
+ case ElementType.Doctype:
+ return renderDirective(node);
+ case ElementType.Comment:
+ return renderComment(node);
+ case ElementType.CDATA:
+ return renderCdata(node);
+ case ElementType.Script:
+ case ElementType.Style:
+ case ElementType.Tag:
+ return renderTag(node, options);
+ case ElementType.Text:
+ return renderText(node, options);
+ }
+ }
+ var foreignModeIntegrationPoints = /* @__PURE__ */ new Set([
+ "mi",
+ "mo",
+ "mn",
+ "ms",
+ "mtext",
+ "annotation-xml",
+ "foreignObject",
+ "desc",
+ "title"
+ ]);
+ var foreignElements = /* @__PURE__ */ new Set(["svg", "math"]);
+ function renderTag(elem, opts) {
+ var _a;
+ if (opts.xmlMode === "foreign") {
+ elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
+ if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) {
+ opts = __assign(__assign({}, opts), { xmlMode: false });
+ }
+ }
+ if (!opts.xmlMode && foreignElements.has(elem.name)) {
+ opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
+ }
+ var tag = "<" + elem.name;
+ var attribs = formatAttributes(elem.attribs, opts);
+ if (attribs) {
+ tag += " " + attribs;
+ }
+ if (elem.children.length === 0 && (opts.xmlMode ? opts.selfClosingTags !== false : opts.selfClosingTags && singleTag.has(elem.name))) {
+ if (!opts.xmlMode)
+ tag += " ";
+ tag += "/>";
+ } else {
+ tag += ">";
+ if (elem.children.length > 0) {
+ tag += render(elem.children, opts);
+ }
+ if (opts.xmlMode || !singleTag.has(elem.name)) {
+ tag += "" + elem.name + ">";
+ }
+ }
+ return tag;
+ }
+ function renderDirective(elem) {
+ return "<" + elem.data + ">";
+ }
+ function renderText(elem, opts) {
+ var data = elem.data || "";
+ if (opts.decodeEntities !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) {
+ data = entities_1.encodeXML(data);
+ }
+ return data;
+ }
+ function renderCdata(elem) {
+ return "";
+ }
+ function renderComment(elem) {
+ return "";
+ }
+ }
+});
+
+// node_modules/domutils/lib/stringify.js
+var require_stringify = __commonJS({
+ "node_modules/domutils/lib/stringify.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
+ var domhandler_1 = require_lib2();
+ var dom_serializer_1 = __importDefault(require_lib4());
+ var domelementtype_1 = require_lib();
+ function getOuterHTML(node, options) {
+ return (0, dom_serializer_1.default)(node, options);
+ }
+ exports.getOuterHTML = getOuterHTML;
+ function getInnerHTML(node, options) {
+ return (0, domhandler_1.hasChildren)(node) ? node.children.map(function(node2) {
+ return getOuterHTML(node2, options);
+ }).join("") : "";
+ }
+ exports.getInnerHTML = getInnerHTML;
+ function getText2(node) {
+ if (Array.isArray(node))
+ return node.map(getText2).join("");
+ if ((0, domhandler_1.isTag)(node))
+ return node.name === "br" ? "\n" : getText2(node.children);
+ if ((0, domhandler_1.isCDATA)(node))
+ return getText2(node.children);
+ if ((0, domhandler_1.isText)(node))
+ return node.data;
+ return "";
+ }
+ exports.getText = getText2;
+ function textContent(node) {
+ if (Array.isArray(node))
+ return node.map(textContent).join("");
+ if ((0, domhandler_1.hasChildren)(node) && !(0, domhandler_1.isComment)(node)) {
+ return textContent(node.children);
+ }
+ if ((0, domhandler_1.isText)(node))
+ return node.data;
+ return "";
+ }
+ exports.textContent = textContent;
+ function innerText(node) {
+ if (Array.isArray(node))
+ return node.map(innerText).join("");
+ if ((0, domhandler_1.hasChildren)(node) && (node.type === domelementtype_1.ElementType.Tag || (0, domhandler_1.isCDATA)(node))) {
+ return innerText(node.children);
+ }
+ if ((0, domhandler_1.isText)(node))
+ return node.data;
+ return "";
+ }
+ exports.innerText = innerText;
+ }
+});
+
+// node_modules/domutils/lib/traversal.js
+var require_traversal = __commonJS({
+ "node_modules/domutils/lib/traversal.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.prevElementSibling = exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;
+ var domhandler_1 = require_lib2();
+ var emptyArray = [];
+ function getChildren2(elem) {
+ var _a;
+ return (_a = elem.children) !== null && _a !== void 0 ? _a : emptyArray;
+ }
+ exports.getChildren = getChildren2;
+ function getParent2(elem) {
+ return elem.parent || null;
+ }
+ exports.getParent = getParent2;
+ function getSiblings2(elem) {
+ var _a, _b;
+ var parent = getParent2(elem);
+ if (parent != null)
+ return getChildren2(parent);
+ var siblings = [elem];
+ var prev = elem.prev, next = elem.next;
+ while (prev != null) {
+ siblings.unshift(prev);
+ _a = prev, prev = _a.prev;
+ }
+ while (next != null) {
+ siblings.push(next);
+ _b = next, next = _b.next;
+ }
+ return siblings;
+ }
+ exports.getSiblings = getSiblings2;
+ function getAttributeValue2(elem, name) {
+ var _a;
+ return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];
+ }
+ exports.getAttributeValue = getAttributeValue2;
+ function hasAttrib2(elem, name) {
+ return elem.attribs != null && Object.prototype.hasOwnProperty.call(elem.attribs, name) && elem.attribs[name] != null;
+ }
+ exports.hasAttrib = hasAttrib2;
+ function getName2(elem) {
+ return elem.name;
+ }
+ exports.getName = getName2;
+ function nextElementSibling2(elem) {
+ var _a;
+ var next = elem.next;
+ while (next !== null && !(0, domhandler_1.isTag)(next))
+ _a = next, next = _a.next;
+ return next;
+ }
+ exports.nextElementSibling = nextElementSibling2;
+ function prevElementSibling(elem) {
+ var _a;
+ var prev = elem.prev;
+ while (prev !== null && !(0, domhandler_1.isTag)(prev))
+ _a = prev, prev = _a.prev;
+ return prev;
+ }
+ exports.prevElementSibling = prevElementSibling;
+ }
+});
+
+// node_modules/domutils/lib/manipulation.js
+var require_manipulation = __commonJS({
+ "node_modules/domutils/lib/manipulation.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;
+ function removeElement(elem) {
+ if (elem.prev)
+ elem.prev.next = elem.next;
+ if (elem.next)
+ elem.next.prev = elem.prev;
+ if (elem.parent) {
+ var childs = elem.parent.children;
+ childs.splice(childs.lastIndexOf(elem), 1);
+ }
+ }
+ exports.removeElement = removeElement;
+ function replaceElement(elem, replacement) {
+ var prev = replacement.prev = elem.prev;
+ if (prev) {
+ prev.next = replacement;
+ }
+ var next = replacement.next = elem.next;
+ if (next) {
+ next.prev = replacement;
+ }
+ var parent = replacement.parent = elem.parent;
+ if (parent) {
+ var childs = parent.children;
+ childs[childs.lastIndexOf(elem)] = replacement;
+ }
+ }
+ exports.replaceElement = replaceElement;
+ function appendChild(elem, child) {
+ removeElement(child);
+ child.next = null;
+ child.parent = elem;
+ if (elem.children.push(child) > 1) {
+ var sibling = elem.children[elem.children.length - 2];
+ sibling.next = child;
+ child.prev = sibling;
+ } else {
+ child.prev = null;
+ }
+ }
+ exports.appendChild = appendChild;
+ function append2(elem, next) {
+ removeElement(next);
+ var parent = elem.parent;
+ var currNext = elem.next;
+ next.next = currNext;
+ next.prev = elem;
+ elem.next = next;
+ next.parent = parent;
+ if (currNext) {
+ currNext.prev = next;
+ if (parent) {
+ var childs = parent.children;
+ childs.splice(childs.lastIndexOf(currNext), 0, next);
+ }
+ } else if (parent) {
+ parent.children.push(next);
+ }
+ }
+ exports.append = append2;
+ function prependChild(elem, child) {
+ removeElement(child);
+ child.parent = elem;
+ child.prev = null;
+ if (elem.children.unshift(child) !== 1) {
+ var sibling = elem.children[1];
+ sibling.prev = child;
+ child.next = sibling;
+ } else {
+ child.next = null;
+ }
+ }
+ exports.prependChild = prependChild;
+ function prepend(elem, prev) {
+ removeElement(prev);
+ var parent = elem.parent;
+ if (parent) {
+ var childs = parent.children;
+ childs.splice(childs.indexOf(elem), 0, prev);
+ }
+ if (elem.prev) {
+ elem.prev.next = prev;
+ }
+ prev.parent = parent;
+ prev.prev = elem.prev;
+ prev.next = elem;
+ elem.prev = prev;
+ }
+ exports.prepend = prepend;
+ }
+});
+
+// node_modules/domutils/lib/querying.js
+var require_querying = __commonJS({
+ "node_modules/domutils/lib/querying.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;
+ var domhandler_1 = require_lib2();
+ function filter(test, node, recurse, limit) {
+ if (recurse === void 0) {
+ recurse = true;
+ }
+ if (limit === void 0) {
+ limit = Infinity;
+ }
+ if (!Array.isArray(node))
+ node = [node];
+ return find(test, node, recurse, limit);
+ }
+ exports.filter = filter;
+ function find(test, nodes, recurse, limit) {
+ var result = [];
+ for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
+ var elem = nodes_1[_i];
+ if (test(elem)) {
+ result.push(elem);
+ if (--limit <= 0)
+ break;
+ }
+ if (recurse && (0, domhandler_1.hasChildren)(elem) && elem.children.length > 0) {
+ var children = find(test, elem.children, recurse, limit);
+ result.push.apply(result, children);
+ limit -= children.length;
+ if (limit <= 0)
+ break;
+ }
+ }
+ return result;
+ }
+ exports.find = find;
+ function findOneChild(test, nodes) {
+ return nodes.find(test);
+ }
+ exports.findOneChild = findOneChild;
+ function findOne2(test, nodes, recurse) {
+ if (recurse === void 0) {
+ recurse = true;
+ }
+ var elem = null;
+ for (var i2 = 0; i2 < nodes.length && !elem; i2++) {
+ var checked = nodes[i2];
+ if (!(0, domhandler_1.isTag)(checked)) {
+ continue;
+ } else if (test(checked)) {
+ elem = checked;
+ } else if (recurse && checked.children.length > 0) {
+ elem = findOne2(test, checked.children);
+ }
+ }
+ return elem;
+ }
+ exports.findOne = findOne2;
+ function existsOne2(test, nodes) {
+ return nodes.some(function(checked) {
+ return (0, domhandler_1.isTag)(checked) && (test(checked) || checked.children.length > 0 && existsOne2(test, checked.children));
+ });
+ }
+ exports.existsOne = existsOne2;
+ function findAll2(test, nodes) {
+ var _a;
+ var result = [];
+ var stack = nodes.filter(domhandler_1.isTag);
+ var elem;
+ while (elem = stack.shift()) {
+ var children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(domhandler_1.isTag);
+ if (children && children.length > 0) {
+ stack.unshift.apply(stack, children);
+ }
+ if (test(elem))
+ result.push(elem);
+ }
+ return result;
+ }
+ exports.findAll = findAll2;
+ }
+});
+
+// node_modules/domutils/lib/legacy.js
+var require_legacy2 = __commonJS({
+ "node_modules/domutils/lib/legacy.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;
+ var domhandler_1 = require_lib2();
+ var querying_1 = require_querying();
+ var Checks = {
+ tag_name: function(name) {
+ if (typeof name === "function") {
+ return function(elem) {
+ return (0, domhandler_1.isTag)(elem) && name(elem.name);
+ };
+ } else if (name === "*") {
+ return domhandler_1.isTag;
+ }
+ return function(elem) {
+ return (0, domhandler_1.isTag)(elem) && elem.name === name;
+ };
+ },
+ tag_type: function(type) {
+ if (typeof type === "function") {
+ return function(elem) {
+ return type(elem.type);
+ };
+ }
+ return function(elem) {
+ return elem.type === type;
+ };
+ },
+ tag_contains: function(data) {
+ if (typeof data === "function") {
+ return function(elem) {
+ return (0, domhandler_1.isText)(elem) && data(elem.data);
+ };
+ }
+ return function(elem) {
+ return (0, domhandler_1.isText)(elem) && elem.data === data;
+ };
+ }
+ };
+ function getAttribCheck(attrib, value) {
+ if (typeof value === "function") {
+ return function(elem) {
+ return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]);
+ };
+ }
+ return function(elem) {
+ return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value;
+ };
+ }
+ function combineFuncs(a, b) {
+ return function(elem) {
+ return a(elem) || b(elem);
+ };
+ }
+ function compileTest(options) {
+ var funcs = Object.keys(options).map(function(key2) {
+ var value = options[key2];
+ return Object.prototype.hasOwnProperty.call(Checks, key2) ? Checks[key2](value) : getAttribCheck(key2, value);
+ });
+ return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
+ }
+ function testElement(options, node) {
+ var test = compileTest(options);
+ return test ? test(node) : true;
+ }
+ exports.testElement = testElement;
+ function getElements(options, nodes, recurse, limit) {
+ if (limit === void 0) {
+ limit = Infinity;
+ }
+ var test = compileTest(options);
+ return test ? (0, querying_1.filter)(test, nodes, recurse, limit) : [];
+ }
+ exports.getElements = getElements;
+ function getElementById(id, nodes, recurse) {
+ if (recurse === void 0) {
+ recurse = true;
+ }
+ if (!Array.isArray(nodes))
+ nodes = [nodes];
+ return (0, querying_1.findOne)(getAttribCheck("id", id), nodes, recurse);
+ }
+ exports.getElementById = getElementById;
+ function getElementsByTagName(tagName15, nodes, recurse, limit) {
+ if (recurse === void 0) {
+ recurse = true;
+ }
+ if (limit === void 0) {
+ limit = Infinity;
+ }
+ return (0, querying_1.filter)(Checks.tag_name(tagName15), nodes, recurse, limit);
+ }
+ exports.getElementsByTagName = getElementsByTagName;
+ function getElementsByTagType(type, nodes, recurse, limit) {
+ if (recurse === void 0) {
+ recurse = true;
+ }
+ if (limit === void 0) {
+ limit = Infinity;
+ }
+ return (0, querying_1.filter)(Checks.tag_type(type), nodes, recurse, limit);
+ }
+ exports.getElementsByTagType = getElementsByTagType;
+ }
+});
+
+// node_modules/domutils/lib/helpers.js
+var require_helpers = __commonJS({
+ "node_modules/domutils/lib/helpers.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0;
+ var domhandler_1 = require_lib2();
+ function removeSubsets2(nodes) {
+ var idx = nodes.length;
+ while (--idx >= 0) {
+ var node = nodes[idx];
+ if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {
+ nodes.splice(idx, 1);
+ continue;
+ }
+ for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
+ if (nodes.includes(ancestor)) {
+ nodes.splice(idx, 1);
+ break;
+ }
+ }
+ }
+ return nodes;
+ }
+ exports.removeSubsets = removeSubsets2;
+ function compareDocumentPosition(nodeA, nodeB) {
+ var aParents = [];
+ var bParents = [];
+ if (nodeA === nodeB) {
+ return 0;
+ }
+ var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;
+ while (current) {
+ aParents.unshift(current);
+ current = current.parent;
+ }
+ current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;
+ while (current) {
+ bParents.unshift(current);
+ current = current.parent;
+ }
+ var maxIdx = Math.min(aParents.length, bParents.length);
+ var idx = 0;
+ while (idx < maxIdx && aParents[idx] === bParents[idx]) {
+ idx++;
+ }
+ if (idx === 0) {
+ return 1;
+ }
+ var sharedParent = aParents[idx - 1];
+ var siblings = sharedParent.children;
+ var aSibling = aParents[idx];
+ var bSibling = bParents[idx];
+ if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
+ if (sharedParent === nodeB) {
+ return 4 | 16;
+ }
+ return 4;
+ }
+ if (sharedParent === nodeA) {
+ return 2 | 8;
+ }
+ return 2;
+ }
+ exports.compareDocumentPosition = compareDocumentPosition;
+ function uniqueSort(nodes) {
+ nodes = nodes.filter(function(node, i2, arr) {
+ return !arr.includes(node, i2 + 1);
+ });
+ nodes.sort(function(a, b) {
+ var relative = compareDocumentPosition(a, b);
+ if (relative & 2) {
+ return -1;
+ } else if (relative & 4) {
+ return 1;
+ }
+ return 0;
+ });
+ return nodes;
+ }
+ exports.uniqueSort = uniqueSort;
+ }
+});
+
+// node_modules/domutils/lib/feeds.js
+var require_feeds = __commonJS({
+ "node_modules/domutils/lib/feeds.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getFeed = void 0;
+ var stringify_1 = require_stringify();
+ var legacy_1 = require_legacy2();
+ function getFeed2(doc) {
+ var feedRoot = getOneElement(isValidFeed, doc);
+ return !feedRoot ? null : feedRoot.name === "feed" ? getAtomFeed(feedRoot) : getRssFeed(feedRoot);
+ }
+ exports.getFeed = getFeed2;
+ function getAtomFeed(feedRoot) {
+ var _a;
+ var childs = feedRoot.children;
+ var feed = {
+ type: "atom",
+ items: (0, legacy_1.getElementsByTagName)("entry", childs).map(function(item) {
+ var _a2;
+ var children = item.children;
+ var entry = { media: getMediaElements(children) };
+ addConditionally(entry, "id", "id", children);
+ addConditionally(entry, "title", "title", children);
+ var href2 = (_a2 = getOneElement("link", children)) === null || _a2 === void 0 ? void 0 : _a2.attribs.href;
+ if (href2) {
+ entry.link = href2;
+ }
+ var description = fetch2("summary", children) || fetch2("content", children);
+ if (description) {
+ entry.description = description;
+ }
+ var pubDate = fetch2("updated", children);
+ if (pubDate) {
+ entry.pubDate = new Date(pubDate);
+ }
+ return entry;
+ })
+ };
+ addConditionally(feed, "id", "id", childs);
+ addConditionally(feed, "title", "title", childs);
+ var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs.href;
+ if (href) {
+ feed.link = href;
+ }
+ addConditionally(feed, "description", "subtitle", childs);
+ var updated = fetch2("updated", childs);
+ if (updated) {
+ feed.updated = new Date(updated);
+ }
+ addConditionally(feed, "author", "email", childs, true);
+ return feed;
+ }
+ function getRssFeed(feedRoot) {
+ var _a, _b;
+ var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
+ var feed = {
+ type: feedRoot.name.substr(0, 3),
+ id: "",
+ items: (0, legacy_1.getElementsByTagName)("item", feedRoot.children).map(function(item) {
+ var children = item.children;
+ var entry = { media: getMediaElements(children) };
+ addConditionally(entry, "id", "guid", children);
+ addConditionally(entry, "title", "title", children);
+ addConditionally(entry, "link", "link", children);
+ addConditionally(entry, "description", "description", children);
+ var pubDate = fetch2("pubDate", children);
+ if (pubDate)
+ entry.pubDate = new Date(pubDate);
+ return entry;
+ })
+ };
+ addConditionally(feed, "title", "title", childs);
+ addConditionally(feed, "link", "link", childs);
+ addConditionally(feed, "description", "description", childs);
+ var updated = fetch2("lastBuildDate", childs);
+ if (updated) {
+ feed.updated = new Date(updated);
+ }
+ addConditionally(feed, "author", "managingEditor", childs, true);
+ return feed;
+ }
+ var MEDIA_KEYS_STRING = ["url", "type", "lang"];
+ var MEDIA_KEYS_INT = [
+ "fileSize",
+ "bitrate",
+ "framerate",
+ "samplingrate",
+ "channels",
+ "duration",
+ "height",
+ "width"
+ ];
+ function getMediaElements(where) {
+ return (0, legacy_1.getElementsByTagName)("media:content", where).map(function(elem) {
+ var attribs = elem.attribs;
+ var media = {
+ medium: attribs.medium,
+ isDefault: !!attribs.isDefault
+ };
+ for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {
+ var attrib = MEDIA_KEYS_STRING_1[_i];
+ if (attribs[attrib]) {
+ media[attrib] = attribs[attrib];
+ }
+ }
+ for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {
+ var attrib = MEDIA_KEYS_INT_1[_a];
+ if (attribs[attrib]) {
+ media[attrib] = parseInt(attribs[attrib], 10);
+ }
+ }
+ if (attribs.expression) {
+ media.expression = attribs.expression;
+ }
+ return media;
+ });
+ }
+ function getOneElement(tagName15, node) {
+ return (0, legacy_1.getElementsByTagName)(tagName15, node, true, 1)[0];
+ }
+ function fetch2(tagName15, where, recurse) {
+ if (recurse === void 0) {
+ recurse = false;
+ }
+ return (0, stringify_1.textContent)((0, legacy_1.getElementsByTagName)(tagName15, where, recurse, 1)).trim();
+ }
+ function addConditionally(obj, prop2, tagName15, where, recurse) {
+ if (recurse === void 0) {
+ recurse = false;
+ }
+ var val = fetch2(tagName15, where, recurse);
+ if (val)
+ obj[prop2] = val;
+ }
+ function isValidFeed(value) {
+ return value === "rss" || value === "feed" || value === "rdf:RDF";
+ }
+ }
+});
+
+// node_modules/domutils/lib/index.js
+var require_lib5 = __commonJS({
+ "node_modules/domutils/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
+ for (var p in m2)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m2, p);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
+ __exportStar(require_stringify(), exports);
+ __exportStar(require_traversal(), exports);
+ __exportStar(require_manipulation(), exports);
+ __exportStar(require_querying(), exports);
+ __exportStar(require_legacy2(), exports);
+ __exportStar(require_helpers(), exports);
+ __exportStar(require_feeds(), exports);
+ var domhandler_1 = require_lib2();
+ Object.defineProperty(exports, "isTag", { enumerable: true, get: function() {
+ return domhandler_1.isTag;
+ } });
+ Object.defineProperty(exports, "isCDATA", { enumerable: true, get: function() {
+ return domhandler_1.isCDATA;
+ } });
+ Object.defineProperty(exports, "isText", { enumerable: true, get: function() {
+ return domhandler_1.isText;
+ } });
+ Object.defineProperty(exports, "isComment", { enumerable: true, get: function() {
+ return domhandler_1.isComment;
+ } });
+ Object.defineProperty(exports, "isDocument", { enumerable: true, get: function() {
+ return domhandler_1.isDocument;
+ } });
+ Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function() {
+ return domhandler_1.hasChildren;
+ } });
+ }
+});
+
+// node_modules/htmlparser2/lib/FeedHandler.js
+var require_FeedHandler = __commonJS({
+ "node_modules/htmlparser2/lib/FeedHandler.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.parseFeed = exports.FeedHandler = void 0;
+ var domhandler_1 = __importDefault(require_lib2());
+ var DomUtils = __importStar(require_lib5());
+ var Parser_1 = require_Parser();
+ var FeedItemMediaMedium;
+ (function(FeedItemMediaMedium2) {
+ FeedItemMediaMedium2[FeedItemMediaMedium2["image"] = 0] = "image";
+ FeedItemMediaMedium2[FeedItemMediaMedium2["audio"] = 1] = "audio";
+ FeedItemMediaMedium2[FeedItemMediaMedium2["video"] = 2] = "video";
+ FeedItemMediaMedium2[FeedItemMediaMedium2["document"] = 3] = "document";
+ FeedItemMediaMedium2[FeedItemMediaMedium2["executable"] = 4] = "executable";
+ })(FeedItemMediaMedium || (FeedItemMediaMedium = {}));
+ var FeedItemMediaExpression;
+ (function(FeedItemMediaExpression2) {
+ FeedItemMediaExpression2[FeedItemMediaExpression2["sample"] = 0] = "sample";
+ FeedItemMediaExpression2[FeedItemMediaExpression2["full"] = 1] = "full";
+ FeedItemMediaExpression2[FeedItemMediaExpression2["nonstop"] = 2] = "nonstop";
+ })(FeedItemMediaExpression || (FeedItemMediaExpression = {}));
+ var FeedHandler = function(_super) {
+ __extends(FeedHandler2, _super);
+ function FeedHandler2(callback, options) {
+ var _this = this;
+ if (typeof callback === "object") {
+ callback = void 0;
+ options = callback;
+ }
+ _this = _super.call(this, callback, options) || this;
+ return _this;
+ }
+ FeedHandler2.prototype.onend = function() {
+ var _a, _b;
+ var feedRoot = getOneElement(isValidFeed, this.dom);
+ if (!feedRoot) {
+ this.handleCallback(new Error("couldn't find root of feed"));
+ return;
+ }
+ var feed = {};
+ if (feedRoot.name === "feed") {
+ var childs = feedRoot.children;
+ feed.type = "atom";
+ addConditionally(feed, "id", "id", childs);
+ addConditionally(feed, "title", "title", childs);
+ var href = getAttribute("href", getOneElement("link", childs));
+ if (href) {
+ feed.link = href;
+ }
+ addConditionally(feed, "description", "subtitle", childs);
+ var updated = fetch2("updated", childs);
+ if (updated) {
+ feed.updated = new Date(updated);
+ }
+ addConditionally(feed, "author", "email", childs, true);
+ feed.items = getElements("entry", childs).map(function(item) {
+ var entry = {};
+ var children = item.children;
+ addConditionally(entry, "id", "id", children);
+ addConditionally(entry, "title", "title", children);
+ var href2 = getAttribute("href", getOneElement("link", children));
+ if (href2) {
+ entry.link = href2;
+ }
+ var description = fetch2("summary", children) || fetch2("content", children);
+ if (description) {
+ entry.description = description;
+ }
+ var pubDate = fetch2("updated", children);
+ if (pubDate) {
+ entry.pubDate = new Date(pubDate);
+ }
+ entry.media = getMediaElements(children);
+ return entry;
+ });
+ } else {
+ var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
+ feed.type = feedRoot.name.substr(0, 3);
+ feed.id = "";
+ addConditionally(feed, "title", "title", childs);
+ addConditionally(feed, "link", "link", childs);
+ addConditionally(feed, "description", "description", childs);
+ var updated = fetch2("lastBuildDate", childs);
+ if (updated) {
+ feed.updated = new Date(updated);
+ }
+ addConditionally(feed, "author", "managingEditor", childs, true);
+ feed.items = getElements("item", feedRoot.children).map(function(item) {
+ var entry = {};
+ var children = item.children;
+ addConditionally(entry, "id", "guid", children);
+ addConditionally(entry, "title", "title", children);
+ addConditionally(entry, "link", "link", children);
+ addConditionally(entry, "description", "description", children);
+ var pubDate = fetch2("pubDate", children);
+ if (pubDate)
+ entry.pubDate = new Date(pubDate);
+ entry.media = getMediaElements(children);
+ return entry;
+ });
+ }
+ this.feed = feed;
+ this.handleCallback(null);
+ };
+ return FeedHandler2;
+ }(domhandler_1.default);
+ exports.FeedHandler = FeedHandler;
+ function getMediaElements(where) {
+ return getElements("media:content", where).map(function(elem) {
+ var media = {
+ medium: elem.attribs.medium,
+ isDefault: !!elem.attribs.isDefault
+ };
+ if (elem.attribs.url) {
+ media.url = elem.attribs.url;
+ }
+ if (elem.attribs.fileSize) {
+ media.fileSize = parseInt(elem.attribs.fileSize, 10);
+ }
+ if (elem.attribs.type) {
+ media.type = elem.attribs.type;
+ }
+ if (elem.attribs.expression) {
+ media.expression = elem.attribs.expression;
+ }
+ if (elem.attribs.bitrate) {
+ media.bitrate = parseInt(elem.attribs.bitrate, 10);
+ }
+ if (elem.attribs.framerate) {
+ media.framerate = parseInt(elem.attribs.framerate, 10);
+ }
+ if (elem.attribs.samplingrate) {
+ media.samplingrate = parseInt(elem.attribs.samplingrate, 10);
+ }
+ if (elem.attribs.channels) {
+ media.channels = parseInt(elem.attribs.channels, 10);
+ }
+ if (elem.attribs.duration) {
+ media.duration = parseInt(elem.attribs.duration, 10);
+ }
+ if (elem.attribs.height) {
+ media.height = parseInt(elem.attribs.height, 10);
+ }
+ if (elem.attribs.width) {
+ media.width = parseInt(elem.attribs.width, 10);
+ }
+ if (elem.attribs.lang) {
+ media.lang = elem.attribs.lang;
+ }
+ return media;
+ });
+ }
+ function getElements(tagName15, where) {
+ return DomUtils.getElementsByTagName(tagName15, where, true);
+ }
+ function getOneElement(tagName15, node) {
+ return DomUtils.getElementsByTagName(tagName15, node, true, 1)[0];
+ }
+ function fetch2(tagName15, where, recurse) {
+ if (recurse === void 0) {
+ recurse = false;
+ }
+ return DomUtils.getText(DomUtils.getElementsByTagName(tagName15, where, recurse, 1)).trim();
+ }
+ function getAttribute(name, elem) {
+ if (!elem) {
+ return null;
+ }
+ var attribs = elem.attribs;
+ return attribs[name];
+ }
+ function addConditionally(obj, prop2, what, where, recurse) {
+ if (recurse === void 0) {
+ recurse = false;
+ }
+ var tmp = fetch2(what, where, recurse);
+ if (tmp)
+ obj[prop2] = tmp;
+ }
+ function isValidFeed(value) {
+ return value === "rss" || value === "feed" || value === "rdf:RDF";
+ }
+ function parseFeed(feed, options) {
+ if (options === void 0) {
+ options = { xmlMode: true };
+ }
+ var handler4 = new FeedHandler(options);
+ new Parser_1.Parser(handler4, options).end(feed);
+ return handler4.feed;
+ }
+ exports.parseFeed = parseFeed;
+ }
+});
+
+// node_modules/htmlparser2/lib/index.js
+var require_lib6 = __commonJS({
+ "node_modules/htmlparser2/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
+ for (var p in m2)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m2, p);
+ };
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;
+ var Parser_1 = require_Parser();
+ Object.defineProperty(exports, "Parser", { enumerable: true, get: function() {
+ return Parser_1.Parser;
+ } });
+ var domhandler_1 = require_lib2();
+ Object.defineProperty(exports, "DomHandler", { enumerable: true, get: function() {
+ return domhandler_1.DomHandler;
+ } });
+ Object.defineProperty(exports, "DefaultHandler", { enumerable: true, get: function() {
+ return domhandler_1.DomHandler;
+ } });
+ function parseDocument(data, options) {
+ var handler4 = new domhandler_1.DomHandler(void 0, options);
+ new Parser_1.Parser(handler4, options).end(data);
+ return handler4.root;
+ }
+ exports.parseDocument = parseDocument;
+ function parseDOM(data, options) {
+ return parseDocument(data, options).children;
+ }
+ exports.parseDOM = parseDOM;
+ function createDomStream(cb, options, elementCb) {
+ var handler4 = new domhandler_1.DomHandler(cb, options, elementCb);
+ return new Parser_1.Parser(handler4, options);
+ }
+ exports.createDomStream = createDomStream;
+ var Tokenizer_1 = require_Tokenizer();
+ Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function() {
+ return __importDefault(Tokenizer_1).default;
+ } });
+ var ElementType = __importStar(require_lib());
+ exports.ElementType = ElementType;
+ __exportStar(require_FeedHandler(), exports);
+ exports.DomUtils = __importStar(require_lib5());
+ var FeedHandler_1 = require_FeedHandler();
+ Object.defineProperty(exports, "RssHandler", { enumerable: true, get: function() {
+ return FeedHandler_1.FeedHandler;
+ } });
+ }
+});
+
+// node_modules/html-to-text/lib/helper.js
+var require_helper = __commonJS({
+ "node_modules/html-to-text/lib/helper.js"(exports, module2) {
+ var merge = require_cjs();
+ function splitClassesAndIds(selectors) {
+ const classes = [];
+ const ids = [];
+ for (const selector of selectors) {
+ if (selector.startsWith(".")) {
+ classes.push(selector.substring(1));
+ } else if (selector.startsWith("#")) {
+ ids.push(selector.substring(1));
+ }
+ }
+ return { classes, ids };
+ }
+ function limitedDepthRecursive(n, f3, g = () => void 0) {
+ if (n === void 0) {
+ const f1 = function(...args) {
+ return f3(f1, ...args);
+ };
+ return f1;
+ }
+ if (n >= 0) {
+ return function(...args) {
+ return f3(limitedDepthRecursive(n - 1, f3, g), ...args);
+ };
+ }
+ return g;
+ }
+ function numberToLetterSequence(num, baseChar = "a", base = 26) {
+ const digits = [];
+ do {
+ num -= 1;
+ digits.push(num % base);
+ num = num / base >> 0;
+ } while (num > 0);
+ const baseCode = baseChar.charCodeAt(0);
+ return digits.reverse().map((n) => String.fromCharCode(baseCode + n)).join("");
+ }
+ var I = ["I", "X", "C", "M"];
+ var V = ["V", "L", "D"];
+ function numberToRoman(num) {
+ return [...num + ""].map((n) => +n).reverse().map((v, i2) => v % 5 < 4 ? (v < 5 ? "" : V[i2]) + I[i2].repeat(v % 5) : I[i2] + (v < 5 ? V[i2] : I[i2 + 1])).reverse().join("");
+ }
+ function trimCharacter(str, char) {
+ let start = 0;
+ let end = str.length;
+ while (start < end && str[start] === char) {
+ ++start;
+ }
+ while (end > start && str[end - 1] === char) {
+ --end;
+ }
+ return start > 0 || end < str.length ? str.substring(start, end) : str;
+ }
+ function get(obj, path) {
+ for (const key2 of path) {
+ if (!obj) {
+ return void 0;
+ }
+ obj = obj[key2];
+ }
+ return obj;
+ }
+ function mergeDuplicatesPreferLast(items, getKey) {
+ const map = /* @__PURE__ */ new Map();
+ for (let i2 = items.length; i2-- > 0; ) {
+ const item = items[i2];
+ const key2 = getKey(item);
+ map.set(key2, map.has(key2) ? merge(item, map.get(key2), { arrayMerge: overwriteMerge }) : item);
+ }
+ return [...map.values()].reverse();
+ }
+ var overwriteMerge = (acc, src, options) => [...src];
+ module2.exports = {
+ get,
+ limitedDepthRecursive,
+ mergeDuplicatesPreferLast,
+ numberToLetterSequence,
+ numberToRoman,
+ splitClassesAndIds,
+ trimCharacter
+ };
+ }
+});
+
+// node_modules/html-to-text/lib/typedefs.js
+var require_typedefs = __commonJS({
+ "node_modules/html-to-text/lib/typedefs.js"() {
+ }
+});
+
+// node_modules/html-to-text/lib/inline-text-builder.js
+var require_inline_text_builder = __commonJS({
+ "node_modules/html-to-text/lib/inline-text-builder.js"(exports, module2) {
+ require_typedefs();
+ var InlineTextBuilder = class {
+ constructor(options, maxLineLength = void 0) {
+ this.lines = [];
+ this.nextLineWords = [];
+ this.maxLineLength = maxLineLength || options.wordwrap || Number.MAX_VALUE;
+ this.nextLineAvailableChars = this.maxLineLength;
+ this.wrapCharacters = options.longWordSplit.wrapCharacters || [];
+ this.forceWrapOnLimit = options.longWordSplit.forceWrapOnLimit || false;
+ this.stashedSpace = false;
+ this.wordBreakOpportunity = false;
+ }
+ pushWord(word) {
+ if (this.nextLineAvailableChars <= 0) {
+ this.startNewLine();
+ }
+ const isLineStart = this.nextLineWords.length === 0;
+ const cost = word.length + (isLineStart ? 0 : 1);
+ if (cost <= this.nextLineAvailableChars) {
+ this.nextLineWords.push(word);
+ this.nextLineAvailableChars -= cost;
+ } else {
+ const [first, ...rest] = this.splitLongWord(word);
+ if (!isLineStart) {
+ this.startNewLine();
+ }
+ this.nextLineWords.push(first);
+ this.nextLineAvailableChars -= first.length;
+ for (const part of rest) {
+ this.startNewLine();
+ this.nextLineWords.push(part);
+ this.nextLineAvailableChars -= part.length;
+ }
+ }
+ }
+ popWord() {
+ const lastWord = this.nextLineWords.pop();
+ if (lastWord !== void 0) {
+ const isLineStart = this.nextLineWords.length === 0;
+ const cost = lastWord.length + (isLineStart ? 0 : 1);
+ this.nextLineAvailableChars += cost;
+ }
+ return lastWord;
+ }
+ concatWord(word) {
+ if (this.wordBreakOpportunity && word.length > this.nextLineAvailableChars) {
+ this.pushWord(word);
+ this.wordBreakOpportunity = false;
+ } else {
+ const lastWord = this.popWord();
+ this.pushWord(lastWord ? lastWord.concat(word) : word);
+ }
+ }
+ startNewLine(n = 1) {
+ this.lines.push(this.nextLineWords);
+ if (n > 1) {
+ this.lines.push(...Array.from({ length: n - 1 }, () => []));
+ }
+ this.nextLineWords = [];
+ this.nextLineAvailableChars = this.maxLineLength;
+ }
+ isEmpty() {
+ return this.lines.length === 0 && this.nextLineWords.length === 0;
+ }
+ clear() {
+ this.lines.length = 0;
+ this.nextLineWords.length = 0;
+ this.nextLineAvailableChars = this.maxLineLength;
+ }
+ toString() {
+ return [...this.lines, this.nextLineWords].map((words) => words.join(" ")).join("\n");
+ }
+ splitLongWord(word) {
+ const parts = [];
+ let idx = 0;
+ while (word.length > this.maxLineLength) {
+ const firstLine = word.substring(0, this.maxLineLength);
+ const remainingChars = word.substring(this.maxLineLength);
+ const splitIndex = firstLine.lastIndexOf(this.wrapCharacters[idx]);
+ if (splitIndex > -1) {
+ word = firstLine.substring(splitIndex + 1) + remainingChars;
+ parts.push(firstLine.substring(0, splitIndex + 1));
+ } else {
+ idx++;
+ if (idx < this.wrapCharacters.length) {
+ word = firstLine + remainingChars;
+ } else {
+ if (this.forceWrapOnLimit) {
+ parts.push(firstLine);
+ word = remainingChars;
+ if (word.length > this.maxLineLength) {
+ continue;
+ }
+ } else {
+ word = firstLine + remainingChars;
+ }
+ break;
+ }
+ }
+ }
+ parts.push(word);
+ return parts;
+ }
+ };
+ module2.exports = { InlineTextBuilder };
+ }
+});
+
+// node_modules/html-to-text/lib/stack-item.js
+var require_stack_item = __commonJS({
+ "node_modules/html-to-text/lib/stack-item.js"(exports, module2) {
+ var { InlineTextBuilder } = require_inline_text_builder();
+ var StackItem = class {
+ constructor(next = null) {
+ this.next = next;
+ }
+ getRoot() {
+ return this.next ? this.next : this;
+ }
+ };
+ var BlockStackItem = class extends StackItem {
+ constructor(options, next = null, leadingLineBreaks = 1, maxLineLength = void 0) {
+ super(next);
+ this.leadingLineBreaks = leadingLineBreaks;
+ this.inlineTextBuilder = new InlineTextBuilder(options, maxLineLength);
+ this.rawText = "";
+ this.stashedLineBreaks = 0;
+ this.isPre = next && next.isPre;
+ }
+ };
+ var TableStackItem = class extends StackItem {
+ constructor(next = null) {
+ super(next);
+ this.rows = [];
+ this.isPre = next && next.isPre;
+ }
+ };
+ var TableRowStackItem = class extends StackItem {
+ constructor(next = null) {
+ super(next);
+ this.cells = [];
+ this.isPre = next && next.isPre;
+ }
+ };
+ var TableCellStackItem = class extends StackItem {
+ constructor(options, next = null, maxColumnWidth = void 0) {
+ super(next);
+ this.inlineTextBuilder = new InlineTextBuilder(options, maxColumnWidth);
+ this.rawText = "";
+ this.stashedLineBreaks = 0;
+ this.isPre = next && next.isPre;
+ }
+ };
+ var TransformerStackItem = class extends StackItem {
+ constructor(next = null, transform) {
+ super(next);
+ this.transform = transform;
+ }
+ };
+ module2.exports = {
+ BlockStackItem,
+ StackItem,
+ TableCellStackItem,
+ TableRowStackItem,
+ TableStackItem,
+ TransformerStackItem
+ };
+ }
+});
+
+// node_modules/html-to-text/lib/table-printer.js
+var require_table_printer = __commonJS({
+ "node_modules/html-to-text/lib/table-printer.js"(exports, module2) {
+ function getRow(matrix, j) {
+ if (!matrix[j]) {
+ matrix[j] = [];
+ }
+ return matrix[j];
+ }
+ function findFirstVacantIndex(row, x2 = 0) {
+ while (row[x2]) {
+ x2++;
+ }
+ return x2;
+ }
+ function transposeInPlace(matrix, maxSize) {
+ for (let i2 = 0; i2 < maxSize; i2++) {
+ const rowI = getRow(matrix, i2);
+ for (let j = 0; j < i2; j++) {
+ const rowJ = getRow(matrix, j);
+ const temp = rowI[j];
+ rowI[j] = rowJ[i2];
+ rowJ[i2] = temp;
+ }
+ }
+ }
+ function putCellIntoLayout(cell, layout, baseRow, baseCol) {
+ for (let r2 = 0; r2 < cell.rowspan; r2++) {
+ const layoutRow = getRow(layout, baseRow + r2);
+ for (let c = 0; c < cell.colspan; c++) {
+ layoutRow[baseCol + c] = cell;
+ }
+ }
+ }
+ function updateOffset(offsets, base, span, value) {
+ offsets[base + span] = Math.max(offsets[base + span] || 0, offsets[base] + value);
+ }
+ function tableToString(tableRows, rowSpacing, colSpacing) {
+ const layout = [];
+ let colNumber = 0;
+ const rowNumber = tableRows.length;
+ const rowOffsets = [0];
+ for (let j = 0; j < rowNumber; j++) {
+ const layoutRow = getRow(layout, j);
+ const cells = tableRows[j];
+ let x2 = 0;
+ for (let i2 = 0; i2 < cells.length; i2++) {
+ const cell = cells[i2];
+ x2 = findFirstVacantIndex(layoutRow, x2);
+ putCellIntoLayout(cell, layout, j, x2);
+ x2 += cell.colspan;
+ cell.lines = cell.text.split("\n");
+ const cellHeight = cell.lines.length;
+ updateOffset(rowOffsets, j, cell.rowspan, cellHeight + rowSpacing);
+ }
+ colNumber = layoutRow.length > colNumber ? layoutRow.length : colNumber;
+ }
+ transposeInPlace(layout, rowNumber > colNumber ? rowNumber : colNumber);
+ const outputLines = [];
+ const colOffsets = [0];
+ for (let x2 = 0; x2 < colNumber; x2++) {
+ let y = 0;
+ let cell;
+ while (y < rowNumber && (cell = layout[x2][y])) {
+ if (!cell.rendered) {
+ let cellWidth = 0;
+ for (let j = 0; j < cell.lines.length; j++) {
+ const line = cell.lines[j];
+ const lineOffset = rowOffsets[y] + j;
+ outputLines[lineOffset] = (outputLines[lineOffset] || "").padEnd(colOffsets[x2]) + line;
+ cellWidth = line.length > cellWidth ? line.length : cellWidth;
+ }
+ updateOffset(colOffsets, x2, cell.colspan, cellWidth + colSpacing);
+ cell.rendered = true;
+ }
+ y += cell.rowspan;
+ }
+ }
+ return outputLines.join("\n");
+ }
+ module2.exports = { tableToString };
+ }
+});
+
+// node_modules/html-to-text/lib/whitespace-processor.js
+var require_whitespace_processor = __commonJS({
+ "node_modules/html-to-text/lib/whitespace-processor.js"(exports, module2) {
+ var { InlineTextBuilder } = require_inline_text_builder();
+ require_typedefs();
+ function charactersToCodes(str) {
+ return [...str].map((c) => "\\u" + c.charCodeAt(0).toString(16).padStart(4, "0")).join("");
+ }
+ var WhitespaceProcessor = class {
+ constructor(options) {
+ this.whitespaceChars = options.preserveNewlines ? options.whitespaceCharacters.replace(/\n/g, "") : options.whitespaceCharacters;
+ const whitespaceCodes = charactersToCodes(this.whitespaceChars);
+ this.leadingWhitespaceRe = new RegExp(`^[${whitespaceCodes}]`);
+ this.trailingWhitespaceRe = new RegExp(`[${whitespaceCodes}]$`);
+ this.allWhitespaceOrEmptyRe = new RegExp(`^[${whitespaceCodes}]*$`);
+ this.newlineOrNonWhitespaceRe = new RegExp(`(\\n|[^\\n${whitespaceCodes}])`, "g");
+ if (options.preserveNewlines) {
+ const wordOrNewlineRe = new RegExp(`\\n|[^\\n${whitespaceCodes}]+`, "gm");
+ this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = (str) => str) {
+ if (!text) {
+ return;
+ }
+ const previouslyStashedSpace = inlineTextBuilder.stashedSpace;
+ let anyMatch = false;
+ let m2 = wordOrNewlineRe.exec(text);
+ if (m2) {
+ anyMatch = true;
+ if (m2[0] === "\n") {
+ inlineTextBuilder.startNewLine();
+ } else if (previouslyStashedSpace || this.testLeadingWhitespace(text)) {
+ inlineTextBuilder.pushWord(transform(m2[0]));
+ } else {
+ inlineTextBuilder.concatWord(transform(m2[0]));
+ }
+ while ((m2 = wordOrNewlineRe.exec(text)) !== null) {
+ if (m2[0] === "\n") {
+ inlineTextBuilder.startNewLine();
+ } else {
+ inlineTextBuilder.pushWord(transform(m2[0]));
+ }
+ }
+ }
+ inlineTextBuilder.stashedSpace = previouslyStashedSpace && !anyMatch || this.testTrailingWhitespace(text);
+ };
+ } else {
+ const wordRe = new RegExp(`[^${whitespaceCodes}]+`, "g");
+ this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = (str) => str) {
+ if (!text) {
+ return;
+ }
+ const previouslyStashedSpace = inlineTextBuilder.stashedSpace;
+ let anyMatch = false;
+ let m2 = wordRe.exec(text);
+ if (m2) {
+ anyMatch = true;
+ if (previouslyStashedSpace || this.testLeadingWhitespace(text)) {
+ inlineTextBuilder.pushWord(transform(m2[0]));
+ } else {
+ inlineTextBuilder.concatWord(transform(m2[0]));
+ }
+ while ((m2 = wordRe.exec(text)) !== null) {
+ inlineTextBuilder.pushWord(transform(m2[0]));
+ }
+ }
+ inlineTextBuilder.stashedSpace = previouslyStashedSpace && !anyMatch || this.testTrailingWhitespace(text);
+ };
+ }
+ }
+ testLeadingWhitespace(text) {
+ return this.leadingWhitespaceRe.test(text);
+ }
+ testTrailingWhitespace(text) {
+ return this.trailingWhitespaceRe.test(text);
+ }
+ testContainsWords(text) {
+ return !this.allWhitespaceOrEmptyRe.test(text);
+ }
+ countNewlinesNoWords(text) {
+ this.newlineOrNonWhitespaceRe.lastIndex = 0;
+ let counter = 0;
+ let match;
+ while ((match = this.newlineOrNonWhitespaceRe.exec(text)) !== null) {
+ if (match[0] === "\n") {
+ counter++;
+ } else {
+ return 0;
+ }
+ }
+ return counter;
+ }
+ };
+ module2.exports = { WhitespaceProcessor };
+ }
+});
+
+// node_modules/html-to-text/lib/block-text-builder.js
+var require_block_text_builder = __commonJS({
+ "node_modules/html-to-text/lib/block-text-builder.js"(exports, module2) {
+ var { Picker } = require_selderee();
+ var { trimCharacter } = require_helper();
+ var { StackItem, BlockStackItem, TableCellStackItem, TableRowStackItem, TableStackItem, TransformerStackItem } = require_stack_item();
+ var { tableToString } = require_table_printer();
+ var { WhitespaceProcessor } = require_whitespace_processor();
+ require_typedefs();
+ var BlockTextBuilder = class {
+ constructor(options, picker) {
+ this.options = options;
+ this.picker = picker;
+ this.whitespaceProcessor = new WhitespaceProcessor(options);
+ this._stackItem = new BlockStackItem(options);
+ this._wordTransformer = void 0;
+ }
+ pushWordTransform(wordTransform) {
+ this._wordTransformer = new TransformerStackItem(this._wordTransformer, wordTransform);
+ }
+ popWordTransform() {
+ if (!this._wordTransformer) {
+ return void 0;
+ }
+ const transform = this._wordTransformer.transform;
+ this._wordTransformer = this._wordTransformer.next;
+ return transform;
+ }
+ _getCombinedWordTransformer() {
+ const applyTransformer = (str, transformer) => transformer ? applyTransformer(transformer.transform(str), transformer.next) : str;
+ return (str) => applyTransformer(str, this._wordTransformer);
+ }
+ _popStackItem() {
+ const item = this._stackItem;
+ this._stackItem = item.next;
+ return item;
+ }
+ addLineBreak() {
+ if (!(this._stackItem instanceof BlockStackItem || this._stackItem instanceof TableCellStackItem)) {
+ return;
+ }
+ if (this._stackItem.isPre) {
+ this._stackItem.rawText += "\n";
+ } else {
+ this._stackItem.inlineTextBuilder.startNewLine();
+ }
+ }
+ addWordBreakOpportunity() {
+ if (this._stackItem instanceof BlockStackItem || this._stackItem instanceof TableCellStackItem) {
+ this._stackItem.inlineTextBuilder.wordBreakOpportunity = true;
+ }
+ }
+ addInline(str, optionsObjectOrNoWordTransform = {}) {
+ if (typeof optionsObjectOrNoWordTransform === "object") {
+ this._addInline(str, optionsObjectOrNoWordTransform);
+ } else {
+ this._addInline(str, { noWordTransform: optionsObjectOrNoWordTransform });
+ }
+ }
+ _addInline(str, { noWordTransform = false } = {}) {
+ if (!(this._stackItem instanceof BlockStackItem || this._stackItem instanceof TableCellStackItem)) {
+ return;
+ }
+ if (this._stackItem.isPre) {
+ this._stackItem.rawText += str;
+ return;
+ }
+ if (str.length === 0 || this._stackItem.stashedLineBreaks && !this.whitespaceProcessor.testContainsWords(str)) {
+ return;
+ }
+ if (this.options.preserveNewlines) {
+ const newlinesNumber = this.whitespaceProcessor.countNewlinesNoWords(str);
+ if (newlinesNumber > 0) {
+ this._stackItem.inlineTextBuilder.startNewLine(newlinesNumber);
+ return;
+ }
+ }
+ if (this._stackItem.stashedLineBreaks) {
+ this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks);
+ }
+ this.whitespaceProcessor.shrinkWrapAdd(str, this._stackItem.inlineTextBuilder, this._wordTransformer && !noWordTransform ? this._getCombinedWordTransformer() : void 0);
+ this._stackItem.stashedLineBreaks = 0;
+ }
+ openBlock(optionsObjectOrLeadingLineBreaks = {}, reservedLineLength = void 0, isPre = void 0) {
+ if (typeof optionsObjectOrLeadingLineBreaks === "object") {
+ this._openBlock(optionsObjectOrLeadingLineBreaks);
+ } else {
+ this._openBlock({
+ isPre,
+ leadingLineBreaks: optionsObjectOrLeadingLineBreaks,
+ reservedLineLength
+ });
+ }
+ }
+ _openBlock({ leadingLineBreaks = 1, reservedLineLength = 0, isPre = false } = {}) {
+ const maxLineLength = Math.max(20, this._stackItem.inlineTextBuilder.maxLineLength - reservedLineLength);
+ this._stackItem = new BlockStackItem(this.options, this._stackItem, leadingLineBreaks, maxLineLength);
+ if (isPre) {
+ this._stackItem.isPre = true;
+ }
+ }
+ closeBlock(optionsObjectOrTrailingLineBreaks = {}, blockTransform = void 0) {
+ if (typeof optionsObjectOrTrailingLineBreaks === "object") {
+ this._closeBlock(optionsObjectOrTrailingLineBreaks);
+ } else {
+ this._closeBlock({
+ trailingLineBreaks: optionsObjectOrTrailingLineBreaks,
+ blockTransform
+ });
+ }
+ }
+ _closeBlock({ trailingLineBreaks = 1, blockTransform = void 0 } = {}) {
+ const block = this._popStackItem();
+ const blockText = blockTransform ? blockTransform(getText2(block)) : getText2(block);
+ addText(this._stackItem, blockText, block.leadingLineBreaks, Math.max(block.stashedLineBreaks, trailingLineBreaks));
+ }
+ openTable() {
+ this._stackItem = new TableStackItem(this._stackItem);
+ }
+ openTableRow() {
+ if (!(this._stackItem instanceof TableStackItem)) {
+ throw new Error("Can't add table row to something that is not a table! Check the formatter.");
+ }
+ this._stackItem = new TableRowStackItem(this._stackItem);
+ }
+ openTableCell(optionsObjectOrMaxColumnWidth = {}) {
+ if (typeof optionsObjectOrMaxColumnWidth === "object") {
+ this._openTableCell(optionsObjectOrMaxColumnWidth);
+ } else {
+ this._openTableCell({ maxColumnWidth: optionsObjectOrMaxColumnWidth });
+ }
+ }
+ _openTableCell({ maxColumnWidth = void 0 } = {}) {
+ if (!(this._stackItem instanceof TableRowStackItem)) {
+ throw new Error("Can't add table cell to something that is not a table row! Check the formatter.");
+ }
+ this._stackItem = new TableCellStackItem(this.options, this._stackItem, maxColumnWidth);
+ }
+ closeTableCell(optionsObjectOrColspan = {}, rowspan = void 0) {
+ if (typeof optionsObjectOrColspan === "object") {
+ this._closeTableCell(optionsObjectOrColspan);
+ } else {
+ this._closeTableCell({
+ colspan: optionsObjectOrColspan,
+ rowspan
+ });
+ }
+ }
+ _closeTableCell({ colspan = 1, rowspan = 1 } = {}) {
+ const cell = this._popStackItem();
+ const text = trimCharacter(getText2(cell), "\n");
+ cell.next.cells.push({ colspan, rowspan, text });
+ }
+ closeTableRow() {
+ const row = this._popStackItem();
+ row.next.rows.push(row.cells);
+ }
+ closeTable(optionsObjectOrColSpacing = {}, rowSpacing = void 0, leadingLineBreaks = void 0, trailingLineBreaks = void 0) {
+ if (typeof optionsObjectOrColSpacing === "object") {
+ this._closeTable(optionsObjectOrColSpacing);
+ } else {
+ this._closeTable({
+ colSpacing: optionsObjectOrColSpacing,
+ leadingLineBreaks,
+ rowSpacing,
+ trailingLineBreaks
+ });
+ }
+ }
+ _closeTable({ colSpacing = 3, rowSpacing = 0, leadingLineBreaks = 2, trailingLineBreaks = 2 } = {}) {
+ const table = this._popStackItem();
+ const output = tableToString(table.rows, rowSpacing, colSpacing);
+ if (output) {
+ addText(this._stackItem, output, leadingLineBreaks, trailingLineBreaks);
+ }
+ }
+ toString() {
+ return getText2(this._stackItem.getRoot());
+ }
+ };
+ function getText2(stackItem) {
+ if (!(stackItem instanceof BlockStackItem || stackItem instanceof TableCellStackItem)) {
+ throw new Error("Only blocks and table cells can be requested for text contents.");
+ }
+ return stackItem.inlineTextBuilder.isEmpty() ? stackItem.rawText : stackItem.rawText + stackItem.inlineTextBuilder.toString();
+ }
+ function addText(stackItem, text, leadingLineBreaks, trailingLineBreaks) {
+ if (!(stackItem instanceof BlockStackItem || stackItem instanceof TableCellStackItem)) {
+ throw new Error("Only blocks and table cells can contain text.");
+ }
+ const parentText = getText2(stackItem);
+ const lineBreaks = Math.max(stackItem.stashedLineBreaks, leadingLineBreaks);
+ stackItem.inlineTextBuilder.clear();
+ if (parentText) {
+ stackItem.rawText = parentText + "\n".repeat(lineBreaks) + text;
+ } else {
+ stackItem.rawText = text;
+ stackItem.leadingLineBreaks = lineBreaks;
+ }
+ stackItem.stashedLineBreaks = trailingLineBreaks;
+ }
+ module2.exports = { BlockTextBuilder };
+ }
+});
+
+// node_modules/html-to-text/lib/formatter.js
+var require_formatter = __commonJS({
+ "node_modules/html-to-text/lib/formatter.js"(exports, module2) {
+ var he = require_he();
+ var { get, numberToLetterSequence, numberToRoman, splitClassesAndIds, trimCharacter } = require_helper();
+ require_typedefs();
+ function formatSkip(elem, walk, builder, formatOptions) {
+ }
+ function formatInline(elem, walk, builder, formatOptions) {
+ walk(elem.children, builder);
+ }
+ function formatBlock(elem, walk, builder, formatOptions) {
+ builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks });
+ walk(elem.children, builder);
+ builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks });
+ }
+ function formatLineBreak(elem, walk, builder, formatOptions) {
+ builder.addLineBreak();
+ }
+ function formatWbr(elem, walk, builder, formatOptions) {
+ builder.addWordBreakOpportunity();
+ }
+ function formatHorizontalLine(elem, walk, builder, formatOptions) {
+ builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
+ builder.addInline("-".repeat(formatOptions.length || builder.options.wordwrap || 40));
+ builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
+ }
+ function formatParagraph(elem, walk, builder, formatOptions) {
+ builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
+ walk(elem.children, builder);
+ builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
+ }
+ function formatPre(elem, walk, builder, formatOptions) {
+ builder.openBlock({
+ isPre: true,
+ leadingLineBreaks: formatOptions.leadingLineBreaks || 2
+ });
+ walk(elem.children, builder);
+ builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
+ }
+ function formatHeading(elem, walk, builder, formatOptions) {
+ builder.openBlock({ leadingLineBreaks: formatOptions.leadingLineBreaks || 2 });
+ if (formatOptions.uppercase !== false) {
+ builder.pushWordTransform((str) => str.toUpperCase());
+ walk(elem.children, builder);
+ builder.popWordTransform();
+ } else {
+ walk(elem.children, builder);
+ }
+ builder.closeBlock({ trailingLineBreaks: formatOptions.trailingLineBreaks || 2 });
+ }
+ function formatBlockquote(elem, walk, builder, formatOptions) {
+ builder.openBlock({
+ leadingLineBreaks: formatOptions.leadingLineBreaks || 2,
+ reservedLineLength: 2
+ });
+ walk(elem.children, builder);
+ builder.closeBlock({
+ trailingLineBreaks: formatOptions.trailingLineBreaks || 2,
+ blockTransform: (str) => (formatOptions.trimEmptyLines !== false ? trimCharacter(str, "\n") : str).split("\n").map((line) => "> " + line).join("\n")
+ });
+ }
+ function withBrackets(str, brackets) {
+ if (!brackets) {
+ return str;
+ }
+ const lbr2 = typeof brackets[0] === "string" ? brackets[0] : "[";
+ const rbr2 = typeof brackets[1] === "string" ? brackets[1] : "]";
+ return lbr2 + str + rbr2;
+ }
+ function formatImage(elem, walk, builder, formatOptions) {
+ const attribs = elem.attribs || {};
+ const alt = attribs.alt ? he.decode(attribs.alt, builder.options.decodeOptions) : "";
+ const src = !attribs.src ? "" : formatOptions.baseUrl && attribs.src.indexOf("/") === 0 ? formatOptions.baseUrl + attribs.src : attribs.src;
+ const text = !src ? alt : !alt ? withBrackets(src, formatOptions.linkBrackets) : alt + " " + withBrackets(src, formatOptions.linkBrackets);
+ builder.addInline(text);
+ }
+ function formatAnchor(elem, walk, builder, formatOptions) {
+ function getHref() {
+ if (formatOptions.ignoreHref) {
+ return "";
+ }
+ if (!elem.attribs || !elem.attribs.href) {
+ return "";
+ }
+ let href2 = elem.attribs.href.replace(/^mailto:/, "");
+ if (formatOptions.noAnchorUrl && href2[0] === "#") {
+ return "";
+ }
+ href2 = formatOptions.baseUrl && href2[0] === "/" ? formatOptions.baseUrl + href2 : href2;
+ return he.decode(href2, builder.options.decodeOptions);
+ }
+ const href = getHref();
+ if (!href) {
+ walk(elem.children, builder);
+ } else {
+ let text = "";
+ builder.pushWordTransform((str) => {
+ if (str) {
+ text += str;
+ }
+ return str;
+ });
+ walk(elem.children, builder);
+ builder.popWordTransform();
+ const hideSameLink = formatOptions.hideLinkHrefIfSameAsText && href === text;
+ if (!hideSameLink) {
+ builder.addInline(!text ? href : " " + withBrackets(href, formatOptions.linkBrackets), { noWordTransform: true });
+ }
+ }
+ }
+ function formatList(elem, walk, builder, formatOptions, nextPrefixCallback) {
+ const isNestedList = get(elem, ["parent", "name"]) === "li";
+ let maxPrefixLength = 0;
+ const listItems = (elem.children || []).filter((child) => child.type !== "text" || !/^\s*$/.test(child.data)).map(function(child) {
+ if (child.name !== "li") {
+ return { node: child, prefix: "" };
+ }
+ const prefix = isNestedList ? nextPrefixCallback().trimStart() : nextPrefixCallback();
+ if (prefix.length > maxPrefixLength) {
+ maxPrefixLength = prefix.length;
+ }
+ return { node: child, prefix };
+ });
+ if (!listItems.length) {
+ return;
+ }
+ const reservedLineLength = maxPrefixLength;
+ const spacing = "\n" + " ".repeat(reservedLineLength);
+ builder.openBlock({ leadingLineBreaks: isNestedList ? 1 : formatOptions.leadingLineBreaks || 2 });
+ for (const { node, prefix } of listItems) {
+ builder.openBlock({
+ leadingLineBreaks: 1,
+ reservedLineLength
+ });
+ walk([node], builder);
+ builder.closeBlock({
+ trailingLineBreaks: 1,
+ blockTransform: (str) => prefix + " ".repeat(reservedLineLength - prefix.length) + str.replace(/\n/g, spacing)
+ });
+ }
+ builder.closeBlock({ trailingLineBreaks: isNestedList ? 1 : formatOptions.trailingLineBreaks || 2 });
+ }
+ function formatUnorderedList(elem, walk, builder, formatOptions) {
+ const prefix = formatOptions.itemPrefix || " * ";
+ return formatList(elem, walk, builder, formatOptions, () => prefix);
+ }
+ function formatOrderedList(elem, walk, builder, formatOptions) {
+ let nextIndex = Number(elem.attribs.start || "1");
+ const indexFunction = getOrderedListIndexFunction(elem.attribs.type);
+ const nextPrefixCallback = () => " " + indexFunction(nextIndex++) + ". ";
+ return formatList(elem, walk, builder, formatOptions, nextPrefixCallback);
+ }
+ function getOrderedListIndexFunction(olType = "1") {
+ switch (olType) {
+ case "a":
+ return (i2) => numberToLetterSequence(i2, "a");
+ case "A":
+ return (i2) => numberToLetterSequence(i2, "A");
+ case "i":
+ return (i2) => numberToRoman(i2).toLowerCase();
+ case "I":
+ return (i2) => numberToRoman(i2);
+ case "1":
+ default:
+ return (i2) => i2.toString();
+ }
+ }
+ function isDataTable(attr, tables) {
+ if (tables === true) {
+ return true;
+ }
+ if (!attr) {
+ return false;
+ }
+ const { classes, ids } = splitClassesAndIds(tables);
+ const attrClasses = (attr["class"] || "").split(" ");
+ const attrIds = (attr["id"] || "").split(" ");
+ return attrClasses.some((x2) => classes.includes(x2)) || attrIds.some((x2) => ids.includes(x2));
+ }
+ function formatTable(elem, walk, builder, formatOptions) {
+ return isDataTable(elem.attribs, builder.options.tables) ? formatDataTable(elem, walk, builder, formatOptions) : formatBlock(elem, walk, builder, formatOptions);
+ }
+ function formatDataTable(elem, walk, builder, formatOptions) {
+ builder.openTable();
+ elem.children.forEach(walkTable);
+ builder.closeTable({
+ colSpacing: formatOptions.colSpacing,
+ leadingLineBreaks: formatOptions.leadingLineBreaks,
+ rowSpacing: formatOptions.rowSpacing,
+ trailingLineBreaks: formatOptions.trailingLineBreaks
+ });
+ function formatCell(cellNode) {
+ const colspan = +get(cellNode, ["attribs", "colspan"]) || 1;
+ const rowspan = +get(cellNode, ["attribs", "rowspan"]) || 1;
+ builder.openTableCell({ maxColumnWidth: formatOptions.maxColumnWidth });
+ walk(cellNode.children, builder);
+ builder.closeTableCell({ colspan, rowspan });
+ }
+ function walkTable(elem2) {
+ if (elem2.type !== "tag") {
+ return;
+ }
+ const formatHeaderCell = formatOptions.uppercaseHeaderCells !== false ? (cellNode) => {
+ builder.pushWordTransform((str) => str.toUpperCase());
+ formatCell(cellNode);
+ builder.popWordTransform();
+ } : formatCell;
+ switch (elem2.name) {
+ case "thead":
+ case "tbody":
+ case "tfoot":
+ case "center":
+ elem2.children.forEach(walkTable);
+ return;
+ case "tr": {
+ builder.openTableRow();
+ for (const childOfTr of elem2.children) {
+ if (childOfTr.type !== "tag") {
+ continue;
+ }
+ switch (childOfTr.name) {
+ case "th": {
+ formatHeaderCell(childOfTr);
+ break;
+ }
+ case "td": {
+ formatCell(childOfTr);
+ break;
+ }
+ default:
+ }
+ }
+ builder.closeTableRow();
+ break;
+ }
+ default:
+ }
+ }
+ }
+ module2.exports = {
+ anchor: formatAnchor,
+ block: formatBlock,
+ blockquote: formatBlockquote,
+ dataTable: formatDataTable,
+ heading: formatHeading,
+ horizontalLine: formatHorizontalLine,
+ image: formatImage,
+ inline: formatInline,
+ lineBreak: formatLineBreak,
+ orderedList: formatOrderedList,
+ paragraph: formatParagraph,
+ pre: formatPre,
+ skip: formatSkip,
+ table: formatTable,
+ unorderedList: formatUnorderedList,
+ wbr: formatWbr
+ };
+ }
+});
+
+// node_modules/html-to-text/lib/html-to-text.js
+var require_html_to_text = __commonJS({
+ "node_modules/html-to-text/lib/html-to-text.js"(exports, module2) {
+ var { hp2Builder } = require_hp2_builder();
+ var merge = require_cjs();
+ var he = require_he();
+ var htmlparser = require_lib6();
+ var selderee = require_selderee();
+ var { BlockTextBuilder } = require_block_text_builder();
+ var defaultFormatters = require_formatter();
+ var { limitedDepthRecursive, mergeDuplicatesPreferLast, get } = require_helper();
+ require_typedefs();
+ var DEFAULT_OPTIONS = {
+ baseElements: {
+ selectors: ["body"],
+ orderBy: "selectors",
+ returnDomByDefault: true
+ },
+ decodeOptions: {
+ isAttributeValue: false,
+ strict: false
+ },
+ formatters: {},
+ limits: {
+ ellipsis: "...",
+ maxBaseElements: void 0,
+ maxChildNodes: void 0,
+ maxDepth: void 0,
+ maxInputLength: 1 << 24
+ },
+ longWordSplit: {
+ forceWrapOnLimit: false,
+ wrapCharacters: []
+ },
+ preserveNewlines: false,
+ selectors: [
+ { selector: "*", format: "inline" },
+ {
+ selector: "a",
+ format: "anchor",
+ options: {
+ baseUrl: null,
+ hideLinkHrefIfSameAsText: false,
+ ignoreHref: false,
+ linkBrackets: ["[", "]"],
+ noAnchorUrl: true
+ }
+ },
+ { selector: "article", format: "block" },
+ { selector: "aside", format: "block" },
+ {
+ selector: "blockquote",
+ format: "blockquote",
+ options: { leadingLineBreaks: 2, trailingLineBreaks: 2, trimEmptyLines: true }
+ },
+ { selector: "br", format: "lineBreak" },
+ { selector: "div", format: "block" },
+ { selector: "footer", format: "block" },
+ { selector: "form", format: "block" },
+ { selector: "h1", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "h2", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "h3", format: "heading", options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "h4", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "h5", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "h6", format: "heading", options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: true } },
+ { selector: "header", format: "block" },
+ {
+ selector: "hr",
+ format: "horizontalLine",
+ options: { leadingLineBreaks: 2, length: void 0, trailingLineBreaks: 2 }
+ },
+ {
+ selector: "img",
+ format: "image",
+ options: { baseUrl: null, linkBrackets: ["[", "]"] }
+ },
+ { selector: "main", format: "block" },
+ { selector: "nav", format: "block" },
+ {
+ selector: "ol",
+ format: "orderedList",
+ options: { leadingLineBreaks: 2, trailingLineBreaks: 2 }
+ },
+ { selector: "p", format: "paragraph", options: { leadingLineBreaks: 2, trailingLineBreaks: 2 } },
+ { selector: "pre", format: "pre", options: { leadingLineBreaks: 2, trailingLineBreaks: 2 } },
+ { selector: "section", format: "block" },
+ {
+ selector: "table",
+ format: "table",
+ options: {
+ colSpacing: 3,
+ leadingLineBreaks: 2,
+ maxColumnWidth: 60,
+ rowSpacing: 0,
+ trailingLineBreaks: 2,
+ uppercaseHeaderCells: true
+ }
+ },
+ {
+ selector: "ul",
+ format: "unorderedList",
+ options: { itemPrefix: " * ", leadingLineBreaks: 2, trailingLineBreaks: 2 }
+ },
+ { selector: "wbr", format: "wbr" }
+ ],
+ tables: [],
+ whitespaceCharacters: " \r\n\f\u200B",
+ wordwrap: 80
+ };
+ var concatMerge = (acc, src, options) => [...acc, ...src];
+ var overwriteMerge = (acc, src, options) => [...src];
+ var selectorsMerge = (acc, src, options) => acc.some((s2) => typeof s2 === "object") ? concatMerge(acc, src, options) : overwriteMerge(acc, src, options);
+ function compile3(options = {}) {
+ options = merge(DEFAULT_OPTIONS, options, {
+ arrayMerge: overwriteMerge,
+ customMerge: (key2) => key2 === "selectors" ? selectorsMerge : void 0
+ });
+ options.formatters = Object.assign({}, defaultFormatters, options.formatters);
+ handleDeprecatedOptions(options);
+ const uniqueSelectors = mergeDuplicatesPreferLast(options.selectors, (s2) => s2.selector);
+ const selectorsWithoutFormat = uniqueSelectors.filter((s2) => !s2.format);
+ if (selectorsWithoutFormat.length) {
+ throw new Error("Following selectors have no specified format: " + selectorsWithoutFormat.map((s2) => `\`${s2.selector}\``).join(", "));
+ }
+ const picker = new selderee.DecisionTree(uniqueSelectors.map((s2) => [s2.selector, s2])).build(hp2Builder);
+ const baseSelectorsPicker = new selderee.DecisionTree(options.baseElements.selectors.map((s2, i2) => [s2, i2 + 1])).build(hp2Builder);
+ function findBaseElements(dom) {
+ return findBases(dom, options, baseSelectorsPicker);
+ }
+ const limitedWalk = limitedDepthRecursive(options.limits.maxDepth, recursiveWalk, function(dom, builder) {
+ builder.addInline(options.limits.ellipsis || "");
+ });
+ return function(html) {
+ return process3(html, options, picker, findBaseElements, limitedWalk);
+ };
+ }
+ function process3(html, options, picker, findBaseElements, walk) {
+ const maxInputLength = options.limits.maxInputLength;
+ if (maxInputLength && html && html.length > maxInputLength) {
+ console.warn(`Input length ${html.length} is above allowed limit of ${maxInputLength}. Truncating without ellipsis.`);
+ html = html.substring(0, maxInputLength);
+ }
+ const handler4 = new htmlparser.DomHandler();
+ new htmlparser.Parser(handler4, { decodeEntities: false }).parseComplete(html);
+ const bases = findBaseElements(handler4.dom);
+ const builder = new BlockTextBuilder(options, picker);
+ walk(bases, builder);
+ return builder.toString();
+ }
+ function convert(html, options = {}) {
+ return compile3(options)(html);
+ }
+ function handleDeprecatedOptions(options) {
+ const selectorDefinitions = options.selectors;
+ if (options.tags) {
+ const tagDefinitions = Object.entries(options.tags).map(([selector, definition]) => __spreadProps(__spreadValues({}, definition), { selector: selector || "*" }));
+ selectorDefinitions.push(...tagDefinitions);
+ }
+ function set(obj, path, value) {
+ const valueKey = path.pop();
+ for (const key2 of path) {
+ let nested = obj[key2];
+ if (!nested) {
+ nested = {};
+ obj[key2] = nested;
+ }
+ obj = nested;
+ }
+ obj[valueKey] = value;
+ }
+ function copyFormatterOption(source, format, target) {
+ if (options[source] === void 0) {
+ return;
+ }
+ for (const definition of selectorDefinitions) {
+ if (definition.format === format) {
+ set(definition, ["options", target], options[source]);
+ }
+ }
+ }
+ copyFormatterOption("hideLinkHrefIfSameAsText", "anchor", "hideLinkHrefIfSameAsText");
+ copyFormatterOption("ignoreHref", "anchor", "ignoreHref");
+ copyFormatterOption("linkHrefBaseUrl", "anchor", "baseUrl");
+ copyFormatterOption("noAnchorUrl", "anchor", "noAnchorUrl");
+ copyFormatterOption("noLinkBrackets", "anchor", "noLinkBrackets");
+ copyFormatterOption("linkHrefBaseUrl", "image", "baseUrl");
+ copyFormatterOption("unorderedListItemPrefix", "unorderedList", "itemPrefix");
+ copyFormatterOption("uppercaseHeadings", "heading", "uppercase");
+ copyFormatterOption("uppercaseHeadings", "table", "uppercaseHeadings");
+ copyFormatterOption("uppercaseHeadings", "dataTable", "uppercaseHeadings");
+ if (options["ignoreImage"]) {
+ for (const definition of selectorDefinitions) {
+ if (definition.format === "image") {
+ definition.format = "skip";
+ }
+ }
+ }
+ if (options["singleNewLineParagraphs"]) {
+ for (const definition of selectorDefinitions) {
+ if (definition.format === "paragraph" || definition.format === "pre") {
+ set(definition, ["options", "leadingLineBreaks"], 1);
+ set(definition, ["options", "trailingLineBreaks"], 1);
+ }
+ }
+ }
+ if (options["baseElement"]) {
+ const baseElement = options["baseElement"];
+ set(options, ["baseElements", "selectors"], Array.isArray(baseElement) ? baseElement : [baseElement]);
+ }
+ if (options["returnDomByDefault"] !== void 0) {
+ set(options, ["baseElements", "returnDomByDefault"], options["returnDomByDefault"]);
+ }
+ for (const definition of selectorDefinitions) {
+ if (definition.format === "anchor" && get(definition, ["options", "noLinkBrackets"])) {
+ set(definition, ["options", "linkBrackets"], false);
+ }
+ }
+ }
+ function findBases(dom, options, baseSelectorsPicker) {
+ const results = [];
+ function recursiveWalk2(walk, dom2) {
+ dom2 = dom2.slice(0, options.limits.maxChildNodes);
+ for (const elem of dom2) {
+ if (elem.type !== "tag") {
+ continue;
+ }
+ const pickedSelectorIndex = baseSelectorsPicker.pick1(elem);
+ if (pickedSelectorIndex > 0) {
+ results.push({ selectorIndex: pickedSelectorIndex, element: elem });
+ } else if (elem.children) {
+ walk(elem.children);
+ }
+ if (results.length >= options.limits.maxBaseElements) {
+ return;
+ }
+ }
+ }
+ const limitedWalk = limitedDepthRecursive(options.limits.maxDepth, recursiveWalk2);
+ limitedWalk(dom);
+ if (options.baseElements.orderBy !== "occurrence") {
+ results.sort((a, b) => a.selectorIndex - b.selectorIndex);
+ }
+ return options.baseElements.returnDomByDefault && results.length === 0 ? dom : results.map((x2) => x2.element);
+ }
+ function recursiveWalk(walk, dom, builder) {
+ if (!dom) {
+ return;
+ }
+ const options = builder.options;
+ const tooManyChildNodes = dom.length > options.limits.maxChildNodes;
+ if (tooManyChildNodes) {
+ dom = dom.slice(0, options.limits.maxChildNodes);
+ dom.push({
+ data: options.limits.ellipsis,
+ type: "text"
+ });
+ }
+ for (const elem of dom) {
+ switch (elem.type) {
+ case "text": {
+ builder.addInline(he.decode(elem.data, options.decodeOptions));
+ break;
+ }
+ case "tag": {
+ const tagDefinition = builder.picker.pick1(elem);
+ const format = options.formatters[tagDefinition.format];
+ format(elem, walk, builder, tagDefinition.options || {});
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ return;
+ }
+ var fromString = (html, options = {}) => convert(html, options);
+ module2.exports = {
+ compile: compile3,
+ convert,
+ fromString,
+ htmlToText: convert
+ };
+ }
+});
+
+// node_modules/html-to-text/index.js
+var require_html_to_text2 = __commonJS({
+ "node_modules/html-to-text/index.js"(exports, module2) {
+ module2.exports = require_html_to_text();
+ }
+});
+
+// node_modules/linkedom/node_modules/entities/lib/decode_codepoint.js
+var require_decode_codepoint2 = __commonJS({
+ "node_modules/linkedom/node_modules/entities/lib/decode_codepoint.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var decodeMap = /* @__PURE__ */ new Map([
+ [0, 65533],
+ [128, 8364],
+ [130, 8218],
+ [131, 402],
+ [132, 8222],
+ [133, 8230],
+ [134, 8224],
+ [135, 8225],
+ [136, 710],
+ [137, 8240],
+ [138, 352],
+ [139, 8249],
+ [140, 338],
+ [142, 381],
+ [145, 8216],
+ [146, 8217],
+ [147, 8220],
+ [148, 8221],
+ [149, 8226],
+ [150, 8211],
+ [151, 8212],
+ [152, 732],
+ [153, 8482],
+ [154, 353],
+ [155, 8250],
+ [156, 339],
+ [158, 382],
+ [159, 376]
+ ]);
+ var fromCodePoint = String.fromCodePoint || function(codePoint) {
+ var output = "";
+ if (codePoint > 65535) {
+ codePoint -= 65536;
+ output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296);
+ codePoint = 56320 | codePoint & 1023;
+ }
+ output += String.fromCharCode(codePoint);
+ return output;
+ };
+ function decodeCodePoint(codePoint) {
+ var _a;
+ if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
+ return "\uFFFD";
+ }
+ return fromCodePoint((_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint);
+ }
+ exports.default = decodeCodePoint;
+ }
+});
+
+// node_modules/linkedom/node_modules/entities/lib/generated/decode-data-html.js
+var require_decode_data_html = __commonJS({
+ "node_modules/linkedom/node_modules/entities/lib/generated/decode-data-html.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.default = new Uint16Array([14866, 60, 237, 340, 721, 1312, 1562, 1654, 1838, 1957, 2183, 2239, 2301, 2958, 3037, 3893, 4123, 4298, 4330, 4801, 5191, 5395, 5752, 5903, 5943, 5972, 6050, 0, 0, 0, 0, 0, 0, 6135, 6565, 7422, 8183, 8738, 9242, 9503, 9938, 10189, 10573, 10637, 10715, 11950, 12246, 13539, 13950, 14445, 14533, 15364, 16514, 16980, 17390, 17763, 17849, 18036, 18125, 4096, 69, 77, 97, 98, 99, 102, 103, 108, 109, 110, 111, 112, 114, 115, 116, 117, 92, 100, 106, 115, 122, 137, 142, 151, 157, 163, 167, 182, 196, 204, 220, 229, 108, 105, 103, 33024, 198, 59, 32768, 198, 80, 33024, 38, 59, 32768, 38, 99, 117, 116, 101, 33024, 193, 59, 32768, 193, 114, 101, 118, 101, 59, 32768, 258, 512, 105, 121, 127, 134, 114, 99, 33024, 194, 59, 32768, 194, 59, 32768, 1040, 114, 59, 32896, 55349, 56580, 114, 97, 118, 101, 33024, 192, 59, 32768, 192, 112, 104, 97, 59, 32768, 913, 97, 99, 114, 59, 32768, 256, 100, 59, 32768, 10835, 512, 103, 112, 172, 177, 111, 110, 59, 32768, 260, 102, 59, 32896, 55349, 56632, 112, 108, 121, 70, 117, 110, 99, 116, 105, 111, 110, 59, 32768, 8289, 105, 110, 103, 33024, 197, 59, 32768, 197, 512, 99, 115, 209, 214, 114, 59, 32896, 55349, 56476, 105, 103, 110, 59, 32768, 8788, 105, 108, 100, 101, 33024, 195, 59, 32768, 195, 109, 108, 33024, 196, 59, 32768, 196, 2048, 97, 99, 101, 102, 111, 114, 115, 117, 253, 278, 282, 310, 315, 321, 327, 332, 512, 99, 114, 258, 267, 107, 115, 108, 97, 115, 104, 59, 32768, 8726, 583, 271, 274, 59, 32768, 10983, 101, 100, 59, 32768, 8966, 121, 59, 32768, 1041, 768, 99, 114, 116, 289, 296, 306, 97, 117, 115, 101, 59, 32768, 8757, 110, 111, 117, 108, 108, 105, 115, 59, 32768, 8492, 97, 59, 32768, 914, 114, 59, 32896, 55349, 56581, 112, 102, 59, 32896, 55349, 56633, 101, 118, 101, 59, 32768, 728, 99, 114, 59, 32768, 8492, 109, 112, 101, 113, 59, 32768, 8782, 3584, 72, 79, 97, 99, 100, 101, 102, 104, 105, 108, 111, 114, 115, 117, 368, 373, 380, 426, 461, 466, 487, 491, 495, 533, 593, 695, 701, 707, 99, 121, 59, 32768, 1063, 80, 89, 33024, 169, 59, 32768, 169, 768, 99, 112, 121, 387, 393, 419, 117, 116, 101, 59, 32768, 262, 512, 59, 105, 398, 400, 32768, 8914, 116, 97, 108, 68, 105, 102, 102, 101, 114, 101, 110, 116, 105, 97, 108, 68, 59, 32768, 8517, 108, 101, 121, 115, 59, 32768, 8493, 1024, 97, 101, 105, 111, 435, 441, 449, 454, 114, 111, 110, 59, 32768, 268, 100, 105, 108, 33024, 199, 59, 32768, 199, 114, 99, 59, 32768, 264, 110, 105, 110, 116, 59, 32768, 8752, 111, 116, 59, 32768, 266, 512, 100, 110, 471, 478, 105, 108, 108, 97, 59, 32768, 184, 116, 101, 114, 68, 111, 116, 59, 32768, 183, 114, 59, 32768, 8493, 105, 59, 32768, 935, 114, 99, 108, 101, 1024, 68, 77, 80, 84, 508, 513, 520, 526, 111, 116, 59, 32768, 8857, 105, 110, 117, 115, 59, 32768, 8854, 108, 117, 115, 59, 32768, 8853, 105, 109, 101, 115, 59, 32768, 8855, 111, 512, 99, 115, 539, 562, 107, 119, 105, 115, 101, 67, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 32768, 8754, 101, 67, 117, 114, 108, 121, 512, 68, 81, 573, 586, 111, 117, 98, 108, 101, 81, 117, 111, 116, 101, 59, 32768, 8221, 117, 111, 116, 101, 59, 32768, 8217, 1024, 108, 110, 112, 117, 602, 614, 648, 664, 111, 110, 512, 59, 101, 609, 611, 32768, 8759, 59, 32768, 10868, 768, 103, 105, 116, 621, 629, 634, 114, 117, 101, 110, 116, 59, 32768, 8801, 110, 116, 59, 32768, 8751, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 32768, 8750, 512, 102, 114, 653, 656, 59, 32768, 8450, 111, 100, 117, 99, 116, 59, 32768, 8720, 110, 116, 101, 114, 67, 108, 111, 99, 107, 119, 105, 115, 101, 67, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 32768, 8755, 111, 115, 115, 59, 32768, 10799, 99, 114, 59, 32896, 55349, 56478, 112, 512, 59, 67, 713, 715, 32768, 8915, 97, 112, 59, 32768, 8781, 2816, 68, 74, 83, 90, 97, 99, 101, 102, 105, 111, 115, 743, 758, 763, 768, 773, 795, 809, 821, 826, 910, 1295, 512, 59, 111, 748, 750, 32768, 8517, 116, 114, 97, 104, 100, 59, 32768, 10513, 99, 121, 59, 32768, 1026, 99, 121, 59, 32768, 1029, 99, 121, 59, 32768, 1039, 768, 103, 114, 115, 780, 786, 790, 103, 101, 114, 59, 32768, 8225, 114, 59, 32768, 8609, 104, 118, 59, 32768, 10980, 512, 97, 121, 800, 806, 114, 111, 110, 59, 32768, 270, 59, 32768, 1044, 108, 512, 59, 116, 815, 817, 32768, 8711, 97, 59, 32768, 916, 114, 59, 32896, 55349, 56583, 512, 97, 102, 831, 897, 512, 99, 109, 836, 891, 114, 105, 116, 105, 99, 97, 108, 1024, 65, 68, 71, 84, 852, 859, 877, 884, 99, 117, 116, 101, 59, 32768, 180, 111, 581, 864, 867, 59, 32768, 729, 98, 108, 101, 65, 99, 117, 116, 101, 59, 32768, 733, 114, 97, 118, 101, 59, 32768, 96, 105, 108, 100, 101, 59, 32768, 732, 111, 110, 100, 59, 32768, 8900, 102, 101, 114, 101, 110, 116, 105, 97, 108, 68, 59, 32768, 8518, 2113, 920, 0, 0, 0, 925, 946, 0, 1139, 102, 59, 32896, 55349, 56635, 768, 59, 68, 69, 931, 933, 938, 32768, 168, 111, 116, 59, 32768, 8412, 113, 117, 97, 108, 59, 32768, 8784, 98, 108, 101, 1536, 67, 68, 76, 82, 85, 86, 961, 978, 996, 1080, 1101, 1125, 111, 110, 116, 111, 117, 114, 73, 110, 116, 101, 103, 114, 97, 108, 59, 32768, 8751, 111, 1093, 985, 0, 0, 988, 59, 32768, 168, 110, 65, 114, 114, 111, 119, 59, 32768, 8659, 512, 101, 111, 1001, 1034, 102, 116, 768, 65, 82, 84, 1010, 1017, 1029, 114, 114, 111, 119, 59, 32768, 8656, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 8660, 101, 101, 59, 32768, 10980, 110, 103, 512, 76, 82, 1041, 1068, 101, 102, 116, 512, 65, 82, 1049, 1056, 114, 114, 111, 119, 59, 32768, 10232, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 10234, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 10233, 105, 103, 104, 116, 512, 65, 84, 1089, 1096, 114, 114, 111, 119, 59, 32768, 8658, 101, 101, 59, 32768, 8872, 112, 1042, 1108, 0, 0, 1115, 114, 114, 111, 119, 59, 32768, 8657, 111, 119, 110, 65, 114, 114, 111, 119, 59, 32768, 8661, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 32768, 8741, 110, 1536, 65, 66, 76, 82, 84, 97, 1152, 1179, 1186, 1236, 1272, 1288, 114, 114, 111, 119, 768, 59, 66, 85, 1163, 1165, 1170, 32768, 8595, 97, 114, 59, 32768, 10515, 112, 65, 114, 114, 111, 119, 59, 32768, 8693, 114, 101, 118, 101, 59, 32768, 785, 101, 102, 116, 1315, 1196, 0, 1209, 0, 1220, 105, 103, 104, 116, 86, 101, 99, 116, 111, 114, 59, 32768, 10576, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10590, 101, 99, 116, 111, 114, 512, 59, 66, 1229, 1231, 32768, 8637, 97, 114, 59, 32768, 10582, 105, 103, 104, 116, 805, 1245, 0, 1256, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10591, 101, 99, 116, 111, 114, 512, 59, 66, 1265, 1267, 32768, 8641, 97, 114, 59, 32768, 10583, 101, 101, 512, 59, 65, 1279, 1281, 32768, 8868, 114, 114, 111, 119, 59, 32768, 8615, 114, 114, 111, 119, 59, 32768, 8659, 512, 99, 116, 1300, 1305, 114, 59, 32896, 55349, 56479, 114, 111, 107, 59, 32768, 272, 4096, 78, 84, 97, 99, 100, 102, 103, 108, 109, 111, 112, 113, 115, 116, 117, 120, 1344, 1348, 1354, 1363, 1386, 1391, 1396, 1405, 1413, 1460, 1475, 1483, 1514, 1527, 1531, 1538, 71, 59, 32768, 330, 72, 33024, 208, 59, 32768, 208, 99, 117, 116, 101, 33024, 201, 59, 32768, 201, 768, 97, 105, 121, 1370, 1376, 1383, 114, 111, 110, 59, 32768, 282, 114, 99, 33024, 202, 59, 32768, 202, 59, 32768, 1069, 111, 116, 59, 32768, 278, 114, 59, 32896, 55349, 56584, 114, 97, 118, 101, 33024, 200, 59, 32768, 200, 101, 109, 101, 110, 116, 59, 32768, 8712, 512, 97, 112, 1418, 1423, 99, 114, 59, 32768, 274, 116, 121, 1060, 1431, 0, 0, 1444, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 32768, 9723, 101, 114, 121, 83, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 32768, 9643, 512, 103, 112, 1465, 1470, 111, 110, 59, 32768, 280, 102, 59, 32896, 55349, 56636, 115, 105, 108, 111, 110, 59, 32768, 917, 117, 512, 97, 105, 1489, 1504, 108, 512, 59, 84, 1495, 1497, 32768, 10869, 105, 108, 100, 101, 59, 32768, 8770, 108, 105, 98, 114, 105, 117, 109, 59, 32768, 8652, 512, 99, 105, 1519, 1523, 114, 59, 32768, 8496, 109, 59, 32768, 10867, 97, 59, 32768, 919, 109, 108, 33024, 203, 59, 32768, 203, 512, 105, 112, 1543, 1549, 115, 116, 115, 59, 32768, 8707, 111, 110, 101, 110, 116, 105, 97, 108, 69, 59, 32768, 8519, 1280, 99, 102, 105, 111, 115, 1572, 1576, 1581, 1620, 1648, 121, 59, 32768, 1060, 114, 59, 32896, 55349, 56585, 108, 108, 101, 100, 1060, 1591, 0, 0, 1604, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 32768, 9724, 101, 114, 121, 83, 109, 97, 108, 108, 83, 113, 117, 97, 114, 101, 59, 32768, 9642, 1601, 1628, 0, 1633, 0, 0, 1639, 102, 59, 32896, 55349, 56637, 65, 108, 108, 59, 32768, 8704, 114, 105, 101, 114, 116, 114, 102, 59, 32768, 8497, 99, 114, 59, 32768, 8497, 3072, 74, 84, 97, 98, 99, 100, 102, 103, 111, 114, 115, 116, 1678, 1683, 1688, 1701, 1708, 1729, 1734, 1739, 1742, 1748, 1828, 1834, 99, 121, 59, 32768, 1027, 33024, 62, 59, 32768, 62, 109, 109, 97, 512, 59, 100, 1696, 1698, 32768, 915, 59, 32768, 988, 114, 101, 118, 101, 59, 32768, 286, 768, 101, 105, 121, 1715, 1721, 1726, 100, 105, 108, 59, 32768, 290, 114, 99, 59, 32768, 284, 59, 32768, 1043, 111, 116, 59, 32768, 288, 114, 59, 32896, 55349, 56586, 59, 32768, 8921, 112, 102, 59, 32896, 55349, 56638, 101, 97, 116, 101, 114, 1536, 69, 70, 71, 76, 83, 84, 1766, 1783, 1794, 1803, 1809, 1821, 113, 117, 97, 108, 512, 59, 76, 1775, 1777, 32768, 8805, 101, 115, 115, 59, 32768, 8923, 117, 108, 108, 69, 113, 117, 97, 108, 59, 32768, 8807, 114, 101, 97, 116, 101, 114, 59, 32768, 10914, 101, 115, 115, 59, 32768, 8823, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 10878, 105, 108, 100, 101, 59, 32768, 8819, 99, 114, 59, 32896, 55349, 56482, 59, 32768, 8811, 2048, 65, 97, 99, 102, 105, 111, 115, 117, 1854, 1861, 1874, 1880, 1884, 1897, 1919, 1934, 82, 68, 99, 121, 59, 32768, 1066, 512, 99, 116, 1866, 1871, 101, 107, 59, 32768, 711, 59, 32768, 94, 105, 114, 99, 59, 32768, 292, 114, 59, 32768, 8460, 108, 98, 101, 114, 116, 83, 112, 97, 99, 101, 59, 32768, 8459, 833, 1902, 0, 1906, 102, 59, 32768, 8461, 105, 122, 111, 110, 116, 97, 108, 76, 105, 110, 101, 59, 32768, 9472, 512, 99, 116, 1924, 1928, 114, 59, 32768, 8459, 114, 111, 107, 59, 32768, 294, 109, 112, 533, 1940, 1950, 111, 119, 110, 72, 117, 109, 112, 59, 32768, 8782, 113, 117, 97, 108, 59, 32768, 8783, 3584, 69, 74, 79, 97, 99, 100, 102, 103, 109, 110, 111, 115, 116, 117, 1985, 1990, 1996, 2001, 2010, 2025, 2030, 2034, 2043, 2077, 2134, 2155, 2160, 2167, 99, 121, 59, 32768, 1045, 108, 105, 103, 59, 32768, 306, 99, 121, 59, 32768, 1025, 99, 117, 116, 101, 33024, 205, 59, 32768, 205, 512, 105, 121, 2015, 2022, 114, 99, 33024, 206, 59, 32768, 206, 59, 32768, 1048, 111, 116, 59, 32768, 304, 114, 59, 32768, 8465, 114, 97, 118, 101, 33024, 204, 59, 32768, 204, 768, 59, 97, 112, 2050, 2052, 2070, 32768, 8465, 512, 99, 103, 2057, 2061, 114, 59, 32768, 298, 105, 110, 97, 114, 121, 73, 59, 32768, 8520, 108, 105, 101, 115, 59, 32768, 8658, 837, 2082, 0, 2110, 512, 59, 101, 2086, 2088, 32768, 8748, 512, 103, 114, 2093, 2099, 114, 97, 108, 59, 32768, 8747, 115, 101, 99, 116, 105, 111, 110, 59, 32768, 8898, 105, 115, 105, 98, 108, 101, 512, 67, 84, 2120, 2127, 111, 109, 109, 97, 59, 32768, 8291, 105, 109, 101, 115, 59, 32768, 8290, 768, 103, 112, 116, 2141, 2146, 2151, 111, 110, 59, 32768, 302, 102, 59, 32896, 55349, 56640, 97, 59, 32768, 921, 99, 114, 59, 32768, 8464, 105, 108, 100, 101, 59, 32768, 296, 828, 2172, 0, 2177, 99, 121, 59, 32768, 1030, 108, 33024, 207, 59, 32768, 207, 1280, 99, 102, 111, 115, 117, 2193, 2206, 2211, 2217, 2232, 512, 105, 121, 2198, 2203, 114, 99, 59, 32768, 308, 59, 32768, 1049, 114, 59, 32896, 55349, 56589, 112, 102, 59, 32896, 55349, 56641, 820, 2222, 0, 2227, 114, 59, 32896, 55349, 56485, 114, 99, 121, 59, 32768, 1032, 107, 99, 121, 59, 32768, 1028, 1792, 72, 74, 97, 99, 102, 111, 115, 2253, 2258, 2263, 2269, 2283, 2288, 2294, 99, 121, 59, 32768, 1061, 99, 121, 59, 32768, 1036, 112, 112, 97, 59, 32768, 922, 512, 101, 121, 2274, 2280, 100, 105, 108, 59, 32768, 310, 59, 32768, 1050, 114, 59, 32896, 55349, 56590, 112, 102, 59, 32896, 55349, 56642, 99, 114, 59, 32896, 55349, 56486, 2816, 74, 84, 97, 99, 101, 102, 108, 109, 111, 115, 116, 2323, 2328, 2333, 2374, 2396, 2775, 2780, 2797, 2804, 2934, 2954, 99, 121, 59, 32768, 1033, 33024, 60, 59, 32768, 60, 1280, 99, 109, 110, 112, 114, 2344, 2350, 2356, 2360, 2370, 117, 116, 101, 59, 32768, 313, 98, 100, 97, 59, 32768, 923, 103, 59, 32768, 10218, 108, 97, 99, 101, 116, 114, 102, 59, 32768, 8466, 114, 59, 32768, 8606, 768, 97, 101, 121, 2381, 2387, 2393, 114, 111, 110, 59, 32768, 317, 100, 105, 108, 59, 32768, 315, 59, 32768, 1051, 512, 102, 115, 2401, 2702, 116, 2560, 65, 67, 68, 70, 82, 84, 85, 86, 97, 114, 2423, 2470, 2479, 2530, 2537, 2561, 2618, 2666, 2683, 2690, 512, 110, 114, 2428, 2441, 103, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 32768, 10216, 114, 111, 119, 768, 59, 66, 82, 2451, 2453, 2458, 32768, 8592, 97, 114, 59, 32768, 8676, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 8646, 101, 105, 108, 105, 110, 103, 59, 32768, 8968, 111, 838, 2485, 0, 2498, 98, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 32768, 10214, 110, 805, 2503, 0, 2514, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10593, 101, 99, 116, 111, 114, 512, 59, 66, 2523, 2525, 32768, 8643, 97, 114, 59, 32768, 10585, 108, 111, 111, 114, 59, 32768, 8970, 105, 103, 104, 116, 512, 65, 86, 2546, 2553, 114, 114, 111, 119, 59, 32768, 8596, 101, 99, 116, 111, 114, 59, 32768, 10574, 512, 101, 114, 2566, 2591, 101, 768, 59, 65, 86, 2574, 2576, 2583, 32768, 8867, 114, 114, 111, 119, 59, 32768, 8612, 101, 99, 116, 111, 114, 59, 32768, 10586, 105, 97, 110, 103, 108, 101, 768, 59, 66, 69, 2604, 2606, 2611, 32768, 8882, 97, 114, 59, 32768, 10703, 113, 117, 97, 108, 59, 32768, 8884, 112, 768, 68, 84, 86, 2626, 2638, 2649, 111, 119, 110, 86, 101, 99, 116, 111, 114, 59, 32768, 10577, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10592, 101, 99, 116, 111, 114, 512, 59, 66, 2659, 2661, 32768, 8639, 97, 114, 59, 32768, 10584, 101, 99, 116, 111, 114, 512, 59, 66, 2676, 2678, 32768, 8636, 97, 114, 59, 32768, 10578, 114, 114, 111, 119, 59, 32768, 8656, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8660, 115, 1536, 69, 70, 71, 76, 83, 84, 2716, 2730, 2741, 2750, 2756, 2768, 113, 117, 97, 108, 71, 114, 101, 97, 116, 101, 114, 59, 32768, 8922, 117, 108, 108, 69, 113, 117, 97, 108, 59, 32768, 8806, 114, 101, 97, 116, 101, 114, 59, 32768, 8822, 101, 115, 115, 59, 32768, 10913, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 10877, 105, 108, 100, 101, 59, 32768, 8818, 114, 59, 32896, 55349, 56591, 512, 59, 101, 2785, 2787, 32768, 8920, 102, 116, 97, 114, 114, 111, 119, 59, 32768, 8666, 105, 100, 111, 116, 59, 32768, 319, 768, 110, 112, 119, 2811, 2899, 2904, 103, 1024, 76, 82, 108, 114, 2821, 2848, 2860, 2887, 101, 102, 116, 512, 65, 82, 2829, 2836, 114, 114, 111, 119, 59, 32768, 10229, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 10231, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 10230, 101, 102, 116, 512, 97, 114, 2868, 2875, 114, 114, 111, 119, 59, 32768, 10232, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 10234, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 10233, 102, 59, 32896, 55349, 56643, 101, 114, 512, 76, 82, 2911, 2922, 101, 102, 116, 65, 114, 114, 111, 119, 59, 32768, 8601, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 8600, 768, 99, 104, 116, 2941, 2945, 2948, 114, 59, 32768, 8466, 59, 32768, 8624, 114, 111, 107, 59, 32768, 321, 59, 32768, 8810, 2048, 97, 99, 101, 102, 105, 111, 115, 117, 2974, 2978, 2982, 3007, 3012, 3022, 3028, 3033, 112, 59, 32768, 10501, 121, 59, 32768, 1052, 512, 100, 108, 2987, 2998, 105, 117, 109, 83, 112, 97, 99, 101, 59, 32768, 8287, 108, 105, 110, 116, 114, 102, 59, 32768, 8499, 114, 59, 32896, 55349, 56592, 110, 117, 115, 80, 108, 117, 115, 59, 32768, 8723, 112, 102, 59, 32896, 55349, 56644, 99, 114, 59, 32768, 8499, 59, 32768, 924, 2304, 74, 97, 99, 101, 102, 111, 115, 116, 117, 3055, 3060, 3067, 3089, 3201, 3206, 3874, 3880, 3889, 99, 121, 59, 32768, 1034, 99, 117, 116, 101, 59, 32768, 323, 768, 97, 101, 121, 3074, 3080, 3086, 114, 111, 110, 59, 32768, 327, 100, 105, 108, 59, 32768, 325, 59, 32768, 1053, 768, 103, 115, 119, 3096, 3160, 3194, 97, 116, 105, 118, 101, 768, 77, 84, 86, 3108, 3121, 3145, 101, 100, 105, 117, 109, 83, 112, 97, 99, 101, 59, 32768, 8203, 104, 105, 512, 99, 110, 3128, 3137, 107, 83, 112, 97, 99, 101, 59, 32768, 8203, 83, 112, 97, 99, 101, 59, 32768, 8203, 101, 114, 121, 84, 104, 105, 110, 83, 112, 97, 99, 101, 59, 32768, 8203, 116, 101, 100, 512, 71, 76, 3168, 3184, 114, 101, 97, 116, 101, 114, 71, 114, 101, 97, 116, 101, 114, 59, 32768, 8811, 101, 115, 115, 76, 101, 115, 115, 59, 32768, 8810, 76, 105, 110, 101, 59, 32768, 10, 114, 59, 32896, 55349, 56593, 1024, 66, 110, 112, 116, 3215, 3222, 3238, 3242, 114, 101, 97, 107, 59, 32768, 8288, 66, 114, 101, 97, 107, 105, 110, 103, 83, 112, 97, 99, 101, 59, 32768, 160, 102, 59, 32768, 8469, 3328, 59, 67, 68, 69, 71, 72, 76, 78, 80, 82, 83, 84, 86, 3269, 3271, 3293, 3312, 3352, 3430, 3455, 3551, 3589, 3625, 3678, 3821, 3861, 32768, 10988, 512, 111, 117, 3276, 3286, 110, 103, 114, 117, 101, 110, 116, 59, 32768, 8802, 112, 67, 97, 112, 59, 32768, 8813, 111, 117, 98, 108, 101, 86, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 32768, 8742, 768, 108, 113, 120, 3319, 3327, 3345, 101, 109, 101, 110, 116, 59, 32768, 8713, 117, 97, 108, 512, 59, 84, 3335, 3337, 32768, 8800, 105, 108, 100, 101, 59, 32896, 8770, 824, 105, 115, 116, 115, 59, 32768, 8708, 114, 101, 97, 116, 101, 114, 1792, 59, 69, 70, 71, 76, 83, 84, 3373, 3375, 3382, 3394, 3404, 3410, 3423, 32768, 8815, 113, 117, 97, 108, 59, 32768, 8817, 117, 108, 108, 69, 113, 117, 97, 108, 59, 32896, 8807, 824, 114, 101, 97, 116, 101, 114, 59, 32896, 8811, 824, 101, 115, 115, 59, 32768, 8825, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32896, 10878, 824, 105, 108, 100, 101, 59, 32768, 8821, 117, 109, 112, 533, 3437, 3448, 111, 119, 110, 72, 117, 109, 112, 59, 32896, 8782, 824, 113, 117, 97, 108, 59, 32896, 8783, 824, 101, 512, 102, 115, 3461, 3492, 116, 84, 114, 105, 97, 110, 103, 108, 101, 768, 59, 66, 69, 3477, 3479, 3485, 32768, 8938, 97, 114, 59, 32896, 10703, 824, 113, 117, 97, 108, 59, 32768, 8940, 115, 1536, 59, 69, 71, 76, 83, 84, 3506, 3508, 3515, 3524, 3531, 3544, 32768, 8814, 113, 117, 97, 108, 59, 32768, 8816, 114, 101, 97, 116, 101, 114, 59, 32768, 8824, 101, 115, 115, 59, 32896, 8810, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32896, 10877, 824, 105, 108, 100, 101, 59, 32768, 8820, 101, 115, 116, 101, 100, 512, 71, 76, 3561, 3578, 114, 101, 97, 116, 101, 114, 71, 114, 101, 97, 116, 101, 114, 59, 32896, 10914, 824, 101, 115, 115, 76, 101, 115, 115, 59, 32896, 10913, 824, 114, 101, 99, 101, 100, 101, 115, 768, 59, 69, 83, 3603, 3605, 3613, 32768, 8832, 113, 117, 97, 108, 59, 32896, 10927, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 8928, 512, 101, 105, 3630, 3645, 118, 101, 114, 115, 101, 69, 108, 101, 109, 101, 110, 116, 59, 32768, 8716, 103, 104, 116, 84, 114, 105, 97, 110, 103, 108, 101, 768, 59, 66, 69, 3663, 3665, 3671, 32768, 8939, 97, 114, 59, 32896, 10704, 824, 113, 117, 97, 108, 59, 32768, 8941, 512, 113, 117, 3683, 3732, 117, 97, 114, 101, 83, 117, 512, 98, 112, 3694, 3712, 115, 101, 116, 512, 59, 69, 3702, 3705, 32896, 8847, 824, 113, 117, 97, 108, 59, 32768, 8930, 101, 114, 115, 101, 116, 512, 59, 69, 3722, 3725, 32896, 8848, 824, 113, 117, 97, 108, 59, 32768, 8931, 768, 98, 99, 112, 3739, 3757, 3801, 115, 101, 116, 512, 59, 69, 3747, 3750, 32896, 8834, 8402, 113, 117, 97, 108, 59, 32768, 8840, 99, 101, 101, 100, 115, 1024, 59, 69, 83, 84, 3771, 3773, 3781, 3793, 32768, 8833, 113, 117, 97, 108, 59, 32896, 10928, 824, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 8929, 105, 108, 100, 101, 59, 32896, 8831, 824, 101, 114, 115, 101, 116, 512, 59, 69, 3811, 3814, 32896, 8835, 8402, 113, 117, 97, 108, 59, 32768, 8841, 105, 108, 100, 101, 1024, 59, 69, 70, 84, 3834, 3836, 3843, 3854, 32768, 8769, 113, 117, 97, 108, 59, 32768, 8772, 117, 108, 108, 69, 113, 117, 97, 108, 59, 32768, 8775, 105, 108, 100, 101, 59, 32768, 8777, 101, 114, 116, 105, 99, 97, 108, 66, 97, 114, 59, 32768, 8740, 99, 114, 59, 32896, 55349, 56489, 105, 108, 100, 101, 33024, 209, 59, 32768, 209, 59, 32768, 925, 3584, 69, 97, 99, 100, 102, 103, 109, 111, 112, 114, 115, 116, 117, 118, 3921, 3927, 3936, 3951, 3958, 3963, 3972, 3996, 4002, 4034, 4037, 4055, 4071, 4078, 108, 105, 103, 59, 32768, 338, 99, 117, 116, 101, 33024, 211, 59, 32768, 211, 512, 105, 121, 3941, 3948, 114, 99, 33024, 212, 59, 32768, 212, 59, 32768, 1054, 98, 108, 97, 99, 59, 32768, 336, 114, 59, 32896, 55349, 56594, 114, 97, 118, 101, 33024, 210, 59, 32768, 210, 768, 97, 101, 105, 3979, 3984, 3989, 99, 114, 59, 32768, 332, 103, 97, 59, 32768, 937, 99, 114, 111, 110, 59, 32768, 927, 112, 102, 59, 32896, 55349, 56646, 101, 110, 67, 117, 114, 108, 121, 512, 68, 81, 4014, 4027, 111, 117, 98, 108, 101, 81, 117, 111, 116, 101, 59, 32768, 8220, 117, 111, 116, 101, 59, 32768, 8216, 59, 32768, 10836, 512, 99, 108, 4042, 4047, 114, 59, 32896, 55349, 56490, 97, 115, 104, 33024, 216, 59, 32768, 216, 105, 573, 4060, 4067, 100, 101, 33024, 213, 59, 32768, 213, 101, 115, 59, 32768, 10807, 109, 108, 33024, 214, 59, 32768, 214, 101, 114, 512, 66, 80, 4085, 4109, 512, 97, 114, 4090, 4094, 114, 59, 32768, 8254, 97, 99, 512, 101, 107, 4101, 4104, 59, 32768, 9182, 101, 116, 59, 32768, 9140, 97, 114, 101, 110, 116, 104, 101, 115, 105, 115, 59, 32768, 9180, 2304, 97, 99, 102, 104, 105, 108, 111, 114, 115, 4141, 4150, 4154, 4159, 4163, 4166, 4176, 4198, 4284, 114, 116, 105, 97, 108, 68, 59, 32768, 8706, 121, 59, 32768, 1055, 114, 59, 32896, 55349, 56595, 105, 59, 32768, 934, 59, 32768, 928, 117, 115, 77, 105, 110, 117, 115, 59, 32768, 177, 512, 105, 112, 4181, 4194, 110, 99, 97, 114, 101, 112, 108, 97, 110, 101, 59, 32768, 8460, 102, 59, 32768, 8473, 1024, 59, 101, 105, 111, 4207, 4209, 4251, 4256, 32768, 10939, 99, 101, 100, 101, 115, 1024, 59, 69, 83, 84, 4223, 4225, 4232, 4244, 32768, 8826, 113, 117, 97, 108, 59, 32768, 10927, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 8828, 105, 108, 100, 101, 59, 32768, 8830, 109, 101, 59, 32768, 8243, 512, 100, 112, 4261, 4267, 117, 99, 116, 59, 32768, 8719, 111, 114, 116, 105, 111, 110, 512, 59, 97, 4278, 4280, 32768, 8759, 108, 59, 32768, 8733, 512, 99, 105, 4289, 4294, 114, 59, 32896, 55349, 56491, 59, 32768, 936, 1024, 85, 102, 111, 115, 4306, 4313, 4318, 4323, 79, 84, 33024, 34, 59, 32768, 34, 114, 59, 32896, 55349, 56596, 112, 102, 59, 32768, 8474, 99, 114, 59, 32896, 55349, 56492, 3072, 66, 69, 97, 99, 101, 102, 104, 105, 111, 114, 115, 117, 4354, 4360, 4366, 4395, 4417, 4473, 4477, 4481, 4743, 4764, 4776, 4788, 97, 114, 114, 59, 32768, 10512, 71, 33024, 174, 59, 32768, 174, 768, 99, 110, 114, 4373, 4379, 4383, 117, 116, 101, 59, 32768, 340, 103, 59, 32768, 10219, 114, 512, 59, 116, 4389, 4391, 32768, 8608, 108, 59, 32768, 10518, 768, 97, 101, 121, 4402, 4408, 4414, 114, 111, 110, 59, 32768, 344, 100, 105, 108, 59, 32768, 342, 59, 32768, 1056, 512, 59, 118, 4422, 4424, 32768, 8476, 101, 114, 115, 101, 512, 69, 85, 4433, 4458, 512, 108, 113, 4438, 4446, 101, 109, 101, 110, 116, 59, 32768, 8715, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 32768, 8651, 112, 69, 113, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 32768, 10607, 114, 59, 32768, 8476, 111, 59, 32768, 929, 103, 104, 116, 2048, 65, 67, 68, 70, 84, 85, 86, 97, 4501, 4547, 4556, 4607, 4614, 4671, 4719, 4736, 512, 110, 114, 4506, 4519, 103, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 32768, 10217, 114, 111, 119, 768, 59, 66, 76, 4529, 4531, 4536, 32768, 8594, 97, 114, 59, 32768, 8677, 101, 102, 116, 65, 114, 114, 111, 119, 59, 32768, 8644, 101, 105, 108, 105, 110, 103, 59, 32768, 8969, 111, 838, 4562, 0, 4575, 98, 108, 101, 66, 114, 97, 99, 107, 101, 116, 59, 32768, 10215, 110, 805, 4580, 0, 4591, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10589, 101, 99, 116, 111, 114, 512, 59, 66, 4600, 4602, 32768, 8642, 97, 114, 59, 32768, 10581, 108, 111, 111, 114, 59, 32768, 8971, 512, 101, 114, 4619, 4644, 101, 768, 59, 65, 86, 4627, 4629, 4636, 32768, 8866, 114, 114, 111, 119, 59, 32768, 8614, 101, 99, 116, 111, 114, 59, 32768, 10587, 105, 97, 110, 103, 108, 101, 768, 59, 66, 69, 4657, 4659, 4664, 32768, 8883, 97, 114, 59, 32768, 10704, 113, 117, 97, 108, 59, 32768, 8885, 112, 768, 68, 84, 86, 4679, 4691, 4702, 111, 119, 110, 86, 101, 99, 116, 111, 114, 59, 32768, 10575, 101, 101, 86, 101, 99, 116, 111, 114, 59, 32768, 10588, 101, 99, 116, 111, 114, 512, 59, 66, 4712, 4714, 32768, 8638, 97, 114, 59, 32768, 10580, 101, 99, 116, 111, 114, 512, 59, 66, 4729, 4731, 32768, 8640, 97, 114, 59, 32768, 10579, 114, 114, 111, 119, 59, 32768, 8658, 512, 112, 117, 4748, 4752, 102, 59, 32768, 8477, 110, 100, 73, 109, 112, 108, 105, 101, 115, 59, 32768, 10608, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8667, 512, 99, 104, 4781, 4785, 114, 59, 32768, 8475, 59, 32768, 8625, 108, 101, 68, 101, 108, 97, 121, 101, 100, 59, 32768, 10740, 3328, 72, 79, 97, 99, 102, 104, 105, 109, 111, 113, 115, 116, 117, 4827, 4842, 4849, 4856, 4889, 4894, 4949, 4955, 4967, 4973, 5059, 5065, 5070, 512, 67, 99, 4832, 4838, 72, 99, 121, 59, 32768, 1065, 121, 59, 32768, 1064, 70, 84, 99, 121, 59, 32768, 1068, 99, 117, 116, 101, 59, 32768, 346, 1280, 59, 97, 101, 105, 121, 4867, 4869, 4875, 4881, 4886, 32768, 10940, 114, 111, 110, 59, 32768, 352, 100, 105, 108, 59, 32768, 350, 114, 99, 59, 32768, 348, 59, 32768, 1057, 114, 59, 32896, 55349, 56598, 111, 114, 116, 1024, 68, 76, 82, 85, 4906, 4917, 4928, 4940, 111, 119, 110, 65, 114, 114, 111, 119, 59, 32768, 8595, 101, 102, 116, 65, 114, 114, 111, 119, 59, 32768, 8592, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 8594, 112, 65, 114, 114, 111, 119, 59, 32768, 8593, 103, 109, 97, 59, 32768, 931, 97, 108, 108, 67, 105, 114, 99, 108, 101, 59, 32768, 8728, 112, 102, 59, 32896, 55349, 56650, 1091, 4979, 0, 0, 4983, 116, 59, 32768, 8730, 97, 114, 101, 1024, 59, 73, 83, 85, 4994, 4996, 5010, 5052, 32768, 9633, 110, 116, 101, 114, 115, 101, 99, 116, 105, 111, 110, 59, 32768, 8851, 117, 512, 98, 112, 5016, 5033, 115, 101, 116, 512, 59, 69, 5024, 5026, 32768, 8847, 113, 117, 97, 108, 59, 32768, 8849, 101, 114, 115, 101, 116, 512, 59, 69, 5043, 5045, 32768, 8848, 113, 117, 97, 108, 59, 32768, 8850, 110, 105, 111, 110, 59, 32768, 8852, 99, 114, 59, 32896, 55349, 56494, 97, 114, 59, 32768, 8902, 1024, 98, 99, 109, 112, 5079, 5102, 5155, 5158, 512, 59, 115, 5084, 5086, 32768, 8912, 101, 116, 512, 59, 69, 5093, 5095, 32768, 8912, 113, 117, 97, 108, 59, 32768, 8838, 512, 99, 104, 5107, 5148, 101, 101, 100, 115, 1024, 59, 69, 83, 84, 5120, 5122, 5129, 5141, 32768, 8827, 113, 117, 97, 108, 59, 32768, 10928, 108, 97, 110, 116, 69, 113, 117, 97, 108, 59, 32768, 8829, 105, 108, 100, 101, 59, 32768, 8831, 84, 104, 97, 116, 59, 32768, 8715, 59, 32768, 8721, 768, 59, 101, 115, 5165, 5167, 5185, 32768, 8913, 114, 115, 101, 116, 512, 59, 69, 5176, 5178, 32768, 8835, 113, 117, 97, 108, 59, 32768, 8839, 101, 116, 59, 32768, 8913, 2816, 72, 82, 83, 97, 99, 102, 104, 105, 111, 114, 115, 5213, 5221, 5227, 5241, 5252, 5274, 5279, 5323, 5362, 5368, 5378, 79, 82, 78, 33024, 222, 59, 32768, 222, 65, 68, 69, 59, 32768, 8482, 512, 72, 99, 5232, 5237, 99, 121, 59, 32768, 1035, 121, 59, 32768, 1062, 512, 98, 117, 5246, 5249, 59, 32768, 9, 59, 32768, 932, 768, 97, 101, 121, 5259, 5265, 5271, 114, 111, 110, 59, 32768, 356, 100, 105, 108, 59, 32768, 354, 59, 32768, 1058, 114, 59, 32896, 55349, 56599, 512, 101, 105, 5284, 5300, 835, 5289, 0, 5297, 101, 102, 111, 114, 101, 59, 32768, 8756, 97, 59, 32768, 920, 512, 99, 110, 5305, 5315, 107, 83, 112, 97, 99, 101, 59, 32896, 8287, 8202, 83, 112, 97, 99, 101, 59, 32768, 8201, 108, 100, 101, 1024, 59, 69, 70, 84, 5335, 5337, 5344, 5355, 32768, 8764, 113, 117, 97, 108, 59, 32768, 8771, 117, 108, 108, 69, 113, 117, 97, 108, 59, 32768, 8773, 105, 108, 100, 101, 59, 32768, 8776, 112, 102, 59, 32896, 55349, 56651, 105, 112, 108, 101, 68, 111, 116, 59, 32768, 8411, 512, 99, 116, 5383, 5388, 114, 59, 32896, 55349, 56495, 114, 111, 107, 59, 32768, 358, 5426, 5417, 5444, 5458, 5473, 0, 5480, 5485, 0, 0, 0, 0, 0, 5494, 5500, 5564, 5579, 0, 5726, 5732, 5738, 5745, 512, 99, 114, 5421, 5429, 117, 116, 101, 33024, 218, 59, 32768, 218, 114, 512, 59, 111, 5435, 5437, 32768, 8607, 99, 105, 114, 59, 32768, 10569, 114, 820, 5449, 0, 5453, 121, 59, 32768, 1038, 118, 101, 59, 32768, 364, 512, 105, 121, 5462, 5469, 114, 99, 33024, 219, 59, 32768, 219, 59, 32768, 1059, 98, 108, 97, 99, 59, 32768, 368, 114, 59, 32896, 55349, 56600, 114, 97, 118, 101, 33024, 217, 59, 32768, 217, 97, 99, 114, 59, 32768, 362, 512, 100, 105, 5504, 5548, 101, 114, 512, 66, 80, 5511, 5535, 512, 97, 114, 5516, 5520, 114, 59, 32768, 95, 97, 99, 512, 101, 107, 5527, 5530, 59, 32768, 9183, 101, 116, 59, 32768, 9141, 97, 114, 101, 110, 116, 104, 101, 115, 105, 115, 59, 32768, 9181, 111, 110, 512, 59, 80, 5555, 5557, 32768, 8899, 108, 117, 115, 59, 32768, 8846, 512, 103, 112, 5568, 5573, 111, 110, 59, 32768, 370, 102, 59, 32896, 55349, 56652, 2048, 65, 68, 69, 84, 97, 100, 112, 115, 5595, 5624, 5635, 5648, 5664, 5671, 5682, 5712, 114, 114, 111, 119, 768, 59, 66, 68, 5606, 5608, 5613, 32768, 8593, 97, 114, 59, 32768, 10514, 111, 119, 110, 65, 114, 114, 111, 119, 59, 32768, 8645, 111, 119, 110, 65, 114, 114, 111, 119, 59, 32768, 8597, 113, 117, 105, 108, 105, 98, 114, 105, 117, 109, 59, 32768, 10606, 101, 101, 512, 59, 65, 5655, 5657, 32768, 8869, 114, 114, 111, 119, 59, 32768, 8613, 114, 114, 111, 119, 59, 32768, 8657, 111, 119, 110, 97, 114, 114, 111, 119, 59, 32768, 8661, 101, 114, 512, 76, 82, 5689, 5700, 101, 102, 116, 65, 114, 114, 111, 119, 59, 32768, 8598, 105, 103, 104, 116, 65, 114, 114, 111, 119, 59, 32768, 8599, 105, 512, 59, 108, 5718, 5720, 32768, 978, 111, 110, 59, 32768, 933, 105, 110, 103, 59, 32768, 366, 99, 114, 59, 32896, 55349, 56496, 105, 108, 100, 101, 59, 32768, 360, 109, 108, 33024, 220, 59, 32768, 220, 2304, 68, 98, 99, 100, 101, 102, 111, 115, 118, 5770, 5776, 5781, 5785, 5798, 5878, 5883, 5889, 5895, 97, 115, 104, 59, 32768, 8875, 97, 114, 59, 32768, 10987, 121, 59, 32768, 1042, 97, 115, 104, 512, 59, 108, 5793, 5795, 32768, 8873, 59, 32768, 10982, 512, 101, 114, 5803, 5806, 59, 32768, 8897, 768, 98, 116, 121, 5813, 5818, 5866, 97, 114, 59, 32768, 8214, 512, 59, 105, 5823, 5825, 32768, 8214, 99, 97, 108, 1024, 66, 76, 83, 84, 5837, 5842, 5848, 5859, 97, 114, 59, 32768, 8739, 105, 110, 101, 59, 32768, 124, 101, 112, 97, 114, 97, 116, 111, 114, 59, 32768, 10072, 105, 108, 100, 101, 59, 32768, 8768, 84, 104, 105, 110, 83, 112, 97, 99, 101, 59, 32768, 8202, 114, 59, 32896, 55349, 56601, 112, 102, 59, 32896, 55349, 56653, 99, 114, 59, 32896, 55349, 56497, 100, 97, 115, 104, 59, 32768, 8874, 1280, 99, 101, 102, 111, 115, 5913, 5919, 5925, 5930, 5936, 105, 114, 99, 59, 32768, 372, 100, 103, 101, 59, 32768, 8896, 114, 59, 32896, 55349, 56602, 112, 102, 59, 32896, 55349, 56654, 99, 114, 59, 32896, 55349, 56498, 1024, 102, 105, 111, 115, 5951, 5956, 5959, 5965, 114, 59, 32896, 55349, 56603, 59, 32768, 926, 112, 102, 59, 32896, 55349, 56655, 99, 114, 59, 32896, 55349, 56499, 2304, 65, 73, 85, 97, 99, 102, 111, 115, 117, 5990, 5995, 6e3, 6005, 6014, 6027, 6032, 6038, 6044, 99, 121, 59, 32768, 1071, 99, 121, 59, 32768, 1031, 99, 121, 59, 32768, 1070, 99, 117, 116, 101, 33024, 221, 59, 32768, 221, 512, 105, 121, 6019, 6024, 114, 99, 59, 32768, 374, 59, 32768, 1067, 114, 59, 32896, 55349, 56604, 112, 102, 59, 32896, 55349, 56656, 99, 114, 59, 32896, 55349, 56500, 109, 108, 59, 32768, 376, 2048, 72, 97, 99, 100, 101, 102, 111, 115, 6066, 6071, 6078, 6092, 6097, 6119, 6123, 6128, 99, 121, 59, 32768, 1046, 99, 117, 116, 101, 59, 32768, 377, 512, 97, 121, 6083, 6089, 114, 111, 110, 59, 32768, 381, 59, 32768, 1047, 111, 116, 59, 32768, 379, 835, 6102, 0, 6116, 111, 87, 105, 100, 116, 104, 83, 112, 97, 99, 101, 59, 32768, 8203, 97, 59, 32768, 918, 114, 59, 32768, 8488, 112, 102, 59, 32768, 8484, 99, 114, 59, 32896, 55349, 56501, 5938, 6159, 6168, 6175, 0, 6214, 6222, 6233, 0, 0, 0, 0, 6242, 6267, 6290, 6429, 6444, 0, 6495, 6503, 6531, 6540, 0, 6547, 99, 117, 116, 101, 33024, 225, 59, 32768, 225, 114, 101, 118, 101, 59, 32768, 259, 1536, 59, 69, 100, 105, 117, 121, 6187, 6189, 6193, 6196, 6203, 6210, 32768, 8766, 59, 32896, 8766, 819, 59, 32768, 8767, 114, 99, 33024, 226, 59, 32768, 226, 116, 101, 33024, 180, 59, 32768, 180, 59, 32768, 1072, 108, 105, 103, 33024, 230, 59, 32768, 230, 512, 59, 114, 6226, 6228, 32768, 8289, 59, 32896, 55349, 56606, 114, 97, 118, 101, 33024, 224, 59, 32768, 224, 512, 101, 112, 6246, 6261, 512, 102, 112, 6251, 6257, 115, 121, 109, 59, 32768, 8501, 104, 59, 32768, 8501, 104, 97, 59, 32768, 945, 512, 97, 112, 6271, 6284, 512, 99, 108, 6276, 6280, 114, 59, 32768, 257, 103, 59, 32768, 10815, 33024, 38, 59, 32768, 38, 1077, 6295, 0, 0, 6326, 1280, 59, 97, 100, 115, 118, 6305, 6307, 6312, 6315, 6322, 32768, 8743, 110, 100, 59, 32768, 10837, 59, 32768, 10844, 108, 111, 112, 101, 59, 32768, 10840, 59, 32768, 10842, 1792, 59, 101, 108, 109, 114, 115, 122, 6340, 6342, 6345, 6349, 6391, 6410, 6422, 32768, 8736, 59, 32768, 10660, 101, 59, 32768, 8736, 115, 100, 512, 59, 97, 6356, 6358, 32768, 8737, 2098, 6368, 6371, 6374, 6377, 6380, 6383, 6386, 6389, 59, 32768, 10664, 59, 32768, 10665, 59, 32768, 10666, 59, 32768, 10667, 59, 32768, 10668, 59, 32768, 10669, 59, 32768, 10670, 59, 32768, 10671, 116, 512, 59, 118, 6397, 6399, 32768, 8735, 98, 512, 59, 100, 6405, 6407, 32768, 8894, 59, 32768, 10653, 512, 112, 116, 6415, 6419, 104, 59, 32768, 8738, 59, 32768, 197, 97, 114, 114, 59, 32768, 9084, 512, 103, 112, 6433, 6438, 111, 110, 59, 32768, 261, 102, 59, 32896, 55349, 56658, 1792, 59, 69, 97, 101, 105, 111, 112, 6458, 6460, 6463, 6469, 6472, 6476, 6480, 32768, 8776, 59, 32768, 10864, 99, 105, 114, 59, 32768, 10863, 59, 32768, 8778, 100, 59, 32768, 8779, 115, 59, 32768, 39, 114, 111, 120, 512, 59, 101, 6488, 6490, 32768, 8776, 113, 59, 32768, 8778, 105, 110, 103, 33024, 229, 59, 32768, 229, 768, 99, 116, 121, 6509, 6514, 6517, 114, 59, 32896, 55349, 56502, 59, 32768, 42, 109, 112, 512, 59, 101, 6524, 6526, 32768, 8776, 113, 59, 32768, 8781, 105, 108, 100, 101, 33024, 227, 59, 32768, 227, 109, 108, 33024, 228, 59, 32768, 228, 512, 99, 105, 6551, 6559, 111, 110, 105, 110, 116, 59, 32768, 8755, 110, 116, 59, 32768, 10769, 4096, 78, 97, 98, 99, 100, 101, 102, 105, 107, 108, 110, 111, 112, 114, 115, 117, 6597, 6602, 6673, 6688, 6701, 6707, 6768, 6773, 6891, 6898, 6999, 7023, 7309, 7316, 7334, 7383, 111, 116, 59, 32768, 10989, 512, 99, 114, 6607, 6652, 107, 1024, 99, 101, 112, 115, 6617, 6623, 6632, 6639, 111, 110, 103, 59, 32768, 8780, 112, 115, 105, 108, 111, 110, 59, 32768, 1014, 114, 105, 109, 101, 59, 32768, 8245, 105, 109, 512, 59, 101, 6646, 6648, 32768, 8765, 113, 59, 32768, 8909, 583, 6656, 6661, 101, 101, 59, 32768, 8893, 101, 100, 512, 59, 103, 6667, 6669, 32768, 8965, 101, 59, 32768, 8965, 114, 107, 512, 59, 116, 6680, 6682, 32768, 9141, 98, 114, 107, 59, 32768, 9142, 512, 111, 121, 6693, 6698, 110, 103, 59, 32768, 8780, 59, 32768, 1073, 113, 117, 111, 59, 32768, 8222, 1280, 99, 109, 112, 114, 116, 6718, 6731, 6738, 6743, 6749, 97, 117, 115, 512, 59, 101, 6726, 6728, 32768, 8757, 59, 32768, 8757, 112, 116, 121, 118, 59, 32768, 10672, 115, 105, 59, 32768, 1014, 110, 111, 117, 59, 32768, 8492, 768, 97, 104, 119, 6756, 6759, 6762, 59, 32768, 946, 59, 32768, 8502, 101, 101, 110, 59, 32768, 8812, 114, 59, 32896, 55349, 56607, 103, 1792, 99, 111, 115, 116, 117, 118, 119, 6789, 6809, 6834, 6850, 6872, 6879, 6884, 768, 97, 105, 117, 6796, 6800, 6805, 112, 59, 32768, 8898, 114, 99, 59, 32768, 9711, 112, 59, 32768, 8899, 768, 100, 112, 116, 6816, 6821, 6827, 111, 116, 59, 32768, 10752, 108, 117, 115, 59, 32768, 10753, 105, 109, 101, 115, 59, 32768, 10754, 1090, 6840, 0, 0, 6846, 99, 117, 112, 59, 32768, 10758, 97, 114, 59, 32768, 9733, 114, 105, 97, 110, 103, 108, 101, 512, 100, 117, 6862, 6868, 111, 119, 110, 59, 32768, 9661, 112, 59, 32768, 9651, 112, 108, 117, 115, 59, 32768, 10756, 101, 101, 59, 32768, 8897, 101, 100, 103, 101, 59, 32768, 8896, 97, 114, 111, 119, 59, 32768, 10509, 768, 97, 107, 111, 6905, 6976, 6994, 512, 99, 110, 6910, 6972, 107, 768, 108, 115, 116, 6918, 6927, 6935, 111, 122, 101, 110, 103, 101, 59, 32768, 10731, 113, 117, 97, 114, 101, 59, 32768, 9642, 114, 105, 97, 110, 103, 108, 101, 1024, 59, 100, 108, 114, 6951, 6953, 6959, 6965, 32768, 9652, 111, 119, 110, 59, 32768, 9662, 101, 102, 116, 59, 32768, 9666, 105, 103, 104, 116, 59, 32768, 9656, 107, 59, 32768, 9251, 770, 6981, 0, 6991, 771, 6985, 0, 6988, 59, 32768, 9618, 59, 32768, 9617, 52, 59, 32768, 9619, 99, 107, 59, 32768, 9608, 512, 101, 111, 7004, 7019, 512, 59, 113, 7009, 7012, 32896, 61, 8421, 117, 105, 118, 59, 32896, 8801, 8421, 116, 59, 32768, 8976, 1024, 112, 116, 119, 120, 7032, 7037, 7049, 7055, 102, 59, 32896, 55349, 56659, 512, 59, 116, 7042, 7044, 32768, 8869, 111, 109, 59, 32768, 8869, 116, 105, 101, 59, 32768, 8904, 3072, 68, 72, 85, 86, 98, 100, 104, 109, 112, 116, 117, 118, 7080, 7101, 7126, 7147, 7182, 7187, 7208, 7233, 7240, 7246, 7253, 7274, 1024, 76, 82, 108, 114, 7089, 7092, 7095, 7098, 59, 32768, 9559, 59, 32768, 9556, 59, 32768, 9558, 59, 32768, 9555, 1280, 59, 68, 85, 100, 117, 7112, 7114, 7117, 7120, 7123, 32768, 9552, 59, 32768, 9574, 59, 32768, 9577, 59, 32768, 9572, 59, 32768, 9575, 1024, 76, 82, 108, 114, 7135, 7138, 7141, 7144, 59, 32768, 9565, 59, 32768, 9562, 59, 32768, 9564, 59, 32768, 9561, 1792, 59, 72, 76, 82, 104, 108, 114, 7162, 7164, 7167, 7170, 7173, 7176, 7179, 32768, 9553, 59, 32768, 9580, 59, 32768, 9571, 59, 32768, 9568, 59, 32768, 9579, 59, 32768, 9570, 59, 32768, 9567, 111, 120, 59, 32768, 10697, 1024, 76, 82, 108, 114, 7196, 7199, 7202, 7205, 59, 32768, 9557, 59, 32768, 9554, 59, 32768, 9488, 59, 32768, 9484, 1280, 59, 68, 85, 100, 117, 7219, 7221, 7224, 7227, 7230, 32768, 9472, 59, 32768, 9573, 59, 32768, 9576, 59, 32768, 9516, 59, 32768, 9524, 105, 110, 117, 115, 59, 32768, 8863, 108, 117, 115, 59, 32768, 8862, 105, 109, 101, 115, 59, 32768, 8864, 1024, 76, 82, 108, 114, 7262, 7265, 7268, 7271, 59, 32768, 9563, 59, 32768, 9560, 59, 32768, 9496, 59, 32768, 9492, 1792, 59, 72, 76, 82, 104, 108, 114, 7289, 7291, 7294, 7297, 7300, 7303, 7306, 32768, 9474, 59, 32768, 9578, 59, 32768, 9569, 59, 32768, 9566, 59, 32768, 9532, 59, 32768, 9508, 59, 32768, 9500, 114, 105, 109, 101, 59, 32768, 8245, 512, 101, 118, 7321, 7326, 118, 101, 59, 32768, 728, 98, 97, 114, 33024, 166, 59, 32768, 166, 1024, 99, 101, 105, 111, 7343, 7348, 7353, 7364, 114, 59, 32896, 55349, 56503, 109, 105, 59, 32768, 8271, 109, 512, 59, 101, 7359, 7361, 32768, 8765, 59, 32768, 8909, 108, 768, 59, 98, 104, 7372, 7374, 7377, 32768, 92, 59, 32768, 10693, 115, 117, 98, 59, 32768, 10184, 573, 7387, 7399, 108, 512, 59, 101, 7392, 7394, 32768, 8226, 116, 59, 32768, 8226, 112, 768, 59, 69, 101, 7406, 7408, 7411, 32768, 8782, 59, 32768, 10926, 512, 59, 113, 7416, 7418, 32768, 8783, 59, 32768, 8783, 6450, 7448, 0, 7523, 7571, 7576, 7613, 0, 7618, 7647, 0, 0, 7764, 0, 0, 7779, 0, 0, 7899, 7914, 7949, 7955, 0, 8158, 0, 8176, 768, 99, 112, 114, 7454, 7460, 7509, 117, 116, 101, 59, 32768, 263, 1536, 59, 97, 98, 99, 100, 115, 7473, 7475, 7480, 7487, 7500, 7505, 32768, 8745, 110, 100, 59, 32768, 10820, 114, 99, 117, 112, 59, 32768, 10825, 512, 97, 117, 7492, 7496, 112, 59, 32768, 10827, 112, 59, 32768, 10823, 111, 116, 59, 32768, 10816, 59, 32896, 8745, 65024, 512, 101, 111, 7514, 7518, 116, 59, 32768, 8257, 110, 59, 32768, 711, 1024, 97, 101, 105, 117, 7531, 7544, 7552, 7557, 833, 7536, 0, 7540, 115, 59, 32768, 10829, 111, 110, 59, 32768, 269, 100, 105, 108, 33024, 231, 59, 32768, 231, 114, 99, 59, 32768, 265, 112, 115, 512, 59, 115, 7564, 7566, 32768, 10828, 109, 59, 32768, 10832, 111, 116, 59, 32768, 267, 768, 100, 109, 110, 7582, 7589, 7596, 105, 108, 33024, 184, 59, 32768, 184, 112, 116, 121, 118, 59, 32768, 10674, 116, 33280, 162, 59, 101, 7603, 7605, 32768, 162, 114, 100, 111, 116, 59, 32768, 183, 114, 59, 32896, 55349, 56608, 768, 99, 101, 105, 7624, 7628, 7643, 121, 59, 32768, 1095, 99, 107, 512, 59, 109, 7635, 7637, 32768, 10003, 97, 114, 107, 59, 32768, 10003, 59, 32768, 967, 114, 1792, 59, 69, 99, 101, 102, 109, 115, 7662, 7664, 7667, 7742, 7745, 7752, 7757, 32768, 9675, 59, 32768, 10691, 768, 59, 101, 108, 7674, 7676, 7680, 32768, 710, 113, 59, 32768, 8791, 101, 1074, 7687, 0, 0, 7709, 114, 114, 111, 119, 512, 108, 114, 7695, 7701, 101, 102, 116, 59, 32768, 8634, 105, 103, 104, 116, 59, 32768, 8635, 1280, 82, 83, 97, 99, 100, 7719, 7722, 7725, 7730, 7736, 59, 32768, 174, 59, 32768, 9416, 115, 116, 59, 32768, 8859, 105, 114, 99, 59, 32768, 8858, 97, 115, 104, 59, 32768, 8861, 59, 32768, 8791, 110, 105, 110, 116, 59, 32768, 10768, 105, 100, 59, 32768, 10991, 99, 105, 114, 59, 32768, 10690, 117, 98, 115, 512, 59, 117, 7771, 7773, 32768, 9827, 105, 116, 59, 32768, 9827, 1341, 7785, 7804, 7850, 0, 7871, 111, 110, 512, 59, 101, 7791, 7793, 32768, 58, 512, 59, 113, 7798, 7800, 32768, 8788, 59, 32768, 8788, 1086, 7809, 0, 0, 7820, 97, 512, 59, 116, 7814, 7816, 32768, 44, 59, 32768, 64, 768, 59, 102, 108, 7826, 7828, 7832, 32768, 8705, 110, 59, 32768, 8728, 101, 512, 109, 120, 7838, 7844, 101, 110, 116, 59, 32768, 8705, 101, 115, 59, 32768, 8450, 824, 7854, 0, 7866, 512, 59, 100, 7858, 7860, 32768, 8773, 111, 116, 59, 32768, 10861, 110, 116, 59, 32768, 8750, 768, 102, 114, 121, 7877, 7881, 7886, 59, 32896, 55349, 56660, 111, 100, 59, 32768, 8720, 33280, 169, 59, 115, 7892, 7894, 32768, 169, 114, 59, 32768, 8471, 512, 97, 111, 7903, 7908, 114, 114, 59, 32768, 8629, 115, 115, 59, 32768, 10007, 512, 99, 117, 7918, 7923, 114, 59, 32896, 55349, 56504, 512, 98, 112, 7928, 7938, 512, 59, 101, 7933, 7935, 32768, 10959, 59, 32768, 10961, 512, 59, 101, 7943, 7945, 32768, 10960, 59, 32768, 10962, 100, 111, 116, 59, 32768, 8943, 1792, 100, 101, 108, 112, 114, 118, 119, 7969, 7983, 7996, 8009, 8057, 8147, 8152, 97, 114, 114, 512, 108, 114, 7977, 7980, 59, 32768, 10552, 59, 32768, 10549, 1089, 7989, 0, 0, 7993, 114, 59, 32768, 8926, 99, 59, 32768, 8927, 97, 114, 114, 512, 59, 112, 8004, 8006, 32768, 8630, 59, 32768, 10557, 1536, 59, 98, 99, 100, 111, 115, 8022, 8024, 8031, 8044, 8049, 8053, 32768, 8746, 114, 99, 97, 112, 59, 32768, 10824, 512, 97, 117, 8036, 8040, 112, 59, 32768, 10822, 112, 59, 32768, 10826, 111, 116, 59, 32768, 8845, 114, 59, 32768, 10821, 59, 32896, 8746, 65024, 1024, 97, 108, 114, 118, 8066, 8078, 8116, 8123, 114, 114, 512, 59, 109, 8073, 8075, 32768, 8631, 59, 32768, 10556, 121, 768, 101, 118, 119, 8086, 8104, 8109, 113, 1089, 8093, 0, 0, 8099, 114, 101, 99, 59, 32768, 8926, 117, 99, 99, 59, 32768, 8927, 101, 101, 59, 32768, 8910, 101, 100, 103, 101, 59, 32768, 8911, 101, 110, 33024, 164, 59, 32768, 164, 101, 97, 114, 114, 111, 119, 512, 108, 114, 8134, 8140, 101, 102, 116, 59, 32768, 8630, 105, 103, 104, 116, 59, 32768, 8631, 101, 101, 59, 32768, 8910, 101, 100, 59, 32768, 8911, 512, 99, 105, 8162, 8170, 111, 110, 105, 110, 116, 59, 32768, 8754, 110, 116, 59, 32768, 8753, 108, 99, 116, 121, 59, 32768, 9005, 4864, 65, 72, 97, 98, 99, 100, 101, 102, 104, 105, 106, 108, 111, 114, 115, 116, 117, 119, 122, 8221, 8226, 8231, 8267, 8282, 8296, 8327, 8351, 8366, 8379, 8466, 8471, 8487, 8621, 8647, 8676, 8697, 8712, 8720, 114, 114, 59, 32768, 8659, 97, 114, 59, 32768, 10597, 1024, 103, 108, 114, 115, 8240, 8246, 8252, 8256, 103, 101, 114, 59, 32768, 8224, 101, 116, 104, 59, 32768, 8504, 114, 59, 32768, 8595, 104, 512, 59, 118, 8262, 8264, 32768, 8208, 59, 32768, 8867, 572, 8271, 8278, 97, 114, 111, 119, 59, 32768, 10511, 97, 99, 59, 32768, 733, 512, 97, 121, 8287, 8293, 114, 111, 110, 59, 32768, 271, 59, 32768, 1076, 768, 59, 97, 111, 8303, 8305, 8320, 32768, 8518, 512, 103, 114, 8310, 8316, 103, 101, 114, 59, 32768, 8225, 114, 59, 32768, 8650, 116, 115, 101, 113, 59, 32768, 10871, 768, 103, 108, 109, 8334, 8339, 8344, 33024, 176, 59, 32768, 176, 116, 97, 59, 32768, 948, 112, 116, 121, 118, 59, 32768, 10673, 512, 105, 114, 8356, 8362, 115, 104, 116, 59, 32768, 10623, 59, 32896, 55349, 56609, 97, 114, 512, 108, 114, 8373, 8376, 59, 32768, 8643, 59, 32768, 8642, 1280, 97, 101, 103, 115, 118, 8390, 8418, 8421, 8428, 8433, 109, 768, 59, 111, 115, 8398, 8400, 8415, 32768, 8900, 110, 100, 512, 59, 115, 8407, 8409, 32768, 8900, 117, 105, 116, 59, 32768, 9830, 59, 32768, 9830, 59, 32768, 168, 97, 109, 109, 97, 59, 32768, 989, 105, 110, 59, 32768, 8946, 768, 59, 105, 111, 8440, 8442, 8461, 32768, 247, 100, 101, 33280, 247, 59, 111, 8450, 8452, 32768, 247, 110, 116, 105, 109, 101, 115, 59, 32768, 8903, 110, 120, 59, 32768, 8903, 99, 121, 59, 32768, 1106, 99, 1088, 8478, 0, 0, 8483, 114, 110, 59, 32768, 8990, 111, 112, 59, 32768, 8973, 1280, 108, 112, 116, 117, 119, 8498, 8504, 8509, 8556, 8570, 108, 97, 114, 59, 32768, 36, 102, 59, 32896, 55349, 56661, 1280, 59, 101, 109, 112, 115, 8520, 8522, 8535, 8542, 8548, 32768, 729, 113, 512, 59, 100, 8528, 8530, 32768, 8784, 111, 116, 59, 32768, 8785, 105, 110, 117, 115, 59, 32768, 8760, 108, 117, 115, 59, 32768, 8724, 113, 117, 97, 114, 101, 59, 32768, 8865, 98, 108, 101, 98, 97, 114, 119, 101, 100, 103, 101, 59, 32768, 8966, 110, 768, 97, 100, 104, 8578, 8585, 8597, 114, 114, 111, 119, 59, 32768, 8595, 111, 119, 110, 97, 114, 114, 111, 119, 115, 59, 32768, 8650, 97, 114, 112, 111, 111, 110, 512, 108, 114, 8608, 8614, 101, 102, 116, 59, 32768, 8643, 105, 103, 104, 116, 59, 32768, 8642, 563, 8625, 8633, 107, 97, 114, 111, 119, 59, 32768, 10512, 1088, 8638, 0, 0, 8643, 114, 110, 59, 32768, 8991, 111, 112, 59, 32768, 8972, 768, 99, 111, 116, 8654, 8666, 8670, 512, 114, 121, 8659, 8663, 59, 32896, 55349, 56505, 59, 32768, 1109, 108, 59, 32768, 10742, 114, 111, 107, 59, 32768, 273, 512, 100, 114, 8681, 8686, 111, 116, 59, 32768, 8945, 105, 512, 59, 102, 8692, 8694, 32768, 9663, 59, 32768, 9662, 512, 97, 104, 8702, 8707, 114, 114, 59, 32768, 8693, 97, 114, 59, 32768, 10607, 97, 110, 103, 108, 101, 59, 32768, 10662, 512, 99, 105, 8725, 8729, 121, 59, 32768, 1119, 103, 114, 97, 114, 114, 59, 32768, 10239, 4608, 68, 97, 99, 100, 101, 102, 103, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 120, 8774, 8788, 8807, 8844, 8849, 8852, 8866, 8895, 8929, 8977, 8989, 9004, 9046, 9136, 9151, 9171, 9184, 9199, 512, 68, 111, 8779, 8784, 111, 116, 59, 32768, 10871, 116, 59, 32768, 8785, 512, 99, 115, 8793, 8801, 117, 116, 101, 33024, 233, 59, 32768, 233, 116, 101, 114, 59, 32768, 10862, 1024, 97, 105, 111, 121, 8816, 8822, 8835, 8841, 114, 111, 110, 59, 32768, 283, 114, 512, 59, 99, 8828, 8830, 32768, 8790, 33024, 234, 59, 32768, 234, 108, 111, 110, 59, 32768, 8789, 59, 32768, 1101, 111, 116, 59, 32768, 279, 59, 32768, 8519, 512, 68, 114, 8857, 8862, 111, 116, 59, 32768, 8786, 59, 32896, 55349, 56610, 768, 59, 114, 115, 8873, 8875, 8883, 32768, 10906, 97, 118, 101, 33024, 232, 59, 32768, 232, 512, 59, 100, 8888, 8890, 32768, 10902, 111, 116, 59, 32768, 10904, 1024, 59, 105, 108, 115, 8904, 8906, 8914, 8917, 32768, 10905, 110, 116, 101, 114, 115, 59, 32768, 9191, 59, 32768, 8467, 512, 59, 100, 8922, 8924, 32768, 10901, 111, 116, 59, 32768, 10903, 768, 97, 112, 115, 8936, 8941, 8960, 99, 114, 59, 32768, 275, 116, 121, 768, 59, 115, 118, 8950, 8952, 8957, 32768, 8709, 101, 116, 59, 32768, 8709, 59, 32768, 8709, 112, 512, 49, 59, 8966, 8975, 516, 8970, 8973, 59, 32768, 8196, 59, 32768, 8197, 32768, 8195, 512, 103, 115, 8982, 8985, 59, 32768, 331, 112, 59, 32768, 8194, 512, 103, 112, 8994, 8999, 111, 110, 59, 32768, 281, 102, 59, 32896, 55349, 56662, 768, 97, 108, 115, 9011, 9023, 9028, 114, 512, 59, 115, 9017, 9019, 32768, 8917, 108, 59, 32768, 10723, 117, 115, 59, 32768, 10865, 105, 768, 59, 108, 118, 9036, 9038, 9043, 32768, 949, 111, 110, 59, 32768, 949, 59, 32768, 1013, 1024, 99, 115, 117, 118, 9055, 9071, 9099, 9128, 512, 105, 111, 9060, 9065, 114, 99, 59, 32768, 8790, 108, 111, 110, 59, 32768, 8789, 1082, 9077, 0, 0, 9081, 109, 59, 32768, 8770, 97, 110, 116, 512, 103, 108, 9088, 9093, 116, 114, 59, 32768, 10902, 101, 115, 115, 59, 32768, 10901, 768, 97, 101, 105, 9106, 9111, 9116, 108, 115, 59, 32768, 61, 115, 116, 59, 32768, 8799, 118, 512, 59, 68, 9122, 9124, 32768, 8801, 68, 59, 32768, 10872, 112, 97, 114, 115, 108, 59, 32768, 10725, 512, 68, 97, 9141, 9146, 111, 116, 59, 32768, 8787, 114, 114, 59, 32768, 10609, 768, 99, 100, 105, 9158, 9162, 9167, 114, 59, 32768, 8495, 111, 116, 59, 32768, 8784, 109, 59, 32768, 8770, 512, 97, 104, 9176, 9179, 59, 32768, 951, 33024, 240, 59, 32768, 240, 512, 109, 114, 9189, 9195, 108, 33024, 235, 59, 32768, 235, 111, 59, 32768, 8364, 768, 99, 105, 112, 9206, 9210, 9215, 108, 59, 32768, 33, 115, 116, 59, 32768, 8707, 512, 101, 111, 9220, 9230, 99, 116, 97, 116, 105, 111, 110, 59, 32768, 8496, 110, 101, 110, 116, 105, 97, 108, 101, 59, 32768, 8519, 4914, 9262, 0, 9276, 0, 9280, 9287, 0, 0, 9318, 9324, 0, 9331, 0, 9352, 9357, 9386, 0, 9395, 9497, 108, 108, 105, 110, 103, 100, 111, 116, 115, 101, 113, 59, 32768, 8786, 121, 59, 32768, 1092, 109, 97, 108, 101, 59, 32768, 9792, 768, 105, 108, 114, 9293, 9299, 9313, 108, 105, 103, 59, 32768, 64259, 1082, 9305, 0, 0, 9309, 103, 59, 32768, 64256, 105, 103, 59, 32768, 64260, 59, 32896, 55349, 56611, 108, 105, 103, 59, 32768, 64257, 108, 105, 103, 59, 32896, 102, 106, 768, 97, 108, 116, 9337, 9341, 9346, 116, 59, 32768, 9837, 105, 103, 59, 32768, 64258, 110, 115, 59, 32768, 9649, 111, 102, 59, 32768, 402, 833, 9361, 0, 9366, 102, 59, 32896, 55349, 56663, 512, 97, 107, 9370, 9375, 108, 108, 59, 32768, 8704, 512, 59, 118, 9380, 9382, 32768, 8916, 59, 32768, 10969, 97, 114, 116, 105, 110, 116, 59, 32768, 10765, 512, 97, 111, 9399, 9491, 512, 99, 115, 9404, 9487, 1794, 9413, 9443, 9453, 9470, 9474, 0, 9484, 1795, 9421, 9426, 9429, 9434, 9437, 0, 9440, 33024, 189, 59, 32768, 189, 59, 32768, 8531, 33024, 188, 59, 32768, 188, 59, 32768, 8533, 59, 32768, 8537, 59, 32768, 8539, 772, 9447, 0, 9450, 59, 32768, 8532, 59, 32768, 8534, 1285, 9459, 9464, 0, 0, 9467, 33024, 190, 59, 32768, 190, 59, 32768, 8535, 59, 32768, 8540, 53, 59, 32768, 8536, 775, 9478, 0, 9481, 59, 32768, 8538, 59, 32768, 8541, 56, 59, 32768, 8542, 108, 59, 32768, 8260, 119, 110, 59, 32768, 8994, 99, 114, 59, 32896, 55349, 56507, 4352, 69, 97, 98, 99, 100, 101, 102, 103, 105, 106, 108, 110, 111, 114, 115, 116, 118, 9537, 9547, 9575, 9582, 9595, 9600, 9679, 9684, 9694, 9700, 9705, 9725, 9773, 9779, 9785, 9810, 9917, 512, 59, 108, 9542, 9544, 32768, 8807, 59, 32768, 10892, 768, 99, 109, 112, 9554, 9560, 9572, 117, 116, 101, 59, 32768, 501, 109, 97, 512, 59, 100, 9567, 9569, 32768, 947, 59, 32768, 989, 59, 32768, 10886, 114, 101, 118, 101, 59, 32768, 287, 512, 105, 121, 9587, 9592, 114, 99, 59, 32768, 285, 59, 32768, 1075, 111, 116, 59, 32768, 289, 1024, 59, 108, 113, 115, 9609, 9611, 9614, 9633, 32768, 8805, 59, 32768, 8923, 768, 59, 113, 115, 9621, 9623, 9626, 32768, 8805, 59, 32768, 8807, 108, 97, 110, 116, 59, 32768, 10878, 1024, 59, 99, 100, 108, 9642, 9644, 9648, 9667, 32768, 10878, 99, 59, 32768, 10921, 111, 116, 512, 59, 111, 9655, 9657, 32768, 10880, 512, 59, 108, 9662, 9664, 32768, 10882, 59, 32768, 10884, 512, 59, 101, 9672, 9675, 32896, 8923, 65024, 115, 59, 32768, 10900, 114, 59, 32896, 55349, 56612, 512, 59, 103, 9689, 9691, 32768, 8811, 59, 32768, 8921, 109, 101, 108, 59, 32768, 8503, 99, 121, 59, 32768, 1107, 1024, 59, 69, 97, 106, 9714, 9716, 9719, 9722, 32768, 8823, 59, 32768, 10898, 59, 32768, 10917, 59, 32768, 10916, 1024, 69, 97, 101, 115, 9734, 9737, 9751, 9768, 59, 32768, 8809, 112, 512, 59, 112, 9743, 9745, 32768, 10890, 114, 111, 120, 59, 32768, 10890, 512, 59, 113, 9756, 9758, 32768, 10888, 512, 59, 113, 9763, 9765, 32768, 10888, 59, 32768, 8809, 105, 109, 59, 32768, 8935, 112, 102, 59, 32896, 55349, 56664, 97, 118, 101, 59, 32768, 96, 512, 99, 105, 9790, 9794, 114, 59, 32768, 8458, 109, 768, 59, 101, 108, 9802, 9804, 9807, 32768, 8819, 59, 32768, 10894, 59, 32768, 10896, 34304, 62, 59, 99, 100, 108, 113, 114, 9824, 9826, 9838, 9843, 9849, 9856, 32768, 62, 512, 99, 105, 9831, 9834, 59, 32768, 10919, 114, 59, 32768, 10874, 111, 116, 59, 32768, 8919, 80, 97, 114, 59, 32768, 10645, 117, 101, 115, 116, 59, 32768, 10876, 1280, 97, 100, 101, 108, 115, 9867, 9882, 9887, 9906, 9912, 833, 9872, 0, 9879, 112, 114, 111, 120, 59, 32768, 10886, 114, 59, 32768, 10616, 111, 116, 59, 32768, 8919, 113, 512, 108, 113, 9893, 9899, 101, 115, 115, 59, 32768, 8923, 108, 101, 115, 115, 59, 32768, 10892, 101, 115, 115, 59, 32768, 8823, 105, 109, 59, 32768, 8819, 512, 101, 110, 9922, 9932, 114, 116, 110, 101, 113, 113, 59, 32896, 8809, 65024, 69, 59, 32896, 8809, 65024, 2560, 65, 97, 98, 99, 101, 102, 107, 111, 115, 121, 9958, 9963, 10015, 10020, 10026, 10060, 10065, 10085, 10147, 10171, 114, 114, 59, 32768, 8660, 1024, 105, 108, 109, 114, 9972, 9978, 9982, 9988, 114, 115, 112, 59, 32768, 8202, 102, 59, 32768, 189, 105, 108, 116, 59, 32768, 8459, 512, 100, 114, 9993, 9998, 99, 121, 59, 32768, 1098, 768, 59, 99, 119, 10005, 10007, 10012, 32768, 8596, 105, 114, 59, 32768, 10568, 59, 32768, 8621, 97, 114, 59, 32768, 8463, 105, 114, 99, 59, 32768, 293, 768, 97, 108, 114, 10033, 10048, 10054, 114, 116, 115, 512, 59, 117, 10041, 10043, 32768, 9829, 105, 116, 59, 32768, 9829, 108, 105, 112, 59, 32768, 8230, 99, 111, 110, 59, 32768, 8889, 114, 59, 32896, 55349, 56613, 115, 512, 101, 119, 10071, 10078, 97, 114, 111, 119, 59, 32768, 10533, 97, 114, 111, 119, 59, 32768, 10534, 1280, 97, 109, 111, 112, 114, 10096, 10101, 10107, 10136, 10141, 114, 114, 59, 32768, 8703, 116, 104, 116, 59, 32768, 8763, 107, 512, 108, 114, 10113, 10124, 101, 102, 116, 97, 114, 114, 111, 119, 59, 32768, 8617, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8618, 102, 59, 32896, 55349, 56665, 98, 97, 114, 59, 32768, 8213, 768, 99, 108, 116, 10154, 10159, 10165, 114, 59, 32896, 55349, 56509, 97, 115, 104, 59, 32768, 8463, 114, 111, 107, 59, 32768, 295, 512, 98, 112, 10176, 10182, 117, 108, 108, 59, 32768, 8259, 104, 101, 110, 59, 32768, 8208, 5426, 10211, 0, 10220, 0, 10239, 10255, 10267, 0, 10276, 10312, 0, 0, 10318, 10371, 10458, 10485, 10491, 0, 10500, 10545, 10558, 99, 117, 116, 101, 33024, 237, 59, 32768, 237, 768, 59, 105, 121, 10226, 10228, 10235, 32768, 8291, 114, 99, 33024, 238, 59, 32768, 238, 59, 32768, 1080, 512, 99, 120, 10243, 10247, 121, 59, 32768, 1077, 99, 108, 33024, 161, 59, 32768, 161, 512, 102, 114, 10259, 10262, 59, 32768, 8660, 59, 32896, 55349, 56614, 114, 97, 118, 101, 33024, 236, 59, 32768, 236, 1024, 59, 105, 110, 111, 10284, 10286, 10300, 10306, 32768, 8520, 512, 105, 110, 10291, 10296, 110, 116, 59, 32768, 10764, 116, 59, 32768, 8749, 102, 105, 110, 59, 32768, 10716, 116, 97, 59, 32768, 8489, 108, 105, 103, 59, 32768, 307, 768, 97, 111, 112, 10324, 10361, 10365, 768, 99, 103, 116, 10331, 10335, 10357, 114, 59, 32768, 299, 768, 101, 108, 112, 10342, 10345, 10351, 59, 32768, 8465, 105, 110, 101, 59, 32768, 8464, 97, 114, 116, 59, 32768, 8465, 104, 59, 32768, 305, 102, 59, 32768, 8887, 101, 100, 59, 32768, 437, 1280, 59, 99, 102, 111, 116, 10381, 10383, 10389, 10403, 10409, 32768, 8712, 97, 114, 101, 59, 32768, 8453, 105, 110, 512, 59, 116, 10396, 10398, 32768, 8734, 105, 101, 59, 32768, 10717, 100, 111, 116, 59, 32768, 305, 1280, 59, 99, 101, 108, 112, 10420, 10422, 10427, 10444, 10451, 32768, 8747, 97, 108, 59, 32768, 8890, 512, 103, 114, 10432, 10438, 101, 114, 115, 59, 32768, 8484, 99, 97, 108, 59, 32768, 8890, 97, 114, 104, 107, 59, 32768, 10775, 114, 111, 100, 59, 32768, 10812, 1024, 99, 103, 112, 116, 10466, 10470, 10475, 10480, 121, 59, 32768, 1105, 111, 110, 59, 32768, 303, 102, 59, 32896, 55349, 56666, 97, 59, 32768, 953, 114, 111, 100, 59, 32768, 10812, 117, 101, 115, 116, 33024, 191, 59, 32768, 191, 512, 99, 105, 10504, 10509, 114, 59, 32896, 55349, 56510, 110, 1280, 59, 69, 100, 115, 118, 10521, 10523, 10526, 10531, 10541, 32768, 8712, 59, 32768, 8953, 111, 116, 59, 32768, 8949, 512, 59, 118, 10536, 10538, 32768, 8948, 59, 32768, 8947, 59, 32768, 8712, 512, 59, 105, 10549, 10551, 32768, 8290, 108, 100, 101, 59, 32768, 297, 828, 10562, 0, 10567, 99, 121, 59, 32768, 1110, 108, 33024, 239, 59, 32768, 239, 1536, 99, 102, 109, 111, 115, 117, 10585, 10598, 10603, 10609, 10615, 10630, 512, 105, 121, 10590, 10595, 114, 99, 59, 32768, 309, 59, 32768, 1081, 114, 59, 32896, 55349, 56615, 97, 116, 104, 59, 32768, 567, 112, 102, 59, 32896, 55349, 56667, 820, 10620, 0, 10625, 114, 59, 32896, 55349, 56511, 114, 99, 121, 59, 32768, 1112, 107, 99, 121, 59, 32768, 1108, 2048, 97, 99, 102, 103, 104, 106, 111, 115, 10653, 10666, 10680, 10685, 10692, 10697, 10702, 10708, 112, 112, 97, 512, 59, 118, 10661, 10663, 32768, 954, 59, 32768, 1008, 512, 101, 121, 10671, 10677, 100, 105, 108, 59, 32768, 311, 59, 32768, 1082, 114, 59, 32896, 55349, 56616, 114, 101, 101, 110, 59, 32768, 312, 99, 121, 59, 32768, 1093, 99, 121, 59, 32768, 1116, 112, 102, 59, 32896, 55349, 56668, 99, 114, 59, 32896, 55349, 56512, 5888, 65, 66, 69, 72, 97, 98, 99, 100, 101, 102, 103, 104, 106, 108, 109, 110, 111, 112, 114, 115, 116, 117, 118, 10761, 10783, 10789, 10799, 10804, 10957, 11011, 11047, 11094, 11349, 11372, 11382, 11409, 11414, 11451, 11478, 11526, 11698, 11711, 11755, 11823, 11910, 11929, 768, 97, 114, 116, 10768, 10773, 10777, 114, 114, 59, 32768, 8666, 114, 59, 32768, 8656, 97, 105, 108, 59, 32768, 10523, 97, 114, 114, 59, 32768, 10510, 512, 59, 103, 10794, 10796, 32768, 8806, 59, 32768, 10891, 97, 114, 59, 32768, 10594, 4660, 10824, 0, 10830, 0, 10838, 0, 0, 0, 0, 0, 10844, 10850, 0, 10867, 10870, 10877, 0, 10933, 117, 116, 101, 59, 32768, 314, 109, 112, 116, 121, 118, 59, 32768, 10676, 114, 97, 110, 59, 32768, 8466, 98, 100, 97, 59, 32768, 955, 103, 768, 59, 100, 108, 10857, 10859, 10862, 32768, 10216, 59, 32768, 10641, 101, 59, 32768, 10216, 59, 32768, 10885, 117, 111, 33024, 171, 59, 32768, 171, 114, 2048, 59, 98, 102, 104, 108, 112, 115, 116, 10894, 10896, 10907, 10911, 10915, 10919, 10923, 10928, 32768, 8592, 512, 59, 102, 10901, 10903, 32768, 8676, 115, 59, 32768, 10527, 115, 59, 32768, 10525, 107, 59, 32768, 8617, 112, 59, 32768, 8619, 108, 59, 32768, 10553, 105, 109, 59, 32768, 10611, 108, 59, 32768, 8610, 768, 59, 97, 101, 10939, 10941, 10946, 32768, 10923, 105, 108, 59, 32768, 10521, 512, 59, 115, 10951, 10953, 32768, 10925, 59, 32896, 10925, 65024, 768, 97, 98, 114, 10964, 10969, 10974, 114, 114, 59, 32768, 10508, 114, 107, 59, 32768, 10098, 512, 97, 107, 10979, 10991, 99, 512, 101, 107, 10985, 10988, 59, 32768, 123, 59, 32768, 91, 512, 101, 115, 10996, 10999, 59, 32768, 10635, 108, 512, 100, 117, 11005, 11008, 59, 32768, 10639, 59, 32768, 10637, 1024, 97, 101, 117, 121, 11020, 11026, 11040, 11044, 114, 111, 110, 59, 32768, 318, 512, 100, 105, 11031, 11036, 105, 108, 59, 32768, 316, 108, 59, 32768, 8968, 98, 59, 32768, 123, 59, 32768, 1083, 1024, 99, 113, 114, 115, 11056, 11060, 11072, 11090, 97, 59, 32768, 10550, 117, 111, 512, 59, 114, 11067, 11069, 32768, 8220, 59, 32768, 8222, 512, 100, 117, 11077, 11083, 104, 97, 114, 59, 32768, 10599, 115, 104, 97, 114, 59, 32768, 10571, 104, 59, 32768, 8626, 1280, 59, 102, 103, 113, 115, 11105, 11107, 11228, 11231, 11250, 32768, 8804, 116, 1280, 97, 104, 108, 114, 116, 11119, 11136, 11157, 11169, 11216, 114, 114, 111, 119, 512, 59, 116, 11128, 11130, 32768, 8592, 97, 105, 108, 59, 32768, 8610, 97, 114, 112, 111, 111, 110, 512, 100, 117, 11147, 11153, 111, 119, 110, 59, 32768, 8637, 112, 59, 32768, 8636, 101, 102, 116, 97, 114, 114, 111, 119, 115, 59, 32768, 8647, 105, 103, 104, 116, 768, 97, 104, 115, 11180, 11194, 11204, 114, 114, 111, 119, 512, 59, 115, 11189, 11191, 32768, 8596, 59, 32768, 8646, 97, 114, 112, 111, 111, 110, 115, 59, 32768, 8651, 113, 117, 105, 103, 97, 114, 114, 111, 119, 59, 32768, 8621, 104, 114, 101, 101, 116, 105, 109, 101, 115, 59, 32768, 8907, 59, 32768, 8922, 768, 59, 113, 115, 11238, 11240, 11243, 32768, 8804, 59, 32768, 8806, 108, 97, 110, 116, 59, 32768, 10877, 1280, 59, 99, 100, 103, 115, 11261, 11263, 11267, 11286, 11298, 32768, 10877, 99, 59, 32768, 10920, 111, 116, 512, 59, 111, 11274, 11276, 32768, 10879, 512, 59, 114, 11281, 11283, 32768, 10881, 59, 32768, 10883, 512, 59, 101, 11291, 11294, 32896, 8922, 65024, 115, 59, 32768, 10899, 1280, 97, 100, 101, 103, 115, 11309, 11317, 11322, 11339, 11344, 112, 112, 114, 111, 120, 59, 32768, 10885, 111, 116, 59, 32768, 8918, 113, 512, 103, 113, 11328, 11333, 116, 114, 59, 32768, 8922, 103, 116, 114, 59, 32768, 10891, 116, 114, 59, 32768, 8822, 105, 109, 59, 32768, 8818, 768, 105, 108, 114, 11356, 11362, 11368, 115, 104, 116, 59, 32768, 10620, 111, 111, 114, 59, 32768, 8970, 59, 32896, 55349, 56617, 512, 59, 69, 11377, 11379, 32768, 8822, 59, 32768, 10897, 562, 11386, 11405, 114, 512, 100, 117, 11391, 11394, 59, 32768, 8637, 512, 59, 108, 11399, 11401, 32768, 8636, 59, 32768, 10602, 108, 107, 59, 32768, 9604, 99, 121, 59, 32768, 1113, 1280, 59, 97, 99, 104, 116, 11425, 11427, 11432, 11440, 11446, 32768, 8810, 114, 114, 59, 32768, 8647, 111, 114, 110, 101, 114, 59, 32768, 8990, 97, 114, 100, 59, 32768, 10603, 114, 105, 59, 32768, 9722, 512, 105, 111, 11456, 11462, 100, 111, 116, 59, 32768, 320, 117, 115, 116, 512, 59, 97, 11470, 11472, 32768, 9136, 99, 104, 101, 59, 32768, 9136, 1024, 69, 97, 101, 115, 11487, 11490, 11504, 11521, 59, 32768, 8808, 112, 512, 59, 112, 11496, 11498, 32768, 10889, 114, 111, 120, 59, 32768, 10889, 512, 59, 113, 11509, 11511, 32768, 10887, 512, 59, 113, 11516, 11518, 32768, 10887, 59, 32768, 8808, 105, 109, 59, 32768, 8934, 2048, 97, 98, 110, 111, 112, 116, 119, 122, 11543, 11556, 11561, 11616, 11640, 11660, 11667, 11680, 512, 110, 114, 11548, 11552, 103, 59, 32768, 10220, 114, 59, 32768, 8701, 114, 107, 59, 32768, 10214, 103, 768, 108, 109, 114, 11569, 11596, 11604, 101, 102, 116, 512, 97, 114, 11577, 11584, 114, 114, 111, 119, 59, 32768, 10229, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 10231, 97, 112, 115, 116, 111, 59, 32768, 10236, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 10230, 112, 97, 114, 114, 111, 119, 512, 108, 114, 11627, 11633, 101, 102, 116, 59, 32768, 8619, 105, 103, 104, 116, 59, 32768, 8620, 768, 97, 102, 108, 11647, 11651, 11655, 114, 59, 32768, 10629, 59, 32896, 55349, 56669, 117, 115, 59, 32768, 10797, 105, 109, 101, 115, 59, 32768, 10804, 562, 11671, 11676, 115, 116, 59, 32768, 8727, 97, 114, 59, 32768, 95, 768, 59, 101, 102, 11687, 11689, 11695, 32768, 9674, 110, 103, 101, 59, 32768, 9674, 59, 32768, 10731, 97, 114, 512, 59, 108, 11705, 11707, 32768, 40, 116, 59, 32768, 10643, 1280, 97, 99, 104, 109, 116, 11722, 11727, 11735, 11747, 11750, 114, 114, 59, 32768, 8646, 111, 114, 110, 101, 114, 59, 32768, 8991, 97, 114, 512, 59, 100, 11742, 11744, 32768, 8651, 59, 32768, 10605, 59, 32768, 8206, 114, 105, 59, 32768, 8895, 1536, 97, 99, 104, 105, 113, 116, 11768, 11774, 11779, 11782, 11798, 11817, 113, 117, 111, 59, 32768, 8249, 114, 59, 32896, 55349, 56513, 59, 32768, 8624, 109, 768, 59, 101, 103, 11790, 11792, 11795, 32768, 8818, 59, 32768, 10893, 59, 32768, 10895, 512, 98, 117, 11803, 11806, 59, 32768, 91, 111, 512, 59, 114, 11812, 11814, 32768, 8216, 59, 32768, 8218, 114, 111, 107, 59, 32768, 322, 34816, 60, 59, 99, 100, 104, 105, 108, 113, 114, 11841, 11843, 11855, 11860, 11866, 11872, 11878, 11885, 32768, 60, 512, 99, 105, 11848, 11851, 59, 32768, 10918, 114, 59, 32768, 10873, 111, 116, 59, 32768, 8918, 114, 101, 101, 59, 32768, 8907, 109, 101, 115, 59, 32768, 8905, 97, 114, 114, 59, 32768, 10614, 117, 101, 115, 116, 59, 32768, 10875, 512, 80, 105, 11890, 11895, 97, 114, 59, 32768, 10646, 768, 59, 101, 102, 11902, 11904, 11907, 32768, 9667, 59, 32768, 8884, 59, 32768, 9666, 114, 512, 100, 117, 11916, 11923, 115, 104, 97, 114, 59, 32768, 10570, 104, 97, 114, 59, 32768, 10598, 512, 101, 110, 11934, 11944, 114, 116, 110, 101, 113, 113, 59, 32896, 8808, 65024, 69, 59, 32896, 8808, 65024, 3584, 68, 97, 99, 100, 101, 102, 104, 105, 108, 110, 111, 112, 115, 117, 11978, 11984, 12061, 12075, 12081, 12095, 12100, 12104, 12170, 12181, 12188, 12204, 12207, 12223, 68, 111, 116, 59, 32768, 8762, 1024, 99, 108, 112, 114, 11993, 11999, 12019, 12055, 114, 33024, 175, 59, 32768, 175, 512, 101, 116, 12004, 12007, 59, 32768, 9794, 512, 59, 101, 12012, 12014, 32768, 10016, 115, 101, 59, 32768, 10016, 512, 59, 115, 12024, 12026, 32768, 8614, 116, 111, 1024, 59, 100, 108, 117, 12037, 12039, 12045, 12051, 32768, 8614, 111, 119, 110, 59, 32768, 8615, 101, 102, 116, 59, 32768, 8612, 112, 59, 32768, 8613, 107, 101, 114, 59, 32768, 9646, 512, 111, 121, 12066, 12072, 109, 109, 97, 59, 32768, 10793, 59, 32768, 1084, 97, 115, 104, 59, 32768, 8212, 97, 115, 117, 114, 101, 100, 97, 110, 103, 108, 101, 59, 32768, 8737, 114, 59, 32896, 55349, 56618, 111, 59, 32768, 8487, 768, 99, 100, 110, 12111, 12118, 12146, 114, 111, 33024, 181, 59, 32768, 181, 1024, 59, 97, 99, 100, 12127, 12129, 12134, 12139, 32768, 8739, 115, 116, 59, 32768, 42, 105, 114, 59, 32768, 10992, 111, 116, 33024, 183, 59, 32768, 183, 117, 115, 768, 59, 98, 100, 12155, 12157, 12160, 32768, 8722, 59, 32768, 8863, 512, 59, 117, 12165, 12167, 32768, 8760, 59, 32768, 10794, 564, 12174, 12178, 112, 59, 32768, 10971, 114, 59, 32768, 8230, 112, 108, 117, 115, 59, 32768, 8723, 512, 100, 112, 12193, 12199, 101, 108, 115, 59, 32768, 8871, 102, 59, 32896, 55349, 56670, 59, 32768, 8723, 512, 99, 116, 12212, 12217, 114, 59, 32896, 55349, 56514, 112, 111, 115, 59, 32768, 8766, 768, 59, 108, 109, 12230, 12232, 12240, 32768, 956, 116, 105, 109, 97, 112, 59, 32768, 8888, 97, 112, 59, 32768, 8888, 6144, 71, 76, 82, 86, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 109, 111, 112, 114, 115, 116, 117, 118, 119, 12294, 12315, 12364, 12376, 12393, 12472, 12496, 12547, 12553, 12636, 12641, 12703, 12725, 12747, 12752, 12876, 12881, 12957, 13033, 13089, 13294, 13359, 13384, 13499, 512, 103, 116, 12299, 12303, 59, 32896, 8921, 824, 512, 59, 118, 12308, 12311, 32896, 8811, 8402, 59, 32896, 8811, 824, 768, 101, 108, 116, 12322, 12348, 12352, 102, 116, 512, 97, 114, 12329, 12336, 114, 114, 111, 119, 59, 32768, 8653, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8654, 59, 32896, 8920, 824, 512, 59, 118, 12357, 12360, 32896, 8810, 8402, 59, 32896, 8810, 824, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8655, 512, 68, 100, 12381, 12387, 97, 115, 104, 59, 32768, 8879, 97, 115, 104, 59, 32768, 8878, 1280, 98, 99, 110, 112, 116, 12404, 12409, 12415, 12420, 12452, 108, 97, 59, 32768, 8711, 117, 116, 101, 59, 32768, 324, 103, 59, 32896, 8736, 8402, 1280, 59, 69, 105, 111, 112, 12431, 12433, 12437, 12442, 12446, 32768, 8777, 59, 32896, 10864, 824, 100, 59, 32896, 8779, 824, 115, 59, 32768, 329, 114, 111, 120, 59, 32768, 8777, 117, 114, 512, 59, 97, 12459, 12461, 32768, 9838, 108, 512, 59, 115, 12467, 12469, 32768, 9838, 59, 32768, 8469, 836, 12477, 0, 12483, 112, 33024, 160, 59, 32768, 160, 109, 112, 512, 59, 101, 12489, 12492, 32896, 8782, 824, 59, 32896, 8783, 824, 1280, 97, 101, 111, 117, 121, 12507, 12519, 12525, 12540, 12544, 833, 12512, 0, 12515, 59, 32768, 10819, 111, 110, 59, 32768, 328, 100, 105, 108, 59, 32768, 326, 110, 103, 512, 59, 100, 12532, 12534, 32768, 8775, 111, 116, 59, 32896, 10861, 824, 112, 59, 32768, 10818, 59, 32768, 1085, 97, 115, 104, 59, 32768, 8211, 1792, 59, 65, 97, 100, 113, 115, 120, 12568, 12570, 12575, 12596, 12602, 12608, 12623, 32768, 8800, 114, 114, 59, 32768, 8663, 114, 512, 104, 114, 12581, 12585, 107, 59, 32768, 10532, 512, 59, 111, 12590, 12592, 32768, 8599, 119, 59, 32768, 8599, 111, 116, 59, 32896, 8784, 824, 117, 105, 118, 59, 32768, 8802, 512, 101, 105, 12613, 12618, 97, 114, 59, 32768, 10536, 109, 59, 32896, 8770, 824, 105, 115, 116, 512, 59, 115, 12631, 12633, 32768, 8708, 59, 32768, 8708, 114, 59, 32896, 55349, 56619, 1024, 69, 101, 115, 116, 12650, 12654, 12688, 12693, 59, 32896, 8807, 824, 768, 59, 113, 115, 12661, 12663, 12684, 32768, 8817, 768, 59, 113, 115, 12670, 12672, 12676, 32768, 8817, 59, 32896, 8807, 824, 108, 97, 110, 116, 59, 32896, 10878, 824, 59, 32896, 10878, 824, 105, 109, 59, 32768, 8821, 512, 59, 114, 12698, 12700, 32768, 8815, 59, 32768, 8815, 768, 65, 97, 112, 12710, 12715, 12720, 114, 114, 59, 32768, 8654, 114, 114, 59, 32768, 8622, 97, 114, 59, 32768, 10994, 768, 59, 115, 118, 12732, 12734, 12744, 32768, 8715, 512, 59, 100, 12739, 12741, 32768, 8956, 59, 32768, 8954, 59, 32768, 8715, 99, 121, 59, 32768, 1114, 1792, 65, 69, 97, 100, 101, 115, 116, 12767, 12772, 12776, 12781, 12785, 12853, 12858, 114, 114, 59, 32768, 8653, 59, 32896, 8806, 824, 114, 114, 59, 32768, 8602, 114, 59, 32768, 8229, 1024, 59, 102, 113, 115, 12794, 12796, 12821, 12842, 32768, 8816, 116, 512, 97, 114, 12802, 12809, 114, 114, 111, 119, 59, 32768, 8602, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8622, 768, 59, 113, 115, 12828, 12830, 12834, 32768, 8816, 59, 32896, 8806, 824, 108, 97, 110, 116, 59, 32896, 10877, 824, 512, 59, 115, 12847, 12850, 32896, 10877, 824, 59, 32768, 8814, 105, 109, 59, 32768, 8820, 512, 59, 114, 12863, 12865, 32768, 8814, 105, 512, 59, 101, 12871, 12873, 32768, 8938, 59, 32768, 8940, 105, 100, 59, 32768, 8740, 512, 112, 116, 12886, 12891, 102, 59, 32896, 55349, 56671, 33536, 172, 59, 105, 110, 12899, 12901, 12936, 32768, 172, 110, 1024, 59, 69, 100, 118, 12911, 12913, 12917, 12923, 32768, 8713, 59, 32896, 8953, 824, 111, 116, 59, 32896, 8949, 824, 818, 12928, 12931, 12934, 59, 32768, 8713, 59, 32768, 8951, 59, 32768, 8950, 105, 512, 59, 118, 12942, 12944, 32768, 8716, 818, 12949, 12952, 12955, 59, 32768, 8716, 59, 32768, 8958, 59, 32768, 8957, 768, 97, 111, 114, 12964, 12992, 12999, 114, 1024, 59, 97, 115, 116, 12974, 12976, 12983, 12988, 32768, 8742, 108, 108, 101, 108, 59, 32768, 8742, 108, 59, 32896, 11005, 8421, 59, 32896, 8706, 824, 108, 105, 110, 116, 59, 32768, 10772, 768, 59, 99, 101, 13006, 13008, 13013, 32768, 8832, 117, 101, 59, 32768, 8928, 512, 59, 99, 13018, 13021, 32896, 10927, 824, 512, 59, 101, 13026, 13028, 32768, 8832, 113, 59, 32896, 10927, 824, 1024, 65, 97, 105, 116, 13042, 13047, 13066, 13077, 114, 114, 59, 32768, 8655, 114, 114, 768, 59, 99, 119, 13056, 13058, 13062, 32768, 8603, 59, 32896, 10547, 824, 59, 32896, 8605, 824, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8603, 114, 105, 512, 59, 101, 13084, 13086, 32768, 8939, 59, 32768, 8941, 1792, 99, 104, 105, 109, 112, 113, 117, 13104, 13128, 13151, 13169, 13174, 13179, 13194, 1024, 59, 99, 101, 114, 13113, 13115, 13120, 13124, 32768, 8833, 117, 101, 59, 32768, 8929, 59, 32896, 10928, 824, 59, 32896, 55349, 56515, 111, 114, 116, 1086, 13137, 0, 0, 13142, 105, 100, 59, 32768, 8740, 97, 114, 97, 108, 108, 101, 108, 59, 32768, 8742, 109, 512, 59, 101, 13157, 13159, 32768, 8769, 512, 59, 113, 13164, 13166, 32768, 8772, 59, 32768, 8772, 105, 100, 59, 32768, 8740, 97, 114, 59, 32768, 8742, 115, 117, 512, 98, 112, 13186, 13190, 101, 59, 32768, 8930, 101, 59, 32768, 8931, 768, 98, 99, 112, 13201, 13241, 13254, 1024, 59, 69, 101, 115, 13210, 13212, 13216, 13219, 32768, 8836, 59, 32896, 10949, 824, 59, 32768, 8840, 101, 116, 512, 59, 101, 13226, 13229, 32896, 8834, 8402, 113, 512, 59, 113, 13235, 13237, 32768, 8840, 59, 32896, 10949, 824, 99, 512, 59, 101, 13247, 13249, 32768, 8833, 113, 59, 32896, 10928, 824, 1024, 59, 69, 101, 115, 13263, 13265, 13269, 13272, 32768, 8837, 59, 32896, 10950, 824, 59, 32768, 8841, 101, 116, 512, 59, 101, 13279, 13282, 32896, 8835, 8402, 113, 512, 59, 113, 13288, 13290, 32768, 8841, 59, 32896, 10950, 824, 1024, 103, 105, 108, 114, 13303, 13307, 13315, 13319, 108, 59, 32768, 8825, 108, 100, 101, 33024, 241, 59, 32768, 241, 103, 59, 32768, 8824, 105, 97, 110, 103, 108, 101, 512, 108, 114, 13330, 13344, 101, 102, 116, 512, 59, 101, 13338, 13340, 32768, 8938, 113, 59, 32768, 8940, 105, 103, 104, 116, 512, 59, 101, 13353, 13355, 32768, 8939, 113, 59, 32768, 8941, 512, 59, 109, 13364, 13366, 32768, 957, 768, 59, 101, 115, 13373, 13375, 13380, 32768, 35, 114, 111, 59, 32768, 8470, 112, 59, 32768, 8199, 2304, 68, 72, 97, 100, 103, 105, 108, 114, 115, 13403, 13409, 13415, 13420, 13426, 13439, 13446, 13476, 13493, 97, 115, 104, 59, 32768, 8877, 97, 114, 114, 59, 32768, 10500, 112, 59, 32896, 8781, 8402, 97, 115, 104, 59, 32768, 8876, 512, 101, 116, 13431, 13435, 59, 32896, 8805, 8402, 59, 32896, 62, 8402, 110, 102, 105, 110, 59, 32768, 10718, 768, 65, 101, 116, 13453, 13458, 13462, 114, 114, 59, 32768, 10498, 59, 32896, 8804, 8402, 512, 59, 114, 13467, 13470, 32896, 60, 8402, 105, 101, 59, 32896, 8884, 8402, 512, 65, 116, 13481, 13486, 114, 114, 59, 32768, 10499, 114, 105, 101, 59, 32896, 8885, 8402, 105, 109, 59, 32896, 8764, 8402, 768, 65, 97, 110, 13506, 13511, 13532, 114, 114, 59, 32768, 8662, 114, 512, 104, 114, 13517, 13521, 107, 59, 32768, 10531, 512, 59, 111, 13526, 13528, 32768, 8598, 119, 59, 32768, 8598, 101, 97, 114, 59, 32768, 10535, 9252, 13576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13579, 0, 13596, 13617, 13653, 13659, 13673, 13695, 13708, 0, 0, 13713, 13750, 0, 13788, 13794, 0, 13815, 13890, 13913, 13937, 13944, 59, 32768, 9416, 512, 99, 115, 13583, 13591, 117, 116, 101, 33024, 243, 59, 32768, 243, 116, 59, 32768, 8859, 512, 105, 121, 13600, 13613, 114, 512, 59, 99, 13606, 13608, 32768, 8858, 33024, 244, 59, 32768, 244, 59, 32768, 1086, 1280, 97, 98, 105, 111, 115, 13627, 13632, 13638, 13642, 13646, 115, 104, 59, 32768, 8861, 108, 97, 99, 59, 32768, 337, 118, 59, 32768, 10808, 116, 59, 32768, 8857, 111, 108, 100, 59, 32768, 10684, 108, 105, 103, 59, 32768, 339, 512, 99, 114, 13663, 13668, 105, 114, 59, 32768, 10687, 59, 32896, 55349, 56620, 1600, 13680, 0, 0, 13684, 0, 13692, 110, 59, 32768, 731, 97, 118, 101, 33024, 242, 59, 32768, 242, 59, 32768, 10689, 512, 98, 109, 13699, 13704, 97, 114, 59, 32768, 10677, 59, 32768, 937, 110, 116, 59, 32768, 8750, 1024, 97, 99, 105, 116, 13721, 13726, 13741, 13746, 114, 114, 59, 32768, 8634, 512, 105, 114, 13731, 13735, 114, 59, 32768, 10686, 111, 115, 115, 59, 32768, 10683, 110, 101, 59, 32768, 8254, 59, 32768, 10688, 768, 97, 101, 105, 13756, 13761, 13766, 99, 114, 59, 32768, 333, 103, 97, 59, 32768, 969, 768, 99, 100, 110, 13773, 13779, 13782, 114, 111, 110, 59, 32768, 959, 59, 32768, 10678, 117, 115, 59, 32768, 8854, 112, 102, 59, 32896, 55349, 56672, 768, 97, 101, 108, 13800, 13804, 13809, 114, 59, 32768, 10679, 114, 112, 59, 32768, 10681, 117, 115, 59, 32768, 8853, 1792, 59, 97, 100, 105, 111, 115, 118, 13829, 13831, 13836, 13869, 13875, 13879, 13886, 32768, 8744, 114, 114, 59, 32768, 8635, 1024, 59, 101, 102, 109, 13845, 13847, 13859, 13864, 32768, 10845, 114, 512, 59, 111, 13853, 13855, 32768, 8500, 102, 59, 32768, 8500, 33024, 170, 59, 32768, 170, 33024, 186, 59, 32768, 186, 103, 111, 102, 59, 32768, 8886, 114, 59, 32768, 10838, 108, 111, 112, 101, 59, 32768, 10839, 59, 32768, 10843, 768, 99, 108, 111, 13896, 13900, 13908, 114, 59, 32768, 8500, 97, 115, 104, 33024, 248, 59, 32768, 248, 108, 59, 32768, 8856, 105, 573, 13917, 13924, 100, 101, 33024, 245, 59, 32768, 245, 101, 115, 512, 59, 97, 13930, 13932, 32768, 8855, 115, 59, 32768, 10806, 109, 108, 33024, 246, 59, 32768, 246, 98, 97, 114, 59, 32768, 9021, 5426, 13972, 0, 14013, 0, 14017, 14053, 0, 14058, 14086, 0, 0, 14107, 14199, 0, 14202, 0, 0, 14229, 14425, 0, 14438, 114, 1024, 59, 97, 115, 116, 13981, 13983, 13997, 14009, 32768, 8741, 33280, 182, 59, 108, 13989, 13991, 32768, 182, 108, 101, 108, 59, 32768, 8741, 1082, 14003, 0, 0, 14007, 109, 59, 32768, 10995, 59, 32768, 11005, 59, 32768, 8706, 121, 59, 32768, 1087, 114, 1280, 99, 105, 109, 112, 116, 14028, 14033, 14038, 14043, 14046, 110, 116, 59, 32768, 37, 111, 100, 59, 32768, 46, 105, 108, 59, 32768, 8240, 59, 32768, 8869, 101, 110, 107, 59, 32768, 8241, 114, 59, 32896, 55349, 56621, 768, 105, 109, 111, 14064, 14074, 14080, 512, 59, 118, 14069, 14071, 32768, 966, 59, 32768, 981, 109, 97, 116, 59, 32768, 8499, 110, 101, 59, 32768, 9742, 768, 59, 116, 118, 14092, 14094, 14103, 32768, 960, 99, 104, 102, 111, 114, 107, 59, 32768, 8916, 59, 32768, 982, 512, 97, 117, 14111, 14132, 110, 512, 99, 107, 14117, 14128, 107, 512, 59, 104, 14123, 14125, 32768, 8463, 59, 32768, 8462, 118, 59, 32768, 8463, 115, 2304, 59, 97, 98, 99, 100, 101, 109, 115, 116, 14152, 14154, 14160, 14163, 14168, 14179, 14182, 14188, 14193, 32768, 43, 99, 105, 114, 59, 32768, 10787, 59, 32768, 8862, 105, 114, 59, 32768, 10786, 512, 111, 117, 14173, 14176, 59, 32768, 8724, 59, 32768, 10789, 59, 32768, 10866, 110, 33024, 177, 59, 32768, 177, 105, 109, 59, 32768, 10790, 119, 111, 59, 32768, 10791, 59, 32768, 177, 768, 105, 112, 117, 14208, 14216, 14221, 110, 116, 105, 110, 116, 59, 32768, 10773, 102, 59, 32896, 55349, 56673, 110, 100, 33024, 163, 59, 32768, 163, 2560, 59, 69, 97, 99, 101, 105, 110, 111, 115, 117, 14249, 14251, 14254, 14258, 14263, 14336, 14348, 14367, 14413, 14418, 32768, 8826, 59, 32768, 10931, 112, 59, 32768, 10935, 117, 101, 59, 32768, 8828, 512, 59, 99, 14268, 14270, 32768, 10927, 1536, 59, 97, 99, 101, 110, 115, 14283, 14285, 14293, 14302, 14306, 14331, 32768, 8826, 112, 112, 114, 111, 120, 59, 32768, 10935, 117, 114, 108, 121, 101, 113, 59, 32768, 8828, 113, 59, 32768, 10927, 768, 97, 101, 115, 14313, 14321, 14326, 112, 112, 114, 111, 120, 59, 32768, 10937, 113, 113, 59, 32768, 10933, 105, 109, 59, 32768, 8936, 105, 109, 59, 32768, 8830, 109, 101, 512, 59, 115, 14343, 14345, 32768, 8242, 59, 32768, 8473, 768, 69, 97, 115, 14355, 14358, 14362, 59, 32768, 10933, 112, 59, 32768, 10937, 105, 109, 59, 32768, 8936, 768, 100, 102, 112, 14374, 14377, 14402, 59, 32768, 8719, 768, 97, 108, 115, 14384, 14390, 14396, 108, 97, 114, 59, 32768, 9006, 105, 110, 101, 59, 32768, 8978, 117, 114, 102, 59, 32768, 8979, 512, 59, 116, 14407, 14409, 32768, 8733, 111, 59, 32768, 8733, 105, 109, 59, 32768, 8830, 114, 101, 108, 59, 32768, 8880, 512, 99, 105, 14429, 14434, 114, 59, 32896, 55349, 56517, 59, 32768, 968, 110, 99, 115, 112, 59, 32768, 8200, 1536, 102, 105, 111, 112, 115, 117, 14457, 14462, 14467, 14473, 14480, 14486, 114, 59, 32896, 55349, 56622, 110, 116, 59, 32768, 10764, 112, 102, 59, 32896, 55349, 56674, 114, 105, 109, 101, 59, 32768, 8279, 99, 114, 59, 32896, 55349, 56518, 768, 97, 101, 111, 14493, 14513, 14526, 116, 512, 101, 105, 14499, 14508, 114, 110, 105, 111, 110, 115, 59, 32768, 8461, 110, 116, 59, 32768, 10774, 115, 116, 512, 59, 101, 14520, 14522, 32768, 63, 113, 59, 32768, 8799, 116, 33024, 34, 59, 32768, 34, 5376, 65, 66, 72, 97, 98, 99, 100, 101, 102, 104, 105, 108, 109, 110, 111, 112, 114, 115, 116, 117, 120, 14575, 14597, 14603, 14608, 14775, 14829, 14865, 14901, 14943, 14966, 15e3, 15139, 15159, 15176, 15182, 15236, 15261, 15267, 15309, 15352, 15360, 768, 97, 114, 116, 14582, 14587, 14591, 114, 114, 59, 32768, 8667, 114, 59, 32768, 8658, 97, 105, 108, 59, 32768, 10524, 97, 114, 114, 59, 32768, 10511, 97, 114, 59, 32768, 10596, 1792, 99, 100, 101, 110, 113, 114, 116, 14623, 14637, 14642, 14650, 14672, 14679, 14751, 512, 101, 117, 14628, 14632, 59, 32896, 8765, 817, 116, 101, 59, 32768, 341, 105, 99, 59, 32768, 8730, 109, 112, 116, 121, 118, 59, 32768, 10675, 103, 1024, 59, 100, 101, 108, 14660, 14662, 14665, 14668, 32768, 10217, 59, 32768, 10642, 59, 32768, 10661, 101, 59, 32768, 10217, 117, 111, 33024, 187, 59, 32768, 187, 114, 2816, 59, 97, 98, 99, 102, 104, 108, 112, 115, 116, 119, 14703, 14705, 14709, 14720, 14723, 14727, 14731, 14735, 14739, 14744, 14748, 32768, 8594, 112, 59, 32768, 10613, 512, 59, 102, 14714, 14716, 32768, 8677, 115, 59, 32768, 10528, 59, 32768, 10547, 115, 59, 32768, 10526, 107, 59, 32768, 8618, 112, 59, 32768, 8620, 108, 59, 32768, 10565, 105, 109, 59, 32768, 10612, 108, 59, 32768, 8611, 59, 32768, 8605, 512, 97, 105, 14756, 14761, 105, 108, 59, 32768, 10522, 111, 512, 59, 110, 14767, 14769, 32768, 8758, 97, 108, 115, 59, 32768, 8474, 768, 97, 98, 114, 14782, 14787, 14792, 114, 114, 59, 32768, 10509, 114, 107, 59, 32768, 10099, 512, 97, 107, 14797, 14809, 99, 512, 101, 107, 14803, 14806, 59, 32768, 125, 59, 32768, 93, 512, 101, 115, 14814, 14817, 59, 32768, 10636, 108, 512, 100, 117, 14823, 14826, 59, 32768, 10638, 59, 32768, 10640, 1024, 97, 101, 117, 121, 14838, 14844, 14858, 14862, 114, 111, 110, 59, 32768, 345, 512, 100, 105, 14849, 14854, 105, 108, 59, 32768, 343, 108, 59, 32768, 8969, 98, 59, 32768, 125, 59, 32768, 1088, 1024, 99, 108, 113, 115, 14874, 14878, 14885, 14897, 97, 59, 32768, 10551, 100, 104, 97, 114, 59, 32768, 10601, 117, 111, 512, 59, 114, 14892, 14894, 32768, 8221, 59, 32768, 8221, 104, 59, 32768, 8627, 768, 97, 99, 103, 14908, 14934, 14938, 108, 1024, 59, 105, 112, 115, 14918, 14920, 14925, 14931, 32768, 8476, 110, 101, 59, 32768, 8475, 97, 114, 116, 59, 32768, 8476, 59, 32768, 8477, 116, 59, 32768, 9645, 33024, 174, 59, 32768, 174, 768, 105, 108, 114, 14950, 14956, 14962, 115, 104, 116, 59, 32768, 10621, 111, 111, 114, 59, 32768, 8971, 59, 32896, 55349, 56623, 512, 97, 111, 14971, 14990, 114, 512, 100, 117, 14977, 14980, 59, 32768, 8641, 512, 59, 108, 14985, 14987, 32768, 8640, 59, 32768, 10604, 512, 59, 118, 14995, 14997, 32768, 961, 59, 32768, 1009, 768, 103, 110, 115, 15007, 15123, 15127, 104, 116, 1536, 97, 104, 108, 114, 115, 116, 15022, 15039, 15060, 15086, 15099, 15111, 114, 114, 111, 119, 512, 59, 116, 15031, 15033, 32768, 8594, 97, 105, 108, 59, 32768, 8611, 97, 114, 112, 111, 111, 110, 512, 100, 117, 15050, 15056, 111, 119, 110, 59, 32768, 8641, 112, 59, 32768, 8640, 101, 102, 116, 512, 97, 104, 15068, 15076, 114, 114, 111, 119, 115, 59, 32768, 8644, 97, 114, 112, 111, 111, 110, 115, 59, 32768, 8652, 105, 103, 104, 116, 97, 114, 114, 111, 119, 115, 59, 32768, 8649, 113, 117, 105, 103, 97, 114, 114, 111, 119, 59, 32768, 8605, 104, 114, 101, 101, 116, 105, 109, 101, 115, 59, 32768, 8908, 103, 59, 32768, 730, 105, 110, 103, 100, 111, 116, 115, 101, 113, 59, 32768, 8787, 768, 97, 104, 109, 15146, 15151, 15156, 114, 114, 59, 32768, 8644, 97, 114, 59, 32768, 8652, 59, 32768, 8207, 111, 117, 115, 116, 512, 59, 97, 15168, 15170, 32768, 9137, 99, 104, 101, 59, 32768, 9137, 109, 105, 100, 59, 32768, 10990, 1024, 97, 98, 112, 116, 15191, 15204, 15209, 15229, 512, 110, 114, 15196, 15200, 103, 59, 32768, 10221, 114, 59, 32768, 8702, 114, 107, 59, 32768, 10215, 768, 97, 102, 108, 15216, 15220, 15224, 114, 59, 32768, 10630, 59, 32896, 55349, 56675, 117, 115, 59, 32768, 10798, 105, 109, 101, 115, 59, 32768, 10805, 512, 97, 112, 15241, 15253, 114, 512, 59, 103, 15247, 15249, 32768, 41, 116, 59, 32768, 10644, 111, 108, 105, 110, 116, 59, 32768, 10770, 97, 114, 114, 59, 32768, 8649, 1024, 97, 99, 104, 113, 15276, 15282, 15287, 15290, 113, 117, 111, 59, 32768, 8250, 114, 59, 32896, 55349, 56519, 59, 32768, 8625, 512, 98, 117, 15295, 15298, 59, 32768, 93, 111, 512, 59, 114, 15304, 15306, 32768, 8217, 59, 32768, 8217, 768, 104, 105, 114, 15316, 15322, 15328, 114, 101, 101, 59, 32768, 8908, 109, 101, 115, 59, 32768, 8906, 105, 1024, 59, 101, 102, 108, 15338, 15340, 15343, 15346, 32768, 9657, 59, 32768, 8885, 59, 32768, 9656, 116, 114, 105, 59, 32768, 10702, 108, 117, 104, 97, 114, 59, 32768, 10600, 59, 32768, 8478, 6706, 15391, 15398, 15404, 15499, 15516, 15592, 0, 15606, 15660, 0, 0, 15752, 15758, 0, 15827, 15863, 15886, 16e3, 16006, 16038, 16086, 0, 16467, 0, 0, 16506, 99, 117, 116, 101, 59, 32768, 347, 113, 117, 111, 59, 32768, 8218, 2560, 59, 69, 97, 99, 101, 105, 110, 112, 115, 121, 15424, 15426, 15429, 15441, 15446, 15458, 15463, 15482, 15490, 15495, 32768, 8827, 59, 32768, 10932, 833, 15434, 0, 15437, 59, 32768, 10936, 111, 110, 59, 32768, 353, 117, 101, 59, 32768, 8829, 512, 59, 100, 15451, 15453, 32768, 10928, 105, 108, 59, 32768, 351, 114, 99, 59, 32768, 349, 768, 69, 97, 115, 15470, 15473, 15477, 59, 32768, 10934, 112, 59, 32768, 10938, 105, 109, 59, 32768, 8937, 111, 108, 105, 110, 116, 59, 32768, 10771, 105, 109, 59, 32768, 8831, 59, 32768, 1089, 111, 116, 768, 59, 98, 101, 15507, 15509, 15512, 32768, 8901, 59, 32768, 8865, 59, 32768, 10854, 1792, 65, 97, 99, 109, 115, 116, 120, 15530, 15535, 15556, 15562, 15566, 15572, 15587, 114, 114, 59, 32768, 8664, 114, 512, 104, 114, 15541, 15545, 107, 59, 32768, 10533, 512, 59, 111, 15550, 15552, 32768, 8600, 119, 59, 32768, 8600, 116, 33024, 167, 59, 32768, 167, 105, 59, 32768, 59, 119, 97, 114, 59, 32768, 10537, 109, 512, 105, 110, 15578, 15584, 110, 117, 115, 59, 32768, 8726, 59, 32768, 8726, 116, 59, 32768, 10038, 114, 512, 59, 111, 15597, 15600, 32896, 55349, 56624, 119, 110, 59, 32768, 8994, 1024, 97, 99, 111, 121, 15614, 15619, 15632, 15654, 114, 112, 59, 32768, 9839, 512, 104, 121, 15624, 15629, 99, 121, 59, 32768, 1097, 59, 32768, 1096, 114, 116, 1086, 15640, 0, 0, 15645, 105, 100, 59, 32768, 8739, 97, 114, 97, 108, 108, 101, 108, 59, 32768, 8741, 33024, 173, 59, 32768, 173, 512, 103, 109, 15664, 15681, 109, 97, 768, 59, 102, 118, 15673, 15675, 15678, 32768, 963, 59, 32768, 962, 59, 32768, 962, 2048, 59, 100, 101, 103, 108, 110, 112, 114, 15698, 15700, 15705, 15715, 15725, 15735, 15739, 15745, 32768, 8764, 111, 116, 59, 32768, 10858, 512, 59, 113, 15710, 15712, 32768, 8771, 59, 32768, 8771, 512, 59, 69, 15720, 15722, 32768, 10910, 59, 32768, 10912, 512, 59, 69, 15730, 15732, 32768, 10909, 59, 32768, 10911, 101, 59, 32768, 8774, 108, 117, 115, 59, 32768, 10788, 97, 114, 114, 59, 32768, 10610, 97, 114, 114, 59, 32768, 8592, 1024, 97, 101, 105, 116, 15766, 15788, 15796, 15808, 512, 108, 115, 15771, 15783, 108, 115, 101, 116, 109, 105, 110, 117, 115, 59, 32768, 8726, 104, 112, 59, 32768, 10803, 112, 97, 114, 115, 108, 59, 32768, 10724, 512, 100, 108, 15801, 15804, 59, 32768, 8739, 101, 59, 32768, 8995, 512, 59, 101, 15813, 15815, 32768, 10922, 512, 59, 115, 15820, 15822, 32768, 10924, 59, 32896, 10924, 65024, 768, 102, 108, 112, 15833, 15839, 15857, 116, 99, 121, 59, 32768, 1100, 512, 59, 98, 15844, 15846, 32768, 47, 512, 59, 97, 15851, 15853, 32768, 10692, 114, 59, 32768, 9023, 102, 59, 32896, 55349, 56676, 97, 512, 100, 114, 15868, 15882, 101, 115, 512, 59, 117, 15875, 15877, 32768, 9824, 105, 116, 59, 32768, 9824, 59, 32768, 8741, 768, 99, 115, 117, 15892, 15921, 15977, 512, 97, 117, 15897, 15909, 112, 512, 59, 115, 15903, 15905, 32768, 8851, 59, 32896, 8851, 65024, 112, 512, 59, 115, 15915, 15917, 32768, 8852, 59, 32896, 8852, 65024, 117, 512, 98, 112, 15927, 15952, 768, 59, 101, 115, 15934, 15936, 15939, 32768, 8847, 59, 32768, 8849, 101, 116, 512, 59, 101, 15946, 15948, 32768, 8847, 113, 59, 32768, 8849, 768, 59, 101, 115, 15959, 15961, 15964, 32768, 8848, 59, 32768, 8850, 101, 116, 512, 59, 101, 15971, 15973, 32768, 8848, 113, 59, 32768, 8850, 768, 59, 97, 102, 15984, 15986, 15996, 32768, 9633, 114, 566, 15991, 15994, 59, 32768, 9633, 59, 32768, 9642, 59, 32768, 9642, 97, 114, 114, 59, 32768, 8594, 1024, 99, 101, 109, 116, 16014, 16019, 16025, 16031, 114, 59, 32896, 55349, 56520, 116, 109, 110, 59, 32768, 8726, 105, 108, 101, 59, 32768, 8995, 97, 114, 102, 59, 32768, 8902, 512, 97, 114, 16042, 16053, 114, 512, 59, 102, 16048, 16050, 32768, 9734, 59, 32768, 9733, 512, 97, 110, 16058, 16081, 105, 103, 104, 116, 512, 101, 112, 16067, 16076, 112, 115, 105, 108, 111, 110, 59, 32768, 1013, 104, 105, 59, 32768, 981, 115, 59, 32768, 175, 1280, 98, 99, 109, 110, 112, 16096, 16221, 16288, 16291, 16295, 2304, 59, 69, 100, 101, 109, 110, 112, 114, 115, 16115, 16117, 16120, 16125, 16137, 16143, 16154, 16160, 16166, 32768, 8834, 59, 32768, 10949, 111, 116, 59, 32768, 10941, 512, 59, 100, 16130, 16132, 32768, 8838, 111, 116, 59, 32768, 10947, 117, 108, 116, 59, 32768, 10945, 512, 69, 101, 16148, 16151, 59, 32768, 10955, 59, 32768, 8842, 108, 117, 115, 59, 32768, 10943, 97, 114, 114, 59, 32768, 10617, 768, 101, 105, 117, 16173, 16206, 16210, 116, 768, 59, 101, 110, 16181, 16183, 16194, 32768, 8834, 113, 512, 59, 113, 16189, 16191, 32768, 8838, 59, 32768, 10949, 101, 113, 512, 59, 113, 16201, 16203, 32768, 8842, 59, 32768, 10955, 109, 59, 32768, 10951, 512, 98, 112, 16215, 16218, 59, 32768, 10965, 59, 32768, 10963, 99, 1536, 59, 97, 99, 101, 110, 115, 16235, 16237, 16245, 16254, 16258, 16283, 32768, 8827, 112, 112, 114, 111, 120, 59, 32768, 10936, 117, 114, 108, 121, 101, 113, 59, 32768, 8829, 113, 59, 32768, 10928, 768, 97, 101, 115, 16265, 16273, 16278, 112, 112, 114, 111, 120, 59, 32768, 10938, 113, 113, 59, 32768, 10934, 105, 109, 59, 32768, 8937, 105, 109, 59, 32768, 8831, 59, 32768, 8721, 103, 59, 32768, 9834, 3328, 49, 50, 51, 59, 69, 100, 101, 104, 108, 109, 110, 112, 115, 16322, 16327, 16332, 16337, 16339, 16342, 16356, 16368, 16382, 16388, 16394, 16405, 16411, 33024, 185, 59, 32768, 185, 33024, 178, 59, 32768, 178, 33024, 179, 59, 32768, 179, 32768, 8835, 59, 32768, 10950, 512, 111, 115, 16347, 16351, 116, 59, 32768, 10942, 117, 98, 59, 32768, 10968, 512, 59, 100, 16361, 16363, 32768, 8839, 111, 116, 59, 32768, 10948, 115, 512, 111, 117, 16374, 16378, 108, 59, 32768, 10185, 98, 59, 32768, 10967, 97, 114, 114, 59, 32768, 10619, 117, 108, 116, 59, 32768, 10946, 512, 69, 101, 16399, 16402, 59, 32768, 10956, 59, 32768, 8843, 108, 117, 115, 59, 32768, 10944, 768, 101, 105, 117, 16418, 16451, 16455, 116, 768, 59, 101, 110, 16426, 16428, 16439, 32768, 8835, 113, 512, 59, 113, 16434, 16436, 32768, 8839, 59, 32768, 10950, 101, 113, 512, 59, 113, 16446, 16448, 32768, 8843, 59, 32768, 10956, 109, 59, 32768, 10952, 512, 98, 112, 16460, 16463, 59, 32768, 10964, 59, 32768, 10966, 768, 65, 97, 110, 16473, 16478, 16499, 114, 114, 59, 32768, 8665, 114, 512, 104, 114, 16484, 16488, 107, 59, 32768, 10534, 512, 59, 111, 16493, 16495, 32768, 8601, 119, 59, 32768, 8601, 119, 97, 114, 59, 32768, 10538, 108, 105, 103, 33024, 223, 59, 32768, 223, 5938, 16538, 16552, 16557, 16579, 16584, 16591, 0, 16596, 16692, 0, 0, 0, 0, 0, 16731, 16780, 0, 16787, 16908, 0, 0, 0, 16938, 1091, 16543, 0, 0, 16549, 103, 101, 116, 59, 32768, 8982, 59, 32768, 964, 114, 107, 59, 32768, 9140, 768, 97, 101, 121, 16563, 16569, 16575, 114, 111, 110, 59, 32768, 357, 100, 105, 108, 59, 32768, 355, 59, 32768, 1090, 111, 116, 59, 32768, 8411, 108, 114, 101, 99, 59, 32768, 8981, 114, 59, 32896, 55349, 56625, 1024, 101, 105, 107, 111, 16604, 16641, 16670, 16684, 835, 16609, 0, 16624, 101, 512, 52, 102, 16614, 16617, 59, 32768, 8756, 111, 114, 101, 59, 32768, 8756, 97, 768, 59, 115, 118, 16631, 16633, 16638, 32768, 952, 121, 109, 59, 32768, 977, 59, 32768, 977, 512, 99, 110, 16646, 16665, 107, 512, 97, 115, 16652, 16660, 112, 112, 114, 111, 120, 59, 32768, 8776, 105, 109, 59, 32768, 8764, 115, 112, 59, 32768, 8201, 512, 97, 115, 16675, 16679, 112, 59, 32768, 8776, 105, 109, 59, 32768, 8764, 114, 110, 33024, 254, 59, 32768, 254, 829, 16696, 16701, 16727, 100, 101, 59, 32768, 732, 101, 115, 33536, 215, 59, 98, 100, 16710, 16712, 16723, 32768, 215, 512, 59, 97, 16717, 16719, 32768, 8864, 114, 59, 32768, 10801, 59, 32768, 10800, 116, 59, 32768, 8749, 768, 101, 112, 115, 16737, 16741, 16775, 97, 59, 32768, 10536, 1024, 59, 98, 99, 102, 16750, 16752, 16757, 16762, 32768, 8868, 111, 116, 59, 32768, 9014, 105, 114, 59, 32768, 10993, 512, 59, 111, 16767, 16770, 32896, 55349, 56677, 114, 107, 59, 32768, 10970, 97, 59, 32768, 10537, 114, 105, 109, 101, 59, 32768, 8244, 768, 97, 105, 112, 16793, 16798, 16899, 100, 101, 59, 32768, 8482, 1792, 97, 100, 101, 109, 112, 115, 116, 16813, 16868, 16873, 16876, 16883, 16889, 16893, 110, 103, 108, 101, 1280, 59, 100, 108, 113, 114, 16828, 16830, 16836, 16850, 16853, 32768, 9653, 111, 119, 110, 59, 32768, 9663, 101, 102, 116, 512, 59, 101, 16844, 16846, 32768, 9667, 113, 59, 32768, 8884, 59, 32768, 8796, 105, 103, 104, 116, 512, 59, 101, 16862, 16864, 32768, 9657, 113, 59, 32768, 8885, 111, 116, 59, 32768, 9708, 59, 32768, 8796, 105, 110, 117, 115, 59, 32768, 10810, 108, 117, 115, 59, 32768, 10809, 98, 59, 32768, 10701, 105, 109, 101, 59, 32768, 10811, 101, 122, 105, 117, 109, 59, 32768, 9186, 768, 99, 104, 116, 16914, 16926, 16931, 512, 114, 121, 16919, 16923, 59, 32896, 55349, 56521, 59, 32768, 1094, 99, 121, 59, 32768, 1115, 114, 111, 107, 59, 32768, 359, 512, 105, 111, 16942, 16947, 120, 116, 59, 32768, 8812, 104, 101, 97, 100, 512, 108, 114, 16956, 16967, 101, 102, 116, 97, 114, 114, 111, 119, 59, 32768, 8606, 105, 103, 104, 116, 97, 114, 114, 111, 119, 59, 32768, 8608, 4608, 65, 72, 97, 98, 99, 100, 102, 103, 104, 108, 109, 111, 112, 114, 115, 116, 117, 119, 17016, 17021, 17026, 17043, 17057, 17072, 17095, 17110, 17119, 17139, 17172, 17187, 17202, 17290, 17330, 17336, 17365, 17381, 114, 114, 59, 32768, 8657, 97, 114, 59, 32768, 10595, 512, 99, 114, 17031, 17039, 117, 116, 101, 33024, 250, 59, 32768, 250, 114, 59, 32768, 8593, 114, 820, 17049, 0, 17053, 121, 59, 32768, 1118, 118, 101, 59, 32768, 365, 512, 105, 121, 17062, 17069, 114, 99, 33024, 251, 59, 32768, 251, 59, 32768, 1091, 768, 97, 98, 104, 17079, 17084, 17090, 114, 114, 59, 32768, 8645, 108, 97, 99, 59, 32768, 369, 97, 114, 59, 32768, 10606, 512, 105, 114, 17100, 17106, 115, 104, 116, 59, 32768, 10622, 59, 32896, 55349, 56626, 114, 97, 118, 101, 33024, 249, 59, 32768, 249, 562, 17123, 17135, 114, 512, 108, 114, 17128, 17131, 59, 32768, 8639, 59, 32768, 8638, 108, 107, 59, 32768, 9600, 512, 99, 116, 17144, 17167, 1088, 17150, 0, 0, 17163, 114, 110, 512, 59, 101, 17156, 17158, 32768, 8988, 114, 59, 32768, 8988, 111, 112, 59, 32768, 8975, 114, 105, 59, 32768, 9720, 512, 97, 108, 17177, 17182, 99, 114, 59, 32768, 363, 33024, 168, 59, 32768, 168, 512, 103, 112, 17192, 17197, 111, 110, 59, 32768, 371, 102, 59, 32896, 55349, 56678, 1536, 97, 100, 104, 108, 115, 117, 17215, 17222, 17233, 17257, 17262, 17280, 114, 114, 111, 119, 59, 32768, 8593, 111, 119, 110, 97, 114, 114, 111, 119, 59, 32768, 8597, 97, 114, 112, 111, 111, 110, 512, 108, 114, 17244, 17250, 101, 102, 116, 59, 32768, 8639, 105, 103, 104, 116, 59, 32768, 8638, 117, 115, 59, 32768, 8846, 105, 768, 59, 104, 108, 17270, 17272, 17275, 32768, 965, 59, 32768, 978, 111, 110, 59, 32768, 965, 112, 97, 114, 114, 111, 119, 115, 59, 32768, 8648, 768, 99, 105, 116, 17297, 17320, 17325, 1088, 17303, 0, 0, 17316, 114, 110, 512, 59, 101, 17309, 17311, 32768, 8989, 114, 59, 32768, 8989, 111, 112, 59, 32768, 8974, 110, 103, 59, 32768, 367, 114, 105, 59, 32768, 9721, 99, 114, 59, 32896, 55349, 56522, 768, 100, 105, 114, 17343, 17348, 17354, 111, 116, 59, 32768, 8944, 108, 100, 101, 59, 32768, 361, 105, 512, 59, 102, 17360, 17362, 32768, 9653, 59, 32768, 9652, 512, 97, 109, 17370, 17375, 114, 114, 59, 32768, 8648, 108, 33024, 252, 59, 32768, 252, 97, 110, 103, 108, 101, 59, 32768, 10663, 3840, 65, 66, 68, 97, 99, 100, 101, 102, 108, 110, 111, 112, 114, 115, 122, 17420, 17425, 17437, 17443, 17613, 17617, 17623, 17667, 17672, 17678, 17693, 17699, 17705, 17711, 17754, 114, 114, 59, 32768, 8661, 97, 114, 512, 59, 118, 17432, 17434, 32768, 10984, 59, 32768, 10985, 97, 115, 104, 59, 32768, 8872, 512, 110, 114, 17448, 17454, 103, 114, 116, 59, 32768, 10652, 1792, 101, 107, 110, 112, 114, 115, 116, 17469, 17478, 17485, 17494, 17515, 17526, 17578, 112, 115, 105, 108, 111, 110, 59, 32768, 1013, 97, 112, 112, 97, 59, 32768, 1008, 111, 116, 104, 105, 110, 103, 59, 32768, 8709, 768, 104, 105, 114, 17501, 17505, 17508, 105, 59, 32768, 981, 59, 32768, 982, 111, 112, 116, 111, 59, 32768, 8733, 512, 59, 104, 17520, 17522, 32768, 8597, 111, 59, 32768, 1009, 512, 105, 117, 17531, 17537, 103, 109, 97, 59, 32768, 962, 512, 98, 112, 17542, 17560, 115, 101, 116, 110, 101, 113, 512, 59, 113, 17553, 17556, 32896, 8842, 65024, 59, 32896, 10955, 65024, 115, 101, 116, 110, 101, 113, 512, 59, 113, 17571, 17574, 32896, 8843, 65024, 59, 32896, 10956, 65024, 512, 104, 114, 17583, 17589, 101, 116, 97, 59, 32768, 977, 105, 97, 110, 103, 108, 101, 512, 108, 114, 17600, 17606, 101, 102, 116, 59, 32768, 8882, 105, 103, 104, 116, 59, 32768, 8883, 121, 59, 32768, 1074, 97, 115, 104, 59, 32768, 8866, 768, 101, 108, 114, 17630, 17648, 17654, 768, 59, 98, 101, 17637, 17639, 17644, 32768, 8744, 97, 114, 59, 32768, 8891, 113, 59, 32768, 8794, 108, 105, 112, 59, 32768, 8942, 512, 98, 116, 17659, 17664, 97, 114, 59, 32768, 124, 59, 32768, 124, 114, 59, 32896, 55349, 56627, 116, 114, 105, 59, 32768, 8882, 115, 117, 512, 98, 112, 17685, 17689, 59, 32896, 8834, 8402, 59, 32896, 8835, 8402, 112, 102, 59, 32896, 55349, 56679, 114, 111, 112, 59, 32768, 8733, 116, 114, 105, 59, 32768, 8883, 512, 99, 117, 17716, 17721, 114, 59, 32896, 55349, 56523, 512, 98, 112, 17726, 17740, 110, 512, 69, 101, 17732, 17736, 59, 32896, 10955, 65024, 59, 32896, 8842, 65024, 110, 512, 69, 101, 17746, 17750, 59, 32896, 10956, 65024, 59, 32896, 8843, 65024, 105, 103, 122, 97, 103, 59, 32768, 10650, 1792, 99, 101, 102, 111, 112, 114, 115, 17777, 17783, 17815, 17820, 17826, 17829, 17842, 105, 114, 99, 59, 32768, 373, 512, 100, 105, 17788, 17809, 512, 98, 103, 17793, 17798, 97, 114, 59, 32768, 10847, 101, 512, 59, 113, 17804, 17806, 32768, 8743, 59, 32768, 8793, 101, 114, 112, 59, 32768, 8472, 114, 59, 32896, 55349, 56628, 112, 102, 59, 32896, 55349, 56680, 59, 32768, 8472, 512, 59, 101, 17834, 17836, 32768, 8768, 97, 116, 104, 59, 32768, 8768, 99, 114, 59, 32896, 55349, 56524, 5428, 17871, 17891, 0, 17897, 0, 17902, 17917, 0, 0, 17920, 17935, 17940, 17945, 0, 0, 17977, 17992, 0, 18008, 18024, 18029, 768, 97, 105, 117, 17877, 17881, 17886, 112, 59, 32768, 8898, 114, 99, 59, 32768, 9711, 112, 59, 32768, 8899, 116, 114, 105, 59, 32768, 9661, 114, 59, 32896, 55349, 56629, 512, 65, 97, 17906, 17911, 114, 114, 59, 32768, 10234, 114, 114, 59, 32768, 10231, 59, 32768, 958, 512, 65, 97, 17924, 17929, 114, 114, 59, 32768, 10232, 114, 114, 59, 32768, 10229, 97, 112, 59, 32768, 10236, 105, 115, 59, 32768, 8955, 768, 100, 112, 116, 17951, 17956, 17970, 111, 116, 59, 32768, 10752, 512, 102, 108, 17961, 17965, 59, 32896, 55349, 56681, 117, 115, 59, 32768, 10753, 105, 109, 101, 59, 32768, 10754, 512, 65, 97, 17981, 17986, 114, 114, 59, 32768, 10233, 114, 114, 59, 32768, 10230, 512, 99, 113, 17996, 18001, 114, 59, 32896, 55349, 56525, 99, 117, 112, 59, 32768, 10758, 512, 112, 116, 18012, 18018, 108, 117, 115, 59, 32768, 10756, 114, 105, 59, 32768, 9651, 101, 101, 59, 32768, 8897, 101, 100, 103, 101, 59, 32768, 8896, 2048, 97, 99, 101, 102, 105, 111, 115, 117, 18052, 18068, 18081, 18087, 18092, 18097, 18103, 18109, 99, 512, 117, 121, 18058, 18065, 116, 101, 33024, 253, 59, 32768, 253, 59, 32768, 1103, 512, 105, 121, 18073, 18078, 114, 99, 59, 32768, 375, 59, 32768, 1099, 110, 33024, 165, 59, 32768, 165, 114, 59, 32896, 55349, 56630, 99, 121, 59, 32768, 1111, 112, 102, 59, 32896, 55349, 56682, 99, 114, 59, 32896, 55349, 56526, 512, 99, 109, 18114, 18118, 121, 59, 32768, 1102, 108, 33024, 255, 59, 32768, 255, 2560, 97, 99, 100, 101, 102, 104, 105, 111, 115, 119, 18145, 18152, 18166, 18171, 18186, 18191, 18196, 18204, 18210, 18216, 99, 117, 116, 101, 59, 32768, 378, 512, 97, 121, 18157, 18163, 114, 111, 110, 59, 32768, 382, 59, 32768, 1079, 111, 116, 59, 32768, 380, 512, 101, 116, 18176, 18182, 116, 114, 102, 59, 32768, 8488, 97, 59, 32768, 950, 114, 59, 32896, 55349, 56631, 99, 121, 59, 32768, 1078, 103, 114, 97, 114, 114, 59, 32768, 8669, 112, 102, 59, 32896, 55349, 56683, 99, 114, 59, 32896, 55349, 56527, 512, 106, 110, 18221, 18224, 59, 32768, 8205, 106, 59, 32768, 8204]);
+ }
+});
+
+// node_modules/linkedom/node_modules/entities/lib/generated/decode-data-xml.js
+var require_decode_data_xml = __commonJS({
+ "node_modules/linkedom/node_modules/entities/lib/generated/decode-data-xml.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.default = new Uint16Array([1024, 97, 103, 108, 113, 9, 23, 27, 31, 1086, 15, 0, 0, 19, 112, 59, 32768, 38, 111, 115, 59, 32768, 39, 116, 59, 32768, 62, 116, 59, 32768, 60, 117, 111, 116, 59, 32768, 34]);
+ }
+});
+
+// node_modules/linkedom/node_modules/entities/lib/decode.js
+var require_decode3 = __commonJS({
+ "node_modules/linkedom/node_modules/entities/lib/decode.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTML = exports.determineBranch = exports.JUMP_OFFSET_BASE = exports.BinTrieFlags = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
+ var decode_data_html_1 = __importDefault(require_decode_data_html());
+ exports.htmlDecodeTree = decode_data_html_1.default;
+ var decode_data_xml_1 = __importDefault(require_decode_data_xml());
+ exports.xmlDecodeTree = decode_data_xml_1.default;
+ var decode_codepoint_1 = __importDefault(require_decode_codepoint2());
+ var BinTrieFlags;
+ (function(BinTrieFlags2) {
+ BinTrieFlags2[BinTrieFlags2["HAS_VALUE"] = 32768] = "HAS_VALUE";
+ BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 32512] = "BRANCH_LENGTH";
+ BinTrieFlags2[BinTrieFlags2["MULTI_BYTE"] = 128] = "MULTI_BYTE";
+ BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
+ })(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
+ exports.JUMP_OFFSET_BASE = 48 - 1;
+ function getDecoder(decodeTree) {
+ return function decodeHTMLBinary(str, strict) {
+ var ret = "";
+ var lastIdx = 0;
+ var strIdx = 0;
+ while ((strIdx = str.indexOf("&", strIdx)) >= 0) {
+ ret += str.slice(lastIdx, strIdx);
+ lastIdx = strIdx;
+ strIdx += 1;
+ if (str.charCodeAt(strIdx) === 35) {
+ var start = strIdx + 1;
+ var base = 10;
+ var cp = str.charCodeAt(start);
+ if ((cp | 32) === 120) {
+ base = 16;
+ strIdx += 1;
+ start += 1;
+ }
+ while ((cp = str.charCodeAt(++strIdx)) >= 48 && cp <= 57 || base === 16 && (cp | 32) >= 97 && (cp | 32) <= 102)
+ ;
+ if (start !== strIdx) {
+ var entity = str.substring(start, strIdx);
+ var parsed = parseInt(entity, base);
+ if (str.charCodeAt(strIdx) === 59) {
+ strIdx += 1;
+ } else if (strict) {
+ continue;
+ }
+ ret += decode_codepoint_1.default(parsed);
+ lastIdx = strIdx;
+ }
+ continue;
+ }
+ var result = null;
+ var excess = 1;
+ var treeIdx = 0;
+ var current = decodeTree[treeIdx];
+ for (; strIdx < str.length; strIdx++, excess++) {
+ treeIdx = determineBranch(decodeTree, current, treeIdx + 1, str.charCodeAt(strIdx));
+ if (treeIdx < 0)
+ break;
+ current = decodeTree[treeIdx];
+ if (current & BinTrieFlags.HAS_VALUE) {
+ if (strict && str.charCodeAt(strIdx) !== 59) {
+ treeIdx += 1;
+ } else {
+ result = current & BinTrieFlags.MULTI_BYTE ? String.fromCharCode(decodeTree[++treeIdx], decodeTree[++treeIdx]) : String.fromCharCode(decodeTree[++treeIdx]);
+ excess = 0;
+ }
+ }
+ }
+ if (result != null) {
+ ret += result;
+ lastIdx = strIdx - excess + 1;
+ }
+ }
+ return ret + str.slice(lastIdx);
+ };
+ }
+ function determineBranch(decodeTree, current, nodeIdx, char) {
+ if (current <= 128) {
+ return char === current ? nodeIdx : -1;
+ }
+ var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 8;
+ if (branchCount === 0) {
+ return -1;
+ }
+ if (branchCount === 1) {
+ return char === decodeTree[nodeIdx] ? nodeIdx + 1 : -1;
+ }
+ var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
+ if (jumpOffset) {
+ var value = char - exports.JUMP_OFFSET_BASE - jumpOffset;
+ return value < 0 || value > branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
+ }
+ var lo = nodeIdx;
+ var hi = lo + branchCount - 1;
+ while (lo <= hi) {
+ var mid = lo + hi >>> 1;
+ var midVal = decodeTree[mid];
+ if (midVal < char) {
+ lo = mid + 1;
+ } else if (midVal > char) {
+ hi = mid - 1;
+ } else {
+ return decodeTree[mid + branchCount];
+ }
+ }
+ return -1;
+ }
+ exports.determineBranch = determineBranch;
+ var htmlDecoder = getDecoder(decode_data_html_1.default);
+ var xmlDecoder = getDecoder(decode_data_xml_1.default);
+ function decodeHTML(str) {
+ return htmlDecoder(str, false);
+ }
+ exports.decodeHTML = decodeHTML;
+ function decodeHTMLStrict(str) {
+ return htmlDecoder(str, true);
+ }
+ exports.decodeHTMLStrict = decodeHTMLStrict;
+ function decodeXML(str) {
+ return xmlDecoder(str, true);
+ }
+ exports.decodeXML = decodeXML;
+ }
+});
+
+// node_modules/linkedom/node_modules/htmlparser2/lib/Tokenizer.js
+var require_Tokenizer2 = __commonJS({
+ "node_modules/linkedom/node_modules/htmlparser2/lib/Tokenizer.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var decode_codepoint_1 = __importDefault(require_decode_codepoint2());
+ var decode_1 = require_decode3();
+ function isWhitespace(c) {
+ return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;
+ }
+ function isEndOfTagSection(c) {
+ return c === 47 || c === 62 || isWhitespace(c);
+ }
+ function isNumber(c) {
+ return c >= 48 && c <= 57;
+ }
+ function isASCIIAlpha(c) {
+ return c >= 97 && c <= 122 || c >= 65 && c <= 90;
+ }
+ var Sequences = {
+ Cdata: new Uint16Array([67, 68, 65, 84, 65, 91]),
+ CdataEnd: new Uint16Array([93, 93, 62]),
+ CommentEnd: new Uint16Array([45, 45, 62]),
+ ScriptEnd: new Uint16Array([
+ 60,
+ 47,
+ 115,
+ 99,
+ 114,
+ 105,
+ 112,
+ 116
+ ]),
+ StyleEnd: new Uint16Array([60, 47, 115, 116, 121, 108, 101]),
+ TitleEnd: new Uint16Array([60, 47, 116, 105, 116, 108, 101])
+ };
+ var Tokenizer = function() {
+ function Tokenizer2(_a, cbs) {
+ var _b = _a.xmlMode, xmlMode = _b === void 0 ? false : _b, _c = _a.decodeEntities, decodeEntities = _c === void 0 ? true : _c;
+ this.cbs = cbs;
+ this._state = 1;
+ this.buffer = "";
+ this.sectionStart = 0;
+ this._index = 0;
+ this.bufferOffset = 0;
+ this.baseState = 1;
+ this.isSpecial = false;
+ this.running = true;
+ this.ended = false;
+ this.sequenceIndex = 0;
+ this.trieIndex = 0;
+ this.trieCurrent = 0;
+ this.trieResult = null;
+ this.entityExcess = 0;
+ this.xmlMode = xmlMode;
+ this.decodeEntities = decodeEntities;
+ this.entityTrie = xmlMode ? decode_1.xmlDecodeTree : decode_1.htmlDecodeTree;
+ }
+ Tokenizer2.prototype.reset = function() {
+ this._state = 1;
+ this.buffer = "";
+ this.sectionStart = 0;
+ this._index = 0;
+ this.bufferOffset = 0;
+ this.baseState = 1;
+ this.currentSequence = void 0;
+ this.running = true;
+ this.ended = false;
+ };
+ Tokenizer2.prototype.write = function(chunk) {
+ if (this.ended)
+ return this.cbs.onerror(Error(".write() after done!"));
+ this.buffer += chunk;
+ this.parse();
+ };
+ Tokenizer2.prototype.end = function(chunk) {
+ if (this.ended)
+ return this.cbs.onerror(Error(".end() after done!"));
+ if (chunk)
+ this.write(chunk);
+ this.ended = true;
+ if (this.running)
+ this.finish();
+ };
+ Tokenizer2.prototype.pause = function() {
+ this.running = false;
+ };
+ Tokenizer2.prototype.resume = function() {
+ this.running = true;
+ if (this._index < this.buffer.length) {
+ this.parse();
+ }
+ if (this.ended) {
+ this.finish();
+ }
+ };
+ Tokenizer2.prototype.getAbsoluteSectionStart = function() {
+ return this.sectionStart + this.bufferOffset;
+ };
+ Tokenizer2.prototype.getAbsoluteIndex = function() {
+ return this.bufferOffset + this._index;
+ };
+ Tokenizer2.prototype.stateText = function(c) {
+ if (c === 60 || !this.decodeEntities && this.fastForwardTo(60)) {
+ if (this._index > this.sectionStart) {
+ this.cbs.ontext(this.getSection());
+ }
+ this._state = 2;
+ this.sectionStart = this._index;
+ } else if (this.decodeEntities && c === 38) {
+ this._state = 25;
+ }
+ };
+ Tokenizer2.prototype.stateSpecialStartSequence = function(c) {
+ var isEnd = this.sequenceIndex === this.currentSequence.length;
+ var isMatch = isEnd ? isEndOfTagSection(c) : (c | 32) === this.currentSequence[this.sequenceIndex];
+ if (!isMatch) {
+ this.isSpecial = false;
+ } else if (!isEnd) {
+ this.sequenceIndex++;
+ return;
+ }
+ this.sequenceIndex = 0;
+ this._state = 3;
+ this.stateInTagName(c);
+ };
+ Tokenizer2.prototype.stateInSpecialTag = function(c) {
+ if (this.sequenceIndex === this.currentSequence.length) {
+ if (c === 62 || isWhitespace(c)) {
+ var endOfText = this._index - this.currentSequence.length;
+ if (this.sectionStart < endOfText) {
+ var actualIndex = this._index;
+ this._index = endOfText;
+ this.cbs.ontext(this.getSection());
+ this._index = actualIndex;
+ }
+ this.isSpecial = false;
+ this.sectionStart = endOfText + 2;
+ this.stateInClosingTagName(c);
+ return;
+ }
+ this.sequenceIndex = 0;
+ }
+ if ((c | 32) === this.currentSequence[this.sequenceIndex]) {
+ this.sequenceIndex += 1;
+ } else if (this.sequenceIndex === 0) {
+ if (this.currentSequence === Sequences.TitleEnd) {
+ if (this.decodeEntities && c === 38) {
+ this._state = 25;
+ }
+ } else if (this.fastForwardTo(60)) {
+ this.sequenceIndex = 1;
+ }
+ } else {
+ this.sequenceIndex = Number(c === 60);
+ }
+ };
+ Tokenizer2.prototype.stateCDATASequence = function(c) {
+ if (c === Sequences.Cdata[this.sequenceIndex]) {
+ if (++this.sequenceIndex === Sequences.Cdata.length) {
+ this._state = 21;
+ this.currentSequence = Sequences.CdataEnd;
+ this.sequenceIndex = 0;
+ this.sectionStart = this._index + 1;
+ }
+ } else {
+ this.sequenceIndex = 0;
+ this._state = 16;
+ this.stateInDeclaration(c);
+ }
+ };
+ Tokenizer2.prototype.fastForwardTo = function(c) {
+ while (++this._index < this.buffer.length) {
+ if (this.buffer.charCodeAt(this._index) === c) {
+ return true;
+ }
+ }
+ this._index = this.buffer.length - 1;
+ return false;
+ };
+ Tokenizer2.prototype.stateInCommentLike = function(c) {
+ if (c === this.currentSequence[this.sequenceIndex]) {
+ if (++this.sequenceIndex === this.currentSequence.length) {
+ var section = this.buffer.slice(this.sectionStart, this._index - 2);
+ if (this.currentSequence === Sequences.CdataEnd) {
+ this.cbs.oncdata(section);
+ } else {
+ this.cbs.oncomment(section);
+ }
+ this.sequenceIndex = 0;
+ this.sectionStart = this._index + 1;
+ this._state = 1;
+ }
+ } else if (this.sequenceIndex === 0) {
+ if (this.fastForwardTo(this.currentSequence[0])) {
+ this.sequenceIndex = 1;
+ }
+ } else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
+ this.sequenceIndex = 0;
+ }
+ };
+ Tokenizer2.prototype.isTagStartChar = function(c) {
+ return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
+ };
+ Tokenizer2.prototype.startSpecial = function(sequence, offset) {
+ this.isSpecial = true;
+ this.currentSequence = sequence;
+ this.sequenceIndex = offset;
+ this._state = 23;
+ };
+ Tokenizer2.prototype.stateBeforeTagName = function(c) {
+ if (c === 33) {
+ this._state = 15;
+ this.sectionStart = this._index + 1;
+ } else if (c === 63) {
+ this._state = 17;
+ this.sectionStart = this._index + 1;
+ } else if (this.isTagStartChar(c)) {
+ var lower2 = c | 32;
+ this.sectionStart = this._index;
+ if (!this.xmlMode && lower2 === Sequences.TitleEnd[2]) {
+ this.startSpecial(Sequences.TitleEnd, 3);
+ } else {
+ this._state = !this.xmlMode && lower2 === Sequences.ScriptEnd[2] ? 22 : 3;
+ }
+ } else if (c === 47) {
+ this._state = 5;
+ } else {
+ this._state = 1;
+ this.stateText(c);
+ }
+ };
+ Tokenizer2.prototype.stateInTagName = function(c) {
+ if (isEndOfTagSection(c)) {
+ this.cbs.onopentagname(this.getSection());
+ this.sectionStart = -1;
+ this._state = 8;
+ this.stateBeforeAttributeName(c);
+ }
+ };
+ Tokenizer2.prototype.stateBeforeClosingTagName = function(c) {
+ if (isWhitespace(c)) {
+ } else if (c === 62) {
+ this._state = 1;
+ } else {
+ this._state = this.isTagStartChar(c) ? 6 : 20;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInClosingTagName = function(c) {
+ if (c === 62 || isWhitespace(c)) {
+ this.cbs.onclosetag(this.getSection());
+ this.sectionStart = -1;
+ this._state = 7;
+ this.stateAfterClosingTagName(c);
+ }
+ };
+ Tokenizer2.prototype.stateAfterClosingTagName = function(c) {
+ if (c === 62 || this.fastForwardTo(62)) {
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeAttributeName = function(c) {
+ if (c === 62) {
+ this.cbs.onopentagend();
+ if (this.isSpecial) {
+ this._state = 24;
+ this.sequenceIndex = 0;
+ } else {
+ this._state = 1;
+ }
+ this.baseState = this._state;
+ this.sectionStart = this._index + 1;
+ } else if (c === 47) {
+ this._state = 4;
+ } else if (!isWhitespace(c)) {
+ this._state = 9;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateInSelfClosingTag = function(c) {
+ if (c === 62) {
+ this.cbs.onselfclosingtag();
+ this._state = 1;
+ this.baseState = 1;
+ this.sectionStart = this._index + 1;
+ this.isSpecial = false;
+ } else if (!isWhitespace(c)) {
+ this._state = 8;
+ this.stateBeforeAttributeName(c);
+ }
+ };
+ Tokenizer2.prototype.stateInAttributeName = function(c) {
+ if (c === 61 || isEndOfTagSection(c)) {
+ this.cbs.onattribname(this.getSection());
+ this.sectionStart = -1;
+ this._state = 10;
+ this.stateAfterAttributeName(c);
+ }
+ };
+ Tokenizer2.prototype.stateAfterAttributeName = function(c) {
+ if (c === 61) {
+ this._state = 11;
+ } else if (c === 47 || c === 62) {
+ this.cbs.onattribend(void 0);
+ this._state = 8;
+ this.stateBeforeAttributeName(c);
+ } else if (!isWhitespace(c)) {
+ this.cbs.onattribend(void 0);
+ this._state = 9;
+ this.sectionStart = this._index;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeAttributeValue = function(c) {
+ if (c === 34) {
+ this._state = 12;
+ this.sectionStart = this._index + 1;
+ } else if (c === 39) {
+ this._state = 13;
+ this.sectionStart = this._index + 1;
+ } else if (!isWhitespace(c)) {
+ this.sectionStart = this._index;
+ this._state = 14;
+ this.stateInAttributeValueNoQuotes(c);
+ }
+ };
+ Tokenizer2.prototype.handleInAttributeValue = function(c, quote) {
+ if (c === quote || !this.decodeEntities && this.fastForwardTo(quote)) {
+ this.cbs.onattribdata(this.getSection());
+ this.sectionStart = -1;
+ this.cbs.onattribend(String.fromCharCode(quote));
+ this._state = 8;
+ } else if (this.decodeEntities && c === 38) {
+ this.baseState = this._state;
+ this._state = 25;
+ }
+ };
+ Tokenizer2.prototype.stateInAttributeValueDoubleQuotes = function(c) {
+ this.handleInAttributeValue(c, 34);
+ };
+ Tokenizer2.prototype.stateInAttributeValueSingleQuotes = function(c) {
+ this.handleInAttributeValue(c, 39);
+ };
+ Tokenizer2.prototype.stateInAttributeValueNoQuotes = function(c) {
+ if (isWhitespace(c) || c === 62) {
+ this.cbs.onattribdata(this.getSection());
+ this.sectionStart = -1;
+ this.cbs.onattribend(null);
+ this._state = 8;
+ this.stateBeforeAttributeName(c);
+ } else if (this.decodeEntities && c === 38) {
+ this.baseState = this._state;
+ this._state = 25;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeDeclaration = function(c) {
+ if (c === 91) {
+ this._state = 19;
+ this.sequenceIndex = 0;
+ } else {
+ this._state = c === 45 ? 18 : 16;
+ }
+ };
+ Tokenizer2.prototype.stateInDeclaration = function(c) {
+ if (c === 62 || this.fastForwardTo(62)) {
+ this.cbs.ondeclaration(this.getSection());
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateInProcessingInstruction = function(c) {
+ if (c === 62 || this.fastForwardTo(62)) {
+ this.cbs.onprocessinginstruction(this.getSection());
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeComment = function(c) {
+ if (c === 45) {
+ this._state = 21;
+ this.currentSequence = Sequences.CommentEnd;
+ this.sequenceIndex = 2;
+ this.sectionStart = this._index + 1;
+ } else {
+ this._state = 16;
+ }
+ };
+ Tokenizer2.prototype.stateInSpecialComment = function(c) {
+ if (c === 62 || this.fastForwardTo(62)) {
+ this.cbs.oncomment(this.getSection());
+ this._state = 1;
+ this.sectionStart = this._index + 1;
+ }
+ };
+ Tokenizer2.prototype.stateBeforeSpecialS = function(c) {
+ var lower2 = c | 32;
+ if (lower2 === Sequences.ScriptEnd[3]) {
+ this.startSpecial(Sequences.ScriptEnd, 4);
+ } else if (lower2 === Sequences.StyleEnd[3]) {
+ this.startSpecial(Sequences.StyleEnd, 4);
+ } else {
+ this._state = 3;
+ this.stateInTagName(c);
+ }
+ };
+ Tokenizer2.prototype.stateBeforeEntity = function(c) {
+ this.entityExcess = 1;
+ if (c === 35) {
+ this._state = 26;
+ } else if (c === 38) {
+ } else {
+ this.trieIndex = 0;
+ this.trieCurrent = this.entityTrie[0];
+ this.trieResult = null;
+ this._state = 27;
+ this.stateInNamedEntity(c);
+ }
+ };
+ Tokenizer2.prototype.stateInNamedEntity = function(c) {
+ this.entityExcess += 1;
+ this.trieIndex = (0, decode_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);
+ if (this.trieIndex < 0) {
+ this.emitNamedEntity();
+ this._index--;
+ return;
+ }
+ this.trieCurrent = this.entityTrie[this.trieIndex];
+ if (this.trieCurrent & decode_1.BinTrieFlags.HAS_VALUE) {
+ if (!this.allowLegacyEntity() && c !== 59) {
+ this.trieIndex += 1;
+ } else {
+ var entityStart = this._index - this.entityExcess + 1;
+ if (entityStart > this.sectionStart) {
+ this.emitPartial(this.buffer.substring(this.sectionStart, entityStart));
+ }
+ this.trieResult = this.trieCurrent & decode_1.BinTrieFlags.MULTI_BYTE ? String.fromCharCode(this.entityTrie[++this.trieIndex], this.entityTrie[++this.trieIndex]) : String.fromCharCode(this.entityTrie[++this.trieIndex]);
+ this.entityExcess = 0;
+ this.sectionStart = this._index + 1;
+ }
+ }
+ };
+ Tokenizer2.prototype.emitNamedEntity = function() {
+ if (this.trieResult) {
+ this.emitPartial(this.trieResult);
+ }
+ this._state = this.baseState;
+ };
+ Tokenizer2.prototype.stateBeforeNumericEntity = function(c) {
+ if ((c | 32) === 120) {
+ this.entityExcess++;
+ this._state = 29;
+ } else {
+ this._state = 28;
+ this.stateInNumericEntity(c);
+ }
+ };
+ Tokenizer2.prototype.decodeNumericEntity = function(base, strict) {
+ var entityStart = this._index - this.entityExcess - 1;
+ var numberStart = entityStart + 2 + (base >> 4);
+ if (numberStart !== this._index) {
+ if (entityStart > this.sectionStart) {
+ this.emitPartial(this.buffer.substring(this.sectionStart, entityStart));
+ }
+ var entity = this.buffer.substring(numberStart, this._index);
+ var parsed = parseInt(entity, base);
+ this.emitPartial((0, decode_codepoint_1.default)(parsed));
+ this.sectionStart = this._index + Number(strict);
+ }
+ this._state = this.baseState;
+ };
+ Tokenizer2.prototype.stateInNumericEntity = function(c) {
+ if (c === 59) {
+ this.decodeNumericEntity(10, true);
+ } else if (!isNumber(c)) {
+ if (this.allowLegacyEntity()) {
+ this.decodeNumericEntity(10, false);
+ } else {
+ this._state = this.baseState;
+ }
+ this._index--;
+ } else {
+ this.entityExcess++;
+ }
+ };
+ Tokenizer2.prototype.stateInHexEntity = function(c) {
+ if (c === 59) {
+ this.decodeNumericEntity(16, true);
+ } else if ((c < 97 || c > 102) && (c < 65 || c > 70) && !isNumber(c)) {
+ if (this.allowLegacyEntity()) {
+ this.decodeNumericEntity(16, false);
+ } else {
+ this._state = this.baseState;
+ }
+ this._index--;
+ } else {
+ this.entityExcess++;
+ }
+ };
+ Tokenizer2.prototype.allowLegacyEntity = function() {
+ return !this.xmlMode && (this.baseState === 1 || this.baseState === 24);
+ };
+ Tokenizer2.prototype.cleanup = function() {
+ if (this.running && this.sectionStart !== this._index && (this._state === 1 || this._state === 24 && this.sequenceIndex === 0)) {
+ this.cbs.ontext(this.buffer.substr(this.sectionStart));
+ this.sectionStart = this._index;
+ }
+ var start = this.sectionStart < 0 ? this._index : this.sectionStart;
+ this.buffer = start === this.buffer.length ? "" : this.buffer.substr(start);
+ this._index -= start;
+ this.bufferOffset += start;
+ if (this.sectionStart > 0) {
+ this.sectionStart = 0;
+ }
+ };
+ Tokenizer2.prototype.shouldContinue = function() {
+ return this._index < this.buffer.length && this.running;
+ };
+ Tokenizer2.prototype.parse = function() {
+ while (this.shouldContinue()) {
+ var c = this.buffer.charCodeAt(this._index);
+ if (this._state === 1) {
+ this.stateText(c);
+ } else if (this._state === 23) {
+ this.stateSpecialStartSequence(c);
+ } else if (this._state === 24) {
+ this.stateInSpecialTag(c);
+ } else if (this._state === 19) {
+ this.stateCDATASequence(c);
+ } else if (this._state === 12) {
+ this.stateInAttributeValueDoubleQuotes(c);
+ } else if (this._state === 9) {
+ this.stateInAttributeName(c);
+ } else if (this._state === 21) {
+ this.stateInCommentLike(c);
+ } else if (this._state === 20) {
+ this.stateInSpecialComment(c);
+ } else if (this._state === 8) {
+ this.stateBeforeAttributeName(c);
+ } else if (this._state === 3) {
+ this.stateInTagName(c);
+ } else if (this._state === 6) {
+ this.stateInClosingTagName(c);
+ } else if (this._state === 2) {
+ this.stateBeforeTagName(c);
+ } else if (this._state === 10) {
+ this.stateAfterAttributeName(c);
+ } else if (this._state === 13) {
+ this.stateInAttributeValueSingleQuotes(c);
+ } else if (this._state === 11) {
+ this.stateBeforeAttributeValue(c);
+ } else if (this._state === 5) {
+ this.stateBeforeClosingTagName(c);
+ } else if (this._state === 7) {
+ this.stateAfterClosingTagName(c);
+ } else if (this._state === 22) {
+ this.stateBeforeSpecialS(c);
+ } else if (this._state === 14) {
+ this.stateInAttributeValueNoQuotes(c);
+ } else if (this._state === 4) {
+ this.stateInSelfClosingTag(c);
+ } else if (this._state === 16) {
+ this.stateInDeclaration(c);
+ } else if (this._state === 15) {
+ this.stateBeforeDeclaration(c);
+ } else if (this._state === 18) {
+ this.stateBeforeComment(c);
+ } else if (this._state === 17) {
+ this.stateInProcessingInstruction(c);
+ } else if (this._state === 27) {
+ this.stateInNamedEntity(c);
+ } else if (this._state === 25) {
+ this.stateBeforeEntity(c);
+ } else if (this._state === 29) {
+ this.stateInHexEntity(c);
+ } else if (this._state === 28) {
+ this.stateInNumericEntity(c);
+ } else {
+ this.stateBeforeNumericEntity(c);
+ }
+ this._index++;
+ }
+ this.cleanup();
+ };
+ Tokenizer2.prototype.finish = function() {
+ if (this._state === 27) {
+ this.emitNamedEntity();
+ }
+ if (this.sectionStart < this._index) {
+ this.handleTrailingData();
+ }
+ this.cbs.onend();
+ };
+ Tokenizer2.prototype.handleTrailingData = function() {
+ var data = this.buffer.substr(this.sectionStart);
+ if (this._state === 21) {
+ if (this.currentSequence === Sequences.CdataEnd) {
+ this.cbs.oncdata(data);
+ } else {
+ this.cbs.oncomment(data);
+ }
+ } else if (this._state === 28 && this.allowLegacyEntity()) {
+ this.decodeNumericEntity(10, false);
+ } else if (this._state === 29 && this.allowLegacyEntity()) {
+ this.decodeNumericEntity(16, false);
+ } else if (this._state === 3 || this._state === 8 || this._state === 11 || this._state === 10 || this._state === 9 || this._state === 13 || this._state === 12 || this._state === 14 || this._state === 6) {
+ } else {
+ this.cbs.ontext(data);
+ }
+ };
+ Tokenizer2.prototype.getSection = function() {
+ return this.buffer.substring(this.sectionStart, this._index);
+ };
+ Tokenizer2.prototype.emitPartial = function(value) {
+ if (this.baseState !== 1 && this.baseState !== 24) {
+ this.cbs.onattribdata(value);
+ } else {
+ this.cbs.ontext(value);
+ }
+ };
+ return Tokenizer2;
+ }();
+ exports.default = Tokenizer;
+ }
+});
+
+// node_modules/linkedom/node_modules/htmlparser2/lib/Parser.js
+var require_Parser2 = __commonJS({
+ "node_modules/linkedom/node_modules/htmlparser2/lib/Parser.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Parser = void 0;
+ var Tokenizer_1 = __importDefault(require_Tokenizer2());
+ var formTags = /* @__PURE__ */ new Set([
+ "input",
+ "option",
+ "optgroup",
+ "select",
+ "button",
+ "datalist",
+ "textarea"
+ ]);
+ var pTag = /* @__PURE__ */ new Set(["p"]);
+ var tableSectionTags = /* @__PURE__ */ new Set(["thead", "tbody"]);
+ var ddtTags = /* @__PURE__ */ new Set(["dd", "dt"]);
+ var rtpTags = /* @__PURE__ */ new Set(["rt", "rp"]);
+ var openImpliesClose = /* @__PURE__ */ new Map([
+ ["tr", /* @__PURE__ */ new Set(["tr", "th", "td"])],
+ ["th", /* @__PURE__ */ new Set(["th"])],
+ ["td", /* @__PURE__ */ new Set(["thead", "th", "td"])],
+ ["body", /* @__PURE__ */ new Set(["head", "link", "script"])],
+ ["li", /* @__PURE__ */ new Set(["li"])],
+ ["p", pTag],
+ ["h1", pTag],
+ ["h2", pTag],
+ ["h3", pTag],
+ ["h4", pTag],
+ ["h5", pTag],
+ ["h6", pTag],
+ ["select", formTags],
+ ["input", formTags],
+ ["output", formTags],
+ ["button", formTags],
+ ["datalist", formTags],
+ ["textarea", formTags],
+ ["option", /* @__PURE__ */ new Set(["option"])],
+ ["optgroup", /* @__PURE__ */ new Set(["optgroup", "option"])],
+ ["dd", ddtTags],
+ ["dt", ddtTags],
+ ["address", pTag],
+ ["article", pTag],
+ ["aside", pTag],
+ ["blockquote", pTag],
+ ["details", pTag],
+ ["div", pTag],
+ ["dl", pTag],
+ ["fieldset", pTag],
+ ["figcaption", pTag],
+ ["figure", pTag],
+ ["footer", pTag],
+ ["form", pTag],
+ ["header", pTag],
+ ["hr", pTag],
+ ["main", pTag],
+ ["nav", pTag],
+ ["ol", pTag],
+ ["pre", pTag],
+ ["section", pTag],
+ ["table", pTag],
+ ["ul", pTag],
+ ["rt", rtpTags],
+ ["rp", rtpTags],
+ ["tbody", tableSectionTags],
+ ["tfoot", tableSectionTags]
+ ]);
+ var voidElements2 = /* @__PURE__ */ new Set([
+ "area",
+ "base",
+ "basefont",
+ "br",
+ "col",
+ "command",
+ "embed",
+ "frame",
+ "hr",
+ "img",
+ "input",
+ "isindex",
+ "keygen",
+ "link",
+ "meta",
+ "param",
+ "source",
+ "track",
+ "wbr"
+ ]);
+ var foreignContextElements = /* @__PURE__ */ new Set(["math", "svg"]);
+ var htmlIntegrationElements = /* @__PURE__ */ new Set([
+ "mi",
+ "mo",
+ "mn",
+ "ms",
+ "mtext",
+ "annotation-xml",
+ "foreignobject",
+ "desc",
+ "title"
+ ]);
+ var reNameEnd = /\s|\//;
+ var Parser2 = function() {
+ function Parser3(cbs, options) {
+ if (options === void 0) {
+ options = {};
+ }
+ var _a, _b, _c, _d, _e;
+ this.options = options;
+ this.startIndex = 0;
+ this.endIndex = 0;
+ this.openTagStart = 0;
+ this.tagname = "";
+ this.attribname = "";
+ this.attribvalue = "";
+ this.attribs = null;
+ this.stack = [];
+ this.foreignContext = [];
+ this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
+ this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;
+ this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;
+ this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);
+ (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);
+ }
+ Parser3.prototype.ontext = function(data) {
+ var _a, _b;
+ var idx = this.tokenizer.getAbsoluteIndex();
+ this.endIndex = idx - 1;
+ (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);
+ this.startIndex = idx;
+ };
+ Parser3.prototype.isVoidElement = function(name) {
+ return !this.options.xmlMode && voidElements2.has(name);
+ };
+ Parser3.prototype.onopentagname = function(name) {
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ this.emitOpenTag(name);
+ };
+ Parser3.prototype.emitOpenTag = function(name) {
+ var _a, _b, _c, _d;
+ this.openTagStart = this.startIndex;
+ this.tagname = name;
+ var impliesClose = !this.options.xmlMode && openImpliesClose.get(name);
+ if (impliesClose) {
+ while (this.stack.length > 0 && impliesClose.has(this.stack[this.stack.length - 1])) {
+ var el = this.stack.pop();
+ (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, el, true);
+ }
+ }
+ if (!this.isVoidElement(name)) {
+ this.stack.push(name);
+ if (foreignContextElements.has(name)) {
+ this.foreignContext.push(true);
+ } else if (htmlIntegrationElements.has(name)) {
+ this.foreignContext.push(false);
+ }
+ }
+ (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);
+ if (this.cbs.onopentag)
+ this.attribs = {};
+ };
+ Parser3.prototype.endOpenTag = function(isImplied) {
+ var _a, _b;
+ this.startIndex = this.openTagStart;
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.attribs) {
+ (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);
+ this.attribs = null;
+ }
+ if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
+ this.cbs.onclosetag(this.tagname, true);
+ }
+ this.tagname = "";
+ };
+ Parser3.prototype.onopentagend = function() {
+ this.endOpenTag(false);
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.onclosetag = function(name) {
+ var _a, _b, _c, _d, _e, _f;
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ if (foreignContextElements.has(name) || htmlIntegrationElements.has(name)) {
+ this.foreignContext.pop();
+ }
+ if (!this.isVoidElement(name)) {
+ var pos = this.stack.lastIndexOf(name);
+ if (pos !== -1) {
+ if (this.cbs.onclosetag) {
+ var count = this.stack.length - pos;
+ while (count--) {
+ this.cbs.onclosetag(this.stack.pop(), count !== 0);
+ }
+ } else
+ this.stack.length = pos;
+ } else if (!this.options.xmlMode && name === "p") {
+ this.emitOpenTag(name);
+ this.closeCurrentTag(true);
+ }
+ } else if (!this.options.xmlMode && name === "br") {
+ (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);
+ (_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, name, {}, true);
+ (_f = (_e = this.cbs).onclosetag) === null || _f === void 0 ? void 0 : _f.call(_e, name, false);
+ }
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.onselfclosingtag = function() {
+ if (this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1]) {
+ this.closeCurrentTag(false);
+ this.startIndex = this.endIndex + 1;
+ } else {
+ this.onopentagend();
+ }
+ };
+ Parser3.prototype.closeCurrentTag = function(isOpenImplied) {
+ var _a, _b;
+ var name = this.tagname;
+ this.endOpenTag(isOpenImplied);
+ if (this.stack[this.stack.length - 1] === name) {
+ (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);
+ this.stack.pop();
+ }
+ };
+ Parser3.prototype.onattribname = function(name) {
+ this.startIndex = this.tokenizer.getAbsoluteSectionStart();
+ if (this.lowerCaseAttributeNames) {
+ name = name.toLowerCase();
+ }
+ this.attribname = name;
+ };
+ Parser3.prototype.onattribdata = function(value) {
+ this.attribvalue += value;
+ };
+ Parser3.prototype.onattribend = function(quote) {
+ var _a, _b;
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);
+ if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
+ this.attribs[this.attribname] = this.attribvalue;
+ }
+ this.attribname = "";
+ this.attribvalue = "";
+ };
+ Parser3.prototype.getInstructionName = function(value) {
+ var idx = value.search(reNameEnd);
+ var name = idx < 0 ? value : value.substr(0, idx);
+ if (this.lowerCaseTagNames) {
+ name = name.toLowerCase();
+ }
+ return name;
+ };
+ Parser3.prototype.ondeclaration = function(value) {
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.cbs.onprocessinginstruction) {
+ var name_1 = this.getInstructionName(value);
+ this.cbs.onprocessinginstruction("!" + name_1, "!" + value);
+ }
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.onprocessinginstruction = function(value) {
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.cbs.onprocessinginstruction) {
+ var name_2 = this.getInstructionName(value);
+ this.cbs.onprocessinginstruction("?" + name_2, "?" + value);
+ }
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.oncomment = function(value) {
+ var _a, _b, _c, _d;
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);
+ (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.oncdata = function(value) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
+ this.endIndex = this.tokenizer.getAbsoluteIndex();
+ if (this.options.xmlMode || this.options.recognizeCDATA) {
+ (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
+ (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
+ (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
+ } else {
+ (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, "[CDATA[" + value + "]]");
+ (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
+ }
+ this.startIndex = this.endIndex + 1;
+ };
+ Parser3.prototype.onerror = function(err) {
+ var _a, _b;
+ (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);
+ };
+ Parser3.prototype.onend = function() {
+ var _a, _b;
+ if (this.cbs.onclosetag) {
+ this.endIndex = this.startIndex;
+ for (var i2 = this.stack.length; i2 > 0; this.cbs.onclosetag(this.stack[--i2], true))
+ ;
+ }
+ (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);
+ };
+ Parser3.prototype.reset = function() {
+ var _a, _b, _c, _d;
+ (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);
+ this.tokenizer.reset();
+ this.tagname = "";
+ this.attribname = "";
+ this.attribs = null;
+ this.stack = [];
+ this.startIndex = 0;
+ this.endIndex = 0;
+ (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);
+ };
+ Parser3.prototype.parseComplete = function(data) {
+ this.reset();
+ this.end(data);
+ };
+ Parser3.prototype.write = function(chunk) {
+ this.tokenizer.write(chunk);
+ };
+ Parser3.prototype.end = function(chunk) {
+ this.tokenizer.end(chunk);
+ };
+ Parser3.prototype.pause = function() {
+ this.tokenizer.pause();
+ };
+ Parser3.prototype.resume = function() {
+ this.tokenizer.resume();
+ };
+ Parser3.prototype.parseChunk = function(chunk) {
+ this.write(chunk);
+ };
+ Parser3.prototype.done = function(chunk) {
+ this.end(chunk);
+ };
+ return Parser3;
+ }();
+ exports.Parser = Parser2;
+ }
+});
+
+// node_modules/linkedom/node_modules/htmlparser2/lib/FeedHandler.js
+var require_FeedHandler2 = __commonJS({
+ "node_modules/linkedom/node_modules/htmlparser2/lib/FeedHandler.js"(exports) {
+ "use strict";
+ var __extends = exports && exports.__extends || function() {
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
+ d2.__proto__ = b2;
+ } || function(d2, b2) {
+ for (var p in b2)
+ if (Object.prototype.hasOwnProperty.call(b2, p))
+ d2[p] = b2[p];
+ };
+ return extendStatics(d, b);
+ };
+ return function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ }();
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.parseFeed = exports.FeedHandler = exports.getFeed = void 0;
+ var domhandler_1 = __importDefault(require_lib2());
+ var domutils_1 = require_lib5();
+ Object.defineProperty(exports, "getFeed", { enumerable: true, get: function() {
+ return domutils_1.getFeed;
+ } });
+ var Parser_1 = require_Parser2();
+ var FeedHandler = function(_super) {
+ __extends(FeedHandler2, _super);
+ function FeedHandler2(callback, options) {
+ var _this = this;
+ if (typeof callback === "object") {
+ callback = void 0;
+ options = callback;
+ }
+ _this = _super.call(this, callback, options) || this;
+ return _this;
+ }
+ FeedHandler2.prototype.onend = function() {
+ var feed = (0, domutils_1.getFeed)(this.dom);
+ if (feed) {
+ this.feed = feed;
+ this.handleCallback(null);
+ } else {
+ this.handleCallback(new Error("couldn't find root of feed"));
+ }
+ };
+ return FeedHandler2;
+ }(domhandler_1.default);
+ exports.FeedHandler = FeedHandler;
+ function parseFeed(feed, options) {
+ if (options === void 0) {
+ options = { xmlMode: true };
+ }
+ var handler4 = new domhandler_1.default(null, options);
+ new Parser_1.Parser(handler4, options).end(feed);
+ return (0, domutils_1.getFeed)(handler4.dom);
+ }
+ exports.parseFeed = parseFeed;
+ }
+});
+
+// node_modules/linkedom/node_modules/htmlparser2/lib/index.js
+var require_lib7 = __commonJS({
+ "node_modules/linkedom/node_modules/htmlparser2/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
+ for (var p in m2)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m2, p);
+ };
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;
+ var Parser_1 = require_Parser2();
+ Object.defineProperty(exports, "Parser", { enumerable: true, get: function() {
+ return Parser_1.Parser;
+ } });
+ var domhandler_1 = require_lib2();
+ Object.defineProperty(exports, "DomHandler", { enumerable: true, get: function() {
+ return domhandler_1.DomHandler;
+ } });
+ Object.defineProperty(exports, "DefaultHandler", { enumerable: true, get: function() {
+ return domhandler_1.DomHandler;
+ } });
+ function parseDocument(data, options) {
+ var handler4 = new domhandler_1.DomHandler(void 0, options);
+ new Parser_1.Parser(handler4, options).end(data);
+ return handler4.root;
+ }
+ exports.parseDocument = parseDocument;
+ function parseDOM(data, options) {
+ return parseDocument(data, options).children;
+ }
+ exports.parseDOM = parseDOM;
+ function createDomStream(cb, options, elementCb) {
+ var handler4 = new domhandler_1.DomHandler(cb, options, elementCb);
+ return new Parser_1.Parser(handler4, options);
+ }
+ exports.createDomStream = createDomStream;
+ var Tokenizer_1 = require_Tokenizer2();
+ Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function() {
+ return __importDefault(Tokenizer_1).default;
+ } });
+ var ElementType = __importStar(require_lib());
+ exports.ElementType = ElementType;
+ __exportStar(require_FeedHandler2(), exports);
+ exports.DomUtils = __importStar(require_lib5());
+ var FeedHandler_1 = require_FeedHandler2();
+ Object.defineProperty(exports, "RssHandler", { enumerable: true, get: function() {
+ return FeedHandler_1.FeedHandler;
+ } });
+ }
+});
+
+// node_modules/linkedom/commonjs/perf_hooks.cjs
+var require_perf_hooks = __commonJS({
+ "node_modules/linkedom/commonjs/perf_hooks.cjs"(exports) {
+ try {
+ const { performance: performance2 } = require("perf_hooks");
+ exports.performance = performance2;
+ } catch (fallback) {
+ exports.performance = { now() {
+ return +new Date();
+ } };
+ }
+ }
+});
+
+// node_modules/boolbase/index.js
+var require_boolbase = __commonJS({
+ "node_modules/boolbase/index.js"(exports, module2) {
+ module2.exports = {
+ trueFunc: function trueFunc() {
+ return true;
+ },
+ falseFunc: function falseFunc() {
+ return false;
+ }
+ };
+ }
+});
+
+// node_modules/css-what/lib/parse.js
+var require_parse = __commonJS({
+ "node_modules/css-what/lib/parse.js"(exports) {
+ "use strict";
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
+ if (pack || arguments.length === 2)
+ for (var i2 = 0, l = from.length, ar; i2 < l; i2++) {
+ if (ar || !(i2 in from)) {
+ if (!ar)
+ ar = Array.prototype.slice.call(from, 0, i2);
+ ar[i2] = from[i2];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.isTraversal = void 0;
+ var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;
+ var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi;
+ var actionTypes = /* @__PURE__ */ new Map([
+ ["~", "element"],
+ ["^", "start"],
+ ["$", "end"],
+ ["*", "any"],
+ ["!", "not"],
+ ["|", "hyphen"]
+ ]);
+ var Traversals = {
+ ">": "child",
+ "<": "parent",
+ "~": "sibling",
+ "+": "adjacent"
+ };
+ var attribSelectors = {
+ "#": ["id", "equals"],
+ ".": ["class", "element"]
+ };
+ var unpackPseudos = /* @__PURE__ */ new Set([
+ "has",
+ "not",
+ "matches",
+ "is",
+ "where",
+ "host",
+ "host-context"
+ ]);
+ var traversalNames = new Set(__spreadArray([
+ "descendant"
+ ], Object.keys(Traversals).map(function(k) {
+ return Traversals[k];
+ }), true));
+ var caseInsensitiveAttributes = /* @__PURE__ */ new Set([
+ "accept",
+ "accept-charset",
+ "align",
+ "alink",
+ "axis",
+ "bgcolor",
+ "charset",
+ "checked",
+ "clear",
+ "codetype",
+ "color",
+ "compact",
+ "declare",
+ "defer",
+ "dir",
+ "direction",
+ "disabled",
+ "enctype",
+ "face",
+ "frame",
+ "hreflang",
+ "http-equiv",
+ "lang",
+ "language",
+ "link",
+ "media",
+ "method",
+ "multiple",
+ "nohref",
+ "noresize",
+ "noshade",
+ "nowrap",
+ "readonly",
+ "rel",
+ "rev",
+ "rules",
+ "scope",
+ "scrolling",
+ "selected",
+ "shape",
+ "target",
+ "text",
+ "type",
+ "valign",
+ "valuetype",
+ "vlink"
+ ]);
+ function isTraversal(selector) {
+ return traversalNames.has(selector.type);
+ }
+ exports.isTraversal = isTraversal;
+ var stripQuotesFromPseudos = /* @__PURE__ */ new Set(["contains", "icontains"]);
+ var quotes = /* @__PURE__ */ new Set(['"', "'"]);
+ function funescape(_, escaped, escapedWhitespace) {
+ var high = parseInt(escaped, 16) - 65536;
+ return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
+ }
+ function unescapeCSS(str) {
+ return str.replace(reEscape, funescape);
+ }
+ function isWhitespace(c) {
+ return c === " " || c === "\n" || c === " " || c === "\f" || c === "\r";
+ }
+ function parse4(selector, options) {
+ var subselects = [];
+ var endIndex = parseSelector(subselects, "" + selector, options, 0);
+ if (endIndex < selector.length) {
+ throw new Error("Unmatched selector: " + selector.slice(endIndex));
+ }
+ return subselects;
+ }
+ exports.default = parse4;
+ function parseSelector(subselects, selector, options, selectorIndex) {
+ var _a, _b;
+ if (options === void 0) {
+ options = {};
+ }
+ var tokens = [];
+ var sawWS = false;
+ function getName2(offset) {
+ var match = selector.slice(selectorIndex + offset).match(reName);
+ if (!match) {
+ throw new Error("Expected name, found " + selector.slice(selectorIndex));
+ }
+ var name = match[0];
+ selectorIndex += offset + name.length;
+ return unescapeCSS(name);
+ }
+ function stripWhitespace(offset) {
+ while (isWhitespace(selector.charAt(selectorIndex + offset)))
+ offset++;
+ selectorIndex += offset;
+ }
+ function isEscaped(pos) {
+ var slashCount = 0;
+ while (selector.charAt(--pos) === "\\")
+ slashCount++;
+ return (slashCount & 1) === 1;
+ }
+ function ensureNotTraversal() {
+ if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {
+ throw new Error("Did not expect successive traversals.");
+ }
+ }
+ stripWhitespace(0);
+ while (selector !== "") {
+ var firstChar = selector.charAt(selectorIndex);
+ if (isWhitespace(firstChar)) {
+ sawWS = true;
+ stripWhitespace(1);
+ } else if (firstChar in Traversals) {
+ ensureNotTraversal();
+ tokens.push({ type: Traversals[firstChar] });
+ sawWS = false;
+ stripWhitespace(1);
+ } else if (firstChar === ",") {
+ if (tokens.length === 0) {
+ throw new Error("Empty sub-selector");
+ }
+ subselects.push(tokens);
+ tokens = [];
+ sawWS = false;
+ stripWhitespace(1);
+ } else if (selector.startsWith("/*", selectorIndex)) {
+ var endIndex = selector.indexOf("*/", selectorIndex + 2);
+ if (endIndex < 0) {
+ throw new Error("Comment was not terminated");
+ }
+ selectorIndex = endIndex + 2;
+ } else {
+ if (sawWS) {
+ ensureNotTraversal();
+ tokens.push({ type: "descendant" });
+ sawWS = false;
+ }
+ if (firstChar in attribSelectors) {
+ var _c = attribSelectors[firstChar], name_1 = _c[0], action = _c[1];
+ tokens.push({
+ type: "attribute",
+ name: name_1,
+ action,
+ value: getName2(1),
+ namespace: null,
+ ignoreCase: options.xmlMode ? null : false
+ });
+ } else if (firstChar === "[") {
+ stripWhitespace(1);
+ var namespace = null;
+ if (selector.charAt(selectorIndex) === "|") {
+ namespace = "";
+ selectorIndex += 1;
+ }
+ if (selector.startsWith("*|", selectorIndex)) {
+ namespace = "*";
+ selectorIndex += 2;
+ }
+ var name_2 = getName2(0);
+ if (namespace === null && selector.charAt(selectorIndex) === "|" && selector.charAt(selectorIndex + 1) !== "=") {
+ namespace = name_2;
+ name_2 = getName2(1);
+ }
+ if ((_a = options.lowerCaseAttributeNames) !== null && _a !== void 0 ? _a : !options.xmlMode) {
+ name_2 = name_2.toLowerCase();
+ }
+ stripWhitespace(0);
+ var action = "exists";
+ var possibleAction = actionTypes.get(selector.charAt(selectorIndex));
+ if (possibleAction) {
+ action = possibleAction;
+ if (selector.charAt(selectorIndex + 1) !== "=") {
+ throw new Error("Expected `=`");
+ }
+ stripWhitespace(2);
+ } else if (selector.charAt(selectorIndex) === "=") {
+ action = "equals";
+ stripWhitespace(1);
+ }
+ var value = "";
+ var ignoreCase2 = null;
+ if (action !== "exists") {
+ if (quotes.has(selector.charAt(selectorIndex))) {
+ var quote = selector.charAt(selectorIndex);
+ var sectionEnd = selectorIndex + 1;
+ while (sectionEnd < selector.length && (selector.charAt(sectionEnd) !== quote || isEscaped(sectionEnd))) {
+ sectionEnd += 1;
+ }
+ if (selector.charAt(sectionEnd) !== quote) {
+ throw new Error("Attribute value didn't end");
+ }
+ value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));
+ selectorIndex = sectionEnd + 1;
+ } else {
+ var valueStart = selectorIndex;
+ while (selectorIndex < selector.length && (!isWhitespace(selector.charAt(selectorIndex)) && selector.charAt(selectorIndex) !== "]" || isEscaped(selectorIndex))) {
+ selectorIndex += 1;
+ }
+ value = unescapeCSS(selector.slice(valueStart, selectorIndex));
+ }
+ stripWhitespace(0);
+ var forceIgnore = selector.charAt(selectorIndex);
+ if (forceIgnore === "s" || forceIgnore === "S") {
+ ignoreCase2 = false;
+ stripWhitespace(1);
+ } else if (forceIgnore === "i" || forceIgnore === "I") {
+ ignoreCase2 = true;
+ stripWhitespace(1);
+ }
+ }
+ if (!options.xmlMode) {
+ ignoreCase2 !== null && ignoreCase2 !== void 0 ? ignoreCase2 : ignoreCase2 = caseInsensitiveAttributes.has(name_2);
+ }
+ if (selector.charAt(selectorIndex) !== "]") {
+ throw new Error("Attribute selector didn't terminate");
+ }
+ selectorIndex += 1;
+ var attributeSelector = {
+ type: "attribute",
+ name: name_2,
+ action,
+ value,
+ namespace,
+ ignoreCase: ignoreCase2
+ };
+ tokens.push(attributeSelector);
+ } else if (firstChar === ":") {
+ if (selector.charAt(selectorIndex + 1) === ":") {
+ tokens.push({
+ type: "pseudo-element",
+ name: getName2(2).toLowerCase()
+ });
+ continue;
+ }
+ var name_3 = getName2(1).toLowerCase();
+ var data = null;
+ if (selector.charAt(selectorIndex) === "(") {
+ if (unpackPseudos.has(name_3)) {
+ if (quotes.has(selector.charAt(selectorIndex + 1))) {
+ throw new Error("Pseudo-selector " + name_3 + " cannot be quoted");
+ }
+ data = [];
+ selectorIndex = parseSelector(data, selector, options, selectorIndex + 1);
+ if (selector.charAt(selectorIndex) !== ")") {
+ throw new Error("Missing closing parenthesis in :" + name_3 + " (" + selector + ")");
+ }
+ selectorIndex += 1;
+ } else {
+ selectorIndex += 1;
+ var start = selectorIndex;
+ var counter = 1;
+ for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {
+ if (selector.charAt(selectorIndex) === "(" && !isEscaped(selectorIndex)) {
+ counter++;
+ } else if (selector.charAt(selectorIndex) === ")" && !isEscaped(selectorIndex)) {
+ counter--;
+ }
+ }
+ if (counter) {
+ throw new Error("Parenthesis not matched");
+ }
+ data = selector.slice(start, selectorIndex - 1);
+ if (stripQuotesFromPseudos.has(name_3)) {
+ var quot = data.charAt(0);
+ if (quot === data.slice(-1) && quotes.has(quot)) {
+ data = data.slice(1, -1);
+ }
+ data = unescapeCSS(data);
+ }
+ }
+ }
+ tokens.push({ type: "pseudo", name: name_3, data });
+ } else {
+ var namespace = null;
+ var name_4 = void 0;
+ if (firstChar === "*") {
+ selectorIndex += 1;
+ name_4 = "*";
+ } else if (reName.test(selector.slice(selectorIndex))) {
+ if (selector.charAt(selectorIndex) === "|") {
+ namespace = "";
+ selectorIndex += 1;
+ }
+ name_4 = getName2(0);
+ } else {
+ if (tokens.length && tokens[tokens.length - 1].type === "descendant") {
+ tokens.pop();
+ }
+ addToken(subselects, tokens);
+ return selectorIndex;
+ }
+ if (selector.charAt(selectorIndex) === "|") {
+ namespace = name_4;
+ if (selector.charAt(selectorIndex + 1) === "*") {
+ name_4 = "*";
+ selectorIndex += 2;
+ } else {
+ name_4 = getName2(1);
+ }
+ }
+ if (name_4 === "*") {
+ tokens.push({ type: "universal", namespace });
+ } else {
+ if ((_b = options.lowerCaseTags) !== null && _b !== void 0 ? _b : !options.xmlMode) {
+ name_4 = name_4.toLowerCase();
+ }
+ tokens.push({ type: "tag", name: name_4, namespace });
+ }
+ }
+ }
+ }
+ addToken(subselects, tokens);
+ return selectorIndex;
+ }
+ function addToken(subselects, tokens) {
+ if (subselects.length > 0 && tokens.length === 0) {
+ throw new Error("Empty sub-selector");
+ }
+ subselects.push(tokens);
+ }
+ }
+});
+
+// node_modules/css-what/lib/stringify.js
+var require_stringify2 = __commonJS({
+ "node_modules/css-what/lib/stringify.js"(exports) {
+ "use strict";
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
+ if (pack || arguments.length === 2)
+ for (var i2 = 0, l = from.length, ar; i2 < l; i2++) {
+ if (ar || !(i2 in from)) {
+ if (!ar)
+ ar = Array.prototype.slice.call(from, 0, i2);
+ ar[i2] = from[i2];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var actionTypes = {
+ equals: "",
+ element: "~",
+ start: "^",
+ end: "$",
+ any: "*",
+ not: "!",
+ hyphen: "|"
+ };
+ var charsToEscape = new Set(__spreadArray(__spreadArray([], Object.keys(actionTypes).map(function(typeKey) {
+ return actionTypes[typeKey];
+ }).filter(Boolean), true), [
+ ":",
+ "[",
+ "]",
+ " ",
+ "\\",
+ "(",
+ ")",
+ "'"
+ ], false));
+ function stringify(selector) {
+ return selector.map(stringifySubselector).join(", ");
+ }
+ exports.default = stringify;
+ function stringifySubselector(token) {
+ return token.map(stringifyToken).join("");
+ }
+ function stringifyToken(token) {
+ switch (token.type) {
+ case "child":
+ return " > ";
+ case "parent":
+ return " < ";
+ case "sibling":
+ return " ~ ";
+ case "adjacent":
+ return " + ";
+ case "descendant":
+ return " ";
+ case "universal":
+ return getNamespace(token.namespace) + "*";
+ case "tag":
+ return getNamespacedName(token);
+ case "pseudo-element":
+ return "::" + escapeName(token.name);
+ case "pseudo":
+ if (token.data === null)
+ return ":" + escapeName(token.name);
+ if (typeof token.data === "string") {
+ return ":" + escapeName(token.name) + "(" + escapeName(token.data) + ")";
+ }
+ return ":" + escapeName(token.name) + "(" + stringify(token.data) + ")";
+ case "attribute": {
+ if (token.name === "id" && token.action === "equals" && !token.ignoreCase && !token.namespace) {
+ return "#" + escapeName(token.value);
+ }
+ if (token.name === "class" && token.action === "element" && !token.ignoreCase && !token.namespace) {
+ return "." + escapeName(token.value);
+ }
+ var name_1 = getNamespacedName(token);
+ if (token.action === "exists") {
+ return "[" + name_1 + "]";
+ }
+ return "[" + name_1 + actionTypes[token.action] + "='" + escapeName(token.value) + "'" + (token.ignoreCase ? "i" : token.ignoreCase === false ? "s" : "") + "]";
+ }
+ }
+ }
+ function getNamespacedName(token) {
+ return "" + getNamespace(token.namespace) + escapeName(token.name);
+ }
+ function getNamespace(namespace) {
+ return namespace !== null ? (namespace === "*" ? "*" : escapeName(namespace)) + "|" : "";
+ }
+ function escapeName(str) {
+ return str.split("").map(function(c) {
+ return charsToEscape.has(c) ? "\\" + c : c;
+ }).join("");
+ }
+ }
+});
+
+// node_modules/css-what/lib/index.js
+var require_lib8 = __commonJS({
+ "node_modules/css-what/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __exportStar = exports && exports.__exportStar || function(m2, exports2) {
+ for (var p in m2)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
+ __createBinding(exports2, m2, p);
+ };
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.stringify = exports.parse = void 0;
+ __exportStar(require_parse(), exports);
+ var parse_1 = require_parse();
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
+ return __importDefault(parse_1).default;
+ } });
+ var stringify_1 = require_stringify2();
+ Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
+ return __importDefault(stringify_1).default;
+ } });
+ }
+});
+
+// node_modules/css-select/lib/procedure.js
+var require_procedure = __commonJS({
+ "node_modules/css-select/lib/procedure.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.isTraversal = exports.procedure = void 0;
+ exports.procedure = {
+ universal: 50,
+ tag: 30,
+ attribute: 1,
+ pseudo: 0,
+ "pseudo-element": 0,
+ descendant: -1,
+ child: -1,
+ parent: -1,
+ sibling: -1,
+ adjacent: -1,
+ _flexibleDescendant: -1
+ };
+ function isTraversal(t2) {
+ return exports.procedure[t2.type] < 0;
+ }
+ exports.isTraversal = isTraversal;
+ }
+});
+
+// node_modules/css-select/lib/sort.js
+var require_sort = __commonJS({
+ "node_modules/css-select/lib/sort.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ var procedure_1 = require_procedure();
+ var attributes = {
+ exists: 10,
+ equals: 8,
+ not: 7,
+ start: 6,
+ end: 6,
+ any: 5,
+ hyphen: 4,
+ element: 4
+ };
+ function sortByProcedure(arr) {
+ var procs = arr.map(getProcedure);
+ for (var i2 = 1; i2 < arr.length; i2++) {
+ var procNew = procs[i2];
+ if (procNew < 0)
+ continue;
+ for (var j = i2 - 1; j >= 0 && procNew < procs[j]; j--) {
+ var token = arr[j + 1];
+ arr[j + 1] = arr[j];
+ arr[j] = token;
+ procs[j + 1] = procs[j];
+ procs[j] = procNew;
+ }
+ }
+ }
+ exports.default = sortByProcedure;
+ function getProcedure(token) {
+ var proc = procedure_1.procedure[token.type];
+ if (token.type === "attribute") {
+ proc = attributes[token.action];
+ if (proc === attributes.equals && token.name === "id") {
+ proc = 9;
+ }
+ if (token.ignoreCase) {
+ proc >>= 1;
+ }
+ } else if (token.type === "pseudo") {
+ if (!token.data) {
+ proc = 3;
+ } else if (token.name === "has" || token.name === "contains") {
+ proc = 0;
+ } else if (Array.isArray(token.data)) {
+ proc = 0;
+ for (var i2 = 0; i2 < token.data.length; i2++) {
+ if (token.data[i2].length !== 1)
+ continue;
+ var cur = getProcedure(token.data[i2][0]);
+ if (cur === 0) {
+ proc = 0;
+ break;
+ }
+ if (cur > proc)
+ proc = cur;
+ }
+ if (token.data.length > 1 && proc > 0)
+ proc -= 1;
+ } else {
+ proc = 1;
+ }
+ }
+ return proc;
+ }
+ }
+});
+
+// node_modules/css-select/lib/attributes.js
+var require_attributes = __commonJS({
+ "node_modules/css-select/lib/attributes.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.attributeRules = void 0;
+ var boolbase_1 = require_boolbase();
+ var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g;
+ function escapeRegex(value) {
+ return value.replace(reChars, "\\$&");
+ }
+ exports.attributeRules = {
+ equals: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name;
+ var value = data.value;
+ if (data.ignoreCase) {
+ value = value.toLowerCase();
+ return function(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && attr.length === value.length && attr.toLowerCase() === value && next(elem);
+ };
+ }
+ return function(elem) {
+ return adapter2.getAttributeValue(elem, name) === value && next(elem);
+ };
+ },
+ hyphen: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = value.length;
+ if (data.ignoreCase) {
+ value = value.toLowerCase();
+ return function hyphenIC(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && (attr.length === len || attr.charAt(len) === "-") && attr.substr(0, len).toLowerCase() === value && next(elem);
+ };
+ }
+ return function hyphen(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && (attr.length === len || attr.charAt(len) === "-") && attr.substr(0, len) === value && next(elem);
+ };
+ },
+ element: function(next, _a, _b) {
+ var name = _a.name, value = _a.value, ignoreCase2 = _a.ignoreCase;
+ var adapter2 = _b.adapter;
+ if (/\s/.test(value)) {
+ return boolbase_1.falseFunc;
+ }
+ var regex = new RegExp("(?:^|\\s)".concat(escapeRegex(value), "(?:$|\\s)"), ignoreCase2 ? "i" : "");
+ return function element(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && attr.length >= value.length && regex.test(attr) && next(elem);
+ };
+ },
+ exists: function(next, _a, _b) {
+ var name = _a.name;
+ var adapter2 = _b.adapter;
+ return function(elem) {
+ return adapter2.hasAttrib(elem, name) && next(elem);
+ };
+ },
+ start: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = value.length;
+ if (len === 0) {
+ return boolbase_1.falseFunc;
+ }
+ if (data.ignoreCase) {
+ value = value.toLowerCase();
+ return function(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && attr.length >= len && attr.substr(0, len).toLowerCase() === value && next(elem);
+ };
+ }
+ return function(elem) {
+ var _a2;
+ return !!((_a2 = adapter2.getAttributeValue(elem, name)) === null || _a2 === void 0 ? void 0 : _a2.startsWith(value)) && next(elem);
+ };
+ },
+ end: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name;
+ var value = data.value;
+ var len = -value.length;
+ if (len === 0) {
+ return boolbase_1.falseFunc;
+ }
+ if (data.ignoreCase) {
+ value = value.toLowerCase();
+ return function(elem) {
+ var _a2;
+ return ((_a2 = adapter2.getAttributeValue(elem, name)) === null || _a2 === void 0 ? void 0 : _a2.substr(len).toLowerCase()) === value && next(elem);
+ };
+ }
+ return function(elem) {
+ var _a2;
+ return !!((_a2 = adapter2.getAttributeValue(elem, name)) === null || _a2 === void 0 ? void 0 : _a2.endsWith(value)) && next(elem);
+ };
+ },
+ any: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name, value = data.value;
+ if (value === "") {
+ return boolbase_1.falseFunc;
+ }
+ if (data.ignoreCase) {
+ var regex_1 = new RegExp(escapeRegex(value), "i");
+ return function anyIC(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return attr != null && attr.length >= value.length && regex_1.test(attr) && next(elem);
+ };
+ }
+ return function(elem) {
+ var _a2;
+ return !!((_a2 = adapter2.getAttributeValue(elem, name)) === null || _a2 === void 0 ? void 0 : _a2.includes(value)) && next(elem);
+ };
+ },
+ not: function(next, data, _a) {
+ var adapter2 = _a.adapter;
+ var name = data.name;
+ var value = data.value;
+ if (value === "") {
+ return function(elem) {
+ return !!adapter2.getAttributeValue(elem, name) && next(elem);
+ };
+ } else if (data.ignoreCase) {
+ value = value.toLowerCase();
+ return function(elem) {
+ var attr = adapter2.getAttributeValue(elem, name);
+ return (attr == null || attr.length !== value.length || attr.toLowerCase() !== value) && next(elem);
+ };
+ }
+ return function(elem) {
+ return adapter2.getAttributeValue(elem, name) !== value && next(elem);
+ };
+ }
+ };
+ }
+});
+
+// node_modules/nth-check/lib/parse.js
+var require_parse2 = __commonJS({
+ "node_modules/nth-check/lib/parse.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.parse = void 0;
+ var whitespace = /* @__PURE__ */ new Set([9, 10, 12, 13, 32]);
+ var ZERO = "0".charCodeAt(0);
+ var NINE = "9".charCodeAt(0);
+ function parse4(formula) {
+ formula = formula.trim().toLowerCase();
+ if (formula === "even") {
+ return [2, 0];
+ } else if (formula === "odd") {
+ return [2, 1];
+ }
+ var idx = 0;
+ var a = 0;
+ var sign = readSign();
+ var number = readNumber();
+ if (idx < formula.length && formula.charAt(idx) === "n") {
+ idx++;
+ a = sign * (number !== null && number !== void 0 ? number : 1);
+ skipWhitespace();
+ if (idx < formula.length) {
+ sign = readSign();
+ skipWhitespace();
+ number = readNumber();
+ } else {
+ sign = number = 0;
+ }
+ }
+ if (number === null || idx < formula.length) {
+ throw new Error("n-th rule couldn't be parsed ('" + formula + "')");
+ }
+ return [a, sign * number];
+ function readSign() {
+ if (formula.charAt(idx) === "-") {
+ idx++;
+ return -1;
+ }
+ if (formula.charAt(idx) === "+") {
+ idx++;
+ }
+ return 1;
+ }
+ function readNumber() {
+ var start = idx;
+ var value = 0;
+ while (idx < formula.length && formula.charCodeAt(idx) >= ZERO && formula.charCodeAt(idx) <= NINE) {
+ value = value * 10 + (formula.charCodeAt(idx) - ZERO);
+ idx++;
+ }
+ return idx === start ? null : value;
+ }
+ function skipWhitespace() {
+ while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) {
+ idx++;
+ }
+ }
+ }
+ exports.parse = parse4;
+ }
+});
+
+// node_modules/nth-check/lib/compile.js
+var require_compile = __commonJS({
+ "node_modules/nth-check/lib/compile.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.compile = void 0;
+ var boolbase_1 = require_boolbase();
+ function compile3(parsed) {
+ var a = parsed[0];
+ var b = parsed[1] - 1;
+ if (b < 0 && a <= 0)
+ return boolbase_1.falseFunc;
+ if (a === -1)
+ return function(index) {
+ return index <= b;
+ };
+ if (a === 0)
+ return function(index) {
+ return index === b;
+ };
+ if (a === 1)
+ return b < 0 ? boolbase_1.trueFunc : function(index) {
+ return index >= b;
+ };
+ var absA = Math.abs(a);
+ var bMod = (b % absA + absA) % absA;
+ return a > 1 ? function(index) {
+ return index >= b && index % absA === bMod;
+ } : function(index) {
+ return index <= b && index % absA === bMod;
+ };
+ }
+ exports.compile = compile3;
+ }
+});
+
+// node_modules/nth-check/lib/index.js
+var require_lib9 = __commonJS({
+ "node_modules/nth-check/lib/index.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.compile = exports.parse = void 0;
+ var parse_1 = require_parse2();
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function() {
+ return parse_1.parse;
+ } });
+ var compile_1 = require_compile();
+ Object.defineProperty(exports, "compile", { enumerable: true, get: function() {
+ return compile_1.compile;
+ } });
+ function nthCheck(formula) {
+ return (0, compile_1.compile)((0, parse_1.parse)(formula));
+ }
+ exports.default = nthCheck;
+ }
+});
+
+// node_modules/css-select/lib/pseudo-selectors/filters.js
+var require_filters = __commonJS({
+ "node_modules/css-select/lib/pseudo-selectors/filters.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.filters = void 0;
+ var nth_check_1 = __importDefault(require_lib9());
+ var boolbase_1 = require_boolbase();
+ function getChildFunc(next, adapter2) {
+ return function(elem) {
+ var parent = adapter2.getParent(elem);
+ return parent != null && adapter2.isTag(parent) && next(elem);
+ };
+ }
+ exports.filters = {
+ contains: function(next, text, _a) {
+ var adapter2 = _a.adapter;
+ return function contains(elem) {
+ return next(elem) && adapter2.getText(elem).includes(text);
+ };
+ },
+ icontains: function(next, text, _a) {
+ var adapter2 = _a.adapter;
+ var itext = text.toLowerCase();
+ return function icontains(elem) {
+ return next(elem) && adapter2.getText(elem).toLowerCase().includes(itext);
+ };
+ },
+ "nth-child": function(next, rule, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ if (func === boolbase_1.trueFunc)
+ return getChildFunc(next, adapter2);
+ return function nthChild(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ var pos = 0;
+ for (var i2 = 0; i2 < siblings.length; i2++) {
+ if (equals(elem, siblings[i2]))
+ break;
+ if (adapter2.isTag(siblings[i2])) {
+ pos++;
+ }
+ }
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-last-child": function(next, rule, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ if (func === boolbase_1.trueFunc)
+ return getChildFunc(next, adapter2);
+ return function nthLastChild(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ var pos = 0;
+ for (var i2 = siblings.length - 1; i2 >= 0; i2--) {
+ if (equals(elem, siblings[i2]))
+ break;
+ if (adapter2.isTag(siblings[i2])) {
+ pos++;
+ }
+ }
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-of-type": function(next, rule, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ if (func === boolbase_1.trueFunc)
+ return getChildFunc(next, adapter2);
+ return function nthOfType(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ var pos = 0;
+ for (var i2 = 0; i2 < siblings.length; i2++) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === adapter2.getName(elem)) {
+ pos++;
+ }
+ }
+ return func(pos) && next(elem);
+ };
+ },
+ "nth-last-of-type": function(next, rule, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var func = (0, nth_check_1.default)(rule);
+ if (func === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ if (func === boolbase_1.trueFunc)
+ return getChildFunc(next, adapter2);
+ return function nthLastOfType(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ var pos = 0;
+ for (var i2 = siblings.length - 1; i2 >= 0; i2--) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === adapter2.getName(elem)) {
+ pos++;
+ }
+ }
+ return func(pos) && next(elem);
+ };
+ },
+ root: function(next, _rule, _a) {
+ var adapter2 = _a.adapter;
+ return function(elem) {
+ var parent = adapter2.getParent(elem);
+ return (parent == null || !adapter2.isTag(parent)) && next(elem);
+ };
+ },
+ scope: function(next, rule, options, context) {
+ var equals = options.equals;
+ if (!context || context.length === 0) {
+ return exports.filters.root(next, rule, options);
+ }
+ if (context.length === 1) {
+ return function(elem) {
+ return equals(context[0], elem) && next(elem);
+ };
+ }
+ return function(elem) {
+ return context.includes(elem) && next(elem);
+ };
+ },
+ hover: dynamicStatePseudo("isHovered"),
+ visited: dynamicStatePseudo("isVisited"),
+ active: dynamicStatePseudo("isActive")
+ };
+ function dynamicStatePseudo(name) {
+ return function dynamicPseudo(next, _rule, _a) {
+ var adapter2 = _a.adapter;
+ var func = adapter2[name];
+ if (typeof func !== "function") {
+ return boolbase_1.falseFunc;
+ }
+ return function active(elem) {
+ return func(elem) && next(elem);
+ };
+ };
+ }
+ }
+});
+
+// node_modules/css-select/lib/pseudo-selectors/pseudos.js
+var require_pseudos = __commonJS({
+ "node_modules/css-select/lib/pseudo-selectors/pseudos.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.verifyPseudoArgs = exports.pseudos = void 0;
+ exports.pseudos = {
+ empty: function(elem, _a) {
+ var adapter2 = _a.adapter;
+ return !adapter2.getChildren(elem).some(function(elem2) {
+ return adapter2.isTag(elem2) || adapter2.getText(elem2) !== "";
+ });
+ },
+ "first-child": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var firstChild = adapter2.getSiblings(elem).find(function(elem2) {
+ return adapter2.isTag(elem2);
+ });
+ return firstChild != null && equals(elem, firstChild);
+ },
+ "last-child": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var siblings = adapter2.getSiblings(elem);
+ for (var i2 = siblings.length - 1; i2 >= 0; i2--) {
+ if (equals(elem, siblings[i2]))
+ return true;
+ if (adapter2.isTag(siblings[i2]))
+ break;
+ }
+ return false;
+ },
+ "first-of-type": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var siblings = adapter2.getSiblings(elem);
+ var elemName = adapter2.getName(elem);
+ for (var i2 = 0; i2 < siblings.length; i2++) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ return true;
+ if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === elemName) {
+ break;
+ }
+ }
+ return false;
+ },
+ "last-of-type": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var siblings = adapter2.getSiblings(elem);
+ var elemName = adapter2.getName(elem);
+ for (var i2 = siblings.length - 1; i2 >= 0; i2--) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ return true;
+ if (adapter2.isTag(currentSibling) && adapter2.getName(currentSibling) === elemName) {
+ break;
+ }
+ }
+ return false;
+ },
+ "only-of-type": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ var elemName = adapter2.getName(elem);
+ return adapter2.getSiblings(elem).every(function(sibling) {
+ return equals(elem, sibling) || !adapter2.isTag(sibling) || adapter2.getName(sibling) !== elemName;
+ });
+ },
+ "only-child": function(elem, _a) {
+ var adapter2 = _a.adapter, equals = _a.equals;
+ return adapter2.getSiblings(elem).every(function(sibling) {
+ return equals(elem, sibling) || !adapter2.isTag(sibling);
+ });
+ }
+ };
+ function verifyPseudoArgs(func, name, subselect) {
+ if (subselect === null) {
+ if (func.length > 2) {
+ throw new Error("pseudo-selector :".concat(name, " requires an argument"));
+ }
+ } else if (func.length === 2) {
+ throw new Error("pseudo-selector :".concat(name, " doesn't have any arguments"));
+ }
+ }
+ exports.verifyPseudoArgs = verifyPseudoArgs;
+ }
+});
+
+// node_modules/css-select/lib/pseudo-selectors/aliases.js
+var require_aliases = __commonJS({
+ "node_modules/css-select/lib/pseudo-selectors/aliases.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.aliases = void 0;
+ exports.aliases = {
+ "any-link": ":is(a, area, link)[href]",
+ link: ":any-link:not(:visited)",
+ disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",
+ enabled: ":not(:disabled)",
+ checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",
+ required: ":is(input, select, textarea)[required]",
+ optional: ":is(input, select, textarea):not([required])",
+ selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",
+ checkbox: "[type=checkbox]",
+ file: "[type=file]",
+ password: "[type=password]",
+ radio: "[type=radio]",
+ reset: "[type=reset]",
+ image: "[type=image]",
+ submit: "[type=submit]",
+ parent: ":not(:empty)",
+ header: ":is(h1, h2, h3, h4, h5, h6)",
+ button: ":is(button, input[type=button])",
+ input: ":is(input, textarea, select, button)",
+ text: "input:is(:not([type!='']), [type=text])"
+ };
+ }
+});
+
+// node_modules/css-select/lib/pseudo-selectors/subselects.js
+var require_subselects = __commonJS({
+ "node_modules/css-select/lib/pseudo-selectors/subselects.js"(exports) {
+ "use strict";
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
+ if (pack || arguments.length === 2)
+ for (var i2 = 0, l = from.length, ar; i2 < l; i2++) {
+ if (ar || !(i2 in from)) {
+ if (!ar)
+ ar = Array.prototype.slice.call(from, 0, i2);
+ ar[i2] = from[i2];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;
+ var boolbase_1 = require_boolbase();
+ var procedure_1 = require_procedure();
+ exports.PLACEHOLDER_ELEMENT = {};
+ function ensureIsTag(next, adapter2) {
+ if (next === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ return function(elem) {
+ return adapter2.isTag(elem) && next(elem);
+ };
+ }
+ exports.ensureIsTag = ensureIsTag;
+ function getNextSiblings(elem, adapter2) {
+ var siblings = adapter2.getSiblings(elem);
+ if (siblings.length <= 1)
+ return [];
+ var elemIndex = siblings.indexOf(elem);
+ if (elemIndex < 0 || elemIndex === siblings.length - 1)
+ return [];
+ return siblings.slice(elemIndex + 1).filter(adapter2.isTag);
+ }
+ exports.getNextSiblings = getNextSiblings;
+ var is2 = function(next, token, options, context, compileToken) {
+ var opts = {
+ xmlMode: !!options.xmlMode,
+ adapter: options.adapter,
+ equals: options.equals
+ };
+ var func = compileToken(token, opts, context);
+ return function(elem) {
+ return func(elem) && next(elem);
+ };
+ };
+ exports.subselects = {
+ is: is2,
+ matches: is2,
+ where: is2,
+ not: function(next, token, options, context, compileToken) {
+ var opts = {
+ xmlMode: !!options.xmlMode,
+ adapter: options.adapter,
+ equals: options.equals
+ };
+ var func = compileToken(token, opts, context);
+ if (func === boolbase_1.falseFunc)
+ return next;
+ if (func === boolbase_1.trueFunc)
+ return boolbase_1.falseFunc;
+ return function not(elem) {
+ return !func(elem) && next(elem);
+ };
+ },
+ has: function(next, subselect, options, _context, compileToken) {
+ var adapter2 = options.adapter;
+ var opts = {
+ xmlMode: !!options.xmlMode,
+ adapter: adapter2,
+ equals: options.equals
+ };
+ var context = subselect.some(function(s2) {
+ return s2.some(procedure_1.isTraversal);
+ }) ? [exports.PLACEHOLDER_ELEMENT] : void 0;
+ var compiled = compileToken(subselect, opts, context);
+ if (compiled === boolbase_1.falseFunc)
+ return boolbase_1.falseFunc;
+ if (compiled === boolbase_1.trueFunc) {
+ return function(elem) {
+ return adapter2.getChildren(elem).some(adapter2.isTag) && next(elem);
+ };
+ }
+ var hasElement = ensureIsTag(compiled, adapter2);
+ var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings = _a === void 0 ? false : _a;
+ if (context) {
+ return function(elem) {
+ context[0] = elem;
+ var childs = adapter2.getChildren(elem);
+ var nextElements = shouldTestNextSiblings ? __spreadArray(__spreadArray([], childs, true), getNextSiblings(elem, adapter2), true) : childs;
+ return next(elem) && adapter2.existsOne(hasElement, nextElements);
+ };
+ }
+ return function(elem) {
+ return next(elem) && adapter2.existsOne(hasElement, adapter2.getChildren(elem));
+ };
+ }
+ };
+ }
+});
+
+// node_modules/css-select/lib/pseudo-selectors/index.js
+var require_pseudo_selectors = __commonJS({
+ "node_modules/css-select/lib/pseudo-selectors/index.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.compilePseudoSelector = exports.aliases = exports.pseudos = exports.filters = void 0;
+ var boolbase_1 = require_boolbase();
+ var css_what_1 = require_lib8();
+ var filters_1 = require_filters();
+ Object.defineProperty(exports, "filters", { enumerable: true, get: function() {
+ return filters_1.filters;
+ } });
+ var pseudos_1 = require_pseudos();
+ Object.defineProperty(exports, "pseudos", { enumerable: true, get: function() {
+ return pseudos_1.pseudos;
+ } });
+ var aliases_1 = require_aliases();
+ Object.defineProperty(exports, "aliases", { enumerable: true, get: function() {
+ return aliases_1.aliases;
+ } });
+ var subselects_1 = require_subselects();
+ function compilePseudoSelector(next, selector, options, context, compileToken) {
+ var name = selector.name, data = selector.data;
+ if (Array.isArray(data)) {
+ return subselects_1.subselects[name](next, data, options, context, compileToken);
+ }
+ if (name in aliases_1.aliases) {
+ if (data != null) {
+ throw new Error("Pseudo ".concat(name, " doesn't have any arguments"));
+ }
+ var alias = (0, css_what_1.parse)(aliases_1.aliases[name], options);
+ return subselects_1.subselects.is(next, alias, options, context, compileToken);
+ }
+ if (name in filters_1.filters) {
+ return filters_1.filters[name](next, data, options, context);
+ }
+ if (name in pseudos_1.pseudos) {
+ var pseudo_1 = pseudos_1.pseudos[name];
+ (0, pseudos_1.verifyPseudoArgs)(pseudo_1, name, data);
+ return pseudo_1 === boolbase_1.falseFunc ? boolbase_1.falseFunc : next === boolbase_1.trueFunc ? function(elem) {
+ return pseudo_1(elem, options, data);
+ } : function(elem) {
+ return pseudo_1(elem, options, data) && next(elem);
+ };
+ }
+ throw new Error("unmatched pseudo-class :".concat(name));
+ }
+ exports.compilePseudoSelector = compilePseudoSelector;
+ }
+});
+
+// node_modules/css-select/lib/general.js
+var require_general = __commonJS({
+ "node_modules/css-select/lib/general.js"(exports) {
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.compileGeneralSelector = void 0;
+ var attributes_1 = require_attributes();
+ var pseudo_selectors_1 = require_pseudo_selectors();
+ function compileGeneralSelector(next, selector, options, context, compileToken) {
+ var adapter2 = options.adapter, equals = options.equals;
+ switch (selector.type) {
+ case "pseudo-element":
+ throw new Error("Pseudo-elements are not supported by css-select");
+ case "attribute":
+ return attributes_1.attributeRules[selector.action](next, selector, options);
+ case "pseudo":
+ return (0, pseudo_selectors_1.compilePseudoSelector)(next, selector, options, context, compileToken);
+ case "tag":
+ return function tag(elem) {
+ return adapter2.getName(elem) === selector.name && next(elem);
+ };
+ case "descendant":
+ if (options.cacheResults === false || typeof WeakSet === "undefined") {
+ return function descendant(elem) {
+ var current = elem;
+ while (current = adapter2.getParent(current)) {
+ if (adapter2.isTag(current) && next(current)) {
+ return true;
+ }
+ }
+ return false;
+ };
+ }
+ var isFalseCache_1 = /* @__PURE__ */ new WeakSet();
+ return function cachedDescendant(elem) {
+ var current = elem;
+ while (current = adapter2.getParent(current)) {
+ if (!isFalseCache_1.has(current)) {
+ if (adapter2.isTag(current) && next(current)) {
+ return true;
+ }
+ isFalseCache_1.add(current);
+ }
+ }
+ return false;
+ };
+ case "_flexibleDescendant":
+ return function flexibleDescendant(elem) {
+ var current = elem;
+ do {
+ if (adapter2.isTag(current) && next(current))
+ return true;
+ } while (current = adapter2.getParent(current));
+ return false;
+ };
+ case "parent":
+ return function parent(elem) {
+ return adapter2.getChildren(elem).some(function(elem2) {
+ return adapter2.isTag(elem2) && next(elem2);
+ });
+ };
+ case "child":
+ return function child(elem) {
+ var parent = adapter2.getParent(elem);
+ return parent != null && adapter2.isTag(parent) && next(parent);
+ };
+ case "sibling":
+ return function sibling(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ for (var i2 = 0; i2 < siblings.length; i2++) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter2.isTag(currentSibling) && next(currentSibling)) {
+ return true;
+ }
+ }
+ return false;
+ };
+ case "adjacent":
+ return function adjacent(elem) {
+ var siblings = adapter2.getSiblings(elem);
+ var lastElement;
+ for (var i2 = 0; i2 < siblings.length; i2++) {
+ var currentSibling = siblings[i2];
+ if (equals(elem, currentSibling))
+ break;
+ if (adapter2.isTag(currentSibling)) {
+ lastElement = currentSibling;
+ }
+ }
+ return !!lastElement && next(lastElement);
+ };
+ case "universal":
+ return next;
+ }
+ }
+ exports.compileGeneralSelector = compileGeneralSelector;
+ }
+});
+
+// node_modules/css-select/lib/compile.js
+var require_compile2 = __commonJS({
+ "node_modules/css-select/lib/compile.js"(exports) {
+ "use strict";
+ var __importDefault = exports && exports.__importDefault || function(mod) {
+ return mod && mod.__esModule ? mod : { "default": mod };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.compileToken = exports.compileUnsafe = exports.compile = void 0;
+ var css_what_1 = require_lib8();
+ var boolbase_1 = require_boolbase();
+ var sort_1 = __importDefault(require_sort());
+ var procedure_1 = require_procedure();
+ var general_1 = require_general();
+ var subselects_1 = require_subselects();
+ function compile3(selector, options, context) {
+ var next = compileUnsafe(selector, options, context);
+ return (0, subselects_1.ensureIsTag)(next, options.adapter);
+ }
+ exports.compile = compile3;
+ function compileUnsafe(selector, options, context) {
+ var token = typeof selector === "string" ? (0, css_what_1.parse)(selector, options) : selector;
+ return compileToken(token, options, context);
+ }
+ exports.compileUnsafe = compileUnsafe;
+ function includesScopePseudo(t2) {
+ return t2.type === "pseudo" && (t2.name === "scope" || Array.isArray(t2.data) && t2.data.some(function(data) {
+ return data.some(includesScopePseudo);
+ }));
+ }
+ var DESCENDANT_TOKEN = { type: "descendant" };
+ var FLEXIBLE_DESCENDANT_TOKEN = {
+ type: "_flexibleDescendant"
+ };
+ var SCOPE_TOKEN = { type: "pseudo", name: "scope", data: null };
+ function absolutize(token, _a, context) {
+ var adapter2 = _a.adapter;
+ var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function(e2) {
+ var parent = adapter2.isTag(e2) && adapter2.getParent(e2);
+ return e2 === subselects_1.PLACEHOLDER_ELEMENT || parent && adapter2.isTag(parent);
+ }));
+ for (var _i = 0, token_1 = token; _i < token_1.length; _i++) {
+ var t2 = token_1[_i];
+ if (t2.length > 0 && (0, procedure_1.isTraversal)(t2[0]) && t2[0].type !== "descendant") {
+ } else if (hasContext && !t2.some(includesScopePseudo)) {
+ t2.unshift(DESCENDANT_TOKEN);
+ } else {
+ continue;
+ }
+ t2.unshift(SCOPE_TOKEN);
+ }
+ }
+ function compileToken(token, options, context) {
+ var _a;
+ token = token.filter(function(t2) {
+ return t2.length > 0;
+ });
+ token.forEach(sort_1.default);
+ context = (_a = options.context) !== null && _a !== void 0 ? _a : context;
+ var isArrayContext = Array.isArray(context);
+ var finalContext = context && (Array.isArray(context) ? context : [context]);
+ absolutize(token, options, finalContext);
+ var shouldTestNextSiblings = false;
+ var query2 = token.map(function(rules) {
+ if (rules.length >= 2) {
+ var first = rules[0], second = rules[1];
+ if (first.type !== "pseudo" || first.name !== "scope") {
+ } else if (isArrayContext && second.type === "descendant") {
+ rules[1] = FLEXIBLE_DESCENDANT_TOKEN;
+ } else if (second.type === "adjacent" || second.type === "sibling") {
+ shouldTestNextSiblings = true;
+ }
+ }
+ return compileRules(rules, options, finalContext);
+ }).reduce(reduceRules, boolbase_1.falseFunc);
+ query2.shouldTestNextSiblings = shouldTestNextSiblings;
+ return query2;
+ }
+ exports.compileToken = compileToken;
+ function compileRules(rules, options, context) {
+ var _a;
+ return rules.reduce(function(previous, rule) {
+ return previous === boolbase_1.falseFunc ? boolbase_1.falseFunc : (0, general_1.compileGeneralSelector)(previous, rule, options, context, compileToken);
+ }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase_1.trueFunc);
+ }
+ function reduceRules(a, b) {
+ if (b === boolbase_1.falseFunc || a === boolbase_1.trueFunc) {
+ return a;
+ }
+ if (a === boolbase_1.falseFunc || b === boolbase_1.trueFunc) {
+ return b;
+ }
+ return function combine(elem) {
+ return a(elem) || b(elem);
+ };
+ }
+ }
+});
+
+// node_modules/css-select/lib/index.js
+var require_lib10 = __commonJS({
+ "node_modules/css-select/lib/index.js"(exports) {
+ "use strict";
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() {
+ return m2[k];
+ } });
+ } : function(o, m2, k, k2) {
+ if (k2 === void 0)
+ k2 = k;
+ o[k2] = m2[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k in mod)
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
+ __createBinding(result, mod, k);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.aliases = exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0;
+ var DomUtils = __importStar(require_lib5());
+ var boolbase_1 = require_boolbase();
+ var compile_1 = require_compile2();
+ var subselects_1 = require_subselects();
+ var defaultEquals = function(a, b) {
+ return a === b;
+ };
+ var defaultOptions = {
+ adapter: DomUtils,
+ equals: defaultEquals
+ };
+ function convertOptionFormats(options) {
+ var _a, _b, _c, _d;
+ var opts = options !== null && options !== void 0 ? options : defaultOptions;
+ (_a = opts.adapter) !== null && _a !== void 0 ? _a : opts.adapter = DomUtils;
+ (_b = opts.equals) !== null && _b !== void 0 ? _b : opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals;
+ return opts;
+ }
+ function wrapCompile(func) {
+ return function addAdapter(selector, options, context) {
+ var opts = convertOptionFormats(options);
+ return func(selector, opts, context);
+ };
+ }
+ exports.compile = wrapCompile(compile_1.compile);
+ exports._compileUnsafe = wrapCompile(compile_1.compileUnsafe);
+ exports._compileToken = wrapCompile(compile_1.compileToken);
+ function getSelectorFunc(searchFunc) {
+ return function select(query2, elements, options) {
+ var opts = convertOptionFormats(options);
+ if (typeof query2 !== "function") {
+ query2 = (0, compile_1.compileUnsafe)(query2, opts, elements);
+ }
+ var filteredElements = prepareContext(elements, opts.adapter, query2.shouldTestNextSiblings);
+ return searchFunc(query2, filteredElements, opts);
+ };
+ }
+ function prepareContext(elems, adapter2, shouldTestNextSiblings) {
+ if (shouldTestNextSiblings === void 0) {
+ shouldTestNextSiblings = false;
+ }
+ if (shouldTestNextSiblings) {
+ elems = appendNextSiblings(elems, adapter2);
+ }
+ return Array.isArray(elems) ? adapter2.removeSubsets(elems) : adapter2.getChildren(elems);
+ }
+ exports.prepareContext = prepareContext;
+ function appendNextSiblings(elem, adapter2) {
+ var elems = Array.isArray(elem) ? elem.slice(0) : [elem];
+ var elemsLength = elems.length;
+ for (var i2 = 0; i2 < elemsLength; i2++) {
+ var nextSiblings = (0, subselects_1.getNextSiblings)(elems[i2], adapter2);
+ elems.push.apply(elems, nextSiblings);
+ }
+ return elems;
+ }
+ exports.selectAll = getSelectorFunc(function(query2, elems, options) {
+ return query2 === boolbase_1.falseFunc || !elems || elems.length === 0 ? [] : options.adapter.findAll(query2, elems);
+ });
+ exports.selectOne = getSelectorFunc(function(query2, elems, options) {
+ return query2 === boolbase_1.falseFunc || !elems || elems.length === 0 ? null : options.adapter.findOne(query2, elems);
+ });
+ function is2(elem, query2, options) {
+ var opts = convertOptionFormats(options);
+ return (typeof query2 === "function" ? query2 : (0, compile_1.compile)(query2, opts))(elem);
+ }
+ exports.is = is2;
+ exports.default = exports.selectAll;
+ var pseudo_selectors_1 = require_pseudo_selectors();
+ Object.defineProperty(exports, "filters", { enumerable: true, get: function() {
+ return pseudo_selectors_1.filters;
+ } });
+ Object.defineProperty(exports, "pseudos", { enumerable: true, get: function() {
+ return pseudo_selectors_1.pseudos;
+ } });
+ Object.defineProperty(exports, "aliases", { enumerable: true, get: function() {
+ return pseudo_selectors_1.aliases;
+ } });
+ }
+});
+
+// node_modules/cssom/lib/StyleSheet.js
+var require_StyleSheet = __commonJS({
+ "node_modules/cssom/lib/StyleSheet.js"(exports) {
+ var CSSOM = {};
+ CSSOM.StyleSheet = function StyleSheet() {
+ this.parentStyleSheet = null;
+ };
+ exports.StyleSheet = CSSOM.StyleSheet;
+ }
+});
+
+// node_modules/cssom/lib/CSSRule.js
+var require_CSSRule = __commonJS({
+ "node_modules/cssom/lib/CSSRule.js"(exports) {
+ var CSSOM = {};
+ CSSOM.CSSRule = function CSSRule() {
+ this.parentRule = null;
+ this.parentStyleSheet = null;
+ };
+ CSSOM.CSSRule.UNKNOWN_RULE = 0;
+ CSSOM.CSSRule.STYLE_RULE = 1;
+ CSSOM.CSSRule.CHARSET_RULE = 2;
+ CSSOM.CSSRule.IMPORT_RULE = 3;
+ CSSOM.CSSRule.MEDIA_RULE = 4;
+ CSSOM.CSSRule.FONT_FACE_RULE = 5;
+ CSSOM.CSSRule.PAGE_RULE = 6;
+ CSSOM.CSSRule.KEYFRAMES_RULE = 7;
+ CSSOM.CSSRule.KEYFRAME_RULE = 8;
+ CSSOM.CSSRule.MARGIN_RULE = 9;
+ CSSOM.CSSRule.NAMESPACE_RULE = 10;
+ CSSOM.CSSRule.COUNTER_STYLE_RULE = 11;
+ CSSOM.CSSRule.SUPPORTS_RULE = 12;
+ CSSOM.CSSRule.DOCUMENT_RULE = 13;
+ CSSOM.CSSRule.FONT_FEATURE_VALUES_RULE = 14;
+ CSSOM.CSSRule.VIEWPORT_RULE = 15;
+ CSSOM.CSSRule.REGION_STYLE_RULE = 16;
+ CSSOM.CSSRule.prototype = {
+ constructor: CSSOM.CSSRule
+ };
+ exports.CSSRule = CSSOM.CSSRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSStyleRule.js
+var require_CSSStyleRule = __commonJS({
+ "node_modules/cssom/lib/CSSStyleRule.js"(exports) {
+ var CSSOM = {
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
+ CSSRule: require_CSSRule().CSSRule
+ };
+ CSSOM.CSSStyleRule = function CSSStyleRule() {
+ CSSOM.CSSRule.call(this);
+ this.selectorText = "";
+ this.style = new CSSOM.CSSStyleDeclaration();
+ this.style.parentRule = this;
+ };
+ CSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;
+ CSSOM.CSSStyleRule.prototype.type = 1;
+ Object.defineProperty(CSSOM.CSSStyleRule.prototype, "cssText", {
+ get: function() {
+ var text;
+ if (this.selectorText) {
+ text = this.selectorText + " {" + this.style.cssText + "}";
+ } else {
+ text = "";
+ }
+ return text;
+ },
+ set: function(cssText) {
+ var rule = CSSOM.CSSStyleRule.parse(cssText);
+ this.style = rule.style;
+ this.selectorText = rule.selectorText;
+ }
+ });
+ CSSOM.CSSStyleRule.parse = function(ruleText) {
+ var i2 = 0;
+ var state = "selector";
+ var index;
+ var j = i2;
+ var buffer = "";
+ var SIGNIFICANT_WHITESPACE = {
+ "selector": true,
+ "value": true
+ };
+ var styleRule = new CSSOM.CSSStyleRule();
+ var name, priority = "";
+ for (var character; character = ruleText.charAt(i2); i2++) {
+ switch (character) {
+ case " ":
+ case " ":
+ case "\r":
+ case "\n":
+ case "\f":
+ if (SIGNIFICANT_WHITESPACE[state]) {
+ switch (ruleText.charAt(i2 - 1)) {
+ case " ":
+ case " ":
+ case "\r":
+ case "\n":
+ case "\f":
+ break;
+ default:
+ buffer += " ";
+ break;
+ }
+ }
+ break;
+ case '"':
+ j = i2 + 1;
+ index = ruleText.indexOf('"', j) + 1;
+ if (!index) {
+ throw '" is missing';
+ }
+ buffer += ruleText.slice(i2, index);
+ i2 = index - 1;
+ break;
+ case "'":
+ j = i2 + 1;
+ index = ruleText.indexOf("'", j) + 1;
+ if (!index) {
+ throw "' is missing";
+ }
+ buffer += ruleText.slice(i2, index);
+ i2 = index - 1;
+ break;
+ case "/":
+ if (ruleText.charAt(i2 + 1) === "*") {
+ i2 += 2;
+ index = ruleText.indexOf("*/", i2);
+ if (index === -1) {
+ throw new SyntaxError("Missing */");
+ } else {
+ i2 = index + 1;
+ }
+ } else {
+ buffer += character;
+ }
+ break;
+ case "{":
+ if (state === "selector") {
+ styleRule.selectorText = buffer.trim();
+ buffer = "";
+ state = "name";
+ }
+ break;
+ case ":":
+ if (state === "name") {
+ name = buffer.trim();
+ buffer = "";
+ state = "value";
+ } else {
+ buffer += character;
+ }
+ break;
+ case "!":
+ if (state === "value" && ruleText.indexOf("!important", i2) === i2) {
+ priority = "important";
+ i2 += "important".length;
+ } else {
+ buffer += character;
+ }
+ break;
+ case ";":
+ if (state === "value") {
+ styleRule.style.setProperty(name, buffer.trim(), priority);
+ priority = "";
+ buffer = "";
+ state = "name";
+ } else {
+ buffer += character;
+ }
+ break;
+ case "}":
+ if (state === "value") {
+ styleRule.style.setProperty(name, buffer.trim(), priority);
+ priority = "";
+ buffer = "";
+ } else if (state === "name") {
+ break;
+ } else {
+ buffer += character;
+ }
+ state = "selector";
+ break;
+ default:
+ buffer += character;
+ break;
+ }
+ }
+ return styleRule;
+ };
+ exports.CSSStyleRule = CSSOM.CSSStyleRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSStyleSheet.js
+var require_CSSStyleSheet = __commonJS({
+ "node_modules/cssom/lib/CSSStyleSheet.js"(exports) {
+ var CSSOM = {
+ StyleSheet: require_StyleSheet().StyleSheet,
+ CSSStyleRule: require_CSSStyleRule().CSSStyleRule
+ };
+ CSSOM.CSSStyleSheet = function CSSStyleSheet() {
+ CSSOM.StyleSheet.call(this);
+ this.cssRules = [];
+ };
+ CSSOM.CSSStyleSheet.prototype = new CSSOM.StyleSheet();
+ CSSOM.CSSStyleSheet.prototype.constructor = CSSOM.CSSStyleSheet;
+ CSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index) {
+ if (index < 0 || index > this.cssRules.length) {
+ throw new RangeError("INDEX_SIZE_ERR");
+ }
+ var cssRule = CSSOM.parse(rule).cssRules[0];
+ cssRule.parentStyleSheet = this;
+ this.cssRules.splice(index, 0, cssRule);
+ return index;
+ };
+ CSSOM.CSSStyleSheet.prototype.deleteRule = function(index) {
+ if (index < 0 || index >= this.cssRules.length) {
+ throw new RangeError("INDEX_SIZE_ERR");
+ }
+ this.cssRules.splice(index, 1);
+ };
+ CSSOM.CSSStyleSheet.prototype.toString = function() {
+ var result = "";
+ var rules = this.cssRules;
+ for (var i2 = 0; i2 < rules.length; i2++) {
+ result += rules[i2].cssText + "\n";
+ }
+ return result;
+ };
+ exports.CSSStyleSheet = CSSOM.CSSStyleSheet;
+ CSSOM.parse = require_parse3().parse;
+ }
+});
+
+// node_modules/cssom/lib/MediaList.js
+var require_MediaList = __commonJS({
+ "node_modules/cssom/lib/MediaList.js"(exports) {
+ var CSSOM = {};
+ CSSOM.MediaList = function MediaList() {
+ this.length = 0;
+ };
+ CSSOM.MediaList.prototype = {
+ constructor: CSSOM.MediaList,
+ get mediaText() {
+ return Array.prototype.join.call(this, ", ");
+ },
+ set mediaText(value) {
+ var values = value.split(",");
+ var length = this.length = values.length;
+ for (var i2 = 0; i2 < length; i2++) {
+ this[i2] = values[i2].trim();
+ }
+ },
+ appendMedium: function(medium) {
+ if (Array.prototype.indexOf.call(this, medium) === -1) {
+ this[this.length] = medium;
+ this.length++;
+ }
+ },
+ deleteMedium: function(medium) {
+ var index = Array.prototype.indexOf.call(this, medium);
+ if (index !== -1) {
+ Array.prototype.splice.call(this, index, 1);
+ }
+ }
+ };
+ exports.MediaList = CSSOM.MediaList;
+ }
+});
+
+// node_modules/cssom/lib/CSSImportRule.js
+var require_CSSImportRule = __commonJS({
+ "node_modules/cssom/lib/CSSImportRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ CSSStyleSheet: require_CSSStyleSheet().CSSStyleSheet,
+ MediaList: require_MediaList().MediaList
+ };
+ CSSOM.CSSImportRule = function CSSImportRule() {
+ CSSOM.CSSRule.call(this);
+ this.href = "";
+ this.media = new CSSOM.MediaList();
+ this.styleSheet = new CSSOM.CSSStyleSheet();
+ };
+ CSSOM.CSSImportRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule;
+ CSSOM.CSSImportRule.prototype.type = 3;
+ Object.defineProperty(CSSOM.CSSImportRule.prototype, "cssText", {
+ get: function() {
+ var mediaText = this.media.mediaText;
+ return "@import url(" + this.href + ")" + (mediaText ? " " + mediaText : "") + ";";
+ },
+ set: function(cssText) {
+ var i2 = 0;
+ var state = "";
+ var buffer = "";
+ var index;
+ for (var character; character = cssText.charAt(i2); i2++) {
+ switch (character) {
+ case " ":
+ case " ":
+ case "\r":
+ case "\n":
+ case "\f":
+ if (state === "after-import") {
+ state = "url";
+ } else {
+ buffer += character;
+ }
+ break;
+ case "@":
+ if (!state && cssText.indexOf("@import", i2) === i2) {
+ state = "after-import";
+ i2 += "import".length;
+ buffer = "";
+ }
+ break;
+ case "u":
+ if (state === "url" && cssText.indexOf("url(", i2) === i2) {
+ index = cssText.indexOf(")", i2 + 1);
+ if (index === -1) {
+ throw i2 + ': ")" not found';
+ }
+ i2 += "url(".length;
+ var url = cssText.slice(i2, index);
+ if (url[0] === url[url.length - 1]) {
+ if (url[0] === '"' || url[0] === "'") {
+ url = url.slice(1, -1);
+ }
+ }
+ this.href = url;
+ i2 = index;
+ state = "media";
+ }
+ break;
+ case '"':
+ if (state === "url") {
+ index = cssText.indexOf('"', i2 + 1);
+ if (!index) {
+ throw i2 + `: '"' not found`;
+ }
+ this.href = cssText.slice(i2 + 1, index);
+ i2 = index;
+ state = "media";
+ }
+ break;
+ case "'":
+ if (state === "url") {
+ index = cssText.indexOf("'", i2 + 1);
+ if (!index) {
+ throw i2 + `: "'" not found`;
+ }
+ this.href = cssText.slice(i2 + 1, index);
+ i2 = index;
+ state = "media";
+ }
+ break;
+ case ";":
+ if (state === "media") {
+ if (buffer) {
+ this.media.mediaText = buffer.trim();
+ }
+ }
+ break;
+ default:
+ if (state === "media") {
+ buffer += character;
+ }
+ break;
+ }
+ }
+ }
+ });
+ exports.CSSImportRule = CSSOM.CSSImportRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSGroupingRule.js
+var require_CSSGroupingRule = __commonJS({
+ "node_modules/cssom/lib/CSSGroupingRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule
+ };
+ CSSOM.CSSGroupingRule = function CSSGroupingRule() {
+ CSSOM.CSSRule.call(this);
+ this.cssRules = [];
+ };
+ CSSOM.CSSGroupingRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSGroupingRule.prototype.constructor = CSSOM.CSSGroupingRule;
+ CSSOM.CSSGroupingRule.prototype.insertRule = function insertRule(rule, index) {
+ if (index < 0 || index > this.cssRules.length) {
+ throw new RangeError("INDEX_SIZE_ERR");
+ }
+ var cssRule = CSSOM.parse(rule).cssRules[0];
+ cssRule.parentRule = this;
+ this.cssRules.splice(index, 0, cssRule);
+ return index;
+ };
+ CSSOM.CSSGroupingRule.prototype.deleteRule = function deleteRule(index) {
+ if (index < 0 || index >= this.cssRules.length) {
+ throw new RangeError("INDEX_SIZE_ERR");
+ }
+ this.cssRules.splice(index, 1)[0].parentRule = null;
+ };
+ exports.CSSGroupingRule = CSSOM.CSSGroupingRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSConditionRule.js
+var require_CSSConditionRule = __commonJS({
+ "node_modules/cssom/lib/CSSConditionRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule
+ };
+ CSSOM.CSSConditionRule = function CSSConditionRule() {
+ CSSOM.CSSGroupingRule.call(this);
+ this.cssRules = [];
+ };
+ CSSOM.CSSConditionRule.prototype = new CSSOM.CSSGroupingRule();
+ CSSOM.CSSConditionRule.prototype.constructor = CSSOM.CSSConditionRule;
+ CSSOM.CSSConditionRule.prototype.conditionText = "";
+ CSSOM.CSSConditionRule.prototype.cssText = "";
+ exports.CSSConditionRule = CSSOM.CSSConditionRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSMediaRule.js
+var require_CSSMediaRule = __commonJS({
+ "node_modules/cssom/lib/CSSMediaRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule,
+ MediaList: require_MediaList().MediaList
+ };
+ CSSOM.CSSMediaRule = function CSSMediaRule() {
+ CSSOM.CSSConditionRule.call(this);
+ this.media = new CSSOM.MediaList();
+ };
+ CSSOM.CSSMediaRule.prototype = new CSSOM.CSSConditionRule();
+ CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;
+ CSSOM.CSSMediaRule.prototype.type = 4;
+ Object.defineProperties(CSSOM.CSSMediaRule.prototype, {
+ "conditionText": {
+ get: function() {
+ return this.media.mediaText;
+ },
+ set: function(value) {
+ this.media.mediaText = value;
+ },
+ configurable: true,
+ enumerable: true
+ },
+ "cssText": {
+ get: function() {
+ var cssTexts = [];
+ for (var i2 = 0, length = this.cssRules.length; i2 < length; i2++) {
+ cssTexts.push(this.cssRules[i2].cssText);
+ }
+ return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}";
+ },
+ configurable: true,
+ enumerable: true
+ }
+ });
+ exports.CSSMediaRule = CSSOM.CSSMediaRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSSupportsRule.js
+var require_CSSSupportsRule = __commonJS({
+ "node_modules/cssom/lib/CSSSupportsRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule
+ };
+ CSSOM.CSSSupportsRule = function CSSSupportsRule() {
+ CSSOM.CSSConditionRule.call(this);
+ };
+ CSSOM.CSSSupportsRule.prototype = new CSSOM.CSSConditionRule();
+ CSSOM.CSSSupportsRule.prototype.constructor = CSSOM.CSSSupportsRule;
+ CSSOM.CSSSupportsRule.prototype.type = 12;
+ Object.defineProperty(CSSOM.CSSSupportsRule.prototype, "cssText", {
+ get: function() {
+ var cssTexts = [];
+ for (var i2 = 0, length = this.cssRules.length; i2 < length; i2++) {
+ cssTexts.push(this.cssRules[i2].cssText);
+ }
+ return "@supports " + this.conditionText + " {" + cssTexts.join("") + "}";
+ }
+ });
+ exports.CSSSupportsRule = CSSOM.CSSSupportsRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSFontFaceRule.js
+var require_CSSFontFaceRule = __commonJS({
+ "node_modules/cssom/lib/CSSFontFaceRule.js"(exports) {
+ var CSSOM = {
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
+ CSSRule: require_CSSRule().CSSRule
+ };
+ CSSOM.CSSFontFaceRule = function CSSFontFaceRule() {
+ CSSOM.CSSRule.call(this);
+ this.style = new CSSOM.CSSStyleDeclaration();
+ this.style.parentRule = this;
+ };
+ CSSOM.CSSFontFaceRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSFontFaceRule.prototype.constructor = CSSOM.CSSFontFaceRule;
+ CSSOM.CSSFontFaceRule.prototype.type = 5;
+ Object.defineProperty(CSSOM.CSSFontFaceRule.prototype, "cssText", {
+ get: function() {
+ return "@font-face {" + this.style.cssText + "}";
+ }
+ });
+ exports.CSSFontFaceRule = CSSOM.CSSFontFaceRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSHostRule.js
+var require_CSSHostRule = __commonJS({
+ "node_modules/cssom/lib/CSSHostRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule
+ };
+ CSSOM.CSSHostRule = function CSSHostRule() {
+ CSSOM.CSSRule.call(this);
+ this.cssRules = [];
+ };
+ CSSOM.CSSHostRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSHostRule.prototype.constructor = CSSOM.CSSHostRule;
+ CSSOM.CSSHostRule.prototype.type = 1001;
+ Object.defineProperty(CSSOM.CSSHostRule.prototype, "cssText", {
+ get: function() {
+ var cssTexts = [];
+ for (var i2 = 0, length = this.cssRules.length; i2 < length; i2++) {
+ cssTexts.push(this.cssRules[i2].cssText);
+ }
+ return "@host {" + cssTexts.join("") + "}";
+ }
+ });
+ exports.CSSHostRule = CSSOM.CSSHostRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSKeyframeRule.js
+var require_CSSKeyframeRule = __commonJS({
+ "node_modules/cssom/lib/CSSKeyframeRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration
+ };
+ CSSOM.CSSKeyframeRule = function CSSKeyframeRule() {
+ CSSOM.CSSRule.call(this);
+ this.keyText = "";
+ this.style = new CSSOM.CSSStyleDeclaration();
+ this.style.parentRule = this;
+ };
+ CSSOM.CSSKeyframeRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSKeyframeRule.prototype.constructor = CSSOM.CSSKeyframeRule;
+ CSSOM.CSSKeyframeRule.prototype.type = 8;
+ Object.defineProperty(CSSOM.CSSKeyframeRule.prototype, "cssText", {
+ get: function() {
+ return this.keyText + " {" + this.style.cssText + "} ";
+ }
+ });
+ exports.CSSKeyframeRule = CSSOM.CSSKeyframeRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSKeyframesRule.js
+var require_CSSKeyframesRule = __commonJS({
+ "node_modules/cssom/lib/CSSKeyframesRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule
+ };
+ CSSOM.CSSKeyframesRule = function CSSKeyframesRule() {
+ CSSOM.CSSRule.call(this);
+ this.name = "";
+ this.cssRules = [];
+ };
+ CSSOM.CSSKeyframesRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSKeyframesRule.prototype.constructor = CSSOM.CSSKeyframesRule;
+ CSSOM.CSSKeyframesRule.prototype.type = 7;
+ Object.defineProperty(CSSOM.CSSKeyframesRule.prototype, "cssText", {
+ get: function() {
+ var cssTexts = [];
+ for (var i2 = 0, length = this.cssRules.length; i2 < length; i2++) {
+ cssTexts.push(" " + this.cssRules[i2].cssText);
+ }
+ return "@" + (this._vendorPrefix || "") + "keyframes " + this.name + " { \n" + cssTexts.join("\n") + "\n}";
+ }
+ });
+ exports.CSSKeyframesRule = CSSOM.CSSKeyframesRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSValue.js
+var require_CSSValue = __commonJS({
+ "node_modules/cssom/lib/CSSValue.js"(exports) {
+ var CSSOM = {};
+ CSSOM.CSSValue = function CSSValue() {
+ };
+ CSSOM.CSSValue.prototype = {
+ constructor: CSSOM.CSSValue,
+ set cssText(text) {
+ var name = this._getConstructorName();
+ throw new Error('DOMException: property "cssText" of "' + name + '" is readonly and can not be replaced with "' + text + '"!');
+ },
+ get cssText() {
+ var name = this._getConstructorName();
+ throw new Error('getter "cssText" of "' + name + '" is not implemented!');
+ },
+ _getConstructorName: function() {
+ var s2 = this.constructor.toString(), c = s2.match(/function\s([^\(]+)/), name = c[1];
+ return name;
+ }
+ };
+ exports.CSSValue = CSSOM.CSSValue;
+ }
+});
+
+// node_modules/cssom/lib/CSSValueExpression.js
+var require_CSSValueExpression = __commonJS({
+ "node_modules/cssom/lib/CSSValueExpression.js"(exports) {
+ var CSSOM = {
+ CSSValue: require_CSSValue().CSSValue
+ };
+ CSSOM.CSSValueExpression = function CSSValueExpression(token, idx) {
+ this._token = token;
+ this._idx = idx;
+ };
+ CSSOM.CSSValueExpression.prototype = new CSSOM.CSSValue();
+ CSSOM.CSSValueExpression.prototype.constructor = CSSOM.CSSValueExpression;
+ CSSOM.CSSValueExpression.prototype.parse = function() {
+ var token = this._token, idx = this._idx;
+ var character = "", expression = "", error = "", info, paren = [];
+ for (; ; ++idx) {
+ character = token.charAt(idx);
+ if (character === "") {
+ error = "css expression error: unfinished expression!";
+ break;
+ }
+ switch (character) {
+ case "(":
+ paren.push(character);
+ expression += character;
+ break;
+ case ")":
+ paren.pop(character);
+ expression += character;
+ break;
+ case "/":
+ if (info = this._parseJSComment(token, idx)) {
+ if (info.error) {
+ error = "css expression error: unfinished comment in expression!";
+ } else {
+ idx = info.idx;
+ }
+ } else if (info = this._parseJSRexExp(token, idx)) {
+ idx = info.idx;
+ expression += info.text;
+ } else {
+ expression += character;
+ }
+ break;
+ case "'":
+ case '"':
+ info = this._parseJSString(token, idx, character);
+ if (info) {
+ idx = info.idx;
+ expression += info.text;
+ } else {
+ expression += character;
+ }
+ break;
+ default:
+ expression += character;
+ break;
+ }
+ if (error) {
+ break;
+ }
+ if (paren.length === 0) {
+ break;
+ }
+ }
+ var ret;
+ if (error) {
+ ret = {
+ error
+ };
+ } else {
+ ret = {
+ idx,
+ expression
+ };
+ }
+ return ret;
+ };
+ CSSOM.CSSValueExpression.prototype._parseJSComment = function(token, idx) {
+ var nextChar = token.charAt(idx + 1), text;
+ if (nextChar === "/" || nextChar === "*") {
+ var startIdx = idx, endIdx, commentEndChar;
+ if (nextChar === "/") {
+ commentEndChar = "\n";
+ } else if (nextChar === "*") {
+ commentEndChar = "*/";
+ }
+ endIdx = token.indexOf(commentEndChar, startIdx + 1 + 1);
+ if (endIdx !== -1) {
+ endIdx = endIdx + commentEndChar.length - 1;
+ text = token.substring(idx, endIdx + 1);
+ return {
+ idx: endIdx,
+ text
+ };
+ } else {
+ var error = "css expression error: unfinished comment in expression!";
+ return {
+ error
+ };
+ }
+ } else {
+ return false;
+ }
+ };
+ CSSOM.CSSValueExpression.prototype._parseJSString = function(token, idx, sep) {
+ var endIdx = this._findMatchedIdx(token, idx, sep), text;
+ if (endIdx === -1) {
+ return false;
+ } else {
+ text = token.substring(idx, endIdx + sep.length);
+ return {
+ idx: endIdx,
+ text
+ };
+ }
+ };
+ CSSOM.CSSValueExpression.prototype._parseJSRexExp = function(token, idx) {
+ var before2 = token.substring(0, idx).replace(/\s+$/, ""), legalRegx = [
+ /^$/,
+ /\($/,
+ /\[$/,
+ /\!$/,
+ /\+$/,
+ /\-$/,
+ /\*$/,
+ /\/\s+/,
+ /\%$/,
+ /\=$/,
+ /\>$/,
+ /<$/,
+ /\&$/,
+ /\|$/,
+ /\^$/,
+ /\~$/,
+ /\?$/,
+ /\,$/,
+ /delete$/,
+ /in$/,
+ /instanceof$/,
+ /new$/,
+ /typeof$/,
+ /void$/
+ ];
+ var isLegal = legalRegx.some(function(reg) {
+ return reg.test(before2);
+ });
+ if (!isLegal) {
+ return false;
+ } else {
+ var sep = "/";
+ return this._parseJSString(token, idx, sep);
+ }
+ };
+ CSSOM.CSSValueExpression.prototype._findMatchedIdx = function(token, idx, sep) {
+ var startIdx = idx, endIdx;
+ var NOT_FOUND = -1;
+ while (true) {
+ endIdx = token.indexOf(sep, startIdx + 1);
+ if (endIdx === -1) {
+ endIdx = NOT_FOUND;
+ break;
+ } else {
+ var text = token.substring(idx + 1, endIdx), matched = text.match(/\\+$/);
+ if (!matched || matched[0] % 2 === 0) {
+ break;
+ } else {
+ startIdx = endIdx;
+ }
+ }
+ }
+ var nextNewLineIdx = token.indexOf("\n", idx + 1);
+ if (nextNewLineIdx < endIdx) {
+ endIdx = NOT_FOUND;
+ }
+ return endIdx;
+ };
+ exports.CSSValueExpression = CSSOM.CSSValueExpression;
+ }
+});
+
+// node_modules/cssom/lib/MatcherList.js
+var require_MatcherList = __commonJS({
+ "node_modules/cssom/lib/MatcherList.js"(exports) {
+ var CSSOM = {};
+ CSSOM.MatcherList = function MatcherList() {
+ this.length = 0;
+ };
+ CSSOM.MatcherList.prototype = {
+ constructor: CSSOM.MatcherList,
+ get matcherText() {
+ return Array.prototype.join.call(this, ", ");
+ },
+ set matcherText(value) {
+ var values = value.split(",");
+ var length = this.length = values.length;
+ for (var i2 = 0; i2 < length; i2++) {
+ this[i2] = values[i2].trim();
+ }
+ },
+ appendMatcher: function(matcher) {
+ if (Array.prototype.indexOf.call(this, matcher) === -1) {
+ this[this.length] = matcher;
+ this.length++;
+ }
+ },
+ deleteMatcher: function(matcher) {
+ var index = Array.prototype.indexOf.call(this, matcher);
+ if (index !== -1) {
+ Array.prototype.splice.call(this, index, 1);
+ }
+ }
+ };
+ exports.MatcherList = CSSOM.MatcherList;
+ }
+});
+
+// node_modules/cssom/lib/CSSDocumentRule.js
+var require_CSSDocumentRule = __commonJS({
+ "node_modules/cssom/lib/CSSDocumentRule.js"(exports) {
+ var CSSOM = {
+ CSSRule: require_CSSRule().CSSRule,
+ MatcherList: require_MatcherList().MatcherList
+ };
+ CSSOM.CSSDocumentRule = function CSSDocumentRule() {
+ CSSOM.CSSRule.call(this);
+ this.matcher = new CSSOM.MatcherList();
+ this.cssRules = [];
+ };
+ CSSOM.CSSDocumentRule.prototype = new CSSOM.CSSRule();
+ CSSOM.CSSDocumentRule.prototype.constructor = CSSOM.CSSDocumentRule;
+ CSSOM.CSSDocumentRule.prototype.type = 10;
+ Object.defineProperty(CSSOM.CSSDocumentRule.prototype, "cssText", {
+ get: function() {
+ var cssTexts = [];
+ for (var i2 = 0, length = this.cssRules.length; i2 < length; i2++) {
+ cssTexts.push(this.cssRules[i2].cssText);
+ }
+ return "@-moz-document " + this.matcher.matcherText + " {" + cssTexts.join("") + "}";
+ }
+ });
+ exports.CSSDocumentRule = CSSOM.CSSDocumentRule;
+ }
+});
+
+// node_modules/cssom/lib/parse.js
+var require_parse3 = __commonJS({
+ "node_modules/cssom/lib/parse.js"(exports) {
+ var CSSOM = {};
+ CSSOM.parse = function parse4(token) {
+ var i2 = 0;
+ var state = "before-selector";
+ var index;
+ var buffer = "";
+ var valueParenthesisDepth = 0;
+ var SIGNIFICANT_WHITESPACE = {
+ "selector": true,
+ "value": true,
+ "value-parenthesis": true,
+ "atRule": true,
+ "importRule-begin": true,
+ "importRule": true,
+ "atBlock": true,
+ "conditionBlock": true,
+ "documentRule-begin": true
+ };
+ var styleSheet = new CSSOM.CSSStyleSheet();
+ var currentScope = styleSheet;
+ var parentRule;
+ var ancestorRules = [];
+ var hasAncestors = false;
+ var prevScope;
+ var name, priority = "", styleRule, mediaRule, supportsRule, importRule, fontFaceRule, keyframesRule, documentRule, hostRule;
+ var atKeyframesRegExp = /@(-(?:\w+-)+)?keyframes/g;
+ var parseError = function(message) {
+ var lines = token.substring(0, i2).split("\n");
+ var lineCount = lines.length;
+ var charCount = lines.pop().length + 1;
+ var error = new Error(message + " (line " + lineCount + ", char " + charCount + ")");
+ error.line = lineCount;
+ error["char"] = charCount;
+ error.styleSheet = styleSheet;
+ throw error;
+ };
+ for (var character; character = token.charAt(i2); i2++) {
+ switch (character) {
+ case " ":
+ case " ":
+ case "\r":
+ case "\n":
+ case "\f":
+ if (SIGNIFICANT_WHITESPACE[state]) {
+ buffer += character;
+ }
+ break;
+ case '"':
+ index = i2 + 1;
+ do {
+ index = token.indexOf('"', index) + 1;
+ if (!index) {
+ parseError('Unmatched "');
+ }
+ } while (token[index - 2] === "\\");
+ buffer += token.slice(i2, index);
+ i2 = index - 1;
+ switch (state) {
+ case "before-value":
+ state = "value";
+ break;
+ case "importRule-begin":
+ state = "importRule";
+ break;
+ }
+ break;
+ case "'":
+ index = i2 + 1;
+ do {
+ index = token.indexOf("'", index) + 1;
+ if (!index) {
+ parseError("Unmatched '");
+ }
+ } while (token[index - 2] === "\\");
+ buffer += token.slice(i2, index);
+ i2 = index - 1;
+ switch (state) {
+ case "before-value":
+ state = "value";
+ break;
+ case "importRule-begin":
+ state = "importRule";
+ break;
+ }
+ break;
+ case "/":
+ if (token.charAt(i2 + 1) === "*") {
+ i2 += 2;
+ index = token.indexOf("*/", i2);
+ if (index === -1) {
+ parseError("Missing */");
+ } else {
+ i2 = index + 1;
+ }
+ } else {
+ buffer += character;
+ }
+ if (state === "importRule-begin") {
+ buffer += " ";
+ state = "importRule";
+ }
+ break;
+ case "@":
+ if (token.indexOf("@-moz-document", i2) === i2) {
+ state = "documentRule-begin";
+ documentRule = new CSSOM.CSSDocumentRule();
+ documentRule.__starts = i2;
+ i2 += "-moz-document".length;
+ buffer = "";
+ break;
+ } else if (token.indexOf("@media", i2) === i2) {
+ state = "atBlock";
+ mediaRule = new CSSOM.CSSMediaRule();
+ mediaRule.__starts = i2;
+ i2 += "media".length;
+ buffer = "";
+ break;
+ } else if (token.indexOf("@supports", i2) === i2) {
+ state = "conditionBlock";
+ supportsRule = new CSSOM.CSSSupportsRule();
+ supportsRule.__starts = i2;
+ i2 += "supports".length;
+ buffer = "";
+ break;
+ } else if (token.indexOf("@host", i2) === i2) {
+ state = "hostRule-begin";
+ i2 += "host".length;
+ hostRule = new CSSOM.CSSHostRule();
+ hostRule.__starts = i2;
+ buffer = "";
+ break;
+ } else if (token.indexOf("@import", i2) === i2) {
+ state = "importRule-begin";
+ i2 += "import".length;
+ buffer += "@import";
+ break;
+ } else if (token.indexOf("@font-face", i2) === i2) {
+ state = "fontFaceRule-begin";
+ i2 += "font-face".length;
+ fontFaceRule = new CSSOM.CSSFontFaceRule();
+ fontFaceRule.__starts = i2;
+ buffer = "";
+ break;
+ } else {
+ atKeyframesRegExp.lastIndex = i2;
+ var matchKeyframes = atKeyframesRegExp.exec(token);
+ if (matchKeyframes && matchKeyframes.index === i2) {
+ state = "keyframesRule-begin";
+ keyframesRule = new CSSOM.CSSKeyframesRule();
+ keyframesRule.__starts = i2;
+ keyframesRule._vendorPrefix = matchKeyframes[1];
+ i2 += matchKeyframes[0].length - 1;
+ buffer = "";
+ break;
+ } else if (state === "selector") {
+ state = "atRule";
+ }
+ }
+ buffer += character;
+ break;
+ case "{":
+ if (state === "selector" || state === "atRule") {
+ styleRule.selectorText = buffer.trim();
+ styleRule.style.__starts = i2;
+ buffer = "";
+ state = "before-name";
+ } else if (state === "atBlock") {
+ mediaRule.media.mediaText = buffer.trim();
+ if (parentRule) {
+ ancestorRules.push(parentRule);
+ }
+ currentScope = parentRule = mediaRule;
+ mediaRule.parentStyleSheet = styleSheet;
+ buffer = "";
+ state = "before-selector";
+ } else if (state === "conditionBlock") {
+ supportsRule.conditionText = buffer.trim();
+ if (parentRule) {
+ ancestorRules.push(parentRule);
+ }
+ currentScope = parentRule = supportsRule;
+ supportsRule.parentStyleSheet = styleSheet;
+ buffer = "";
+ state = "before-selector";
+ } else if (state === "hostRule-begin") {
+ if (parentRule) {
+ ancestorRules.push(parentRule);
+ }
+ currentScope = parentRule = hostRule;
+ hostRule.parentStyleSheet = styleSheet;
+ buffer = "";
+ state = "before-selector";
+ } else if (state === "fontFaceRule-begin") {
+ if (parentRule) {
+ fontFaceRule.parentRule = parentRule;
+ }
+ fontFaceRule.parentStyleSheet = styleSheet;
+ styleRule = fontFaceRule;
+ buffer = "";
+ state = "before-name";
+ } else if (state === "keyframesRule-begin") {
+ keyframesRule.name = buffer.trim();
+ if (parentRule) {
+ ancestorRules.push(parentRule);
+ keyframesRule.parentRule = parentRule;
+ }
+ keyframesRule.parentStyleSheet = styleSheet;
+ currentScope = parentRule = keyframesRule;
+ buffer = "";
+ state = "keyframeRule-begin";
+ } else if (state === "keyframeRule-begin") {
+ styleRule = new CSSOM.CSSKeyframeRule();
+ styleRule.keyText = buffer.trim();
+ styleRule.__starts = i2;
+ buffer = "";
+ state = "before-name";
+ } else if (state === "documentRule-begin") {
+ documentRule.matcher.matcherText = buffer.trim();
+ if (parentRule) {
+ ancestorRules.push(parentRule);
+ documentRule.parentRule = parentRule;
+ }
+ currentScope = parentRule = documentRule;
+ documentRule.parentStyleSheet = styleSheet;
+ buffer = "";
+ state = "before-selector";
+ }
+ break;
+ case ":":
+ if (state === "name") {
+ name = buffer.trim();
+ buffer = "";
+ state = "before-value";
+ } else {
+ buffer += character;
+ }
+ break;
+ case "(":
+ if (state === "value") {
+ if (buffer.trim() === "expression") {
+ var info = new CSSOM.CSSValueExpression(token, i2).parse();
+ if (info.error) {
+ parseError(info.error);
+ } else {
+ buffer += info.expression;
+ i2 = info.idx;
+ }
+ } else {
+ state = "value-parenthesis";
+ valueParenthesisDepth = 1;
+ buffer += character;
+ }
+ } else if (state === "value-parenthesis") {
+ valueParenthesisDepth++;
+ buffer += character;
+ } else {
+ buffer += character;
+ }
+ break;
+ case ")":
+ if (state === "value-parenthesis") {
+ valueParenthesisDepth--;
+ if (valueParenthesisDepth === 0)
+ state = "value";
+ }
+ buffer += character;
+ break;
+ case "!":
+ if (state === "value" && token.indexOf("!important", i2) === i2) {
+ priority = "important";
+ i2 += "important".length;
+ } else {
+ buffer += character;
+ }
+ break;
+ case ";":
+ switch (state) {
+ case "value":
+ styleRule.style.setProperty(name, buffer.trim(), priority);
+ priority = "";
+ buffer = "";
+ state = "before-name";
+ break;
+ case "atRule":
+ buffer = "";
+ state = "before-selector";
+ break;
+ case "importRule":
+ importRule = new CSSOM.CSSImportRule();
+ importRule.parentStyleSheet = importRule.styleSheet.parentStyleSheet = styleSheet;
+ importRule.cssText = buffer + character;
+ styleSheet.cssRules.push(importRule);
+ buffer = "";
+ state = "before-selector";
+ break;
+ default:
+ buffer += character;
+ break;
+ }
+ break;
+ case "}":
+ switch (state) {
+ case "value":
+ styleRule.style.setProperty(name, buffer.trim(), priority);
+ priority = "";
+ case "before-name":
+ case "name":
+ styleRule.__ends = i2 + 1;
+ if (parentRule) {
+ styleRule.parentRule = parentRule;
+ }
+ styleRule.parentStyleSheet = styleSheet;
+ currentScope.cssRules.push(styleRule);
+ buffer = "";
+ if (currentScope.constructor === CSSOM.CSSKeyframesRule) {
+ state = "keyframeRule-begin";
+ } else {
+ state = "before-selector";
+ }
+ break;
+ case "keyframeRule-begin":
+ case "before-selector":
+ case "selector":
+ if (!parentRule) {
+ parseError("Unexpected }");
+ }
+ hasAncestors = ancestorRules.length > 0;
+ while (ancestorRules.length > 0) {
+ parentRule = ancestorRules.pop();
+ if (parentRule.constructor.name === "CSSMediaRule" || parentRule.constructor.name === "CSSSupportsRule") {
+ prevScope = currentScope;
+ currentScope = parentRule;
+ currentScope.cssRules.push(prevScope);
+ break;
+ }
+ if (ancestorRules.length === 0) {
+ hasAncestors = false;
+ }
+ }
+ if (!hasAncestors) {
+ currentScope.__ends = i2 + 1;
+ styleSheet.cssRules.push(currentScope);
+ currentScope = styleSheet;
+ parentRule = null;
+ }
+ buffer = "";
+ state = "before-selector";
+ break;
+ }
+ break;
+ default:
+ switch (state) {
+ case "before-selector":
+ state = "selector";
+ styleRule = new CSSOM.CSSStyleRule();
+ styleRule.__starts = i2;
+ break;
+ case "before-name":
+ state = "name";
+ break;
+ case "before-value":
+ state = "value";
+ break;
+ case "importRule-begin":
+ state = "importRule";
+ break;
+ }
+ buffer += character;
+ break;
+ }
+ }
+ return styleSheet;
+ };
+ exports.parse = CSSOM.parse;
+ CSSOM.CSSStyleSheet = require_CSSStyleSheet().CSSStyleSheet;
+ CSSOM.CSSStyleRule = require_CSSStyleRule().CSSStyleRule;
+ CSSOM.CSSImportRule = require_CSSImportRule().CSSImportRule;
+ CSSOM.CSSGroupingRule = require_CSSGroupingRule().CSSGroupingRule;
+ CSSOM.CSSMediaRule = require_CSSMediaRule().CSSMediaRule;
+ CSSOM.CSSConditionRule = require_CSSConditionRule().CSSConditionRule;
+ CSSOM.CSSSupportsRule = require_CSSSupportsRule().CSSSupportsRule;
+ CSSOM.CSSFontFaceRule = require_CSSFontFaceRule().CSSFontFaceRule;
+ CSSOM.CSSHostRule = require_CSSHostRule().CSSHostRule;
+ CSSOM.CSSStyleDeclaration = require_CSSStyleDeclaration().CSSStyleDeclaration;
+ CSSOM.CSSKeyframeRule = require_CSSKeyframeRule().CSSKeyframeRule;
+ CSSOM.CSSKeyframesRule = require_CSSKeyframesRule().CSSKeyframesRule;
+ CSSOM.CSSValueExpression = require_CSSValueExpression().CSSValueExpression;
+ CSSOM.CSSDocumentRule = require_CSSDocumentRule().CSSDocumentRule;
+ }
+});
+
+// node_modules/cssom/lib/CSSStyleDeclaration.js
+var require_CSSStyleDeclaration = __commonJS({
+ "node_modules/cssom/lib/CSSStyleDeclaration.js"(exports) {
+ var CSSOM = {};
+ CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration2() {
+ this.length = 0;
+ this.parentRule = null;
+ this._importants = {};
+ };
+ CSSOM.CSSStyleDeclaration.prototype = {
+ constructor: CSSOM.CSSStyleDeclaration,
+ getPropertyValue: function(name) {
+ return this[name] || "";
+ },
+ setProperty: function(name, value, priority) {
+ if (this[name]) {
+ var index = Array.prototype.indexOf.call(this, name);
+ if (index < 0) {
+ this[this.length] = name;
+ this.length++;
+ }
+ } else {
+ this[this.length] = name;
+ this.length++;
+ }
+ this[name] = value + "";
+ this._importants[name] = priority;
+ },
+ removeProperty: function(name) {
+ if (!(name in this)) {
+ return "";
+ }
+ var index = Array.prototype.indexOf.call(this, name);
+ if (index < 0) {
+ return "";
+ }
+ var prevValue = this[name];
+ this[name] = "";
+ Array.prototype.splice.call(this, index, 1);
+ return prevValue;
+ },
+ getPropertyCSSValue: function() {
+ },
+ getPropertyPriority: function(name) {
+ return this._importants[name] || "";
+ },
+ getPropertyShorthand: function() {
+ },
+ isPropertyImplicit: function() {
+ },
+ get cssText() {
+ var properties = [];
+ for (var i2 = 0, length = this.length; i2 < length; ++i2) {
+ var name = this[i2];
+ var value = this.getPropertyValue(name);
+ var priority = this.getPropertyPriority(name);
+ if (priority) {
+ priority = " !" + priority;
+ }
+ properties[i2] = name + ": " + value + priority + ";";
+ }
+ return properties.join(" ");
+ },
+ set cssText(text) {
+ var i2, name;
+ for (i2 = this.length; i2--; ) {
+ name = this[i2];
+ this[name] = "";
+ }
+ Array.prototype.splice.call(this, 0, this.length);
+ this._importants = {};
+ var dummyRule = CSSOM.parse("#bogus{" + text + "}").cssRules[0].style;
+ var length = dummyRule.length;
+ for (i2 = 0; i2 < length; ++i2) {
+ name = dummyRule[i2];
+ this.setProperty(dummyRule[i2], dummyRule.getPropertyValue(name), dummyRule.getPropertyPriority(name));
+ }
+ }
+ };
+ exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;
+ CSSOM.parse = require_parse3().parse;
+ }
+});
+
+// node_modules/cssom/lib/clone.js
+var require_clone = __commonJS({
+ "node_modules/cssom/lib/clone.js"(exports) {
+ var CSSOM = {
+ CSSStyleSheet: require_CSSStyleSheet().CSSStyleSheet,
+ CSSRule: require_CSSRule().CSSRule,
+ CSSStyleRule: require_CSSStyleRule().CSSStyleRule,
+ CSSGroupingRule: require_CSSGroupingRule().CSSGroupingRule,
+ CSSConditionRule: require_CSSConditionRule().CSSConditionRule,
+ CSSMediaRule: require_CSSMediaRule().CSSMediaRule,
+ CSSSupportsRule: require_CSSSupportsRule().CSSSupportsRule,
+ CSSStyleDeclaration: require_CSSStyleDeclaration().CSSStyleDeclaration,
+ CSSKeyframeRule: require_CSSKeyframeRule().CSSKeyframeRule,
+ CSSKeyframesRule: require_CSSKeyframesRule().CSSKeyframesRule
+ };
+ CSSOM.clone = function clone2(stylesheet) {
+ var cloned = new CSSOM.CSSStyleSheet();
+ var rules = stylesheet.cssRules;
+ if (!rules) {
+ return cloned;
+ }
+ for (var i2 = 0, rulesLength = rules.length; i2 < rulesLength; i2++) {
+ var rule = rules[i2];
+ var ruleClone = cloned.cssRules[i2] = new rule.constructor();
+ var style = rule.style;
+ if (style) {
+ var styleClone = ruleClone.style = new CSSOM.CSSStyleDeclaration();
+ for (var j = 0, styleLength = style.length; j < styleLength; j++) {
+ var name = styleClone[j] = style[j];
+ styleClone[name] = style[name];
+ styleClone._importants[name] = style.getPropertyPriority(name);
+ }
+ styleClone.length = style.length;
+ }
+ if (rule.hasOwnProperty("keyText")) {
+ ruleClone.keyText = rule.keyText;
+ }
+ if (rule.hasOwnProperty("selectorText")) {
+ ruleClone.selectorText = rule.selectorText;
+ }
+ if (rule.hasOwnProperty("mediaText")) {
+ ruleClone.mediaText = rule.mediaText;
+ }
+ if (rule.hasOwnProperty("conditionText")) {
+ ruleClone.conditionText = rule.conditionText;
+ }
+ if (rule.hasOwnProperty("cssRules")) {
+ ruleClone.cssRules = clone2(rule).cssRules;
+ }
+ }
+ return cloned;
+ };
+ exports.clone = CSSOM.clone;
+ }
+});
+
+// node_modules/cssom/lib/index.js
+var require_lib11 = __commonJS({
+ "node_modules/cssom/lib/index.js"(exports) {
+ "use strict";
+ exports.CSSStyleDeclaration = require_CSSStyleDeclaration().CSSStyleDeclaration;
+ exports.CSSRule = require_CSSRule().CSSRule;
+ exports.CSSGroupingRule = require_CSSGroupingRule().CSSGroupingRule;
+ exports.CSSConditionRule = require_CSSConditionRule().CSSConditionRule;
+ exports.CSSStyleRule = require_CSSStyleRule().CSSStyleRule;
+ exports.MediaList = require_MediaList().MediaList;
+ exports.CSSMediaRule = require_CSSMediaRule().CSSMediaRule;
+ exports.CSSSupportsRule = require_CSSSupportsRule().CSSSupportsRule;
+ exports.CSSImportRule = require_CSSImportRule().CSSImportRule;
+ exports.CSSFontFaceRule = require_CSSFontFaceRule().CSSFontFaceRule;
+ exports.CSSHostRule = require_CSSHostRule().CSSHostRule;
+ exports.StyleSheet = require_StyleSheet().StyleSheet;
+ exports.CSSStyleSheet = require_CSSStyleSheet().CSSStyleSheet;
+ exports.CSSKeyframesRule = require_CSSKeyframesRule().CSSKeyframesRule;
+ exports.CSSKeyframeRule = require_CSSKeyframeRule().CSSKeyframeRule;
+ exports.MatcherList = require_MatcherList().MatcherList;
+ exports.CSSDocumentRule = require_CSSDocumentRule().CSSDocumentRule;
+ exports.CSSValue = require_CSSValue().CSSValue;
+ exports.CSSValueExpression = require_CSSValueExpression().CSSValueExpression;
+ exports.parse = require_parse3().parse;
+ exports.clone = require_clone().clone;
+ }
+});
+
+// node_modules/linkedom/commonjs/canvas.cjs
+var require_canvas = __commonJS({
+ "node_modules/linkedom/commonjs/canvas.cjs"(exports, module2) {
+ try {
+ module2.exports = require("canvas");
+ } catch (fallback) {
+ class Canvas2 {
+ constructor(width, height) {
+ this.width = width;
+ this.height = height;
+ }
+ getContext() {
+ return null;
+ }
+ toDataURL() {
+ return "";
+ }
+ }
+ module2.exports = {
+ createCanvas: (width, height) => new Canvas2(width, height)
+ };
+ }
+ }
+});
+
+// node_modules/showdown/dist/showdown.js
+var require_showdown = __commonJS({
+ "node_modules/showdown/dist/showdown.js"(exports, module2) {
+ (function() {
+ function getDefaultOpts(simple) {
+ "use strict";
+ var defaultOptions = {
+ omitExtraWLInCodeBlocks: {
+ defaultValue: false,
+ describe: "Omit the default extra whiteline added to code blocks",
+ type: "boolean"
+ },
+ noHeaderId: {
+ defaultValue: false,
+ describe: "Turn on/off generated header id",
+ type: "boolean"
+ },
+ prefixHeaderId: {
+ defaultValue: false,
+ describe: "Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",
+ type: "string"
+ },
+ rawPrefixHeaderId: {
+ defaultValue: false,
+ describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
+ type: "boolean"
+ },
+ ghCompatibleHeaderId: {
+ defaultValue: false,
+ describe: "Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",
+ type: "boolean"
+ },
+ rawHeaderId: {
+ defaultValue: false,
+ describe: `Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,
+ type: "boolean"
+ },
+ headerLevelStart: {
+ defaultValue: false,
+ describe: "The header blocks level start",
+ type: "integer"
+ },
+ parseImgDimensions: {
+ defaultValue: false,
+ describe: "Turn on/off image dimension parsing",
+ type: "boolean"
+ },
+ simplifiedAutoLink: {
+ defaultValue: false,
+ describe: "Turn on/off GFM autolink style",
+ type: "boolean"
+ },
+ excludeTrailingPunctuationFromURLs: {
+ defaultValue: false,
+ describe: "Excludes trailing punctuation from links generated with autoLinking",
+ type: "boolean"
+ },
+ literalMidWordUnderscores: {
+ defaultValue: false,
+ describe: "Parse midword underscores as literal underscores",
+ type: "boolean"
+ },
+ literalMidWordAsterisks: {
+ defaultValue: false,
+ describe: "Parse midword asterisks as literal asterisks",
+ type: "boolean"
+ },
+ strikethrough: {
+ defaultValue: false,
+ describe: "Turn on/off strikethrough support",
+ type: "boolean"
+ },
+ tables: {
+ defaultValue: false,
+ describe: "Turn on/off tables support",
+ type: "boolean"
+ },
+ tablesHeaderId: {
+ defaultValue: false,
+ describe: "Add an id to table headers",
+ type: "boolean"
+ },
+ ghCodeBlocks: {
+ defaultValue: true,
+ describe: "Turn on/off GFM fenced code blocks support",
+ type: "boolean"
+ },
+ tasklists: {
+ defaultValue: false,
+ describe: "Turn on/off GFM tasklist support",
+ type: "boolean"
+ },
+ smoothLivePreview: {
+ defaultValue: false,
+ describe: "Prevents weird effects in live previews due to incomplete input",
+ type: "boolean"
+ },
+ smartIndentationFix: {
+ defaultValue: false,
+ describe: "Tries to smartly fix indentation in es6 strings",
+ type: "boolean"
+ },
+ disableForced4SpacesIndentedSublists: {
+ defaultValue: false,
+ describe: "Disables the requirement of indenting nested sublists by 4 spaces",
+ type: "boolean"
+ },
+ simpleLineBreaks: {
+ defaultValue: false,
+ describe: "Parses simple line breaks as
(GFM Style)",
+ type: "boolean"
+ },
+ requireSpaceBeforeHeadingText: {
+ defaultValue: false,
+ describe: "Makes adding a space between `#` and the header text mandatory (GFM Style)",
+ type: "boolean"
+ },
+ ghMentions: {
+ defaultValue: false,
+ describe: "Enables github @mentions",
+ type: "boolean"
+ },
+ ghMentionsLink: {
+ defaultValue: "https://github.com/{u}",
+ describe: "Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",
+ type: "string"
+ },
+ encodeEmails: {
+ defaultValue: true,
+ describe: "Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",
+ type: "boolean"
+ },
+ openLinksInNewWindow: {
+ defaultValue: false,
+ describe: "Open all links in new windows",
+ type: "boolean"
+ },
+ backslashEscapesHTMLTags: {
+ defaultValue: false,
+ describe: "Support for HTML Tag escaping. ex:
[^\r]+?<\/pre>)/gm, function(wholeMatch, m1) { + var pre = m1; + pre = pre.replace(/^ /mg, "\xA80"); + pre = pre.replace(/¨0/g, ""); + return pre; + }); + return showdown2.subParser("hashBlock")("\n" + bq + "\n", options, globals); + }); + text = globals.converter._dispatch("blockQuotes.after", text, options, globals); + return text; + }); + showdown2.subParser("codeBlocks", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("codeBlocks.before", text, options, globals); + text += "\xA80"; + var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g; + text = text.replace(pattern, function(wholeMatch, m1, m2) { + var codeblock = m1, nextChar = m2, end = "\n"; + codeblock = showdown2.subParser("outdent")(codeblock, options, globals); + codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals); + codeblock = showdown2.subParser("detab")(codeblock, options, globals); + codeblock = codeblock.replace(/^\n+/g, ""); + codeblock = codeblock.replace(/\n+$/g, ""); + if (options.omitExtraWLInCodeBlocks) { + end = ""; + } + codeblock = ""; + return showdown2.subParser("hashBlock")(codeblock, options, globals) + nextChar; + }); + text = text.replace(/¨0/, ""); + text = globals.converter._dispatch("codeBlocks.after", text, options, globals); + return text; + }); + showdown2.subParser("codeSpans", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("codeSpans.before", text, options, globals); + if (typeof text === "undefined") { + text = ""; + } + text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(wholeMatch, m1, m2, m3) { + var c = m3; + c = c.replace(/^([ \t]*)/g, ""); + c = c.replace(/[ \t]*$/g, ""); + c = showdown2.subParser("encodeCode")(c, options, globals); + c = m1 + "" + codeblock + end + "
" + c + "
"; + c = showdown2.subParser("hashHTMLSpans")(c, options, globals); + return c; + }); + text = globals.converter._dispatch("codeSpans.after", text, options, globals); + return text; + }); + showdown2.subParser("completeHTMLDocument", function(text, options, globals) { + "use strict"; + if (!options.completeHTMLDocument) { + return text; + } + text = globals.converter._dispatch("completeHTMLDocument.before", text, options, globals); + var doctype = "html", doctypeParsed = "\n", title = "", charset = '\n', lang = "", metadata = ""; + if (typeof globals.metadata.parsed.doctype !== "undefined") { + doctypeParsed = "\n"; + doctype = globals.metadata.parsed.doctype.toString().toLowerCase(); + if (doctype === "html" || doctype === "html5") { + charset = ''; + } + } + for (var meta in globals.metadata.parsed) { + if (globals.metadata.parsed.hasOwnProperty(meta)) { + switch (meta.toLowerCase()) { + case "doctype": + break; + case "title": + title = "" + globals.metadata.parsed.title + " \n"; + break; + case "charset": + if (doctype === "html" || doctype === "html5") { + charset = '\n'; + } else { + charset = '\n'; + } + break; + case "language": + case "lang": + lang = ' lang="' + globals.metadata.parsed[meta] + '"'; + metadata += '\n'; + break; + default: + metadata += '\n'; + } + } + } + text = doctypeParsed + "\n\n" + title + charset + metadata + "\n\n" + text.trim() + "\n\n"; + text = globals.converter._dispatch("completeHTMLDocument.after", text, options, globals); + return text; + }); + showdown2.subParser("detab", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("detab.before", text, options, globals); + text = text.replace(/\t(?=\t)/g, " "); + text = text.replace(/\t/g, "\xA8A\xA8B"); + text = text.replace(/¨B(.+?)¨A/g, function(wholeMatch, m1) { + var leadingText = m1, numSpaces = 4 - leadingText.length % 4; + for (var i2 = 0; i2 < numSpaces; i2++) { + leadingText += " "; + } + return leadingText; + }); + text = text.replace(/¨A/g, " "); + text = text.replace(/¨B/g, ""); + text = globals.converter._dispatch("detab.after", text, options, globals); + return text; + }); + showdown2.subParser("ellipsis", function(text, options, globals) { + "use strict"; + if (!options.ellipsis) { + return text; + } + text = globals.converter._dispatch("ellipsis.before", text, options, globals); + text = text.replace(/\.\.\./g, "\u2026"); + text = globals.converter._dispatch("ellipsis.after", text, options, globals); + return text; + }); + showdown2.subParser("emoji", function(text, options, globals) { + "use strict"; + if (!options.emoji) { + return text; + } + text = globals.converter._dispatch("emoji.before", text, options, globals); + var emojiRgx = /:([\S]+?):/g; + text = text.replace(emojiRgx, function(wm2, emojiCode) { + if (showdown2.helper.emojis.hasOwnProperty(emojiCode)) { + return showdown2.helper.emojis[emojiCode]; + } + return wm2; + }); + text = globals.converter._dispatch("emoji.after", text, options, globals); + return text; + }); + showdown2.subParser("encodeAmpsAndAngles", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("encodeAmpsAndAngles.before", text, options, globals); + text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"); + text = text.replace(/<(?![a-z\/?$!])/gi, "<"); + text = text.replace(//g, ">"); + text = globals.converter._dispatch("encodeAmpsAndAngles.after", text, options, globals); + return text; + }); + showdown2.subParser("encodeBackslashEscapes", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("encodeBackslashEscapes.before", text, options, globals); + text = text.replace(/\\(\\)/g, showdown2.helper.escapeCharactersCallback); + text = text.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g, showdown2.helper.escapeCharactersCallback); + text = globals.converter._dispatch("encodeBackslashEscapes.after", text, options, globals); + return text; + }); + showdown2.subParser("encodeCode", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("encodeCode.before", text, options, globals); + text = text.replace(/&/g, "&").replace(//g, ">").replace(/([*_{}\[\]\\=~-])/g, showdown2.helper.escapeCharactersCallback); + text = globals.converter._dispatch("encodeCode.after", text, options, globals); + return text; + }); + showdown2.subParser("escapeSpecialCharsWithinTagAttributes", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before", text, options, globals); + var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi; + text = text.replace(tags, function(wholeMatch) { + return wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`").replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback); + }); + text = text.replace(comments, function(wholeMatch) { + return wholeMatch.replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback); + }); + text = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after", text, options, globals); + return text; + }); + showdown2.subParser("githubCodeBlocks", function(text, options, globals) { + "use strict"; + if (!options.ghCodeBlocks) { + return text; + } + text = globals.converter._dispatch("githubCodeBlocks.before", text, options, globals); + text += "\xA80"; + text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function(wholeMatch, delim, language, codeblock) { + var end = options.omitExtraWLInCodeBlocks ? "" : "\n"; + codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals); + codeblock = showdown2.subParser("detab")(codeblock, options, globals); + codeblock = codeblock.replace(/^\n+/g, ""); + codeblock = codeblock.replace(/\n+$/g, ""); + codeblock = ""; + codeblock = showdown2.subParser("hashBlock")(codeblock, options, globals); + return "\n\n\xA8G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n"; + }); + text = text.replace(/¨0/, ""); + return globals.converter._dispatch("githubCodeBlocks.after", text, options, globals); + }); + showdown2.subParser("hashBlock", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("hashBlock.before", text, options, globals); + text = text.replace(/(^\n+|\n+$)/g, ""); + text = "\n\n\xA8K" + (globals.gHtmlBlocks.push(text) - 1) + "K\n\n"; + text = globals.converter._dispatch("hashBlock.after", text, options, globals); + return text; + }); + showdown2.subParser("hashCodeTags", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("hashCodeTags.before", text, options, globals); + var repFunc = function(wholeMatch, match, left, right) { + var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right; + return "\xA8C" + (globals.gHtmlSpans.push(codeblock) - 1) + "C"; + }; + text = showdown2.helper.replaceRecursiveRegExp(text, repFunc, "" + codeblock + end + "
]*>", "
", "gim"); + text = globals.converter._dispatch("hashCodeTags.after", text, options, globals); + return text; + }); + showdown2.subParser("hashElement", function(text, options, globals) { + "use strict"; + return function(wholeMatch, m1) { + var blockText = m1; + blockText = blockText.replace(/\n\n/g, "\n"); + blockText = blockText.replace(/^\n/, ""); + blockText = blockText.replace(/\n+$/g, ""); + blockText = "\n\n\xA8K" + (globals.gHtmlBlocks.push(blockText) - 1) + "K\n\n"; + return blockText; + }; + }); + showdown2.subParser("hashHTMLBlocks", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("hashHTMLBlocks.before", text, options, globals); + var blockTags = [ + "pre", + "div", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "blockquote", + "table", + "dl", + "ol", + "ul", + "script", + "noscript", + "form", + "fieldset", + "iframe", + "math", + "style", + "section", + "header", + "footer", + "nav", + "article", + "aside", + "address", + "audio", + "canvas", + "figure", + "hgroup", + "output", + "video", + "p" + ], repFunc = function(wholeMatch, match, left, right) { + var txt = wholeMatch; + if (left.search(/\bmarkdown\b/) !== -1) { + txt = left + globals.converter.makeHtml(match) + right; + } + return "\n\n\xA8K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n"; + }; + if (options.backslashEscapesHTMLTags) { + text = text.replace(/\\<(\/?[^>]+?)>/g, function(wm2, inside) { + return "<" + inside + ">"; + }); + } + for (var i2 = 0; i2 < blockTags.length; ++i2) { + var opTagPos, rgx1 = new RegExp("^ {0,3}(<" + blockTags[i2] + "\\b[^>]*>)", "im"), patLeft = "<" + blockTags[i2] + "\\b[^>]*>", patRight = "" + blockTags[i2] + ">"; + while ((opTagPos = showdown2.helper.regexIndexOf(text, rgx1)) !== -1) { + var subTexts = showdown2.helper.splitAtIndex(text, opTagPos), newSubText1 = showdown2.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, "im"); + if (newSubText1 === subTexts[1]) { + break; + } + text = subTexts[0].concat(newSubText1); + } + } + text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, showdown2.subParser("hashElement")(text, options, globals)); + text = showdown2.helper.replaceRecursiveRegExp(text, function(txt) { + return "\n\n\xA8K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n"; + }, "^ {0,3}", "gm"); + text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, showdown2.subParser("hashElement")(text, options, globals)); + text = globals.converter._dispatch("hashHTMLBlocks.after", text, options, globals); + return text; + }); + showdown2.subParser("hashHTMLSpans", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("hashHTMLSpans.before", text, options, globals); + function hashHTMLSpan(html) { + return "\xA8C" + (globals.gHtmlSpans.push(html) - 1) + "C"; + } + text = text.replace(/<[^>]+?\/>/gi, function(wm2) { + return hashHTMLSpan(wm2); + }); + text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function(wm2) { + return hashHTMLSpan(wm2); + }); + text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function(wm2) { + return hashHTMLSpan(wm2); + }); + text = text.replace(/<[^>]+?>/gi, function(wm2) { + return hashHTMLSpan(wm2); + }); + text = globals.converter._dispatch("hashHTMLSpans.after", text, options, globals); + return text; + }); + showdown2.subParser("unhashHTMLSpans", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("unhashHTMLSpans.before", text, options, globals); + for (var i2 = 0; i2 < globals.gHtmlSpans.length; ++i2) { + var repText = globals.gHtmlSpans[i2], limit = 0; + while (/¨C(\d+)C/.test(repText)) { + var num = RegExp.$1; + repText = repText.replace("\xA8C" + num + "C", globals.gHtmlSpans[num]); + if (limit === 10) { + console.error("maximum nesting of 10 spans reached!!!"); + break; + } + ++limit; + } + text = text.replace("\xA8C" + i2 + "C", repText); + } + text = globals.converter._dispatch("unhashHTMLSpans.after", text, options, globals); + return text; + }); + showdown2.subParser("hashPreCodeTags", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("hashPreCodeTags.before", text, options, globals); + var repFunc = function(wholeMatch, match, left, right) { + var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right; + return "\n\n\xA8G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n"; + }; + text = showdown2.helper.replaceRecursiveRegExp(text, repFunc, "^ {0,3}]*>\\s*", "gim"); + text = globals.converter._dispatch("hashPreCodeTags.after", text, options, globals); + return text; + }); + showdown2.subParser("headers", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("headers.before", text, options, globals); + var headerLevelStart = isNaN(parseInt(options.headerLevelStart)) ? 1 : parseInt(options.headerLevelStart), setextRegexH1 = options.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, setextRegexH2 = options.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; + text = text.replace(setextRegexH1, function(wholeMatch, m1) { + var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart, hashBlock = "]*>", "^ {0,3}
\\s*" + spanGamut + " "; + return showdown2.subParser("hashBlock")(hashBlock, options, globals); + }); + text = text.replace(setextRegexH2, function(matchFound, m1) { + var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart + 1, hashBlock = "" + spanGamut + " "; + return showdown2.subParser("hashBlock")(hashBlock, options, globals); + }); + var atxStyle = options.requireSpaceBeforeHeadingText ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm; + text = text.replace(atxStyle, function(wholeMatch, m1, m2) { + var hText = m2; + if (options.customizedHeaderId) { + hText = m2.replace(/\s?\{([^{]+?)}\s*$/, ""); + } + var span = showdown2.subParser("spanGamut")(hText, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m2) + '"', hLevel = headerLevelStart - 1 + m1.length, header = "" + span + " "; + return showdown2.subParser("hashBlock")(header, options, globals); + }); + function headerId(m2) { + var title, prefix; + if (options.customizedHeaderId) { + var match = m2.match(/\{([^{]+?)}\s*$/); + if (match && match[1]) { + m2 = match[1]; + } + } + title = m2; + if (showdown2.helper.isString(options.prefixHeaderId)) { + prefix = options.prefixHeaderId; + } else if (options.prefixHeaderId === true) { + prefix = "section-"; + } else { + prefix = ""; + } + if (!options.rawPrefixHeaderId) { + title = prefix + title; + } + if (options.ghCompatibleHeaderId) { + title = title.replace(/ /g, "-").replace(/&/g, "").replace(/¨T/g, "").replace(/¨D/g, "").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, "").toLowerCase(); + } else if (options.rawHeaderId) { + title = title.replace(/ /g, "-").replace(/&/g, "&").replace(/¨T/g, "\xA8").replace(/¨D/g, "$").replace(/["']/g, "-").toLowerCase(); + } else { + title = title.replace(/[^\w]/g, "").toLowerCase(); + } + if (options.rawPrefixHeaderId) { + title = prefix + title; + } + if (globals.hashLinkCounts[title]) { + title = title + "-" + globals.hashLinkCounts[title]++; + } else { + globals.hashLinkCounts[title] = 1; + } + return title; + } + text = globals.converter._dispatch("headers.after", text, options, globals); + return text; + }); + showdown2.subParser("horizontalRule", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("horizontalRule.before", text, options, globals); + var key2 = showdown2.subParser("hashBlock")("
", options, globals); + text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key2); + text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key2); + text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key2); + text = globals.converter._dispatch("horizontalRule.after", text, options, globals); + return text; + }); + showdown2.subParser("images", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("images.before", text, options, globals); + var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g; + function writeImageTagBase64(wholeMatch, altText, linkId, url, width, height, m5, title) { + url = url.replace(/\s/g, ""); + return writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title); + } + function writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title) { + var gUrls = globals.gUrls, gTitles = globals.gTitles, gDims = globals.gDimensions; + linkId = linkId.toLowerCase(); + if (!title) { + title = ""; + } + if (wholeMatch.search(/\(\s*>? ?(['"].*['"])?\)$/m) > -1) { + url = ""; + } else if (url === "" || url === null) { + if (linkId === "" || linkId === null) { + linkId = altText.toLowerCase().replace(/ ?\n/g, " "); + } + url = "#" + linkId; + if (!showdown2.helper.isUndefined(gUrls[linkId])) { + url = gUrls[linkId]; + if (!showdown2.helper.isUndefined(gTitles[linkId])) { + title = gTitles[linkId]; + } + if (!showdown2.helper.isUndefined(gDims[linkId])) { + width = gDims[linkId].width; + height = gDims[linkId].height; + } + } else { + return wholeMatch; + } + } + altText = altText.replace(/"/g, """).replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); + url = url.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); + var result = '"; + return result; + } + text = text.replace(referenceRegExp, writeImageTag); + text = text.replace(base64RegExp, writeImageTagBase64); + text = text.replace(crazyRegExp, writeImageTag); + text = text.replace(inlineRegExp, writeImageTag); + text = text.replace(refShortcutRegExp, writeImageTag); + text = globals.converter._dispatch("images.after", text, options, globals); + return text; + }); + showdown2.subParser("italicsAndBold", function(text, options, globals) { + "use strict"; + text = globals.converter._dispatch("italicsAndBold.before", text, options, globals); + function parseInside(txt, left, right) { + return left + txt + right; + } + if (options.literalMidWordUnderscores) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function(wm2, txt) { + return parseInside(txt, "", ""); + }); + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm2, txt) { + return parseInside(txt, "", ""); + }); + text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function(wm2, txt) { + return parseInside(txt, "", ""); + }); + } else { + text = text.replace(/___(\S[\s\S]*?)___/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + text = text.replace(/__(\S[\s\S]*?)__/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + text = text.replace(/_([^\s_][\s\S]*?)_/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + } + if (options.literalMidWordAsterisks) { + text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function(wm2, lead, txt) { + return parseInside(txt, lead + "", ""); + }); + text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function(wm2, lead, txt) { + return parseInside(txt, lead + "", ""); + }); + text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function(wm2, lead, txt) { + return parseInside(txt, lead + "", ""); + }); + } else { + text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function(wm2, m2) { + return /\S$/.test(m2) ? parseInside(m2, "", "") : wm2; + }); + } + text = globals.converter._dispatch("italicsAndBold.after", text, options, globals); + return text; + }); + showdown2.subParser("lists", function(text, options, globals) { + "use strict"; + function processListItems(listStr, trimTrailing) { + globals.gListLevel++; + listStr = listStr.replace(/\n{2,}$/, "\n"); + listStr += "\xA80"; + var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, isParagraphed = /\n[ \t]*\n(?!¨0)/.test(listStr); + if (options.disableForced4SpacesIndentedSublists) { + rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm; + } + listStr = listStr.replace(rgx, function(wholeMatch, m1, m2, m3, m4, taskbtn, checked) { + checked = checked && checked.trim() !== ""; + var item = showdown2.subParser("outdent")(m4, options, globals), bulletStyle = ""; + if (taskbtn && options.tasklists) { + bulletStyle = ' class="task-list-item" style="list-style-type: none;"'; + item = item.replace(/^[ \t]*\[(x|X| )?]/m, function() { + var otp = '"; + return otp; + }); + } + item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function(wm2) { + return "\xA8A" + wm2; + }); + if (m1 || item.search(/\n{2,}/) > -1) { + item = showdown2.subParser("githubCodeBlocks")(item, options, globals); + item = showdown2.subParser("blockGamut")(item, options, globals); + } else { + item = showdown2.subParser("lists")(item, options, globals); + item = item.replace(/\n$/, ""); + item = showdown2.subParser("hashHTMLBlocks")(item, options, globals); + item = item.replace(/\n\n+/g, "\n\n"); + if (isParagraphed) { + item = showdown2.subParser("paragraphs")(item, options, globals); + } else { + item = showdown2.subParser("spanGamut")(item, options, globals); + } + } + item = item.replace("\xA8A", ""); + item = "
"); + str += "
"; + grafsOut.push(str); + } + } + end = grafsOut.length; + for (i2 = 0; i2 < end; i2++) { + var blockText = "", grafsOutIt = grafsOut[i2], codeFlag = false; + while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) { + var delim = RegExp.$1, num = RegExp.$2; + if (delim === "K") { + blockText = globals.gHtmlBlocks[num]; + } else { + if (codeFlag) { + blockText = showdown2.subParser("encodeCode")(globals.ghCodeBlocks[num].text, options, globals); + } else { + blockText = globals.ghCodeBlocks[num].codeblock; + } + } + blockText = blockText.replace(/\$/g, "$$$$"); + grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText); + if (/^]*>\s*]*>/.test(grafsOutIt)) {
+ codeFlag = true;
+ }
+ }
+ grafsOut[i2] = grafsOutIt;
+ }
+ text = grafsOut.join("\n");
+ text = text.replace(/^\n+/g, "");
+ text = text.replace(/\n+$/g, "");
+ return globals.converter._dispatch("paragraphs.after", text, options, globals);
+ });
+ showdown2.subParser("runExtension", function(ext, text, options, globals) {
+ "use strict";
+ if (ext.filter) {
+ text = ext.filter(text, globals.converter, options);
+ } else if (ext.regex) {
+ var re = ext.regex;
+ if (!(re instanceof RegExp)) {
+ re = new RegExp(re, "g");
+ }
+ text = text.replace(re, ext.replace);
+ }
+ return text;
+ });
+ showdown2.subParser("spanGamut", function(text, options, globals) {
+ "use strict";
+ text = globals.converter._dispatch("spanGamut.before", text, options, globals);
+ text = showdown2.subParser("codeSpans")(text, options, globals);
+ text = showdown2.subParser("escapeSpecialCharsWithinTagAttributes")(text, options, globals);
+ text = showdown2.subParser("encodeBackslashEscapes")(text, options, globals);
+ text = showdown2.subParser("images")(text, options, globals);
+ text = showdown2.subParser("anchors")(text, options, globals);
+ text = showdown2.subParser("autoLinks")(text, options, globals);
+ text = showdown2.subParser("simplifiedAutoLinks")(text, options, globals);
+ text = showdown2.subParser("emoji")(text, options, globals);
+ text = showdown2.subParser("underline")(text, options, globals);
+ text = showdown2.subParser("italicsAndBold")(text, options, globals);
+ text = showdown2.subParser("strikethrough")(text, options, globals);
+ text = showdown2.subParser("ellipsis")(text, options, globals);
+ text = showdown2.subParser("hashHTMLSpans")(text, options, globals);
+ text = showdown2.subParser("encodeAmpsAndAngles")(text, options, globals);
+ if (options.simpleLineBreaks) {
+ if (!/\n\n¨K/.test(text)) {
+ text = text.replace(/\n+/g, "
\n");
+ }
+ } else {
+ text = text.replace(/ +\n/g, "
\n");
+ }
+ text = globals.converter._dispatch("spanGamut.after", text, options, globals);
+ return text;
+ });
+ showdown2.subParser("strikethrough", function(text, options, globals) {
+ "use strict";
+ function parseInside(txt) {
+ if (options.simplifiedAutoLink) {
+ txt = showdown2.subParser("simplifiedAutoLinks")(txt, options, globals);
+ }
+ return "" + txt + "";
+ }
+ if (options.strikethrough) {
+ text = globals.converter._dispatch("strikethrough.before", text, options, globals);
+ text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function(wm2, txt) {
+ return parseInside(txt);
+ });
+ text = globals.converter._dispatch("strikethrough.after", text, options, globals);
+ }
+ return text;
+ });
+ showdown2.subParser("stripLinkDefinitions", function(text, options, globals) {
+ "use strict";
+ var regex = /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, base64Regex = /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;
+ text += "\xA80";
+ var replaceFunc = function(wholeMatch, linkId, url, width, height, blankLines, title) {
+ linkId = linkId.toLowerCase();
+ if (text.toLowerCase().split(linkId).length - 1 < 2) {
+ return wholeMatch;
+ }
+ if (url.match(/^data:.+?\/.+?;base64,/)) {
+ globals.gUrls[linkId] = url.replace(/\s/g, "");
+ } else {
+ globals.gUrls[linkId] = showdown2.subParser("encodeAmpsAndAngles")(url, options, globals);
+ }
+ if (blankLines) {
+ return blankLines + title;
+ } else {
+ if (title) {
+ globals.gTitles[linkId] = title.replace(/"|'/g, """);
+ }
+ if (options.parseImgDimensions && width && height) {
+ globals.gDimensions[linkId] = {
+ width,
+ height
+ };
+ }
+ }
+ return "";
+ };
+ text = text.replace(base64Regex, replaceFunc);
+ text = text.replace(regex, replaceFunc);
+ text = text.replace(/¨0/, "");
+ return text;
+ });
+ showdown2.subParser("tables", function(text, options, globals) {
+ "use strict";
+ if (!options.tables) {
+ return text;
+ }
+ var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
+ function parseStyles(sLine) {
+ if (/^:[ \t]*--*$/.test(sLine)) {
+ return ' style="text-align:left;"';
+ } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
+ return ' style="text-align:right;"';
+ } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
+ return ' style="text-align:center;"';
+ } else {
+ return "";
+ }
+ }
+ function parseHeaders(header, style) {
+ var id = "";
+ header = header.trim();
+ if (options.tablesHeaderId || options.tableHeaderId) {
+ id = ' id="' + header.replace(/ /g, "_").toLowerCase() + '"';
+ }
+ header = showdown2.subParser("spanGamut")(header, options, globals);
+ return "" + header + " \n";
+ }
+ function parseCells(cell, style) {
+ var subText = showdown2.subParser("spanGamut")(cell, options, globals);
+ return "" + subText + " \n";
+ }
+ function buildTable(headers, cells) {
+ var tb = "\n\n\n", tblLgn = headers.length;
+ for (var i2 = 0; i2 < tblLgn; ++i2) {
+ tb += headers[i2];
+ }
+ tb += " \n\n\n";
+ for (i2 = 0; i2 < cells.length; ++i2) {
+ tb += "\n";
+ for (var ii = 0; ii < tblLgn; ++ii) {
+ tb += cells[i2][ii];
+ }
+ tb += " \n";
+ }
+ tb += "\n
\n";
+ return tb;
+ }
+ function parseTable(rawTable) {
+ var i2, tableLines = rawTable.split("\n");
+ for (i2 = 0; i2 < tableLines.length; ++i2) {
+ if (/^ {0,3}\|/.test(tableLines[i2])) {
+ tableLines[i2] = tableLines[i2].replace(/^ {0,3}\|/, "");
+ }
+ if (/\|[ \t]*$/.test(tableLines[i2])) {
+ tableLines[i2] = tableLines[i2].replace(/\|[ \t]*$/, "");
+ }
+ tableLines[i2] = showdown2.subParser("codeSpans")(tableLines[i2], options, globals);
+ }
+ var rawHeaders = tableLines[0].split("|").map(function(s2) {
+ return s2.trim();
+ }), rawStyles = tableLines[1].split("|").map(function(s2) {
+ return s2.trim();
+ }), rawCells = [], headers = [], styles = [], cells = [];
+ tableLines.shift();
+ tableLines.shift();
+ for (i2 = 0; i2 < tableLines.length; ++i2) {
+ if (tableLines[i2].trim() === "") {
+ continue;
+ }
+ rawCells.push(tableLines[i2].split("|").map(function(s2) {
+ return s2.trim();
+ }));
+ }
+ if (rawHeaders.length < rawStyles.length) {
+ return rawTable;
+ }
+ for (i2 = 0; i2 < rawStyles.length; ++i2) {
+ styles.push(parseStyles(rawStyles[i2]));
+ }
+ for (i2 = 0; i2 < rawHeaders.length; ++i2) {
+ if (showdown2.helper.isUndefined(styles[i2])) {
+ styles[i2] = "";
+ }
+ headers.push(parseHeaders(rawHeaders[i2], styles[i2]));
+ }
+ for (i2 = 0; i2 < rawCells.length; ++i2) {
+ var row = [];
+ for (var ii = 0; ii < headers.length; ++ii) {
+ if (showdown2.helper.isUndefined(rawCells[i2][ii])) {
+ }
+ row.push(parseCells(rawCells[i2][ii], styles[ii]));
+ }
+ cells.push(row);
+ }
+ return buildTable(headers, cells);
+ }
+ text = globals.converter._dispatch("tables.before", text, options, globals);
+ text = text.replace(/\\(\|)/g, showdown2.helper.escapeCharactersCallback);
+ text = text.replace(tableRgx, parseTable);
+ text = text.replace(singeColTblRgx, parseTable);
+ text = globals.converter._dispatch("tables.after", text, options, globals);
+ return text;
+ });
+ showdown2.subParser("underline", function(text, options, globals) {
+ "use strict";
+ if (!options.underline) {
+ return text;
+ }
+ text = globals.converter._dispatch("underline.before", text, options, globals);
+ if (options.literalMidWordUnderscores) {
+ text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function(wm2, txt) {
+ return "" + txt + "";
+ });
+ text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm2, txt) {
+ return "" + txt + "";
+ });
+ } else {
+ text = text.replace(/___(\S[\s\S]*?)___/g, function(wm2, m2) {
+ return /\S$/.test(m2) ? "" + m2 + "" : wm2;
+ });
+ text = text.replace(/__(\S[\s\S]*?)__/g, function(wm2, m2) {
+ return /\S$/.test(m2) ? "" + m2 + "" : wm2;
+ });
+ }
+ text = text.replace(/(_)/g, showdown2.helper.escapeCharactersCallback);
+ text = globals.converter._dispatch("underline.after", text, options, globals);
+ return text;
+ });
+ showdown2.subParser("unescapeSpecialChars", function(text, options, globals) {
+ "use strict";
+ text = globals.converter._dispatch("unescapeSpecialChars.before", text, options, globals);
+ text = text.replace(/¨E(\d+)E/g, function(wholeMatch, m1) {
+ var charCodeToReplace = parseInt(m1);
+ return String.fromCharCode(charCodeToReplace);
+ });
+ text = globals.converter._dispatch("unescapeSpecialChars.after", text, options, globals);
+ return text;
+ });
+ showdown2.subParser("makeMarkdown.blockquote", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes()) {
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ var innerTxt = showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ if (innerTxt === "") {
+ continue;
+ }
+ txt += innerTxt;
+ }
+ }
+ txt = txt.trim();
+ txt = "> " + txt.split("\n").join("\n> ");
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.codeBlock", function(node, globals) {
+ "use strict";
+ var lang = node.getAttribute("language"), num = node.getAttribute("precodenum");
+ return "```" + lang + "\n" + globals.preList[num] + "\n```";
+ });
+ showdown2.subParser("makeMarkdown.codeSpan", function(node) {
+ "use strict";
+ return "`" + node.innerHTML + "`";
+ });
+ showdown2.subParser("makeMarkdown.emphasis", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes()) {
+ txt += "*";
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ txt += "*";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.header", function(node, globals, headerLevel) {
+ "use strict";
+ var headerMark = new Array(headerLevel + 1).join("#"), txt = "";
+ if (node.hasChildNodes()) {
+ txt = headerMark + " ";
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.hr", function() {
+ "use strict";
+ return "---";
+ });
+ showdown2.subParser("makeMarkdown.image", function(node) {
+ "use strict";
+ var txt = "";
+ if (node.hasAttribute("src")) {
+ txt += "![" + node.getAttribute("alt") + "](";
+ txt += "<" + node.getAttribute("src") + ">";
+ if (node.hasAttribute("width") && node.hasAttribute("height")) {
+ txt += " =" + node.getAttribute("width") + "x" + node.getAttribute("height");
+ }
+ if (node.hasAttribute("title")) {
+ txt += ' "' + node.getAttribute("title") + '"';
+ }
+ txt += ")";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.links", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes() && node.hasAttribute("href")) {
+ var children = node.childNodes, childrenLength = children.length;
+ txt = "[";
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ txt += "](";
+ txt += "<" + node.getAttribute("href") + ">";
+ if (node.hasAttribute("title")) {
+ txt += ' "' + node.getAttribute("title") + '"';
+ }
+ txt += ")";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.list", function(node, globals, type) {
+ "use strict";
+ var txt = "";
+ if (!node.hasChildNodes()) {
+ return "";
+ }
+ var listItems = node.childNodes, listItemsLenght = listItems.length, listNum = node.getAttribute("start") || 1;
+ for (var i2 = 0; i2 < listItemsLenght; ++i2) {
+ if (typeof listItems[i2].tagName === "undefined" || listItems[i2].tagName.toLowerCase() !== "li") {
+ continue;
+ }
+ var bullet = "";
+ if (type === "ol") {
+ bullet = listNum.toString() + ". ";
+ } else {
+ bullet = "- ";
+ }
+ txt += bullet + showdown2.subParser("makeMarkdown.listItem")(listItems[i2], globals);
+ ++listNum;
+ }
+ txt += "\n\n";
+ return txt.trim();
+ });
+ showdown2.subParser("makeMarkdown.listItem", function(node, globals) {
+ "use strict";
+ var listItemTxt = "";
+ var children = node.childNodes, childrenLenght = children.length;
+ for (var i2 = 0; i2 < childrenLenght; ++i2) {
+ listItemTxt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ if (!/\n$/.test(listItemTxt)) {
+ listItemTxt += "\n";
+ } else {
+ listItemTxt = listItemTxt.split("\n").join("\n ").replace(/^ {4}$/gm, "").replace(/\n\n+/g, "\n\n");
+ }
+ return listItemTxt;
+ });
+ showdown2.subParser("makeMarkdown.node", function(node, globals, spansOnly) {
+ "use strict";
+ spansOnly = spansOnly || false;
+ var txt = "";
+ if (node.nodeType === 3) {
+ return showdown2.subParser("makeMarkdown.txt")(node, globals);
+ }
+ if (node.nodeType === 8) {
+ return "\n\n";
+ }
+ if (node.nodeType !== 1) {
+ return "";
+ }
+ var tagName15 = node.tagName.toLowerCase();
+ switch (tagName15) {
+ case "h1":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 1) + "\n\n";
+ }
+ break;
+ case "h2":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 2) + "\n\n";
+ }
+ break;
+ case "h3":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 3) + "\n\n";
+ }
+ break;
+ case "h4":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 4) + "\n\n";
+ }
+ break;
+ case "h5":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 5) + "\n\n";
+ }
+ break;
+ case "h6":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.header")(node, globals, 6) + "\n\n";
+ }
+ break;
+ case "p":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.paragraph")(node, globals) + "\n\n";
+ }
+ break;
+ case "blockquote":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.blockquote")(node, globals) + "\n\n";
+ }
+ break;
+ case "hr":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.hr")(node, globals) + "\n\n";
+ }
+ break;
+ case "ol":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.list")(node, globals, "ol") + "\n\n";
+ }
+ break;
+ case "ul":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.list")(node, globals, "ul") + "\n\n";
+ }
+ break;
+ case "precode":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.codeBlock")(node, globals) + "\n\n";
+ }
+ break;
+ case "pre":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.pre")(node, globals) + "\n\n";
+ }
+ break;
+ case "table":
+ if (!spansOnly) {
+ txt = showdown2.subParser("makeMarkdown.table")(node, globals) + "\n\n";
+ }
+ break;
+ case "code":
+ txt = showdown2.subParser("makeMarkdown.codeSpan")(node, globals);
+ break;
+ case "em":
+ case "i":
+ txt = showdown2.subParser("makeMarkdown.emphasis")(node, globals);
+ break;
+ case "strong":
+ case "b":
+ txt = showdown2.subParser("makeMarkdown.strong")(node, globals);
+ break;
+ case "del":
+ txt = showdown2.subParser("makeMarkdown.strikethrough")(node, globals);
+ break;
+ case "a":
+ txt = showdown2.subParser("makeMarkdown.links")(node, globals);
+ break;
+ case "img":
+ txt = showdown2.subParser("makeMarkdown.image")(node, globals);
+ break;
+ default:
+ txt = node.outerHTML + "\n\n";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.paragraph", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes()) {
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ }
+ txt = txt.trim();
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.pre", function(node, globals) {
+ "use strict";
+ var num = node.getAttribute("prenum");
+ return "" + globals.preList[num] + "
";
+ });
+ showdown2.subParser("makeMarkdown.strikethrough", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes()) {
+ txt += "~~";
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ txt += "~~";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.strong", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (node.hasChildNodes()) {
+ txt += "**";
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals);
+ }
+ txt += "**";
+ }
+ return txt;
+ });
+ showdown2.subParser("makeMarkdown.table", function(node, globals) {
+ "use strict";
+ var txt = "", tableArray = [[], []], headings = node.querySelectorAll("thead>tr>th"), rows = node.querySelectorAll("tbody>tr"), i2, ii;
+ for (i2 = 0; i2 < headings.length; ++i2) {
+ var headContent = showdown2.subParser("makeMarkdown.tableCell")(headings[i2], globals), allign = "---";
+ if (headings[i2].hasAttribute("style")) {
+ var style = headings[i2].getAttribute("style").toLowerCase().replace(/\s/g, "");
+ switch (style) {
+ case "text-align:left;":
+ allign = ":---";
+ break;
+ case "text-align:right;":
+ allign = "---:";
+ break;
+ case "text-align:center;":
+ allign = ":---:";
+ break;
+ }
+ }
+ tableArray[0][i2] = headContent.trim();
+ tableArray[1][i2] = allign;
+ }
+ for (i2 = 0; i2 < rows.length; ++i2) {
+ var r2 = tableArray.push([]) - 1, cols = rows[i2].getElementsByTagName("td");
+ for (ii = 0; ii < headings.length; ++ii) {
+ var cellContent = " ";
+ if (typeof cols[ii] !== "undefined") {
+ cellContent = showdown2.subParser("makeMarkdown.tableCell")(cols[ii], globals);
+ }
+ tableArray[r2].push(cellContent);
+ }
+ }
+ var cellSpacesCount = 3;
+ for (i2 = 0; i2 < tableArray.length; ++i2) {
+ for (ii = 0; ii < tableArray[i2].length; ++ii) {
+ var strLen = tableArray[i2][ii].length;
+ if (strLen > cellSpacesCount) {
+ cellSpacesCount = strLen;
+ }
+ }
+ }
+ for (i2 = 0; i2 < tableArray.length; ++i2) {
+ for (ii = 0; ii < tableArray[i2].length; ++ii) {
+ if (i2 === 1) {
+ if (tableArray[i2][ii].slice(-1) === ":") {
+ tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii].slice(-1), cellSpacesCount - 1, "-") + ":";
+ } else {
+ tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii], cellSpacesCount, "-");
+ }
+ } else {
+ tableArray[i2][ii] = showdown2.helper.padEnd(tableArray[i2][ii], cellSpacesCount);
+ }
+ }
+ txt += "| " + tableArray[i2].join(" | ") + " |\n";
+ }
+ return txt.trim();
+ });
+ showdown2.subParser("makeMarkdown.tableCell", function(node, globals) {
+ "use strict";
+ var txt = "";
+ if (!node.hasChildNodes()) {
+ return "";
+ }
+ var children = node.childNodes, childrenLength = children.length;
+ for (var i2 = 0; i2 < childrenLength; ++i2) {
+ txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals, true);
+ }
+ return txt.trim();
+ });
+ showdown2.subParser("makeMarkdown.txt", function(node) {
+ "use strict";
+ var txt = node.nodeValue;
+ txt = txt.replace(/ +/g, " ");
+ txt = txt.replace(/¨NBSP;/g, " ");
+ txt = showdown2.helper.unescapeHTMLEntities(txt);
+ txt = txt.replace(/([*_~|`])/g, "\\$1");
+ txt = txt.replace(/^(\s*)>/g, "\\$1>");
+ txt = txt.replace(/^#/gm, "\\#");
+ txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, "$1\\$2$3");
+ txt = txt.replace(/^( {0,3}\d+)\./gm, "$1\\.");
+ txt = txt.replace(/^( {0,3})([+-])/gm, "$1\\$2");
+ txt = txt.replace(/]([\s]*)\(/g, "\\]$1\\(");
+ txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, "\\[$1]:");
+ return txt;
+ });
+ var root = this;
+ if (typeof define === "function" && define.amd) {
+ define(function() {
+ "use strict";
+ return showdown2;
+ });
+ } else if (typeof module2 !== "undefined" && module2.exports) {
+ module2.exports = showdown2;
+ } else {
+ root.showdown = showdown2;
+ }
+ }).call(exports);
+ }
+});
+
+// node_modules/web-streams-polyfill/dist/ponyfill.es2018.js
+var require_ponyfill_es2018 = __commonJS({
+ "node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports, module2) {
+ (function(global2, factory) {
+ typeof exports === "object" && typeof module2 !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.WebStreamsPolyfill = {}));
+ })(exports, function(exports2) {
+ "use strict";
+ const SymbolPolyfill = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol : (description) => `Symbol(${description})`;
+ function noop2() {
+ return void 0;
+ }
+ function getGlobals() {
+ if (typeof self !== "undefined") {
+ return self;
+ } else if (typeof window !== "undefined") {
+ return window;
+ } else if (typeof global !== "undefined") {
+ return global;
+ }
+ return void 0;
+ }
+ const globals = getGlobals();
+ function typeIsObject(x2) {
+ return typeof x2 === "object" && x2 !== null || typeof x2 === "function";
+ }
+ const rethrowAssertionErrorRejection = noop2;
+ const originalPromise = Promise;
+ const originalPromiseThen = Promise.prototype.then;
+ const originalPromiseResolve = Promise.resolve.bind(originalPromise);
+ const originalPromiseReject = Promise.reject.bind(originalPromise);
+ function newPromise(executor) {
+ return new originalPromise(executor);
+ }
+ function promiseResolvedWith(value) {
+ return originalPromiseResolve(value);
+ }
+ function promiseRejectedWith(reason) {
+ return originalPromiseReject(reason);
+ }
+ function PerformPromiseThen(promise, onFulfilled, onRejected) {
+ return originalPromiseThen.call(promise, onFulfilled, onRejected);
+ }
+ function uponPromise(promise, onFulfilled, onRejected) {
+ PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), void 0, rethrowAssertionErrorRejection);
+ }
+ function uponFulfillment(promise, onFulfilled) {
+ uponPromise(promise, onFulfilled);
+ }
+ function uponRejection(promise, onRejected) {
+ uponPromise(promise, void 0, onRejected);
+ }
+ function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) {
+ return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler);
+ }
+ function setPromiseIsHandledToTrue(promise) {
+ PerformPromiseThen(promise, void 0, rethrowAssertionErrorRejection);
+ }
+ const queueMicrotask = (() => {
+ const globalQueueMicrotask = globals && globals.queueMicrotask;
+ if (typeof globalQueueMicrotask === "function") {
+ return globalQueueMicrotask;
+ }
+ const resolvedPromise = promiseResolvedWith(void 0);
+ return (fn) => PerformPromiseThen(resolvedPromise, fn);
+ })();
+ function reflectCall(F2, V, args) {
+ if (typeof F2 !== "function") {
+ throw new TypeError("Argument is not a function");
+ }
+ return Function.prototype.apply.call(F2, V, args);
+ }
+ function promiseCall(F2, V, args) {
+ try {
+ return promiseResolvedWith(reflectCall(F2, V, args));
+ } catch (value) {
+ return promiseRejectedWith(value);
+ }
+ }
+ const QUEUE_MAX_ARRAY_SIZE = 16384;
+ class SimpleQueue {
+ constructor() {
+ this._cursor = 0;
+ this._size = 0;
+ this._front = {
+ _elements: [],
+ _next: void 0
+ };
+ this._back = this._front;
+ this._cursor = 0;
+ this._size = 0;
+ }
+ get length() {
+ return this._size;
+ }
+ push(element) {
+ const oldBack = this._back;
+ let newBack = oldBack;
+ if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) {
+ newBack = {
+ _elements: [],
+ _next: void 0
+ };
+ }
+ oldBack._elements.push(element);
+ if (newBack !== oldBack) {
+ this._back = newBack;
+ oldBack._next = newBack;
+ }
+ ++this._size;
+ }
+ shift() {
+ const oldFront = this._front;
+ let newFront = oldFront;
+ const oldCursor = this._cursor;
+ let newCursor = oldCursor + 1;
+ const elements = oldFront._elements;
+ const element = elements[oldCursor];
+ if (newCursor === QUEUE_MAX_ARRAY_SIZE) {
+ newFront = oldFront._next;
+ newCursor = 0;
+ }
+ --this._size;
+ this._cursor = newCursor;
+ if (oldFront !== newFront) {
+ this._front = newFront;
+ }
+ elements[oldCursor] = void 0;
+ return element;
+ }
+ forEach(callback) {
+ let i2 = this._cursor;
+ let node = this._front;
+ let elements = node._elements;
+ while (i2 !== elements.length || node._next !== void 0) {
+ if (i2 === elements.length) {
+ node = node._next;
+ elements = node._elements;
+ i2 = 0;
+ if (elements.length === 0) {
+ break;
+ }
+ }
+ callback(elements[i2]);
+ ++i2;
+ }
+ }
+ peek() {
+ const front = this._front;
+ const cursor = this._cursor;
+ return front._elements[cursor];
+ }
+ }
+ function ReadableStreamReaderGenericInitialize(reader, stream) {
+ reader._ownerReadableStream = stream;
+ stream._reader = reader;
+ if (stream._state === "readable") {
+ defaultReaderClosedPromiseInitialize(reader);
+ } else if (stream._state === "closed") {
+ defaultReaderClosedPromiseInitializeAsResolved(reader);
+ } else {
+ defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError);
+ }
+ }
+ function ReadableStreamReaderGenericCancel(reader, reason) {
+ const stream = reader._ownerReadableStream;
+ return ReadableStreamCancel(stream, reason);
+ }
+ function ReadableStreamReaderGenericRelease(reader) {
+ if (reader._ownerReadableStream._state === "readable") {
+ defaultReaderClosedPromiseReject(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`));
+ } else {
+ defaultReaderClosedPromiseResetToRejected(reader, new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`));
+ }
+ reader._ownerReadableStream._reader = void 0;
+ reader._ownerReadableStream = void 0;
+ }
+ function readerLockException(name) {
+ return new TypeError("Cannot " + name + " a stream using a released reader");
+ }
+ function defaultReaderClosedPromiseInitialize(reader) {
+ reader._closedPromise = newPromise((resolve, reject) => {
+ reader._closedPromise_resolve = resolve;
+ reader._closedPromise_reject = reject;
+ });
+ }
+ function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) {
+ defaultReaderClosedPromiseInitialize(reader);
+ defaultReaderClosedPromiseReject(reader, reason);
+ }
+ function defaultReaderClosedPromiseInitializeAsResolved(reader) {
+ defaultReaderClosedPromiseInitialize(reader);
+ defaultReaderClosedPromiseResolve(reader);
+ }
+ function defaultReaderClosedPromiseReject(reader, reason) {
+ if (reader._closedPromise_reject === void 0) {
+ return;
+ }
+ setPromiseIsHandledToTrue(reader._closedPromise);
+ reader._closedPromise_reject(reason);
+ reader._closedPromise_resolve = void 0;
+ reader._closedPromise_reject = void 0;
+ }
+ function defaultReaderClosedPromiseResetToRejected(reader, reason) {
+ defaultReaderClosedPromiseInitializeAsRejected(reader, reason);
+ }
+ function defaultReaderClosedPromiseResolve(reader) {
+ if (reader._closedPromise_resolve === void 0) {
+ return;
+ }
+ reader._closedPromise_resolve(void 0);
+ reader._closedPromise_resolve = void 0;
+ reader._closedPromise_reject = void 0;
+ }
+ const AbortSteps = SymbolPolyfill("[[AbortSteps]]");
+ const ErrorSteps = SymbolPolyfill("[[ErrorSteps]]");
+ const CancelSteps = SymbolPolyfill("[[CancelSteps]]");
+ const PullSteps = SymbolPolyfill("[[PullSteps]]");
+ const NumberIsFinite = Number.isFinite || function(x2) {
+ return typeof x2 === "number" && isFinite(x2);
+ };
+ const MathTrunc = Math.trunc || function(v) {
+ return v < 0 ? Math.ceil(v) : Math.floor(v);
+ };
+ function isDictionary(x2) {
+ return typeof x2 === "object" || typeof x2 === "function";
+ }
+ function assertDictionary(obj, context) {
+ if (obj !== void 0 && !isDictionary(obj)) {
+ throw new TypeError(`${context} is not an object.`);
+ }
+ }
+ function assertFunction(x2, context) {
+ if (typeof x2 !== "function") {
+ throw new TypeError(`${context} is not a function.`);
+ }
+ }
+ function isObject(x2) {
+ return typeof x2 === "object" && x2 !== null || typeof x2 === "function";
+ }
+ function assertObject(x2, context) {
+ if (!isObject(x2)) {
+ throw new TypeError(`${context} is not an object.`);
+ }
+ }
+ function assertRequiredArgument(x2, position, context) {
+ if (x2 === void 0) {
+ throw new TypeError(`Parameter ${position} is required in '${context}'.`);
+ }
+ }
+ function assertRequiredField(x2, field, context) {
+ if (x2 === void 0) {
+ throw new TypeError(`${field} is required in '${context}'.`);
+ }
+ }
+ function convertUnrestrictedDouble(value) {
+ return Number(value);
+ }
+ function censorNegativeZero(x2) {
+ return x2 === 0 ? 0 : x2;
+ }
+ function integerPart(x2) {
+ return censorNegativeZero(MathTrunc(x2));
+ }
+ function convertUnsignedLongLongWithEnforceRange(value, context) {
+ const lowerBound = 0;
+ const upperBound = Number.MAX_SAFE_INTEGER;
+ let x2 = Number(value);
+ x2 = censorNegativeZero(x2);
+ if (!NumberIsFinite(x2)) {
+ throw new TypeError(`${context} is not a finite number`);
+ }
+ x2 = integerPart(x2);
+ if (x2 < lowerBound || x2 > upperBound) {
+ throw new TypeError(`${context} is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`);
+ }
+ if (!NumberIsFinite(x2) || x2 === 0) {
+ return 0;
+ }
+ return x2;
+ }
+ function assertReadableStream(x2, context) {
+ if (!IsReadableStream(x2)) {
+ throw new TypeError(`${context} is not a ReadableStream.`);
+ }
+ }
+ function AcquireReadableStreamDefaultReader(stream) {
+ return new ReadableStreamDefaultReader(stream);
+ }
+ function ReadableStreamAddReadRequest(stream, readRequest) {
+ stream._reader._readRequests.push(readRequest);
+ }
+ function ReadableStreamFulfillReadRequest(stream, chunk, done) {
+ const reader = stream._reader;
+ const readRequest = reader._readRequests.shift();
+ if (done) {
+ readRequest._closeSteps();
+ } else {
+ readRequest._chunkSteps(chunk);
+ }
+ }
+ function ReadableStreamGetNumReadRequests(stream) {
+ return stream._reader._readRequests.length;
+ }
+ function ReadableStreamHasDefaultReader(stream) {
+ const reader = stream._reader;
+ if (reader === void 0) {
+ return false;
+ }
+ if (!IsReadableStreamDefaultReader(reader)) {
+ return false;
+ }
+ return true;
+ }
+ class ReadableStreamDefaultReader {
+ constructor(stream) {
+ assertRequiredArgument(stream, 1, "ReadableStreamDefaultReader");
+ assertReadableStream(stream, "First parameter");
+ if (IsReadableStreamLocked(stream)) {
+ throw new TypeError("This stream has already been locked for exclusive reading by another reader");
+ }
+ ReadableStreamReaderGenericInitialize(this, stream);
+ this._readRequests = new SimpleQueue();
+ }
+ get closed() {
+ if (!IsReadableStreamDefaultReader(this)) {
+ return promiseRejectedWith(defaultReaderBrandCheckException("closed"));
+ }
+ return this._closedPromise;
+ }
+ cancel(reason = void 0) {
+ if (!IsReadableStreamDefaultReader(this)) {
+ return promiseRejectedWith(defaultReaderBrandCheckException("cancel"));
+ }
+ if (this._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("cancel"));
+ }
+ return ReadableStreamReaderGenericCancel(this, reason);
+ }
+ read() {
+ if (!IsReadableStreamDefaultReader(this)) {
+ return promiseRejectedWith(defaultReaderBrandCheckException("read"));
+ }
+ if (this._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("read from"));
+ }
+ let resolvePromise;
+ let rejectPromise;
+ const promise = newPromise((resolve, reject) => {
+ resolvePromise = resolve;
+ rejectPromise = reject;
+ });
+ const readRequest = {
+ _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }),
+ _closeSteps: () => resolvePromise({ value: void 0, done: true }),
+ _errorSteps: (e2) => rejectPromise(e2)
+ };
+ ReadableStreamDefaultReaderRead(this, readRequest);
+ return promise;
+ }
+ releaseLock() {
+ if (!IsReadableStreamDefaultReader(this)) {
+ throw defaultReaderBrandCheckException("releaseLock");
+ }
+ if (this._ownerReadableStream === void 0) {
+ return;
+ }
+ if (this._readRequests.length > 0) {
+ throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");
+ }
+ ReadableStreamReaderGenericRelease(this);
+ }
+ }
+ Object.defineProperties(ReadableStreamDefaultReader.prototype, {
+ cancel: { enumerable: true },
+ read: { enumerable: true },
+ releaseLock: { enumerable: true },
+ closed: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableStreamDefaultReader",
+ configurable: true
+ });
+ }
+ function IsReadableStreamDefaultReader(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_readRequests")) {
+ return false;
+ }
+ return x2 instanceof ReadableStreamDefaultReader;
+ }
+ function ReadableStreamDefaultReaderRead(reader, readRequest) {
+ const stream = reader._ownerReadableStream;
+ stream._disturbed = true;
+ if (stream._state === "closed") {
+ readRequest._closeSteps();
+ } else if (stream._state === "errored") {
+ readRequest._errorSteps(stream._storedError);
+ } else {
+ stream._readableStreamController[PullSteps](readRequest);
+ }
+ }
+ function defaultReaderBrandCheckException(name) {
+ return new TypeError(`ReadableStreamDefaultReader.prototype.${name} can only be used on a ReadableStreamDefaultReader`);
+ }
+ const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {
+ }).prototype);
+ class ReadableStreamAsyncIteratorImpl {
+ constructor(reader, preventCancel) {
+ this._ongoingPromise = void 0;
+ this._isFinished = false;
+ this._reader = reader;
+ this._preventCancel = preventCancel;
+ }
+ next() {
+ const nextSteps = () => this._nextSteps();
+ this._ongoingPromise = this._ongoingPromise ? transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) : nextSteps();
+ return this._ongoingPromise;
+ }
+ return(value) {
+ const returnSteps = () => this._returnSteps(value);
+ return this._ongoingPromise ? transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) : returnSteps();
+ }
+ _nextSteps() {
+ if (this._isFinished) {
+ return Promise.resolve({ value: void 0, done: true });
+ }
+ const reader = this._reader;
+ if (reader._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("iterate"));
+ }
+ let resolvePromise;
+ let rejectPromise;
+ const promise = newPromise((resolve, reject) => {
+ resolvePromise = resolve;
+ rejectPromise = reject;
+ });
+ const readRequest = {
+ _chunkSteps: (chunk) => {
+ this._ongoingPromise = void 0;
+ queueMicrotask(() => resolvePromise({ value: chunk, done: false }));
+ },
+ _closeSteps: () => {
+ this._ongoingPromise = void 0;
+ this._isFinished = true;
+ ReadableStreamReaderGenericRelease(reader);
+ resolvePromise({ value: void 0, done: true });
+ },
+ _errorSteps: (reason) => {
+ this._ongoingPromise = void 0;
+ this._isFinished = true;
+ ReadableStreamReaderGenericRelease(reader);
+ rejectPromise(reason);
+ }
+ };
+ ReadableStreamDefaultReaderRead(reader, readRequest);
+ return promise;
+ }
+ _returnSteps(value) {
+ if (this._isFinished) {
+ return Promise.resolve({ value, done: true });
+ }
+ this._isFinished = true;
+ const reader = this._reader;
+ if (reader._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("finish iterating"));
+ }
+ if (!this._preventCancel) {
+ const result = ReadableStreamReaderGenericCancel(reader, value);
+ ReadableStreamReaderGenericRelease(reader);
+ return transformPromiseWith(result, () => ({ value, done: true }));
+ }
+ ReadableStreamReaderGenericRelease(reader);
+ return promiseResolvedWith({ value, done: true });
+ }
+ }
+ const ReadableStreamAsyncIteratorPrototype = {
+ next() {
+ if (!IsReadableStreamAsyncIterator(this)) {
+ return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"));
+ }
+ return this._asyncIteratorImpl.next();
+ },
+ return(value) {
+ if (!IsReadableStreamAsyncIterator(this)) {
+ return promiseRejectedWith(streamAsyncIteratorBrandCheckException("return"));
+ }
+ return this._asyncIteratorImpl.return(value);
+ }
+ };
+ if (AsyncIteratorPrototype !== void 0) {
+ Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype);
+ }
+ function AcquireReadableStreamAsyncIterator(stream, preventCancel) {
+ const reader = AcquireReadableStreamDefaultReader(stream);
+ const impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel);
+ const iterator = Object.create(ReadableStreamAsyncIteratorPrototype);
+ iterator._asyncIteratorImpl = impl;
+ return iterator;
+ }
+ function IsReadableStreamAsyncIterator(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_asyncIteratorImpl")) {
+ return false;
+ }
+ try {
+ return x2._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl;
+ } catch (_a) {
+ return false;
+ }
+ }
+ function streamAsyncIteratorBrandCheckException(name) {
+ return new TypeError(`ReadableStreamAsyncIterator.${name} can only be used on a ReadableSteamAsyncIterator`);
+ }
+ const NumberIsNaN = Number.isNaN || function(x2) {
+ return x2 !== x2;
+ };
+ function CreateArrayFromList(elements) {
+ return elements.slice();
+ }
+ function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) {
+ new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);
+ }
+ function TransferArrayBuffer(O) {
+ return O;
+ }
+ function IsDetachedBuffer(O) {
+ return false;
+ }
+ function ArrayBufferSlice(buffer, begin, end) {
+ if (buffer.slice) {
+ return buffer.slice(begin, end);
+ }
+ const length = end - begin;
+ const slice = new ArrayBuffer(length);
+ CopyDataBlockBytes(slice, 0, buffer, begin, length);
+ return slice;
+ }
+ function IsNonNegativeNumber(v) {
+ if (typeof v !== "number") {
+ return false;
+ }
+ if (NumberIsNaN(v)) {
+ return false;
+ }
+ if (v < 0) {
+ return false;
+ }
+ return true;
+ }
+ function CloneAsUint8Array(O) {
+ const buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength);
+ return new Uint8Array(buffer);
+ }
+ function DequeueValue(container) {
+ const pair = container._queue.shift();
+ container._queueTotalSize -= pair.size;
+ if (container._queueTotalSize < 0) {
+ container._queueTotalSize = 0;
+ }
+ return pair.value;
+ }
+ function EnqueueValueWithSize(container, value, size) {
+ if (!IsNonNegativeNumber(size) || size === Infinity) {
+ throw new RangeError("Size must be a finite, non-NaN, non-negative number.");
+ }
+ container._queue.push({ value, size });
+ container._queueTotalSize += size;
+ }
+ function PeekQueueValue(container) {
+ const pair = container._queue.peek();
+ return pair.value;
+ }
+ function ResetQueue(container) {
+ container._queue = new SimpleQueue();
+ container._queueTotalSize = 0;
+ }
+ class ReadableStreamBYOBRequest {
+ constructor() {
+ throw new TypeError("Illegal constructor");
+ }
+ get view() {
+ if (!IsReadableStreamBYOBRequest(this)) {
+ throw byobRequestBrandCheckException("view");
+ }
+ return this._view;
+ }
+ respond(bytesWritten) {
+ if (!IsReadableStreamBYOBRequest(this)) {
+ throw byobRequestBrandCheckException("respond");
+ }
+ assertRequiredArgument(bytesWritten, 1, "respond");
+ bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, "First parameter");
+ if (this._associatedReadableByteStreamController === void 0) {
+ throw new TypeError("This BYOB request has been invalidated");
+ }
+ if (IsDetachedBuffer(this._view.buffer))
+ ;
+ ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten);
+ }
+ respondWithNewView(view) {
+ if (!IsReadableStreamBYOBRequest(this)) {
+ throw byobRequestBrandCheckException("respondWithNewView");
+ }
+ assertRequiredArgument(view, 1, "respondWithNewView");
+ if (!ArrayBuffer.isView(view)) {
+ throw new TypeError("You can only respond with array buffer views");
+ }
+ if (this._associatedReadableByteStreamController === void 0) {
+ throw new TypeError("This BYOB request has been invalidated");
+ }
+ if (IsDetachedBuffer(view.buffer))
+ ;
+ ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view);
+ }
+ }
+ Object.defineProperties(ReadableStreamBYOBRequest.prototype, {
+ respond: { enumerable: true },
+ respondWithNewView: { enumerable: true },
+ view: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableStreamBYOBRequest",
+ configurable: true
+ });
+ }
+ class ReadableByteStreamController {
+ constructor() {
+ throw new TypeError("Illegal constructor");
+ }
+ get byobRequest() {
+ if (!IsReadableByteStreamController(this)) {
+ throw byteStreamControllerBrandCheckException("byobRequest");
+ }
+ return ReadableByteStreamControllerGetBYOBRequest(this);
+ }
+ get desiredSize() {
+ if (!IsReadableByteStreamController(this)) {
+ throw byteStreamControllerBrandCheckException("desiredSize");
+ }
+ return ReadableByteStreamControllerGetDesiredSize(this);
+ }
+ close() {
+ if (!IsReadableByteStreamController(this)) {
+ throw byteStreamControllerBrandCheckException("close");
+ }
+ if (this._closeRequested) {
+ throw new TypeError("The stream has already been closed; do not close it again!");
+ }
+ const state = this._controlledReadableByteStream._state;
+ if (state !== "readable") {
+ throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be closed`);
+ }
+ ReadableByteStreamControllerClose(this);
+ }
+ enqueue(chunk) {
+ if (!IsReadableByteStreamController(this)) {
+ throw byteStreamControllerBrandCheckException("enqueue");
+ }
+ assertRequiredArgument(chunk, 1, "enqueue");
+ if (!ArrayBuffer.isView(chunk)) {
+ throw new TypeError("chunk must be an array buffer view");
+ }
+ if (chunk.byteLength === 0) {
+ throw new TypeError("chunk must have non-zero byteLength");
+ }
+ if (chunk.buffer.byteLength === 0) {
+ throw new TypeError(`chunk's buffer must have non-zero byteLength`);
+ }
+ if (this._closeRequested) {
+ throw new TypeError("stream is closed or draining");
+ }
+ const state = this._controlledReadableByteStream._state;
+ if (state !== "readable") {
+ throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be enqueued to`);
+ }
+ ReadableByteStreamControllerEnqueue(this, chunk);
+ }
+ error(e2 = void 0) {
+ if (!IsReadableByteStreamController(this)) {
+ throw byteStreamControllerBrandCheckException("error");
+ }
+ ReadableByteStreamControllerError(this, e2);
+ }
+ [CancelSteps](reason) {
+ ReadableByteStreamControllerClearPendingPullIntos(this);
+ ResetQueue(this);
+ const result = this._cancelAlgorithm(reason);
+ ReadableByteStreamControllerClearAlgorithms(this);
+ return result;
+ }
+ [PullSteps](readRequest) {
+ const stream = this._controlledReadableByteStream;
+ if (this._queueTotalSize > 0) {
+ const entry = this._queue.shift();
+ this._queueTotalSize -= entry.byteLength;
+ ReadableByteStreamControllerHandleQueueDrain(this);
+ const view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength);
+ readRequest._chunkSteps(view);
+ return;
+ }
+ const autoAllocateChunkSize = this._autoAllocateChunkSize;
+ if (autoAllocateChunkSize !== void 0) {
+ let buffer;
+ try {
+ buffer = new ArrayBuffer(autoAllocateChunkSize);
+ } catch (bufferE) {
+ readRequest._errorSteps(bufferE);
+ return;
+ }
+ const pullIntoDescriptor = {
+ buffer,
+ bufferByteLength: autoAllocateChunkSize,
+ byteOffset: 0,
+ byteLength: autoAllocateChunkSize,
+ bytesFilled: 0,
+ elementSize: 1,
+ viewConstructor: Uint8Array,
+ readerType: "default"
+ };
+ this._pendingPullIntos.push(pullIntoDescriptor);
+ }
+ ReadableStreamAddReadRequest(stream, readRequest);
+ ReadableByteStreamControllerCallPullIfNeeded(this);
+ }
+ }
+ Object.defineProperties(ReadableByteStreamController.prototype, {
+ close: { enumerable: true },
+ enqueue: { enumerable: true },
+ error: { enumerable: true },
+ byobRequest: { enumerable: true },
+ desiredSize: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableByteStreamController",
+ configurable: true
+ });
+ }
+ function IsReadableByteStreamController(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_controlledReadableByteStream")) {
+ return false;
+ }
+ return x2 instanceof ReadableByteStreamController;
+ }
+ function IsReadableStreamBYOBRequest(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_associatedReadableByteStreamController")) {
+ return false;
+ }
+ return x2 instanceof ReadableStreamBYOBRequest;
+ }
+ function ReadableByteStreamControllerCallPullIfNeeded(controller) {
+ const shouldPull = ReadableByteStreamControllerShouldCallPull(controller);
+ if (!shouldPull) {
+ return;
+ }
+ if (controller._pulling) {
+ controller._pullAgain = true;
+ return;
+ }
+ controller._pulling = true;
+ const pullPromise = controller._pullAlgorithm();
+ uponPromise(pullPromise, () => {
+ controller._pulling = false;
+ if (controller._pullAgain) {
+ controller._pullAgain = false;
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }
+ }, (e2) => {
+ ReadableByteStreamControllerError(controller, e2);
+ });
+ }
+ function ReadableByteStreamControllerClearPendingPullIntos(controller) {
+ ReadableByteStreamControllerInvalidateBYOBRequest(controller);
+ controller._pendingPullIntos = new SimpleQueue();
+ }
+ function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) {
+ let done = false;
+ if (stream._state === "closed") {
+ done = true;
+ }
+ const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);
+ if (pullIntoDescriptor.readerType === "default") {
+ ReadableStreamFulfillReadRequest(stream, filledView, done);
+ } else {
+ ReadableStreamFulfillReadIntoRequest(stream, filledView, done);
+ }
+ }
+ function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) {
+ const bytesFilled = pullIntoDescriptor.bytesFilled;
+ const elementSize = pullIntoDescriptor.elementSize;
+ return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize);
+ }
+ function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) {
+ controller._queue.push({ buffer, byteOffset, byteLength });
+ controller._queueTotalSize += byteLength;
+ }
+ function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) {
+ const elementSize = pullIntoDescriptor.elementSize;
+ const currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize;
+ const maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled);
+ const maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy;
+ const maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize;
+ let totalBytesToCopyRemaining = maxBytesToCopy;
+ let ready = false;
+ if (maxAlignedBytes > currentAlignedBytes) {
+ totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled;
+ ready = true;
+ }
+ const queue = controller._queue;
+ while (totalBytesToCopyRemaining > 0) {
+ const headOfQueue = queue.peek();
+ const bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength);
+ const destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;
+ CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy);
+ if (headOfQueue.byteLength === bytesToCopy) {
+ queue.shift();
+ } else {
+ headOfQueue.byteOffset += bytesToCopy;
+ headOfQueue.byteLength -= bytesToCopy;
+ }
+ controller._queueTotalSize -= bytesToCopy;
+ ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor);
+ totalBytesToCopyRemaining -= bytesToCopy;
+ }
+ return ready;
+ }
+ function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) {
+ pullIntoDescriptor.bytesFilled += size;
+ }
+ function ReadableByteStreamControllerHandleQueueDrain(controller) {
+ if (controller._queueTotalSize === 0 && controller._closeRequested) {
+ ReadableByteStreamControllerClearAlgorithms(controller);
+ ReadableStreamClose(controller._controlledReadableByteStream);
+ } else {
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }
+ }
+ function ReadableByteStreamControllerInvalidateBYOBRequest(controller) {
+ if (controller._byobRequest === null) {
+ return;
+ }
+ controller._byobRequest._associatedReadableByteStreamController = void 0;
+ controller._byobRequest._view = null;
+ controller._byobRequest = null;
+ }
+ function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) {
+ while (controller._pendingPullIntos.length > 0) {
+ if (controller._queueTotalSize === 0) {
+ return;
+ }
+ const pullIntoDescriptor = controller._pendingPullIntos.peek();
+ if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {
+ ReadableByteStreamControllerShiftPendingPullInto(controller);
+ ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);
+ }
+ }
+ }
+ function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) {
+ const stream = controller._controlledReadableByteStream;
+ let elementSize = 1;
+ if (view.constructor !== DataView) {
+ elementSize = view.constructor.BYTES_PER_ELEMENT;
+ }
+ const ctor = view.constructor;
+ const buffer = TransferArrayBuffer(view.buffer);
+ const pullIntoDescriptor = {
+ buffer,
+ bufferByteLength: buffer.byteLength,
+ byteOffset: view.byteOffset,
+ byteLength: view.byteLength,
+ bytesFilled: 0,
+ elementSize,
+ viewConstructor: ctor,
+ readerType: "byob"
+ };
+ if (controller._pendingPullIntos.length > 0) {
+ controller._pendingPullIntos.push(pullIntoDescriptor);
+ ReadableStreamAddReadIntoRequest(stream, readIntoRequest);
+ return;
+ }
+ if (stream._state === "closed") {
+ const emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0);
+ readIntoRequest._closeSteps(emptyView);
+ return;
+ }
+ if (controller._queueTotalSize > 0) {
+ if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {
+ const filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);
+ ReadableByteStreamControllerHandleQueueDrain(controller);
+ readIntoRequest._chunkSteps(filledView);
+ return;
+ }
+ if (controller._closeRequested) {
+ const e2 = new TypeError("Insufficient bytes to fill elements in the given buffer");
+ ReadableByteStreamControllerError(controller, e2);
+ readIntoRequest._errorSteps(e2);
+ return;
+ }
+ }
+ controller._pendingPullIntos.push(pullIntoDescriptor);
+ ReadableStreamAddReadIntoRequest(stream, readIntoRequest);
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }
+ function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) {
+ const stream = controller._controlledReadableByteStream;
+ if (ReadableStreamHasBYOBReader(stream)) {
+ while (ReadableStreamGetNumReadIntoRequests(stream) > 0) {
+ const pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller);
+ ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor);
+ }
+ }
+ }
+ function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) {
+ ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor);
+ if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) {
+ return;
+ }
+ ReadableByteStreamControllerShiftPendingPullInto(controller);
+ const remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize;
+ if (remainderSize > 0) {
+ const end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;
+ const remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end);
+ ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength);
+ }
+ pullIntoDescriptor.bytesFilled -= remainderSize;
+ ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);
+ ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);
+ }
+ function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) {
+ const firstDescriptor = controller._pendingPullIntos.peek();
+ ReadableByteStreamControllerInvalidateBYOBRequest(controller);
+ const state = controller._controlledReadableByteStream._state;
+ if (state === "closed") {
+ ReadableByteStreamControllerRespondInClosedState(controller);
+ } else {
+ ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor);
+ }
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }
+ function ReadableByteStreamControllerShiftPendingPullInto(controller) {
+ const descriptor = controller._pendingPullIntos.shift();
+ return descriptor;
+ }
+ function ReadableByteStreamControllerShouldCallPull(controller) {
+ const stream = controller._controlledReadableByteStream;
+ if (stream._state !== "readable") {
+ return false;
+ }
+ if (controller._closeRequested) {
+ return false;
+ }
+ if (!controller._started) {
+ return false;
+ }
+ if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
+ return true;
+ }
+ if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) {
+ return true;
+ }
+ const desiredSize = ReadableByteStreamControllerGetDesiredSize(controller);
+ if (desiredSize > 0) {
+ return true;
+ }
+ return false;
+ }
+ function ReadableByteStreamControllerClearAlgorithms(controller) {
+ controller._pullAlgorithm = void 0;
+ controller._cancelAlgorithm = void 0;
+ }
+ function ReadableByteStreamControllerClose(controller) {
+ const stream = controller._controlledReadableByteStream;
+ if (controller._closeRequested || stream._state !== "readable") {
+ return;
+ }
+ if (controller._queueTotalSize > 0) {
+ controller._closeRequested = true;
+ return;
+ }
+ if (controller._pendingPullIntos.length > 0) {
+ const firstPendingPullInto = controller._pendingPullIntos.peek();
+ if (firstPendingPullInto.bytesFilled > 0) {
+ const e2 = new TypeError("Insufficient bytes to fill elements in the given buffer");
+ ReadableByteStreamControllerError(controller, e2);
+ throw e2;
+ }
+ }
+ ReadableByteStreamControllerClearAlgorithms(controller);
+ ReadableStreamClose(stream);
+ }
+ function ReadableByteStreamControllerEnqueue(controller, chunk) {
+ const stream = controller._controlledReadableByteStream;
+ if (controller._closeRequested || stream._state !== "readable") {
+ return;
+ }
+ const buffer = chunk.buffer;
+ const byteOffset = chunk.byteOffset;
+ const byteLength = chunk.byteLength;
+ const transferredBuffer = TransferArrayBuffer(buffer);
+ if (controller._pendingPullIntos.length > 0) {
+ const firstPendingPullInto = controller._pendingPullIntos.peek();
+ if (IsDetachedBuffer(firstPendingPullInto.buffer))
+ ;
+ firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer);
+ }
+ ReadableByteStreamControllerInvalidateBYOBRequest(controller);
+ if (ReadableStreamHasDefaultReader(stream)) {
+ if (ReadableStreamGetNumReadRequests(stream) === 0) {
+ ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
+ } else {
+ if (controller._pendingPullIntos.length > 0) {
+ ReadableByteStreamControllerShiftPendingPullInto(controller);
+ }
+ const transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength);
+ ReadableStreamFulfillReadRequest(stream, transferredView, false);
+ }
+ } else if (ReadableStreamHasBYOBReader(stream)) {
+ ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
+ ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);
+ } else {
+ ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);
+ }
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }
+ function ReadableByteStreamControllerError(controller, e2) {
+ const stream = controller._controlledReadableByteStream;
+ if (stream._state !== "readable") {
+ return;
+ }
+ ReadableByteStreamControllerClearPendingPullIntos(controller);
+ ResetQueue(controller);
+ ReadableByteStreamControllerClearAlgorithms(controller);
+ ReadableStreamError(stream, e2);
+ }
+ function ReadableByteStreamControllerGetBYOBRequest(controller) {
+ if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) {
+ const firstDescriptor = controller._pendingPullIntos.peek();
+ const view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled);
+ const byobRequest = Object.create(ReadableStreamBYOBRequest.prototype);
+ SetUpReadableStreamBYOBRequest(byobRequest, controller, view);
+ controller._byobRequest = byobRequest;
+ }
+ return controller._byobRequest;
+ }
+ function ReadableByteStreamControllerGetDesiredSize(controller) {
+ const state = controller._controlledReadableByteStream._state;
+ if (state === "errored") {
+ return null;
+ }
+ if (state === "closed") {
+ return 0;
+ }
+ return controller._strategyHWM - controller._queueTotalSize;
+ }
+ function ReadableByteStreamControllerRespond(controller, bytesWritten) {
+ const firstDescriptor = controller._pendingPullIntos.peek();
+ const state = controller._controlledReadableByteStream._state;
+ if (state === "closed") {
+ if (bytesWritten !== 0) {
+ throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");
+ }
+ } else {
+ if (bytesWritten === 0) {
+ throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");
+ }
+ if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) {
+ throw new RangeError("bytesWritten out of range");
+ }
+ }
+ firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer);
+ ReadableByteStreamControllerRespondInternal(controller, bytesWritten);
+ }
+ function ReadableByteStreamControllerRespondWithNewView(controller, view) {
+ const firstDescriptor = controller._pendingPullIntos.peek();
+ const state = controller._controlledReadableByteStream._state;
+ if (state === "closed") {
+ if (view.byteLength !== 0) {
+ throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream");
+ }
+ } else {
+ if (view.byteLength === 0) {
+ throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");
+ }
+ }
+ if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) {
+ throw new RangeError("The region specified by view does not match byobRequest");
+ }
+ if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) {
+ throw new RangeError("The buffer of view has different capacity than byobRequest");
+ }
+ if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) {
+ throw new RangeError("The region specified by view is larger than byobRequest");
+ }
+ const viewByteLength = view.byteLength;
+ firstDescriptor.buffer = TransferArrayBuffer(view.buffer);
+ ReadableByteStreamControllerRespondInternal(controller, viewByteLength);
+ }
+ function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) {
+ controller._controlledReadableByteStream = stream;
+ controller._pullAgain = false;
+ controller._pulling = false;
+ controller._byobRequest = null;
+ controller._queue = controller._queueTotalSize = void 0;
+ ResetQueue(controller);
+ controller._closeRequested = false;
+ controller._started = false;
+ controller._strategyHWM = highWaterMark;
+ controller._pullAlgorithm = pullAlgorithm;
+ controller._cancelAlgorithm = cancelAlgorithm;
+ controller._autoAllocateChunkSize = autoAllocateChunkSize;
+ controller._pendingPullIntos = new SimpleQueue();
+ stream._readableStreamController = controller;
+ const startResult = startAlgorithm();
+ uponPromise(promiseResolvedWith(startResult), () => {
+ controller._started = true;
+ ReadableByteStreamControllerCallPullIfNeeded(controller);
+ }, (r2) => {
+ ReadableByteStreamControllerError(controller, r2);
+ });
+ }
+ function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) {
+ const controller = Object.create(ReadableByteStreamController.prototype);
+ let startAlgorithm = () => void 0;
+ let pullAlgorithm = () => promiseResolvedWith(void 0);
+ let cancelAlgorithm = () => promiseResolvedWith(void 0);
+ if (underlyingByteSource.start !== void 0) {
+ startAlgorithm = () => underlyingByteSource.start(controller);
+ }
+ if (underlyingByteSource.pull !== void 0) {
+ pullAlgorithm = () => underlyingByteSource.pull(controller);
+ }
+ if (underlyingByteSource.cancel !== void 0) {
+ cancelAlgorithm = (reason) => underlyingByteSource.cancel(reason);
+ }
+ const autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;
+ if (autoAllocateChunkSize === 0) {
+ throw new TypeError("autoAllocateChunkSize must be greater than 0");
+ }
+ SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize);
+ }
+ function SetUpReadableStreamBYOBRequest(request, controller, view) {
+ request._associatedReadableByteStreamController = controller;
+ request._view = view;
+ }
+ function byobRequestBrandCheckException(name) {
+ return new TypeError(`ReadableStreamBYOBRequest.prototype.${name} can only be used on a ReadableStreamBYOBRequest`);
+ }
+ function byteStreamControllerBrandCheckException(name) {
+ return new TypeError(`ReadableByteStreamController.prototype.${name} can only be used on a ReadableByteStreamController`);
+ }
+ function AcquireReadableStreamBYOBReader(stream) {
+ return new ReadableStreamBYOBReader(stream);
+ }
+ function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) {
+ stream._reader._readIntoRequests.push(readIntoRequest);
+ }
+ function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) {
+ const reader = stream._reader;
+ const readIntoRequest = reader._readIntoRequests.shift();
+ if (done) {
+ readIntoRequest._closeSteps(chunk);
+ } else {
+ readIntoRequest._chunkSteps(chunk);
+ }
+ }
+ function ReadableStreamGetNumReadIntoRequests(stream) {
+ return stream._reader._readIntoRequests.length;
+ }
+ function ReadableStreamHasBYOBReader(stream) {
+ const reader = stream._reader;
+ if (reader === void 0) {
+ return false;
+ }
+ if (!IsReadableStreamBYOBReader(reader)) {
+ return false;
+ }
+ return true;
+ }
+ class ReadableStreamBYOBReader {
+ constructor(stream) {
+ assertRequiredArgument(stream, 1, "ReadableStreamBYOBReader");
+ assertReadableStream(stream, "First parameter");
+ if (IsReadableStreamLocked(stream)) {
+ throw new TypeError("This stream has already been locked for exclusive reading by another reader");
+ }
+ if (!IsReadableByteStreamController(stream._readableStreamController)) {
+ throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");
+ }
+ ReadableStreamReaderGenericInitialize(this, stream);
+ this._readIntoRequests = new SimpleQueue();
+ }
+ get closed() {
+ if (!IsReadableStreamBYOBReader(this)) {
+ return promiseRejectedWith(byobReaderBrandCheckException("closed"));
+ }
+ return this._closedPromise;
+ }
+ cancel(reason = void 0) {
+ if (!IsReadableStreamBYOBReader(this)) {
+ return promiseRejectedWith(byobReaderBrandCheckException("cancel"));
+ }
+ if (this._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("cancel"));
+ }
+ return ReadableStreamReaderGenericCancel(this, reason);
+ }
+ read(view) {
+ if (!IsReadableStreamBYOBReader(this)) {
+ return promiseRejectedWith(byobReaderBrandCheckException("read"));
+ }
+ if (!ArrayBuffer.isView(view)) {
+ return promiseRejectedWith(new TypeError("view must be an array buffer view"));
+ }
+ if (view.byteLength === 0) {
+ return promiseRejectedWith(new TypeError("view must have non-zero byteLength"));
+ }
+ if (view.buffer.byteLength === 0) {
+ return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`));
+ }
+ if (IsDetachedBuffer(view.buffer))
+ ;
+ if (this._ownerReadableStream === void 0) {
+ return promiseRejectedWith(readerLockException("read from"));
+ }
+ let resolvePromise;
+ let rejectPromise;
+ const promise = newPromise((resolve, reject) => {
+ resolvePromise = resolve;
+ rejectPromise = reject;
+ });
+ const readIntoRequest = {
+ _chunkSteps: (chunk) => resolvePromise({ value: chunk, done: false }),
+ _closeSteps: (chunk) => resolvePromise({ value: chunk, done: true }),
+ _errorSteps: (e2) => rejectPromise(e2)
+ };
+ ReadableStreamBYOBReaderRead(this, view, readIntoRequest);
+ return promise;
+ }
+ releaseLock() {
+ if (!IsReadableStreamBYOBReader(this)) {
+ throw byobReaderBrandCheckException("releaseLock");
+ }
+ if (this._ownerReadableStream === void 0) {
+ return;
+ }
+ if (this._readIntoRequests.length > 0) {
+ throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");
+ }
+ ReadableStreamReaderGenericRelease(this);
+ }
+ }
+ Object.defineProperties(ReadableStreamBYOBReader.prototype, {
+ cancel: { enumerable: true },
+ read: { enumerable: true },
+ releaseLock: { enumerable: true },
+ closed: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableStreamBYOBReader",
+ configurable: true
+ });
+ }
+ function IsReadableStreamBYOBReader(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_readIntoRequests")) {
+ return false;
+ }
+ return x2 instanceof ReadableStreamBYOBReader;
+ }
+ function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) {
+ const stream = reader._ownerReadableStream;
+ stream._disturbed = true;
+ if (stream._state === "errored") {
+ readIntoRequest._errorSteps(stream._storedError);
+ } else {
+ ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest);
+ }
+ }
+ function byobReaderBrandCheckException(name) {
+ return new TypeError(`ReadableStreamBYOBReader.prototype.${name} can only be used on a ReadableStreamBYOBReader`);
+ }
+ function ExtractHighWaterMark(strategy, defaultHWM) {
+ const { highWaterMark } = strategy;
+ if (highWaterMark === void 0) {
+ return defaultHWM;
+ }
+ if (NumberIsNaN(highWaterMark) || highWaterMark < 0) {
+ throw new RangeError("Invalid highWaterMark");
+ }
+ return highWaterMark;
+ }
+ function ExtractSizeAlgorithm(strategy) {
+ const { size } = strategy;
+ if (!size) {
+ return () => 1;
+ }
+ return size;
+ }
+ function convertQueuingStrategy(init, context) {
+ assertDictionary(init, context);
+ const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
+ const size = init === null || init === void 0 ? void 0 : init.size;
+ return {
+ highWaterMark: highWaterMark === void 0 ? void 0 : convertUnrestrictedDouble(highWaterMark),
+ size: size === void 0 ? void 0 : convertQueuingStrategySize(size, `${context} has member 'size' that`)
+ };
+ }
+ function convertQueuingStrategySize(fn, context) {
+ assertFunction(fn, context);
+ return (chunk) => convertUnrestrictedDouble(fn(chunk));
+ }
+ function convertUnderlyingSink(original, context) {
+ assertDictionary(original, context);
+ const abort = original === null || original === void 0 ? void 0 : original.abort;
+ const close = original === null || original === void 0 ? void 0 : original.close;
+ const start = original === null || original === void 0 ? void 0 : original.start;
+ const type = original === null || original === void 0 ? void 0 : original.type;
+ const write2 = original === null || original === void 0 ? void 0 : original.write;
+ return {
+ abort: abort === void 0 ? void 0 : convertUnderlyingSinkAbortCallback(abort, original, `${context} has member 'abort' that`),
+ close: close === void 0 ? void 0 : convertUnderlyingSinkCloseCallback(close, original, `${context} has member 'close' that`),
+ start: start === void 0 ? void 0 : convertUnderlyingSinkStartCallback(start, original, `${context} has member 'start' that`),
+ write: write2 === void 0 ? void 0 : convertUnderlyingSinkWriteCallback(write2, original, `${context} has member 'write' that`),
+ type
+ };
+ }
+ function convertUnderlyingSinkAbortCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (reason) => promiseCall(fn, original, [reason]);
+ }
+ function convertUnderlyingSinkCloseCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return () => promiseCall(fn, original, []);
+ }
+ function convertUnderlyingSinkStartCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (controller) => reflectCall(fn, original, [controller]);
+ }
+ function convertUnderlyingSinkWriteCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (chunk, controller) => promiseCall(fn, original, [chunk, controller]);
+ }
+ function assertWritableStream(x2, context) {
+ if (!IsWritableStream(x2)) {
+ throw new TypeError(`${context} is not a WritableStream.`);
+ }
+ }
+ function isAbortSignal2(value) {
+ if (typeof value !== "object" || value === null) {
+ return false;
+ }
+ try {
+ return typeof value.aborted === "boolean";
+ } catch (_a) {
+ return false;
+ }
+ }
+ const supportsAbortController = typeof AbortController === "function";
+ function createAbortController() {
+ if (supportsAbortController) {
+ return new AbortController();
+ }
+ return void 0;
+ }
+ class WritableStream {
+ constructor(rawUnderlyingSink = {}, rawStrategy = {}) {
+ if (rawUnderlyingSink === void 0) {
+ rawUnderlyingSink = null;
+ } else {
+ assertObject(rawUnderlyingSink, "First parameter");
+ }
+ const strategy = convertQueuingStrategy(rawStrategy, "Second parameter");
+ const underlyingSink = convertUnderlyingSink(rawUnderlyingSink, "First parameter");
+ InitializeWritableStream(this);
+ const type = underlyingSink.type;
+ if (type !== void 0) {
+ throw new RangeError("Invalid type is specified");
+ }
+ const sizeAlgorithm = ExtractSizeAlgorithm(strategy);
+ const highWaterMark = ExtractHighWaterMark(strategy, 1);
+ SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm);
+ }
+ get locked() {
+ if (!IsWritableStream(this)) {
+ throw streamBrandCheckException$2("locked");
+ }
+ return IsWritableStreamLocked(this);
+ }
+ abort(reason = void 0) {
+ if (!IsWritableStream(this)) {
+ return promiseRejectedWith(streamBrandCheckException$2("abort"));
+ }
+ if (IsWritableStreamLocked(this)) {
+ return promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer"));
+ }
+ return WritableStreamAbort(this, reason);
+ }
+ close() {
+ if (!IsWritableStream(this)) {
+ return promiseRejectedWith(streamBrandCheckException$2("close"));
+ }
+ if (IsWritableStreamLocked(this)) {
+ return promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer"));
+ }
+ if (WritableStreamCloseQueuedOrInFlight(this)) {
+ return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"));
+ }
+ return WritableStreamClose(this);
+ }
+ getWriter() {
+ if (!IsWritableStream(this)) {
+ throw streamBrandCheckException$2("getWriter");
+ }
+ return AcquireWritableStreamDefaultWriter(this);
+ }
+ }
+ Object.defineProperties(WritableStream.prototype, {
+ abort: { enumerable: true },
+ close: { enumerable: true },
+ getWriter: { enumerable: true },
+ locked: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, {
+ value: "WritableStream",
+ configurable: true
+ });
+ }
+ function AcquireWritableStreamDefaultWriter(stream) {
+ return new WritableStreamDefaultWriter(stream);
+ }
+ function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) {
+ const stream = Object.create(WritableStream.prototype);
+ InitializeWritableStream(stream);
+ const controller = Object.create(WritableStreamDefaultController.prototype);
+ SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
+ return stream;
+ }
+ function InitializeWritableStream(stream) {
+ stream._state = "writable";
+ stream._storedError = void 0;
+ stream._writer = void 0;
+ stream._writableStreamController = void 0;
+ stream._writeRequests = new SimpleQueue();
+ stream._inFlightWriteRequest = void 0;
+ stream._closeRequest = void 0;
+ stream._inFlightCloseRequest = void 0;
+ stream._pendingAbortRequest = void 0;
+ stream._backpressure = false;
+ }
+ function IsWritableStream(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_writableStreamController")) {
+ return false;
+ }
+ return x2 instanceof WritableStream;
+ }
+ function IsWritableStreamLocked(stream) {
+ if (stream._writer === void 0) {
+ return false;
+ }
+ return true;
+ }
+ function WritableStreamAbort(stream, reason) {
+ var _a;
+ if (stream._state === "closed" || stream._state === "errored") {
+ return promiseResolvedWith(void 0);
+ }
+ stream._writableStreamController._abortReason = reason;
+ (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort();
+ const state = stream._state;
+ if (state === "closed" || state === "errored") {
+ return promiseResolvedWith(void 0);
+ }
+ if (stream._pendingAbortRequest !== void 0) {
+ return stream._pendingAbortRequest._promise;
+ }
+ let wasAlreadyErroring = false;
+ if (state === "erroring") {
+ wasAlreadyErroring = true;
+ reason = void 0;
+ }
+ const promise = newPromise((resolve, reject) => {
+ stream._pendingAbortRequest = {
+ _promise: void 0,
+ _resolve: resolve,
+ _reject: reject,
+ _reason: reason,
+ _wasAlreadyErroring: wasAlreadyErroring
+ };
+ });
+ stream._pendingAbortRequest._promise = promise;
+ if (!wasAlreadyErroring) {
+ WritableStreamStartErroring(stream, reason);
+ }
+ return promise;
+ }
+ function WritableStreamClose(stream) {
+ const state = stream._state;
+ if (state === "closed" || state === "errored") {
+ return promiseRejectedWith(new TypeError(`The stream (in ${state} state) is not in the writable state and cannot be closed`));
+ }
+ const promise = newPromise((resolve, reject) => {
+ const closeRequest = {
+ _resolve: resolve,
+ _reject: reject
+ };
+ stream._closeRequest = closeRequest;
+ });
+ const writer = stream._writer;
+ if (writer !== void 0 && stream._backpressure && state === "writable") {
+ defaultWriterReadyPromiseResolve(writer);
+ }
+ WritableStreamDefaultControllerClose(stream._writableStreamController);
+ return promise;
+ }
+ function WritableStreamAddWriteRequest(stream) {
+ const promise = newPromise((resolve, reject) => {
+ const writeRequest = {
+ _resolve: resolve,
+ _reject: reject
+ };
+ stream._writeRequests.push(writeRequest);
+ });
+ return promise;
+ }
+ function WritableStreamDealWithRejection(stream, error) {
+ const state = stream._state;
+ if (state === "writable") {
+ WritableStreamStartErroring(stream, error);
+ return;
+ }
+ WritableStreamFinishErroring(stream);
+ }
+ function WritableStreamStartErroring(stream, reason) {
+ const controller = stream._writableStreamController;
+ stream._state = "erroring";
+ stream._storedError = reason;
+ const writer = stream._writer;
+ if (writer !== void 0) {
+ WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);
+ }
+ if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) {
+ WritableStreamFinishErroring(stream);
+ }
+ }
+ function WritableStreamFinishErroring(stream) {
+ stream._state = "errored";
+ stream._writableStreamController[ErrorSteps]();
+ const storedError = stream._storedError;
+ stream._writeRequests.forEach((writeRequest) => {
+ writeRequest._reject(storedError);
+ });
+ stream._writeRequests = new SimpleQueue();
+ if (stream._pendingAbortRequest === void 0) {
+ WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+ return;
+ }
+ const abortRequest = stream._pendingAbortRequest;
+ stream._pendingAbortRequest = void 0;
+ if (abortRequest._wasAlreadyErroring) {
+ abortRequest._reject(storedError);
+ WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+ return;
+ }
+ const promise = stream._writableStreamController[AbortSteps](abortRequest._reason);
+ uponPromise(promise, () => {
+ abortRequest._resolve();
+ WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+ }, (reason) => {
+ abortRequest._reject(reason);
+ WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
+ });
+ }
+ function WritableStreamFinishInFlightWrite(stream) {
+ stream._inFlightWriteRequest._resolve(void 0);
+ stream._inFlightWriteRequest = void 0;
+ }
+ function WritableStreamFinishInFlightWriteWithError(stream, error) {
+ stream._inFlightWriteRequest._reject(error);
+ stream._inFlightWriteRequest = void 0;
+ WritableStreamDealWithRejection(stream, error);
+ }
+ function WritableStreamFinishInFlightClose(stream) {
+ stream._inFlightCloseRequest._resolve(void 0);
+ stream._inFlightCloseRequest = void 0;
+ const state = stream._state;
+ if (state === "erroring") {
+ stream._storedError = void 0;
+ if (stream._pendingAbortRequest !== void 0) {
+ stream._pendingAbortRequest._resolve();
+ stream._pendingAbortRequest = void 0;
+ }
+ }
+ stream._state = "closed";
+ const writer = stream._writer;
+ if (writer !== void 0) {
+ defaultWriterClosedPromiseResolve(writer);
+ }
+ }
+ function WritableStreamFinishInFlightCloseWithError(stream, error) {
+ stream._inFlightCloseRequest._reject(error);
+ stream._inFlightCloseRequest = void 0;
+ if (stream._pendingAbortRequest !== void 0) {
+ stream._pendingAbortRequest._reject(error);
+ stream._pendingAbortRequest = void 0;
+ }
+ WritableStreamDealWithRejection(stream, error);
+ }
+ function WritableStreamCloseQueuedOrInFlight(stream) {
+ if (stream._closeRequest === void 0 && stream._inFlightCloseRequest === void 0) {
+ return false;
+ }
+ return true;
+ }
+ function WritableStreamHasOperationMarkedInFlight(stream) {
+ if (stream._inFlightWriteRequest === void 0 && stream._inFlightCloseRequest === void 0) {
+ return false;
+ }
+ return true;
+ }
+ function WritableStreamMarkCloseRequestInFlight(stream) {
+ stream._inFlightCloseRequest = stream._closeRequest;
+ stream._closeRequest = void 0;
+ }
+ function WritableStreamMarkFirstWriteRequestInFlight(stream) {
+ stream._inFlightWriteRequest = stream._writeRequests.shift();
+ }
+ function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) {
+ if (stream._closeRequest !== void 0) {
+ stream._closeRequest._reject(stream._storedError);
+ stream._closeRequest = void 0;
+ }
+ const writer = stream._writer;
+ if (writer !== void 0) {
+ defaultWriterClosedPromiseReject(writer, stream._storedError);
+ }
+ }
+ function WritableStreamUpdateBackpressure(stream, backpressure) {
+ const writer = stream._writer;
+ if (writer !== void 0 && backpressure !== stream._backpressure) {
+ if (backpressure) {
+ defaultWriterReadyPromiseReset(writer);
+ } else {
+ defaultWriterReadyPromiseResolve(writer);
+ }
+ }
+ stream._backpressure = backpressure;
+ }
+ class WritableStreamDefaultWriter {
+ constructor(stream) {
+ assertRequiredArgument(stream, 1, "WritableStreamDefaultWriter");
+ assertWritableStream(stream, "First parameter");
+ if (IsWritableStreamLocked(stream)) {
+ throw new TypeError("This stream has already been locked for exclusive writing by another writer");
+ }
+ this._ownerWritableStream = stream;
+ stream._writer = this;
+ const state = stream._state;
+ if (state === "writable") {
+ if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) {
+ defaultWriterReadyPromiseInitialize(this);
+ } else {
+ defaultWriterReadyPromiseInitializeAsResolved(this);
+ }
+ defaultWriterClosedPromiseInitialize(this);
+ } else if (state === "erroring") {
+ defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError);
+ defaultWriterClosedPromiseInitialize(this);
+ } else if (state === "closed") {
+ defaultWriterReadyPromiseInitializeAsResolved(this);
+ defaultWriterClosedPromiseInitializeAsResolved(this);
+ } else {
+ const storedError = stream._storedError;
+ defaultWriterReadyPromiseInitializeAsRejected(this, storedError);
+ defaultWriterClosedPromiseInitializeAsRejected(this, storedError);
+ }
+ }
+ get closed() {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ return promiseRejectedWith(defaultWriterBrandCheckException("closed"));
+ }
+ return this._closedPromise;
+ }
+ get desiredSize() {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ throw defaultWriterBrandCheckException("desiredSize");
+ }
+ if (this._ownerWritableStream === void 0) {
+ throw defaultWriterLockException("desiredSize");
+ }
+ return WritableStreamDefaultWriterGetDesiredSize(this);
+ }
+ get ready() {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ return promiseRejectedWith(defaultWriterBrandCheckException("ready"));
+ }
+ return this._readyPromise;
+ }
+ abort(reason = void 0) {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ return promiseRejectedWith(defaultWriterBrandCheckException("abort"));
+ }
+ if (this._ownerWritableStream === void 0) {
+ return promiseRejectedWith(defaultWriterLockException("abort"));
+ }
+ return WritableStreamDefaultWriterAbort(this, reason);
+ }
+ close() {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ return promiseRejectedWith(defaultWriterBrandCheckException("close"));
+ }
+ const stream = this._ownerWritableStream;
+ if (stream === void 0) {
+ return promiseRejectedWith(defaultWriterLockException("close"));
+ }
+ if (WritableStreamCloseQueuedOrInFlight(stream)) {
+ return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"));
+ }
+ return WritableStreamDefaultWriterClose(this);
+ }
+ releaseLock() {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ throw defaultWriterBrandCheckException("releaseLock");
+ }
+ const stream = this._ownerWritableStream;
+ if (stream === void 0) {
+ return;
+ }
+ WritableStreamDefaultWriterRelease(this);
+ }
+ write(chunk = void 0) {
+ if (!IsWritableStreamDefaultWriter(this)) {
+ return promiseRejectedWith(defaultWriterBrandCheckException("write"));
+ }
+ if (this._ownerWritableStream === void 0) {
+ return promiseRejectedWith(defaultWriterLockException("write to"));
+ }
+ return WritableStreamDefaultWriterWrite(this, chunk);
+ }
+ }
+ Object.defineProperties(WritableStreamDefaultWriter.prototype, {
+ abort: { enumerable: true },
+ close: { enumerable: true },
+ releaseLock: { enumerable: true },
+ write: { enumerable: true },
+ closed: { enumerable: true },
+ desiredSize: { enumerable: true },
+ ready: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, {
+ value: "WritableStreamDefaultWriter",
+ configurable: true
+ });
+ }
+ function IsWritableStreamDefaultWriter(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_ownerWritableStream")) {
+ return false;
+ }
+ return x2 instanceof WritableStreamDefaultWriter;
+ }
+ function WritableStreamDefaultWriterAbort(writer, reason) {
+ const stream = writer._ownerWritableStream;
+ return WritableStreamAbort(stream, reason);
+ }
+ function WritableStreamDefaultWriterClose(writer) {
+ const stream = writer._ownerWritableStream;
+ return WritableStreamClose(stream);
+ }
+ function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) {
+ const stream = writer._ownerWritableStream;
+ const state = stream._state;
+ if (WritableStreamCloseQueuedOrInFlight(stream) || state === "closed") {
+ return promiseResolvedWith(void 0);
+ }
+ if (state === "errored") {
+ return promiseRejectedWith(stream._storedError);
+ }
+ return WritableStreamDefaultWriterClose(writer);
+ }
+ function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) {
+ if (writer._closedPromiseState === "pending") {
+ defaultWriterClosedPromiseReject(writer, error);
+ } else {
+ defaultWriterClosedPromiseResetToRejected(writer, error);
+ }
+ }
+ function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) {
+ if (writer._readyPromiseState === "pending") {
+ defaultWriterReadyPromiseReject(writer, error);
+ } else {
+ defaultWriterReadyPromiseResetToRejected(writer, error);
+ }
+ }
+ function WritableStreamDefaultWriterGetDesiredSize(writer) {
+ const stream = writer._ownerWritableStream;
+ const state = stream._state;
+ if (state === "errored" || state === "erroring") {
+ return null;
+ }
+ if (state === "closed") {
+ return 0;
+ }
+ return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController);
+ }
+ function WritableStreamDefaultWriterRelease(writer) {
+ const stream = writer._ownerWritableStream;
+ const releasedError = new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`);
+ WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);
+ WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);
+ stream._writer = void 0;
+ writer._ownerWritableStream = void 0;
+ }
+ function WritableStreamDefaultWriterWrite(writer, chunk) {
+ const stream = writer._ownerWritableStream;
+ const controller = stream._writableStreamController;
+ const chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);
+ if (stream !== writer._ownerWritableStream) {
+ return promiseRejectedWith(defaultWriterLockException("write to"));
+ }
+ const state = stream._state;
+ if (state === "errored") {
+ return promiseRejectedWith(stream._storedError);
+ }
+ if (WritableStreamCloseQueuedOrInFlight(stream) || state === "closed") {
+ return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"));
+ }
+ if (state === "erroring") {
+ return promiseRejectedWith(stream._storedError);
+ }
+ const promise = WritableStreamAddWriteRequest(stream);
+ WritableStreamDefaultControllerWrite(controller, chunk, chunkSize);
+ return promise;
+ }
+ const closeSentinel = {};
+ class WritableStreamDefaultController {
+ constructor() {
+ throw new TypeError("Illegal constructor");
+ }
+ get abortReason() {
+ if (!IsWritableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$2("abortReason");
+ }
+ return this._abortReason;
+ }
+ get signal() {
+ if (!IsWritableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$2("signal");
+ }
+ if (this._abortController === void 0) {
+ throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");
+ }
+ return this._abortController.signal;
+ }
+ error(e2 = void 0) {
+ if (!IsWritableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$2("error");
+ }
+ const state = this._controlledWritableStream._state;
+ if (state !== "writable") {
+ return;
+ }
+ WritableStreamDefaultControllerError(this, e2);
+ }
+ [AbortSteps](reason) {
+ const result = this._abortAlgorithm(reason);
+ WritableStreamDefaultControllerClearAlgorithms(this);
+ return result;
+ }
+ [ErrorSteps]() {
+ ResetQueue(this);
+ }
+ }
+ Object.defineProperties(WritableStreamDefaultController.prototype, {
+ abortReason: { enumerable: true },
+ signal: { enumerable: true },
+ error: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
+ value: "WritableStreamDefaultController",
+ configurable: true
+ });
+ }
+ function IsWritableStreamDefaultController(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_controlledWritableStream")) {
+ return false;
+ }
+ return x2 instanceof WritableStreamDefaultController;
+ }
+ function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {
+ controller._controlledWritableStream = stream;
+ stream._writableStreamController = controller;
+ controller._queue = void 0;
+ controller._queueTotalSize = void 0;
+ ResetQueue(controller);
+ controller._abortReason = void 0;
+ controller._abortController = createAbortController();
+ controller._started = false;
+ controller._strategySizeAlgorithm = sizeAlgorithm;
+ controller._strategyHWM = highWaterMark;
+ controller._writeAlgorithm = writeAlgorithm;
+ controller._closeAlgorithm = closeAlgorithm;
+ controller._abortAlgorithm = abortAlgorithm;
+ const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
+ WritableStreamUpdateBackpressure(stream, backpressure);
+ const startResult = startAlgorithm();
+ const startPromise = promiseResolvedWith(startResult);
+ uponPromise(startPromise, () => {
+ controller._started = true;
+ WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+ }, (r2) => {
+ controller._started = true;
+ WritableStreamDealWithRejection(stream, r2);
+ });
+ }
+ function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) {
+ const controller = Object.create(WritableStreamDefaultController.prototype);
+ let startAlgorithm = () => void 0;
+ let writeAlgorithm = () => promiseResolvedWith(void 0);
+ let closeAlgorithm = () => promiseResolvedWith(void 0);
+ let abortAlgorithm = () => promiseResolvedWith(void 0);
+ if (underlyingSink.start !== void 0) {
+ startAlgorithm = () => underlyingSink.start(controller);
+ }
+ if (underlyingSink.write !== void 0) {
+ writeAlgorithm = (chunk) => underlyingSink.write(chunk, controller);
+ }
+ if (underlyingSink.close !== void 0) {
+ closeAlgorithm = () => underlyingSink.close();
+ }
+ if (underlyingSink.abort !== void 0) {
+ abortAlgorithm = (reason) => underlyingSink.abort(reason);
+ }
+ SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
+ }
+ function WritableStreamDefaultControllerClearAlgorithms(controller) {
+ controller._writeAlgorithm = void 0;
+ controller._closeAlgorithm = void 0;
+ controller._abortAlgorithm = void 0;
+ controller._strategySizeAlgorithm = void 0;
+ }
+ function WritableStreamDefaultControllerClose(controller) {
+ EnqueueValueWithSize(controller, closeSentinel, 0);
+ WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+ }
+ function WritableStreamDefaultControllerGetChunkSize(controller, chunk) {
+ try {
+ return controller._strategySizeAlgorithm(chunk);
+ } catch (chunkSizeE) {
+ WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);
+ return 1;
+ }
+ }
+ function WritableStreamDefaultControllerGetDesiredSize(controller) {
+ return controller._strategyHWM - controller._queueTotalSize;
+ }
+ function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) {
+ try {
+ EnqueueValueWithSize(controller, chunk, chunkSize);
+ } catch (enqueueE) {
+ WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);
+ return;
+ }
+ const stream = controller._controlledWritableStream;
+ if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === "writable") {
+ const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
+ WritableStreamUpdateBackpressure(stream, backpressure);
+ }
+ WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+ }
+ function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {
+ const stream = controller._controlledWritableStream;
+ if (!controller._started) {
+ return;
+ }
+ if (stream._inFlightWriteRequest !== void 0) {
+ return;
+ }
+ const state = stream._state;
+ if (state === "erroring") {
+ WritableStreamFinishErroring(stream);
+ return;
+ }
+ if (controller._queue.length === 0) {
+ return;
+ }
+ const value = PeekQueueValue(controller);
+ if (value === closeSentinel) {
+ WritableStreamDefaultControllerProcessClose(controller);
+ } else {
+ WritableStreamDefaultControllerProcessWrite(controller, value);
+ }
+ }
+ function WritableStreamDefaultControllerErrorIfNeeded(controller, error) {
+ if (controller._controlledWritableStream._state === "writable") {
+ WritableStreamDefaultControllerError(controller, error);
+ }
+ }
+ function WritableStreamDefaultControllerProcessClose(controller) {
+ const stream = controller._controlledWritableStream;
+ WritableStreamMarkCloseRequestInFlight(stream);
+ DequeueValue(controller);
+ const sinkClosePromise = controller._closeAlgorithm();
+ WritableStreamDefaultControllerClearAlgorithms(controller);
+ uponPromise(sinkClosePromise, () => {
+ WritableStreamFinishInFlightClose(stream);
+ }, (reason) => {
+ WritableStreamFinishInFlightCloseWithError(stream, reason);
+ });
+ }
+ function WritableStreamDefaultControllerProcessWrite(controller, chunk) {
+ const stream = controller._controlledWritableStream;
+ WritableStreamMarkFirstWriteRequestInFlight(stream);
+ const sinkWritePromise = controller._writeAlgorithm(chunk);
+ uponPromise(sinkWritePromise, () => {
+ WritableStreamFinishInFlightWrite(stream);
+ const state = stream._state;
+ DequeueValue(controller);
+ if (!WritableStreamCloseQueuedOrInFlight(stream) && state === "writable") {
+ const backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
+ WritableStreamUpdateBackpressure(stream, backpressure);
+ }
+ WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+ }, (reason) => {
+ if (stream._state === "writable") {
+ WritableStreamDefaultControllerClearAlgorithms(controller);
+ }
+ WritableStreamFinishInFlightWriteWithError(stream, reason);
+ });
+ }
+ function WritableStreamDefaultControllerGetBackpressure(controller) {
+ const desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller);
+ return desiredSize <= 0;
+ }
+ function WritableStreamDefaultControllerError(controller, error) {
+ const stream = controller._controlledWritableStream;
+ WritableStreamDefaultControllerClearAlgorithms(controller);
+ WritableStreamStartErroring(stream, error);
+ }
+ function streamBrandCheckException$2(name) {
+ return new TypeError(`WritableStream.prototype.${name} can only be used on a WritableStream`);
+ }
+ function defaultControllerBrandCheckException$2(name) {
+ return new TypeError(`WritableStreamDefaultController.prototype.${name} can only be used on a WritableStreamDefaultController`);
+ }
+ function defaultWriterBrandCheckException(name) {
+ return new TypeError(`WritableStreamDefaultWriter.prototype.${name} can only be used on a WritableStreamDefaultWriter`);
+ }
+ function defaultWriterLockException(name) {
+ return new TypeError("Cannot " + name + " a stream using a released writer");
+ }
+ function defaultWriterClosedPromiseInitialize(writer) {
+ writer._closedPromise = newPromise((resolve, reject) => {
+ writer._closedPromise_resolve = resolve;
+ writer._closedPromise_reject = reject;
+ writer._closedPromiseState = "pending";
+ });
+ }
+ function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) {
+ defaultWriterClosedPromiseInitialize(writer);
+ defaultWriterClosedPromiseReject(writer, reason);
+ }
+ function defaultWriterClosedPromiseInitializeAsResolved(writer) {
+ defaultWriterClosedPromiseInitialize(writer);
+ defaultWriterClosedPromiseResolve(writer);
+ }
+ function defaultWriterClosedPromiseReject(writer, reason) {
+ if (writer._closedPromise_reject === void 0) {
+ return;
+ }
+ setPromiseIsHandledToTrue(writer._closedPromise);
+ writer._closedPromise_reject(reason);
+ writer._closedPromise_resolve = void 0;
+ writer._closedPromise_reject = void 0;
+ writer._closedPromiseState = "rejected";
+ }
+ function defaultWriterClosedPromiseResetToRejected(writer, reason) {
+ defaultWriterClosedPromiseInitializeAsRejected(writer, reason);
+ }
+ function defaultWriterClosedPromiseResolve(writer) {
+ if (writer._closedPromise_resolve === void 0) {
+ return;
+ }
+ writer._closedPromise_resolve(void 0);
+ writer._closedPromise_resolve = void 0;
+ writer._closedPromise_reject = void 0;
+ writer._closedPromiseState = "resolved";
+ }
+ function defaultWriterReadyPromiseInitialize(writer) {
+ writer._readyPromise = newPromise((resolve, reject) => {
+ writer._readyPromise_resolve = resolve;
+ writer._readyPromise_reject = reject;
+ });
+ writer._readyPromiseState = "pending";
+ }
+ function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) {
+ defaultWriterReadyPromiseInitialize(writer);
+ defaultWriterReadyPromiseReject(writer, reason);
+ }
+ function defaultWriterReadyPromiseInitializeAsResolved(writer) {
+ defaultWriterReadyPromiseInitialize(writer);
+ defaultWriterReadyPromiseResolve(writer);
+ }
+ function defaultWriterReadyPromiseReject(writer, reason) {
+ if (writer._readyPromise_reject === void 0) {
+ return;
+ }
+ setPromiseIsHandledToTrue(writer._readyPromise);
+ writer._readyPromise_reject(reason);
+ writer._readyPromise_resolve = void 0;
+ writer._readyPromise_reject = void 0;
+ writer._readyPromiseState = "rejected";
+ }
+ function defaultWriterReadyPromiseReset(writer) {
+ defaultWriterReadyPromiseInitialize(writer);
+ }
+ function defaultWriterReadyPromiseResetToRejected(writer, reason) {
+ defaultWriterReadyPromiseInitializeAsRejected(writer, reason);
+ }
+ function defaultWriterReadyPromiseResolve(writer) {
+ if (writer._readyPromise_resolve === void 0) {
+ return;
+ }
+ writer._readyPromise_resolve(void 0);
+ writer._readyPromise_resolve = void 0;
+ writer._readyPromise_reject = void 0;
+ writer._readyPromiseState = "fulfilled";
+ }
+ const NativeDOMException = typeof DOMException !== "undefined" ? DOMException : void 0;
+ function isDOMExceptionConstructor(ctor) {
+ if (!(typeof ctor === "function" || typeof ctor === "object")) {
+ return false;
+ }
+ try {
+ new ctor();
+ return true;
+ } catch (_a) {
+ return false;
+ }
+ }
+ function createDOMExceptionPolyfill() {
+ const ctor = function DOMException3(message, name) {
+ this.message = message || "";
+ this.name = name || "Error";
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ };
+ ctor.prototype = Object.create(Error.prototype);
+ Object.defineProperty(ctor.prototype, "constructor", { value: ctor, writable: true, configurable: true });
+ return ctor;
+ }
+ const DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill();
+ function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) {
+ const reader = AcquireReadableStreamDefaultReader(source);
+ const writer = AcquireWritableStreamDefaultWriter(dest);
+ source._disturbed = true;
+ let shuttingDown = false;
+ let currentWrite = promiseResolvedWith(void 0);
+ return newPromise((resolve, reject) => {
+ let abortAlgorithm;
+ if (signal !== void 0) {
+ abortAlgorithm = () => {
+ const error = new DOMException$1("Aborted", "AbortError");
+ const actions = [];
+ if (!preventAbort) {
+ actions.push(() => {
+ if (dest._state === "writable") {
+ return WritableStreamAbort(dest, error);
+ }
+ return promiseResolvedWith(void 0);
+ });
+ }
+ if (!preventCancel) {
+ actions.push(() => {
+ if (source._state === "readable") {
+ return ReadableStreamCancel(source, error);
+ }
+ return promiseResolvedWith(void 0);
+ });
+ }
+ shutdownWithAction(() => Promise.all(actions.map((action) => action())), true, error);
+ };
+ if (signal.aborted) {
+ abortAlgorithm();
+ return;
+ }
+ signal.addEventListener("abort", abortAlgorithm);
+ }
+ function pipeLoop() {
+ return newPromise((resolveLoop, rejectLoop) => {
+ function next(done) {
+ if (done) {
+ resolveLoop();
+ } else {
+ PerformPromiseThen(pipeStep(), next, rejectLoop);
+ }
+ }
+ next(false);
+ });
+ }
+ function pipeStep() {
+ if (shuttingDown) {
+ return promiseResolvedWith(true);
+ }
+ return PerformPromiseThen(writer._readyPromise, () => {
+ return newPromise((resolveRead, rejectRead) => {
+ ReadableStreamDefaultReaderRead(reader, {
+ _chunkSteps: (chunk) => {
+ currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), void 0, noop2);
+ resolveRead(false);
+ },
+ _closeSteps: () => resolveRead(true),
+ _errorSteps: rejectRead
+ });
+ });
+ });
+ }
+ isOrBecomesErrored(source, reader._closedPromise, (storedError) => {
+ if (!preventAbort) {
+ shutdownWithAction(() => WritableStreamAbort(dest, storedError), true, storedError);
+ } else {
+ shutdown(true, storedError);
+ }
+ });
+ isOrBecomesErrored(dest, writer._closedPromise, (storedError) => {
+ if (!preventCancel) {
+ shutdownWithAction(() => ReadableStreamCancel(source, storedError), true, storedError);
+ } else {
+ shutdown(true, storedError);
+ }
+ });
+ isOrBecomesClosed(source, reader._closedPromise, () => {
+ if (!preventClose) {
+ shutdownWithAction(() => WritableStreamDefaultWriterCloseWithErrorPropagation(writer));
+ } else {
+ shutdown();
+ }
+ });
+ if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === "closed") {
+ const destClosed = new TypeError("the destination writable stream closed before all data could be piped to it");
+ if (!preventCancel) {
+ shutdownWithAction(() => ReadableStreamCancel(source, destClosed), true, destClosed);
+ } else {
+ shutdown(true, destClosed);
+ }
+ }
+ setPromiseIsHandledToTrue(pipeLoop());
+ function waitForWritesToFinish() {
+ const oldCurrentWrite = currentWrite;
+ return PerformPromiseThen(currentWrite, () => oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : void 0);
+ }
+ function isOrBecomesErrored(stream, promise, action) {
+ if (stream._state === "errored") {
+ action(stream._storedError);
+ } else {
+ uponRejection(promise, action);
+ }
+ }
+ function isOrBecomesClosed(stream, promise, action) {
+ if (stream._state === "closed") {
+ action();
+ } else {
+ uponFulfillment(promise, action);
+ }
+ }
+ function shutdownWithAction(action, originalIsError, originalError) {
+ if (shuttingDown) {
+ return;
+ }
+ shuttingDown = true;
+ if (dest._state === "writable" && !WritableStreamCloseQueuedOrInFlight(dest)) {
+ uponFulfillment(waitForWritesToFinish(), doTheRest);
+ } else {
+ doTheRest();
+ }
+ function doTheRest() {
+ uponPromise(action(), () => finalize(originalIsError, originalError), (newError) => finalize(true, newError));
+ }
+ }
+ function shutdown(isError, error) {
+ if (shuttingDown) {
+ return;
+ }
+ shuttingDown = true;
+ if (dest._state === "writable" && !WritableStreamCloseQueuedOrInFlight(dest)) {
+ uponFulfillment(waitForWritesToFinish(), () => finalize(isError, error));
+ } else {
+ finalize(isError, error);
+ }
+ }
+ function finalize(isError, error) {
+ WritableStreamDefaultWriterRelease(writer);
+ ReadableStreamReaderGenericRelease(reader);
+ if (signal !== void 0) {
+ signal.removeEventListener("abort", abortAlgorithm);
+ }
+ if (isError) {
+ reject(error);
+ } else {
+ resolve(void 0);
+ }
+ }
+ });
+ }
+ class ReadableStreamDefaultController {
+ constructor() {
+ throw new TypeError("Illegal constructor");
+ }
+ get desiredSize() {
+ if (!IsReadableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$1("desiredSize");
+ }
+ return ReadableStreamDefaultControllerGetDesiredSize(this);
+ }
+ close() {
+ if (!IsReadableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$1("close");
+ }
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
+ throw new TypeError("The stream is not in a state that permits close");
+ }
+ ReadableStreamDefaultControllerClose(this);
+ }
+ enqueue(chunk = void 0) {
+ if (!IsReadableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$1("enqueue");
+ }
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
+ throw new TypeError("The stream is not in a state that permits enqueue");
+ }
+ return ReadableStreamDefaultControllerEnqueue(this, chunk);
+ }
+ error(e2 = void 0) {
+ if (!IsReadableStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException$1("error");
+ }
+ ReadableStreamDefaultControllerError(this, e2);
+ }
+ [CancelSteps](reason) {
+ ResetQueue(this);
+ const result = this._cancelAlgorithm(reason);
+ ReadableStreamDefaultControllerClearAlgorithms(this);
+ return result;
+ }
+ [PullSteps](readRequest) {
+ const stream = this._controlledReadableStream;
+ if (this._queue.length > 0) {
+ const chunk = DequeueValue(this);
+ if (this._closeRequested && this._queue.length === 0) {
+ ReadableStreamDefaultControllerClearAlgorithms(this);
+ ReadableStreamClose(stream);
+ } else {
+ ReadableStreamDefaultControllerCallPullIfNeeded(this);
+ }
+ readRequest._chunkSteps(chunk);
+ } else {
+ ReadableStreamAddReadRequest(stream, readRequest);
+ ReadableStreamDefaultControllerCallPullIfNeeded(this);
+ }
+ }
+ }
+ Object.defineProperties(ReadableStreamDefaultController.prototype, {
+ close: { enumerable: true },
+ enqueue: { enumerable: true },
+ error: { enumerable: true },
+ desiredSize: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableStreamDefaultController",
+ configurable: true
+ });
+ }
+ function IsReadableStreamDefaultController(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_controlledReadableStream")) {
+ return false;
+ }
+ return x2 instanceof ReadableStreamDefaultController;
+ }
+ function ReadableStreamDefaultControllerCallPullIfNeeded(controller) {
+ const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller);
+ if (!shouldPull) {
+ return;
+ }
+ if (controller._pulling) {
+ controller._pullAgain = true;
+ return;
+ }
+ controller._pulling = true;
+ const pullPromise = controller._pullAlgorithm();
+ uponPromise(pullPromise, () => {
+ controller._pulling = false;
+ if (controller._pullAgain) {
+ controller._pullAgain = false;
+ ReadableStreamDefaultControllerCallPullIfNeeded(controller);
+ }
+ }, (e2) => {
+ ReadableStreamDefaultControllerError(controller, e2);
+ });
+ }
+ function ReadableStreamDefaultControllerShouldCallPull(controller) {
+ const stream = controller._controlledReadableStream;
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
+ return false;
+ }
+ if (!controller._started) {
+ return false;
+ }
+ if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
+ return true;
+ }
+ const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);
+ if (desiredSize > 0) {
+ return true;
+ }
+ return false;
+ }
+ function ReadableStreamDefaultControllerClearAlgorithms(controller) {
+ controller._pullAlgorithm = void 0;
+ controller._cancelAlgorithm = void 0;
+ controller._strategySizeAlgorithm = void 0;
+ }
+ function ReadableStreamDefaultControllerClose(controller) {
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
+ return;
+ }
+ const stream = controller._controlledReadableStream;
+ controller._closeRequested = true;
+ if (controller._queue.length === 0) {
+ ReadableStreamDefaultControllerClearAlgorithms(controller);
+ ReadableStreamClose(stream);
+ }
+ }
+ function ReadableStreamDefaultControllerEnqueue(controller, chunk) {
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
+ return;
+ }
+ const stream = controller._controlledReadableStream;
+ if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
+ ReadableStreamFulfillReadRequest(stream, chunk, false);
+ } else {
+ let chunkSize;
+ try {
+ chunkSize = controller._strategySizeAlgorithm(chunk);
+ } catch (chunkSizeE) {
+ ReadableStreamDefaultControllerError(controller, chunkSizeE);
+ throw chunkSizeE;
+ }
+ try {
+ EnqueueValueWithSize(controller, chunk, chunkSize);
+ } catch (enqueueE) {
+ ReadableStreamDefaultControllerError(controller, enqueueE);
+ throw enqueueE;
+ }
+ }
+ ReadableStreamDefaultControllerCallPullIfNeeded(controller);
+ }
+ function ReadableStreamDefaultControllerError(controller, e2) {
+ const stream = controller._controlledReadableStream;
+ if (stream._state !== "readable") {
+ return;
+ }
+ ResetQueue(controller);
+ ReadableStreamDefaultControllerClearAlgorithms(controller);
+ ReadableStreamError(stream, e2);
+ }
+ function ReadableStreamDefaultControllerGetDesiredSize(controller) {
+ const state = controller._controlledReadableStream._state;
+ if (state === "errored") {
+ return null;
+ }
+ if (state === "closed") {
+ return 0;
+ }
+ return controller._strategyHWM - controller._queueTotalSize;
+ }
+ function ReadableStreamDefaultControllerHasBackpressure(controller) {
+ if (ReadableStreamDefaultControllerShouldCallPull(controller)) {
+ return false;
+ }
+ return true;
+ }
+ function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) {
+ const state = controller._controlledReadableStream._state;
+ if (!controller._closeRequested && state === "readable") {
+ return true;
+ }
+ return false;
+ }
+ function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {
+ controller._controlledReadableStream = stream;
+ controller._queue = void 0;
+ controller._queueTotalSize = void 0;
+ ResetQueue(controller);
+ controller._started = false;
+ controller._closeRequested = false;
+ controller._pullAgain = false;
+ controller._pulling = false;
+ controller._strategySizeAlgorithm = sizeAlgorithm;
+ controller._strategyHWM = highWaterMark;
+ controller._pullAlgorithm = pullAlgorithm;
+ controller._cancelAlgorithm = cancelAlgorithm;
+ stream._readableStreamController = controller;
+ const startResult = startAlgorithm();
+ uponPromise(promiseResolvedWith(startResult), () => {
+ controller._started = true;
+ ReadableStreamDefaultControllerCallPullIfNeeded(controller);
+ }, (r2) => {
+ ReadableStreamDefaultControllerError(controller, r2);
+ });
+ }
+ function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) {
+ const controller = Object.create(ReadableStreamDefaultController.prototype);
+ let startAlgorithm = () => void 0;
+ let pullAlgorithm = () => promiseResolvedWith(void 0);
+ let cancelAlgorithm = () => promiseResolvedWith(void 0);
+ if (underlyingSource.start !== void 0) {
+ startAlgorithm = () => underlyingSource.start(controller);
+ }
+ if (underlyingSource.pull !== void 0) {
+ pullAlgorithm = () => underlyingSource.pull(controller);
+ }
+ if (underlyingSource.cancel !== void 0) {
+ cancelAlgorithm = (reason) => underlyingSource.cancel(reason);
+ }
+ SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
+ }
+ function defaultControllerBrandCheckException$1(name) {
+ return new TypeError(`ReadableStreamDefaultController.prototype.${name} can only be used on a ReadableStreamDefaultController`);
+ }
+ function ReadableStreamTee(stream, cloneForBranch2) {
+ if (IsReadableByteStreamController(stream._readableStreamController)) {
+ return ReadableByteStreamTee(stream);
+ }
+ return ReadableStreamDefaultTee(stream);
+ }
+ function ReadableStreamDefaultTee(stream, cloneForBranch2) {
+ const reader = AcquireReadableStreamDefaultReader(stream);
+ let reading = false;
+ let readAgain = false;
+ let canceled1 = false;
+ let canceled2 = false;
+ let reason1;
+ let reason2;
+ let branch1;
+ let branch2;
+ let resolveCancelPromise;
+ const cancelPromise = newPromise((resolve) => {
+ resolveCancelPromise = resolve;
+ });
+ function pullAlgorithm() {
+ if (reading) {
+ readAgain = true;
+ return promiseResolvedWith(void 0);
+ }
+ reading = true;
+ const readRequest = {
+ _chunkSteps: (chunk) => {
+ queueMicrotask(() => {
+ readAgain = false;
+ const chunk1 = chunk;
+ const chunk2 = chunk;
+ if (!canceled1) {
+ ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1);
+ }
+ if (!canceled2) {
+ ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2);
+ }
+ reading = false;
+ if (readAgain) {
+ pullAlgorithm();
+ }
+ });
+ },
+ _closeSteps: () => {
+ reading = false;
+ if (!canceled1) {
+ ReadableStreamDefaultControllerClose(branch1._readableStreamController);
+ }
+ if (!canceled2) {
+ ReadableStreamDefaultControllerClose(branch2._readableStreamController);
+ }
+ if (!canceled1 || !canceled2) {
+ resolveCancelPromise(void 0);
+ }
+ },
+ _errorSteps: () => {
+ reading = false;
+ }
+ };
+ ReadableStreamDefaultReaderRead(reader, readRequest);
+ return promiseResolvedWith(void 0);
+ }
+ function cancel1Algorithm(reason) {
+ canceled1 = true;
+ reason1 = reason;
+ if (canceled2) {
+ const compositeReason = CreateArrayFromList([reason1, reason2]);
+ const cancelResult = ReadableStreamCancel(stream, compositeReason);
+ resolveCancelPromise(cancelResult);
+ }
+ return cancelPromise;
+ }
+ function cancel2Algorithm(reason) {
+ canceled2 = true;
+ reason2 = reason;
+ if (canceled1) {
+ const compositeReason = CreateArrayFromList([reason1, reason2]);
+ const cancelResult = ReadableStreamCancel(stream, compositeReason);
+ resolveCancelPromise(cancelResult);
+ }
+ return cancelPromise;
+ }
+ function startAlgorithm() {
+ }
+ branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm);
+ branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm);
+ uponRejection(reader._closedPromise, (r2) => {
+ ReadableStreamDefaultControllerError(branch1._readableStreamController, r2);
+ ReadableStreamDefaultControllerError(branch2._readableStreamController, r2);
+ if (!canceled1 || !canceled2) {
+ resolveCancelPromise(void 0);
+ }
+ });
+ return [branch1, branch2];
+ }
+ function ReadableByteStreamTee(stream) {
+ let reader = AcquireReadableStreamDefaultReader(stream);
+ let reading = false;
+ let readAgainForBranch1 = false;
+ let readAgainForBranch2 = false;
+ let canceled1 = false;
+ let canceled2 = false;
+ let reason1;
+ let reason2;
+ let branch1;
+ let branch2;
+ let resolveCancelPromise;
+ const cancelPromise = newPromise((resolve) => {
+ resolveCancelPromise = resolve;
+ });
+ function forwardReaderError(thisReader) {
+ uponRejection(thisReader._closedPromise, (r2) => {
+ if (thisReader !== reader) {
+ return;
+ }
+ ReadableByteStreamControllerError(branch1._readableStreamController, r2);
+ ReadableByteStreamControllerError(branch2._readableStreamController, r2);
+ if (!canceled1 || !canceled2) {
+ resolveCancelPromise(void 0);
+ }
+ });
+ }
+ function pullWithDefaultReader() {
+ if (IsReadableStreamBYOBReader(reader)) {
+ ReadableStreamReaderGenericRelease(reader);
+ reader = AcquireReadableStreamDefaultReader(stream);
+ forwardReaderError(reader);
+ }
+ const readRequest = {
+ _chunkSteps: (chunk) => {
+ queueMicrotask(() => {
+ readAgainForBranch1 = false;
+ readAgainForBranch2 = false;
+ const chunk1 = chunk;
+ let chunk2 = chunk;
+ if (!canceled1 && !canceled2) {
+ try {
+ chunk2 = CloneAsUint8Array(chunk);
+ } catch (cloneE) {
+ ReadableByteStreamControllerError(branch1._readableStreamController, cloneE);
+ ReadableByteStreamControllerError(branch2._readableStreamController, cloneE);
+ resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
+ return;
+ }
+ }
+ if (!canceled1) {
+ ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1);
+ }
+ if (!canceled2) {
+ ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2);
+ }
+ reading = false;
+ if (readAgainForBranch1) {
+ pull1Algorithm();
+ } else if (readAgainForBranch2) {
+ pull2Algorithm();
+ }
+ });
+ },
+ _closeSteps: () => {
+ reading = false;
+ if (!canceled1) {
+ ReadableByteStreamControllerClose(branch1._readableStreamController);
+ }
+ if (!canceled2) {
+ ReadableByteStreamControllerClose(branch2._readableStreamController);
+ }
+ if (branch1._readableStreamController._pendingPullIntos.length > 0) {
+ ReadableByteStreamControllerRespond(branch1._readableStreamController, 0);
+ }
+ if (branch2._readableStreamController._pendingPullIntos.length > 0) {
+ ReadableByteStreamControllerRespond(branch2._readableStreamController, 0);
+ }
+ if (!canceled1 || !canceled2) {
+ resolveCancelPromise(void 0);
+ }
+ },
+ _errorSteps: () => {
+ reading = false;
+ }
+ };
+ ReadableStreamDefaultReaderRead(reader, readRequest);
+ }
+ function pullWithBYOBReader(view, forBranch2) {
+ if (IsReadableStreamDefaultReader(reader)) {
+ ReadableStreamReaderGenericRelease(reader);
+ reader = AcquireReadableStreamBYOBReader(stream);
+ forwardReaderError(reader);
+ }
+ const byobBranch = forBranch2 ? branch2 : branch1;
+ const otherBranch = forBranch2 ? branch1 : branch2;
+ const readIntoRequest = {
+ _chunkSteps: (chunk) => {
+ queueMicrotask(() => {
+ readAgainForBranch1 = false;
+ readAgainForBranch2 = false;
+ const byobCanceled = forBranch2 ? canceled2 : canceled1;
+ const otherCanceled = forBranch2 ? canceled1 : canceled2;
+ if (!otherCanceled) {
+ let clonedChunk;
+ try {
+ clonedChunk = CloneAsUint8Array(chunk);
+ } catch (cloneE) {
+ ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE);
+ ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE);
+ resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
+ return;
+ }
+ if (!byobCanceled) {
+ ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
+ }
+ ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk);
+ } else if (!byobCanceled) {
+ ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
+ }
+ reading = false;
+ if (readAgainForBranch1) {
+ pull1Algorithm();
+ } else if (readAgainForBranch2) {
+ pull2Algorithm();
+ }
+ });
+ },
+ _closeSteps: (chunk) => {
+ reading = false;
+ const byobCanceled = forBranch2 ? canceled2 : canceled1;
+ const otherCanceled = forBranch2 ? canceled1 : canceled2;
+ if (!byobCanceled) {
+ ReadableByteStreamControllerClose(byobBranch._readableStreamController);
+ }
+ if (!otherCanceled) {
+ ReadableByteStreamControllerClose(otherBranch._readableStreamController);
+ }
+ if (chunk !== void 0) {
+ if (!byobCanceled) {
+ ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
+ }
+ if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) {
+ ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0);
+ }
+ }
+ if (!byobCanceled || !otherCanceled) {
+ resolveCancelPromise(void 0);
+ }
+ },
+ _errorSteps: () => {
+ reading = false;
+ }
+ };
+ ReadableStreamBYOBReaderRead(reader, view, readIntoRequest);
+ }
+ function pull1Algorithm() {
+ if (reading) {
+ readAgainForBranch1 = true;
+ return promiseResolvedWith(void 0);
+ }
+ reading = true;
+ const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController);
+ if (byobRequest === null) {
+ pullWithDefaultReader();
+ } else {
+ pullWithBYOBReader(byobRequest._view, false);
+ }
+ return promiseResolvedWith(void 0);
+ }
+ function pull2Algorithm() {
+ if (reading) {
+ readAgainForBranch2 = true;
+ return promiseResolvedWith(void 0);
+ }
+ reading = true;
+ const byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController);
+ if (byobRequest === null) {
+ pullWithDefaultReader();
+ } else {
+ pullWithBYOBReader(byobRequest._view, true);
+ }
+ return promiseResolvedWith(void 0);
+ }
+ function cancel1Algorithm(reason) {
+ canceled1 = true;
+ reason1 = reason;
+ if (canceled2) {
+ const compositeReason = CreateArrayFromList([reason1, reason2]);
+ const cancelResult = ReadableStreamCancel(stream, compositeReason);
+ resolveCancelPromise(cancelResult);
+ }
+ return cancelPromise;
+ }
+ function cancel2Algorithm(reason) {
+ canceled2 = true;
+ reason2 = reason;
+ if (canceled1) {
+ const compositeReason = CreateArrayFromList([reason1, reason2]);
+ const cancelResult = ReadableStreamCancel(stream, compositeReason);
+ resolveCancelPromise(cancelResult);
+ }
+ return cancelPromise;
+ }
+ function startAlgorithm() {
+ return;
+ }
+ branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm);
+ branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm);
+ forwardReaderError(reader);
+ return [branch1, branch2];
+ }
+ function convertUnderlyingDefaultOrByteSource(source, context) {
+ assertDictionary(source, context);
+ const original = source;
+ const autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize;
+ const cancel = original === null || original === void 0 ? void 0 : original.cancel;
+ const pull = original === null || original === void 0 ? void 0 : original.pull;
+ const start = original === null || original === void 0 ? void 0 : original.start;
+ const type = original === null || original === void 0 ? void 0 : original.type;
+ return {
+ autoAllocateChunkSize: autoAllocateChunkSize === void 0 ? void 0 : convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, `${context} has member 'autoAllocateChunkSize' that`),
+ cancel: cancel === void 0 ? void 0 : convertUnderlyingSourceCancelCallback(cancel, original, `${context} has member 'cancel' that`),
+ pull: pull === void 0 ? void 0 : convertUnderlyingSourcePullCallback(pull, original, `${context} has member 'pull' that`),
+ start: start === void 0 ? void 0 : convertUnderlyingSourceStartCallback(start, original, `${context} has member 'start' that`),
+ type: type === void 0 ? void 0 : convertReadableStreamType(type, `${context} has member 'type' that`)
+ };
+ }
+ function convertUnderlyingSourceCancelCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (reason) => promiseCall(fn, original, [reason]);
+ }
+ function convertUnderlyingSourcePullCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (controller) => promiseCall(fn, original, [controller]);
+ }
+ function convertUnderlyingSourceStartCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (controller) => reflectCall(fn, original, [controller]);
+ }
+ function convertReadableStreamType(type, context) {
+ type = `${type}`;
+ if (type !== "bytes") {
+ throw new TypeError(`${context} '${type}' is not a valid enumeration value for ReadableStreamType`);
+ }
+ return type;
+ }
+ function convertReaderOptions(options, context) {
+ assertDictionary(options, context);
+ const mode = options === null || options === void 0 ? void 0 : options.mode;
+ return {
+ mode: mode === void 0 ? void 0 : convertReadableStreamReaderMode(mode, `${context} has member 'mode' that`)
+ };
+ }
+ function convertReadableStreamReaderMode(mode, context) {
+ mode = `${mode}`;
+ if (mode !== "byob") {
+ throw new TypeError(`${context} '${mode}' is not a valid enumeration value for ReadableStreamReaderMode`);
+ }
+ return mode;
+ }
+ function convertIteratorOptions(options, context) {
+ assertDictionary(options, context);
+ const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
+ return { preventCancel: Boolean(preventCancel) };
+ }
+ function convertPipeOptions(options, context) {
+ assertDictionary(options, context);
+ const preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort;
+ const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
+ const preventClose = options === null || options === void 0 ? void 0 : options.preventClose;
+ const signal = options === null || options === void 0 ? void 0 : options.signal;
+ if (signal !== void 0) {
+ assertAbortSignal(signal, `${context} has member 'signal' that`);
+ }
+ return {
+ preventAbort: Boolean(preventAbort),
+ preventCancel: Boolean(preventCancel),
+ preventClose: Boolean(preventClose),
+ signal
+ };
+ }
+ function assertAbortSignal(signal, context) {
+ if (!isAbortSignal2(signal)) {
+ throw new TypeError(`${context} is not an AbortSignal.`);
+ }
+ }
+ function convertReadableWritablePair(pair, context) {
+ assertDictionary(pair, context);
+ const readable = pair === null || pair === void 0 ? void 0 : pair.readable;
+ assertRequiredField(readable, "readable", "ReadableWritablePair");
+ assertReadableStream(readable, `${context} has member 'readable' that`);
+ const writable = pair === null || pair === void 0 ? void 0 : pair.writable;
+ assertRequiredField(writable, "writable", "ReadableWritablePair");
+ assertWritableStream(writable, `${context} has member 'writable' that`);
+ return { readable, writable };
+ }
+ class ReadableStream2 {
+ constructor(rawUnderlyingSource = {}, rawStrategy = {}) {
+ if (rawUnderlyingSource === void 0) {
+ rawUnderlyingSource = null;
+ } else {
+ assertObject(rawUnderlyingSource, "First parameter");
+ }
+ const strategy = convertQueuingStrategy(rawStrategy, "Second parameter");
+ const underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, "First parameter");
+ InitializeReadableStream(this);
+ if (underlyingSource.type === "bytes") {
+ if (strategy.size !== void 0) {
+ throw new RangeError("The strategy for a byte stream cannot have a size function");
+ }
+ const highWaterMark = ExtractHighWaterMark(strategy, 0);
+ SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark);
+ } else {
+ const sizeAlgorithm = ExtractSizeAlgorithm(strategy);
+ const highWaterMark = ExtractHighWaterMark(strategy, 1);
+ SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm);
+ }
+ }
+ get locked() {
+ if (!IsReadableStream(this)) {
+ throw streamBrandCheckException$1("locked");
+ }
+ return IsReadableStreamLocked(this);
+ }
+ cancel(reason = void 0) {
+ if (!IsReadableStream(this)) {
+ return promiseRejectedWith(streamBrandCheckException$1("cancel"));
+ }
+ if (IsReadableStreamLocked(this)) {
+ return promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader"));
+ }
+ return ReadableStreamCancel(this, reason);
+ }
+ getReader(rawOptions = void 0) {
+ if (!IsReadableStream(this)) {
+ throw streamBrandCheckException$1("getReader");
+ }
+ const options = convertReaderOptions(rawOptions, "First parameter");
+ if (options.mode === void 0) {
+ return AcquireReadableStreamDefaultReader(this);
+ }
+ return AcquireReadableStreamBYOBReader(this);
+ }
+ pipeThrough(rawTransform, rawOptions = {}) {
+ if (!IsReadableStream(this)) {
+ throw streamBrandCheckException$1("pipeThrough");
+ }
+ assertRequiredArgument(rawTransform, 1, "pipeThrough");
+ const transform = convertReadableWritablePair(rawTransform, "First parameter");
+ const options = convertPipeOptions(rawOptions, "Second parameter");
+ if (IsReadableStreamLocked(this)) {
+ throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");
+ }
+ if (IsWritableStreamLocked(transform.writable)) {
+ throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");
+ }
+ const promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
+ setPromiseIsHandledToTrue(promise);
+ return transform.readable;
+ }
+ pipeTo(destination, rawOptions = {}) {
+ if (!IsReadableStream(this)) {
+ return promiseRejectedWith(streamBrandCheckException$1("pipeTo"));
+ }
+ if (destination === void 0) {
+ return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`);
+ }
+ if (!IsWritableStream(destination)) {
+ return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`));
+ }
+ let options;
+ try {
+ options = convertPipeOptions(rawOptions, "Second parameter");
+ } catch (e2) {
+ return promiseRejectedWith(e2);
+ }
+ if (IsReadableStreamLocked(this)) {
+ return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));
+ }
+ if (IsWritableStreamLocked(destination)) {
+ return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));
+ }
+ return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
+ }
+ tee() {
+ if (!IsReadableStream(this)) {
+ throw streamBrandCheckException$1("tee");
+ }
+ const branches = ReadableStreamTee(this);
+ return CreateArrayFromList(branches);
+ }
+ values(rawOptions = void 0) {
+ if (!IsReadableStream(this)) {
+ throw streamBrandCheckException$1("values");
+ }
+ const options = convertIteratorOptions(rawOptions, "First parameter");
+ return AcquireReadableStreamAsyncIterator(this, options.preventCancel);
+ }
+ }
+ Object.defineProperties(ReadableStream2.prototype, {
+ cancel: { enumerable: true },
+ getReader: { enumerable: true },
+ pipeThrough: { enumerable: true },
+ pipeTo: { enumerable: true },
+ tee: { enumerable: true },
+ values: { enumerable: true },
+ locked: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ReadableStream2.prototype, SymbolPolyfill.toStringTag, {
+ value: "ReadableStream",
+ configurable: true
+ });
+ }
+ if (typeof SymbolPolyfill.asyncIterator === "symbol") {
+ Object.defineProperty(ReadableStream2.prototype, SymbolPolyfill.asyncIterator, {
+ value: ReadableStream2.prototype.values,
+ writable: true,
+ configurable: true
+ });
+ }
+ function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) {
+ const stream = Object.create(ReadableStream2.prototype);
+ InitializeReadableStream(stream);
+ const controller = Object.create(ReadableStreamDefaultController.prototype);
+ SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
+ return stream;
+ }
+ function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) {
+ const stream = Object.create(ReadableStream2.prototype);
+ InitializeReadableStream(stream);
+ const controller = Object.create(ReadableByteStreamController.prototype);
+ SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, void 0);
+ return stream;
+ }
+ function InitializeReadableStream(stream) {
+ stream._state = "readable";
+ stream._reader = void 0;
+ stream._storedError = void 0;
+ stream._disturbed = false;
+ }
+ function IsReadableStream(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_readableStreamController")) {
+ return false;
+ }
+ return x2 instanceof ReadableStream2;
+ }
+ function IsReadableStreamLocked(stream) {
+ if (stream._reader === void 0) {
+ return false;
+ }
+ return true;
+ }
+ function ReadableStreamCancel(stream, reason) {
+ stream._disturbed = true;
+ if (stream._state === "closed") {
+ return promiseResolvedWith(void 0);
+ }
+ if (stream._state === "errored") {
+ return promiseRejectedWith(stream._storedError);
+ }
+ ReadableStreamClose(stream);
+ const reader = stream._reader;
+ if (reader !== void 0 && IsReadableStreamBYOBReader(reader)) {
+ reader._readIntoRequests.forEach((readIntoRequest) => {
+ readIntoRequest._closeSteps(void 0);
+ });
+ reader._readIntoRequests = new SimpleQueue();
+ }
+ const sourceCancelPromise = stream._readableStreamController[CancelSteps](reason);
+ return transformPromiseWith(sourceCancelPromise, noop2);
+ }
+ function ReadableStreamClose(stream) {
+ stream._state = "closed";
+ const reader = stream._reader;
+ if (reader === void 0) {
+ return;
+ }
+ defaultReaderClosedPromiseResolve(reader);
+ if (IsReadableStreamDefaultReader(reader)) {
+ reader._readRequests.forEach((readRequest) => {
+ readRequest._closeSteps();
+ });
+ reader._readRequests = new SimpleQueue();
+ }
+ }
+ function ReadableStreamError(stream, e2) {
+ stream._state = "errored";
+ stream._storedError = e2;
+ const reader = stream._reader;
+ if (reader === void 0) {
+ return;
+ }
+ defaultReaderClosedPromiseReject(reader, e2);
+ if (IsReadableStreamDefaultReader(reader)) {
+ reader._readRequests.forEach((readRequest) => {
+ readRequest._errorSteps(e2);
+ });
+ reader._readRequests = new SimpleQueue();
+ } else {
+ reader._readIntoRequests.forEach((readIntoRequest) => {
+ readIntoRequest._errorSteps(e2);
+ });
+ reader._readIntoRequests = new SimpleQueue();
+ }
+ }
+ function streamBrandCheckException$1(name) {
+ return new TypeError(`ReadableStream.prototype.${name} can only be used on a ReadableStream`);
+ }
+ function convertQueuingStrategyInit(init, context) {
+ assertDictionary(init, context);
+ const highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
+ assertRequiredField(highWaterMark, "highWaterMark", "QueuingStrategyInit");
+ return {
+ highWaterMark: convertUnrestrictedDouble(highWaterMark)
+ };
+ }
+ const byteLengthSizeFunction = (chunk) => {
+ return chunk.byteLength;
+ };
+ Object.defineProperty(byteLengthSizeFunction, "name", {
+ value: "size",
+ configurable: true
+ });
+ class ByteLengthQueuingStrategy {
+ constructor(options) {
+ assertRequiredArgument(options, 1, "ByteLengthQueuingStrategy");
+ options = convertQueuingStrategyInit(options, "First parameter");
+ this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark;
+ }
+ get highWaterMark() {
+ if (!IsByteLengthQueuingStrategy(this)) {
+ throw byteLengthBrandCheckException("highWaterMark");
+ }
+ return this._byteLengthQueuingStrategyHighWaterMark;
+ }
+ get size() {
+ if (!IsByteLengthQueuingStrategy(this)) {
+ throw byteLengthBrandCheckException("size");
+ }
+ return byteLengthSizeFunction;
+ }
+ }
+ Object.defineProperties(ByteLengthQueuingStrategy.prototype, {
+ highWaterMark: { enumerable: true },
+ size: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
+ value: "ByteLengthQueuingStrategy",
+ configurable: true
+ });
+ }
+ function byteLengthBrandCheckException(name) {
+ return new TypeError(`ByteLengthQueuingStrategy.prototype.${name} can only be used on a ByteLengthQueuingStrategy`);
+ }
+ function IsByteLengthQueuingStrategy(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_byteLengthQueuingStrategyHighWaterMark")) {
+ return false;
+ }
+ return x2 instanceof ByteLengthQueuingStrategy;
+ }
+ const countSizeFunction = () => {
+ return 1;
+ };
+ Object.defineProperty(countSizeFunction, "name", {
+ value: "size",
+ configurable: true
+ });
+ class CountQueuingStrategy {
+ constructor(options) {
+ assertRequiredArgument(options, 1, "CountQueuingStrategy");
+ options = convertQueuingStrategyInit(options, "First parameter");
+ this._countQueuingStrategyHighWaterMark = options.highWaterMark;
+ }
+ get highWaterMark() {
+ if (!IsCountQueuingStrategy(this)) {
+ throw countBrandCheckException("highWaterMark");
+ }
+ return this._countQueuingStrategyHighWaterMark;
+ }
+ get size() {
+ if (!IsCountQueuingStrategy(this)) {
+ throw countBrandCheckException("size");
+ }
+ return countSizeFunction;
+ }
+ }
+ Object.defineProperties(CountQueuingStrategy.prototype, {
+ highWaterMark: { enumerable: true },
+ size: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
+ value: "CountQueuingStrategy",
+ configurable: true
+ });
+ }
+ function countBrandCheckException(name) {
+ return new TypeError(`CountQueuingStrategy.prototype.${name} can only be used on a CountQueuingStrategy`);
+ }
+ function IsCountQueuingStrategy(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_countQueuingStrategyHighWaterMark")) {
+ return false;
+ }
+ return x2 instanceof CountQueuingStrategy;
+ }
+ function convertTransformer(original, context) {
+ assertDictionary(original, context);
+ const flush = original === null || original === void 0 ? void 0 : original.flush;
+ const readableType = original === null || original === void 0 ? void 0 : original.readableType;
+ const start = original === null || original === void 0 ? void 0 : original.start;
+ const transform = original === null || original === void 0 ? void 0 : original.transform;
+ const writableType = original === null || original === void 0 ? void 0 : original.writableType;
+ return {
+ flush: flush === void 0 ? void 0 : convertTransformerFlushCallback(flush, original, `${context} has member 'flush' that`),
+ readableType,
+ start: start === void 0 ? void 0 : convertTransformerStartCallback(start, original, `${context} has member 'start' that`),
+ transform: transform === void 0 ? void 0 : convertTransformerTransformCallback(transform, original, `${context} has member 'transform' that`),
+ writableType
+ };
+ }
+ function convertTransformerFlushCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (controller) => promiseCall(fn, original, [controller]);
+ }
+ function convertTransformerStartCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (controller) => reflectCall(fn, original, [controller]);
+ }
+ function convertTransformerTransformCallback(fn, original, context) {
+ assertFunction(fn, context);
+ return (chunk, controller) => promiseCall(fn, original, [chunk, controller]);
+ }
+ class TransformStream {
+ constructor(rawTransformer = {}, rawWritableStrategy = {}, rawReadableStrategy = {}) {
+ if (rawTransformer === void 0) {
+ rawTransformer = null;
+ }
+ const writableStrategy = convertQueuingStrategy(rawWritableStrategy, "Second parameter");
+ const readableStrategy = convertQueuingStrategy(rawReadableStrategy, "Third parameter");
+ const transformer = convertTransformer(rawTransformer, "First parameter");
+ if (transformer.readableType !== void 0) {
+ throw new RangeError("Invalid readableType specified");
+ }
+ if (transformer.writableType !== void 0) {
+ throw new RangeError("Invalid writableType specified");
+ }
+ const readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0);
+ const readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy);
+ const writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1);
+ const writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy);
+ let startPromise_resolve;
+ const startPromise = newPromise((resolve) => {
+ startPromise_resolve = resolve;
+ });
+ InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
+ SetUpTransformStreamDefaultControllerFromTransformer(this, transformer);
+ if (transformer.start !== void 0) {
+ startPromise_resolve(transformer.start(this._transformStreamController));
+ } else {
+ startPromise_resolve(void 0);
+ }
+ }
+ get readable() {
+ if (!IsTransformStream(this)) {
+ throw streamBrandCheckException("readable");
+ }
+ return this._readable;
+ }
+ get writable() {
+ if (!IsTransformStream(this)) {
+ throw streamBrandCheckException("writable");
+ }
+ return this._writable;
+ }
+ }
+ Object.defineProperties(TransformStream.prototype, {
+ readable: { enumerable: true },
+ writable: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, {
+ value: "TransformStream",
+ configurable: true
+ });
+ }
+ function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) {
+ function startAlgorithm() {
+ return startPromise;
+ }
+ function writeAlgorithm(chunk) {
+ return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk);
+ }
+ function abortAlgorithm(reason) {
+ return TransformStreamDefaultSinkAbortAlgorithm(stream, reason);
+ }
+ function closeAlgorithm() {
+ return TransformStreamDefaultSinkCloseAlgorithm(stream);
+ }
+ stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm);
+ function pullAlgorithm() {
+ return TransformStreamDefaultSourcePullAlgorithm(stream);
+ }
+ function cancelAlgorithm(reason) {
+ TransformStreamErrorWritableAndUnblockWrite(stream, reason);
+ return promiseResolvedWith(void 0);
+ }
+ stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
+ stream._backpressure = void 0;
+ stream._backpressureChangePromise = void 0;
+ stream._backpressureChangePromise_resolve = void 0;
+ TransformStreamSetBackpressure(stream, true);
+ stream._transformStreamController = void 0;
+ }
+ function IsTransformStream(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_transformStreamController")) {
+ return false;
+ }
+ return x2 instanceof TransformStream;
+ }
+ function TransformStreamError(stream, e2) {
+ ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e2);
+ TransformStreamErrorWritableAndUnblockWrite(stream, e2);
+ }
+ function TransformStreamErrorWritableAndUnblockWrite(stream, e2) {
+ TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController);
+ WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e2);
+ if (stream._backpressure) {
+ TransformStreamSetBackpressure(stream, false);
+ }
+ }
+ function TransformStreamSetBackpressure(stream, backpressure) {
+ if (stream._backpressureChangePromise !== void 0) {
+ stream._backpressureChangePromise_resolve();
+ }
+ stream._backpressureChangePromise = newPromise((resolve) => {
+ stream._backpressureChangePromise_resolve = resolve;
+ });
+ stream._backpressure = backpressure;
+ }
+ class TransformStreamDefaultController {
+ constructor() {
+ throw new TypeError("Illegal constructor");
+ }
+ get desiredSize() {
+ if (!IsTransformStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException("desiredSize");
+ }
+ const readableController = this._controlledTransformStream._readable._readableStreamController;
+ return ReadableStreamDefaultControllerGetDesiredSize(readableController);
+ }
+ enqueue(chunk = void 0) {
+ if (!IsTransformStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException("enqueue");
+ }
+ TransformStreamDefaultControllerEnqueue(this, chunk);
+ }
+ error(reason = void 0) {
+ if (!IsTransformStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException("error");
+ }
+ TransformStreamDefaultControllerError(this, reason);
+ }
+ terminate() {
+ if (!IsTransformStreamDefaultController(this)) {
+ throw defaultControllerBrandCheckException("terminate");
+ }
+ TransformStreamDefaultControllerTerminate(this);
+ }
+ }
+ Object.defineProperties(TransformStreamDefaultController.prototype, {
+ enqueue: { enumerable: true },
+ error: { enumerable: true },
+ terminate: { enumerable: true },
+ desiredSize: { enumerable: true }
+ });
+ if (typeof SymbolPolyfill.toStringTag === "symbol") {
+ Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
+ value: "TransformStreamDefaultController",
+ configurable: true
+ });
+ }
+ function IsTransformStreamDefaultController(x2) {
+ if (!typeIsObject(x2)) {
+ return false;
+ }
+ if (!Object.prototype.hasOwnProperty.call(x2, "_controlledTransformStream")) {
+ return false;
+ }
+ return x2 instanceof TransformStreamDefaultController;
+ }
+ function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) {
+ controller._controlledTransformStream = stream;
+ stream._transformStreamController = controller;
+ controller._transformAlgorithm = transformAlgorithm;
+ controller._flushAlgorithm = flushAlgorithm;
+ }
+ function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) {
+ const controller = Object.create(TransformStreamDefaultController.prototype);
+ let transformAlgorithm = (chunk) => {
+ try {
+ TransformStreamDefaultControllerEnqueue(controller, chunk);
+ return promiseResolvedWith(void 0);
+ } catch (transformResultE) {
+ return promiseRejectedWith(transformResultE);
+ }
+ };
+ let flushAlgorithm = () => promiseResolvedWith(void 0);
+ if (transformer.transform !== void 0) {
+ transformAlgorithm = (chunk) => transformer.transform(chunk, controller);
+ }
+ if (transformer.flush !== void 0) {
+ flushAlgorithm = () => transformer.flush(controller);
+ }
+ SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm);
+ }
+ function TransformStreamDefaultControllerClearAlgorithms(controller) {
+ controller._transformAlgorithm = void 0;
+ controller._flushAlgorithm = void 0;
+ }
+ function TransformStreamDefaultControllerEnqueue(controller, chunk) {
+ const stream = controller._controlledTransformStream;
+ const readableController = stream._readable._readableStreamController;
+ if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) {
+ throw new TypeError("Readable side is not in a state that permits enqueue");
+ }
+ try {
+ ReadableStreamDefaultControllerEnqueue(readableController, chunk);
+ } catch (e2) {
+ TransformStreamErrorWritableAndUnblockWrite(stream, e2);
+ throw stream._readable._storedError;
+ }
+ const backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController);
+ if (backpressure !== stream._backpressure) {
+ TransformStreamSetBackpressure(stream, true);
+ }
+ }
+ function TransformStreamDefaultControllerError(controller, e2) {
+ TransformStreamError(controller._controlledTransformStream, e2);
+ }
+ function TransformStreamDefaultControllerPerformTransform(controller, chunk) {
+ const transformPromise = controller._transformAlgorithm(chunk);
+ return transformPromiseWith(transformPromise, void 0, (r2) => {
+ TransformStreamError(controller._controlledTransformStream, r2);
+ throw r2;
+ });
+ }
+ function TransformStreamDefaultControllerTerminate(controller) {
+ const stream = controller._controlledTransformStream;
+ const readableController = stream._readable._readableStreamController;
+ ReadableStreamDefaultControllerClose(readableController);
+ const error = new TypeError("TransformStream terminated");
+ TransformStreamErrorWritableAndUnblockWrite(stream, error);
+ }
+ function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) {
+ const controller = stream._transformStreamController;
+ if (stream._backpressure) {
+ const backpressureChangePromise = stream._backpressureChangePromise;
+ return transformPromiseWith(backpressureChangePromise, () => {
+ const writable = stream._writable;
+ const state = writable._state;
+ if (state === "erroring") {
+ throw writable._storedError;
+ }
+ return TransformStreamDefaultControllerPerformTransform(controller, chunk);
+ });
+ }
+ return TransformStreamDefaultControllerPerformTransform(controller, chunk);
+ }
+ function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) {
+ TransformStreamError(stream, reason);
+ return promiseResolvedWith(void 0);
+ }
+ function TransformStreamDefaultSinkCloseAlgorithm(stream) {
+ const readable = stream._readable;
+ const controller = stream._transformStreamController;
+ const flushPromise = controller._flushAlgorithm();
+ TransformStreamDefaultControllerClearAlgorithms(controller);
+ return transformPromiseWith(flushPromise, () => {
+ if (readable._state === "errored") {
+ throw readable._storedError;
+ }
+ ReadableStreamDefaultControllerClose(readable._readableStreamController);
+ }, (r2) => {
+ TransformStreamError(stream, r2);
+ throw readable._storedError;
+ });
+ }
+ function TransformStreamDefaultSourcePullAlgorithm(stream) {
+ TransformStreamSetBackpressure(stream, false);
+ return stream._backpressureChangePromise;
+ }
+ function defaultControllerBrandCheckException(name) {
+ return new TypeError(`TransformStreamDefaultController.prototype.${name} can only be used on a TransformStreamDefaultController`);
+ }
+ function streamBrandCheckException(name) {
+ return new TypeError(`TransformStream.prototype.${name} can only be used on a TransformStream`);
+ }
+ exports2.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy;
+ exports2.CountQueuingStrategy = CountQueuingStrategy;
+ exports2.ReadableByteStreamController = ReadableByteStreamController;
+ exports2.ReadableStream = ReadableStream2;
+ exports2.ReadableStreamBYOBReader = ReadableStreamBYOBReader;
+ exports2.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest;
+ exports2.ReadableStreamDefaultController = ReadableStreamDefaultController;
+ exports2.ReadableStreamDefaultReader = ReadableStreamDefaultReader;
+ exports2.TransformStream = TransformStream;
+ exports2.TransformStreamDefaultController = TransformStreamDefaultController;
+ exports2.WritableStream = WritableStream;
+ exports2.WritableStreamDefaultController = WritableStreamDefaultController;
+ exports2.WritableStreamDefaultWriter = WritableStreamDefaultWriter;
+ Object.defineProperty(exports2, "__esModule", { value: true });
+ });
+ }
+});
+
+// node_modules/fetch-blob/streams.cjs
+var require_streams = __commonJS({
+ "node_modules/fetch-blob/streams.cjs"() {
+ var POOL_SIZE2 = 65536;
+ if (!globalThis.ReadableStream) {
+ try {
+ const process3 = require("node:process");
+ const { emitWarning } = process3;
+ try {
+ process3.emitWarning = () => {
+ };
+ Object.assign(globalThis, require("node:stream/web"));
+ process3.emitWarning = emitWarning;
+ } catch (error) {
+ process3.emitWarning = emitWarning;
+ throw error;
+ }
+ } catch (error) {
+ Object.assign(globalThis, require_ponyfill_es2018());
+ }
+ }
+ try {
+ const { Blob: Blob3 } = require("buffer");
+ if (Blob3 && !Blob3.prototype.stream) {
+ Blob3.prototype.stream = function name(params) {
+ let position = 0;
+ const blob = this;
+ return new ReadableStream({
+ type: "bytes",
+ async pull(ctrl) {
+ const chunk = blob.slice(position, Math.min(blob.size, position + POOL_SIZE2));
+ const buffer = await chunk.arrayBuffer();
+ position += buffer.byteLength;
+ ctrl.enqueue(new Uint8Array(buffer));
+ if (position === blob.size) {
+ ctrl.close();
+ }
+ }
+ });
+ };
+ }
+ } catch (error) {
+ }
+ }
+});
+
+// node_modules/fetch-blob/index.js
+async function* toIterator(parts, clone2 = true) {
+ for (const part of parts) {
+ if ("stream" in part) {
+ yield* part.stream();
+ } else if (ArrayBuffer.isView(part)) {
+ if (clone2) {
+ let position = part.byteOffset;
+ const end = part.byteOffset + part.byteLength;
+ while (position !== end) {
+ const size = Math.min(end - position, POOL_SIZE);
+ const chunk = part.buffer.slice(position, position + size);
+ position += chunk.byteLength;
+ yield new Uint8Array(chunk);
+ }
+ } else {
+ yield part;
+ }
+ } else {
+ let position = 0, b = part;
+ while (position !== b.size) {
+ const chunk = b.slice(position, Math.min(b.size, position + POOL_SIZE));
+ const buffer = await chunk.arrayBuffer();
+ position += buffer.byteLength;
+ yield new Uint8Array(buffer);
+ }
+ }
+ }
+}
+var import_streams, POOL_SIZE, _Blob, Blob2, fetch_blob_default;
+var init_fetch_blob = __esm({
+ "node_modules/fetch-blob/index.js"() {
+ import_streams = __toESM(require_streams(), 1);
+ POOL_SIZE = 65536;
+ _Blob = class Blob {
+ #parts = [];
+ #type = "";
+ #size = 0;
+ #endings = "transparent";
+ constructor(blobParts = [], options = {}) {
+ if (typeof blobParts !== "object" || blobParts === null) {
+ throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");
+ }
+ if (typeof blobParts[Symbol.iterator] !== "function") {
+ throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");
+ }
+ if (typeof options !== "object" && typeof options !== "function") {
+ throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");
+ }
+ if (options === null)
+ options = {};
+ const encoder = new TextEncoder();
+ for (const element of blobParts) {
+ let part;
+ if (ArrayBuffer.isView(element)) {
+ part = new Uint8Array(element.buffer.slice(element.byteOffset, element.byteOffset + element.byteLength));
+ } else if (element instanceof ArrayBuffer) {
+ part = new Uint8Array(element.slice(0));
+ } else if (element instanceof Blob) {
+ part = element;
+ } else {
+ part = encoder.encode(`${element}`);
+ }
+ const size = ArrayBuffer.isView(part) ? part.byteLength : part.size;
+ if (size) {
+ this.#size += size;
+ this.#parts.push(part);
+ }
+ }
+ this.#endings = `${options.endings === void 0 ? "transparent" : options.endings}`;
+ const type = options.type === void 0 ? "" : String(options.type);
+ this.#type = /^[\x20-\x7E]*$/.test(type) ? type : "";
+ }
+ get size() {
+ return this.#size;
+ }
+ get type() {
+ return this.#type;
+ }
+ async text() {
+ const decoder = new TextDecoder();
+ let str = "";
+ for await (const part of toIterator(this.#parts, false)) {
+ str += decoder.decode(part, { stream: true });
+ }
+ str += decoder.decode();
+ return str;
+ }
+ async arrayBuffer() {
+ const data = new Uint8Array(this.size);
+ let offset = 0;
+ for await (const chunk of toIterator(this.#parts, false)) {
+ data.set(chunk, offset);
+ offset += chunk.length;
+ }
+ return data.buffer;
+ }
+ stream() {
+ const it = toIterator(this.#parts, true);
+ return new globalThis.ReadableStream({
+ type: "bytes",
+ async pull(ctrl) {
+ const chunk = await it.next();
+ chunk.done ? ctrl.close() : ctrl.enqueue(chunk.value);
+ },
+ async cancel() {
+ await it.return();
+ }
+ });
+ }
+ slice(start = 0, end = this.size, type = "") {
+ const { size } = this;
+ let relativeStart = start < 0 ? Math.max(size + start, 0) : Math.min(start, size);
+ let relativeEnd = end < 0 ? Math.max(size + end, 0) : Math.min(end, size);
+ const span = Math.max(relativeEnd - relativeStart, 0);
+ const parts = this.#parts;
+ const blobParts = [];
+ let added = 0;
+ for (const part of parts) {
+ if (added >= span) {
+ break;
+ }
+ const size2 = ArrayBuffer.isView(part) ? part.byteLength : part.size;
+ if (relativeStart && size2 <= relativeStart) {
+ relativeStart -= size2;
+ relativeEnd -= size2;
+ } else {
+ let chunk;
+ if (ArrayBuffer.isView(part)) {
+ chunk = part.subarray(relativeStart, Math.min(size2, relativeEnd));
+ added += chunk.byteLength;
+ } else {
+ chunk = part.slice(relativeStart, Math.min(size2, relativeEnd));
+ added += chunk.size;
+ }
+ relativeEnd -= size2;
+ blobParts.push(chunk);
+ relativeStart = 0;
+ }
+ }
+ const blob = new Blob([], { type: String(type).toLowerCase() });
+ blob.#size = span;
+ blob.#parts = blobParts;
+ return blob;
+ }
+ get [Symbol.toStringTag]() {
+ return "Blob";
+ }
+ static [Symbol.hasInstance](object) {
+ return object && typeof object === "object" && typeof object.constructor === "function" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]);
+ }
+ };
+ Object.defineProperties(_Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+ });
+ Blob2 = _Blob;
+ fetch_blob_default = Blob2;
+ }
+});
+
+// node_modules/fetch-blob/file.js
+var _File, File2, file_default;
+var init_file = __esm({
+ "node_modules/fetch-blob/file.js"() {
+ init_fetch_blob();
+ _File = class File extends fetch_blob_default {
+ #lastModified = 0;
+ #name = "";
+ constructor(fileBits, fileName, options = {}) {
+ if (arguments.length < 2) {
+ throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);
+ }
+ super(fileBits, options);
+ if (options === null)
+ options = {};
+ const lastModified = options.lastModified === void 0 ? Date.now() : Number(options.lastModified);
+ if (!Number.isNaN(lastModified)) {
+ this.#lastModified = lastModified;
+ }
+ this.#name = String(fileName);
+ }
+ get name() {
+ return this.#name;
+ }
+ get lastModified() {
+ return this.#lastModified;
+ }
+ get [Symbol.toStringTag]() {
+ return "File";
+ }
+ static [Symbol.hasInstance](object) {
+ return !!object && object instanceof fetch_blob_default && /^(File)$/.test(object[Symbol.toStringTag]);
+ }
+ };
+ File2 = _File;
+ file_default = File2;
+ }
+});
+
+// node_modules/formdata-polyfill/esm.min.js
+function formDataToBlob(F2, B = fetch_blob_default) {
+ var b = `${r()}${r()}`.replace(/\./g, "").slice(-28).padStart(32, "-"), c = [], p = `--${b}\r
+Content-Disposition: form-data; name="`;
+ F2.forEach((v, n) => typeof v == "string" ? c.push(p + e(n) + `"\r
+\r
+${v.replace(/\r(?!\n)|(? (a += "", /^(Blob|File)$/.test(b && b[t]) ? [(c = c !== void 0 ? c + "" : b[t] == "File" ? b.name : "blob", a), b.name !== c || b[t] == "blob" ? new file_default([b], c, b) : b] : [a, b + ""]);
+ e = (c, f3) => (f3 ? c : c.replace(/\r?\n|\r/g, "\r\n")).replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
+ x = (n, a, e2) => {
+ if (a.length < e2) {
+ throw new TypeError(`Failed to execute '${n}' on 'FormData': ${e2} arguments required, but only ${a.length} present.`);
+ }
+ };
+ FormData2 = class FormData3 {
+ #d = [];
+ constructor(...a) {
+ if (a.length)
+ throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`);
+ }
+ get [t]() {
+ return "FormData";
+ }
+ [i]() {
+ return this.entries();
+ }
+ static [h](o) {
+ return o && typeof o === "object" && o[t] === "FormData" && !m.some((m2) => typeof o[m2] != "function");
+ }
+ append(...a) {
+ x("append", arguments, 2);
+ this.#d.push(f(...a));
+ }
+ delete(a) {
+ x("delete", arguments, 1);
+ a += "";
+ this.#d = this.#d.filter(([b]) => b !== a);
+ }
+ get(a) {
+ x("get", arguments, 1);
+ a += "";
+ for (var b = this.#d, l = b.length, c = 0; c < l; c++)
+ if (b[c][0] === a)
+ return b[c][1];
+ return null;
+ }
+ getAll(a, b) {
+ x("getAll", arguments, 1);
+ b = [];
+ a += "";
+ this.#d.forEach((c) => c[0] === a && b.push(c[1]));
+ return b;
+ }
+ has(a) {
+ x("has", arguments, 1);
+ a += "";
+ return this.#d.some((b) => b[0] === a);
+ }
+ forEach(a, b) {
+ x("forEach", arguments, 1);
+ for (var [c, d] of this)
+ a.call(b, d, c, this);
+ }
+ set(...a) {
+ x("set", arguments, 2);
+ var b = [], c = true;
+ a = f(...a);
+ this.#d.forEach((d) => {
+ d[0] === a[0] ? c && (c = !b.push(a)) : b.push(d);
+ });
+ c && b.push(a);
+ this.#d = b;
+ }
+ *entries() {
+ yield* this.#d;
+ }
+ *keys() {
+ for (var [a] of this)
+ yield a;
+ }
+ *values() {
+ for (var [, a] of this)
+ yield a;
+ }
+ };
+ }
+});
+
+// node_modules/node-domexception/index.js
+var require_node_domexception = __commonJS({
+ "node_modules/node-domexception/index.js"(exports, module2) {
+ if (!globalThis.DOMException) {
+ try {
+ const { MessageChannel } = require("worker_threads"), port = new MessageChannel().port1, ab = new ArrayBuffer();
+ port.postMessage(ab, [ab, ab]);
+ } catch (err) {
+ err.constructor.name === "DOMException" && (globalThis.DOMException = err.constructor);
+ }
+ }
+ module2.exports = globalThis.DOMException;
+ }
+});
+
+// node_modules/fetch-blob/from.js
+var import_node_fs, import_node_domexception, stat, BlobDataItem;
+var init_from = __esm({
+ "node_modules/fetch-blob/from.js"() {
+ import_node_fs = require("node:fs");
+ import_node_domexception = __toESM(require_node_domexception(), 1);
+ init_file();
+ init_fetch_blob();
+ ({ stat } = import_node_fs.promises);
+ BlobDataItem = class {
+ #path;
+ #start;
+ constructor(options) {
+ this.#path = options.path;
+ this.#start = options.start;
+ this.size = options.size;
+ this.lastModified = options.lastModified;
+ this.originalSize = options.originalSize === void 0 ? options.size : options.originalSize;
+ }
+ slice(start, end) {
+ return new BlobDataItem({
+ path: this.#path,
+ lastModified: this.lastModified,
+ originalSize: this.originalSize,
+ size: end - start,
+ start: this.#start + start
+ });
+ }
+ async *stream() {
+ const { mtimeMs, size } = await stat(this.#path);
+ if (mtimeMs > this.lastModified || this.originalSize !== size) {
+ throw new import_node_domexception.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
+ }
+ yield* (0, import_node_fs.createReadStream)(this.#path, {
+ start: this.#start,
+ end: this.#start + this.size - 1
+ });
+ }
+ get [Symbol.toStringTag]() {
+ return "Blob";
+ }
+ };
+ }
+});
+
+// node_modules/node-fetch/src/utils/multipart-parser.js
+var multipart_parser_exports = {};
+__export(multipart_parser_exports, {
+ toFormData: () => toFormData
+});
+function _fileName(headerValue) {
+ const m2 = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
+ if (!m2) {
+ return;
+ }
+ const match = m2[2] || m2[3] || "";
+ let filename = match.slice(match.lastIndexOf("\\") + 1);
+ filename = filename.replace(/%22/g, '"');
+ filename = filename.replace(/(\d{4});/g, (m3, code) => {
+ return String.fromCharCode(code);
+ });
+ return filename;
+}
+async function toFormData(Body2, ct) {
+ if (!/multipart/i.test(ct)) {
+ throw new TypeError("Failed to fetch");
+ }
+ const m2 = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
+ if (!m2) {
+ throw new TypeError("no or bad content-type header, no multipart boundary");
+ }
+ const parser = new MultipartParser(m2[1] || m2[2]);
+ let headerField;
+ let headerValue;
+ let entryValue;
+ let entryName;
+ let contentType;
+ let filename;
+ const entryChunks = [];
+ const formData = new FormData2();
+ const onPartData = (ui8a) => {
+ entryValue += decoder.decode(ui8a, { stream: true });
+ };
+ const appendToFile = (ui8a) => {
+ entryChunks.push(ui8a);
+ };
+ const appendFileToFormData = () => {
+ const file = new file_default(entryChunks, filename, { type: contentType });
+ formData.append(entryName, file);
+ };
+ const appendEntryToFormData = () => {
+ formData.append(entryName, entryValue);
+ };
+ const decoder = new TextDecoder("utf-8");
+ decoder.decode();
+ parser.onPartBegin = function() {
+ parser.onPartData = onPartData;
+ parser.onPartEnd = appendEntryToFormData;
+ headerField = "";
+ headerValue = "";
+ entryValue = "";
+ entryName = "";
+ contentType = "";
+ filename = null;
+ entryChunks.length = 0;
+ };
+ parser.onHeaderField = function(ui8a) {
+ headerField += decoder.decode(ui8a, { stream: true });
+ };
+ parser.onHeaderValue = function(ui8a) {
+ headerValue += decoder.decode(ui8a, { stream: true });
+ };
+ parser.onHeaderEnd = function() {
+ headerValue += decoder.decode();
+ headerField = headerField.toLowerCase();
+ if (headerField === "content-disposition") {
+ const m3 = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
+ if (m3) {
+ entryName = m3[2] || m3[3] || "";
+ }
+ filename = _fileName(headerValue);
+ if (filename) {
+ parser.onPartData = appendToFile;
+ parser.onPartEnd = appendFileToFormData;
+ }
+ } else if (headerField === "content-type") {
+ contentType = headerValue;
+ }
+ headerValue = "";
+ headerField = "";
+ };
+ for await (const chunk of Body2) {
+ parser.write(chunk);
+ }
+ parser.end();
+ return formData;
+}
+var s, S, f2, F, LF, CR, SPACE, HYPHEN, COLON, A, Z, lower, noop, MultipartParser;
+var init_multipart_parser = __esm({
+ "node_modules/node-fetch/src/utils/multipart-parser.js"() {
+ init_from();
+ init_esm_min();
+ s = 0;
+ S = {
+ START_BOUNDARY: s++,
+ HEADER_FIELD_START: s++,
+ HEADER_FIELD: s++,
+ HEADER_VALUE_START: s++,
+ HEADER_VALUE: s++,
+ HEADER_VALUE_ALMOST_DONE: s++,
+ HEADERS_ALMOST_DONE: s++,
+ PART_DATA_START: s++,
+ PART_DATA: s++,
+ END: s++
+ };
+ f2 = 1;
+ F = {
+ PART_BOUNDARY: f2,
+ LAST_BOUNDARY: f2 *= 2
+ };
+ LF = 10;
+ CR = 13;
+ SPACE = 32;
+ HYPHEN = 45;
+ COLON = 58;
+ A = 97;
+ Z = 122;
+ lower = (c) => c | 32;
+ noop = () => {
+ };
+ MultipartParser = class {
+ constructor(boundary) {
+ this.index = 0;
+ this.flags = 0;
+ this.onHeaderEnd = noop;
+ this.onHeaderField = noop;
+ this.onHeadersEnd = noop;
+ this.onHeaderValue = noop;
+ this.onPartBegin = noop;
+ this.onPartData = noop;
+ this.onPartEnd = noop;
+ this.boundaryChars = {};
+ boundary = "\r\n--" + boundary;
+ const ui8a = new Uint8Array(boundary.length);
+ for (let i2 = 0; i2 < boundary.length; i2++) {
+ ui8a[i2] = boundary.charCodeAt(i2);
+ this.boundaryChars[ui8a[i2]] = true;
+ }
+ this.boundary = ui8a;
+ this.lookbehind = new Uint8Array(this.boundary.length + 8);
+ this.state = S.START_BOUNDARY;
+ }
+ write(data) {
+ let i2 = 0;
+ const length_ = data.length;
+ let previousIndex = this.index;
+ let { lookbehind, boundary, boundaryChars, index, state, flags } = this;
+ const boundaryLength = this.boundary.length;
+ const boundaryEnd = boundaryLength - 1;
+ const bufferLength = data.length;
+ let c;
+ let cl;
+ const mark = (name) => {
+ this[name + "Mark"] = i2;
+ };
+ const clear = (name) => {
+ delete this[name + "Mark"];
+ };
+ const callback = (callbackSymbol, start, end, ui8a) => {
+ if (start === void 0 || start !== end) {
+ this[callbackSymbol](ui8a && ui8a.subarray(start, end));
+ }
+ };
+ const dataCallback = (name, clear2) => {
+ const markSymbol = name + "Mark";
+ if (!(markSymbol in this)) {
+ return;
+ }
+ if (clear2) {
+ callback(name, this[markSymbol], i2, data);
+ delete this[markSymbol];
+ } else {
+ callback(name, this[markSymbol], data.length, data);
+ this[markSymbol] = 0;
+ }
+ };
+ for (i2 = 0; i2 < length_; i2++) {
+ c = data[i2];
+ switch (state) {
+ case S.START_BOUNDARY:
+ if (index === boundary.length - 2) {
+ if (c === HYPHEN) {
+ flags |= F.LAST_BOUNDARY;
+ } else if (c !== CR) {
+ return;
+ }
+ index++;
+ break;
+ } else if (index - 1 === boundary.length - 2) {
+ if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
+ state = S.END;
+ flags = 0;
+ } else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
+ index = 0;
+ callback("onPartBegin");
+ state = S.HEADER_FIELD_START;
+ } else {
+ return;
+ }
+ break;
+ }
+ if (c !== boundary[index + 2]) {
+ index = -2;
+ }
+ if (c === boundary[index + 2]) {
+ index++;
+ }
+ break;
+ case S.HEADER_FIELD_START:
+ state = S.HEADER_FIELD;
+ mark("onHeaderField");
+ index = 0;
+ case S.HEADER_FIELD:
+ if (c === CR) {
+ clear("onHeaderField");
+ state = S.HEADERS_ALMOST_DONE;
+ break;
+ }
+ index++;
+ if (c === HYPHEN) {
+ break;
+ }
+ if (c === COLON) {
+ if (index === 1) {
+ return;
+ }
+ dataCallback("onHeaderField", true);
+ state = S.HEADER_VALUE_START;
+ break;
+ }
+ cl = lower(c);
+ if (cl < A || cl > Z) {
+ return;
+ }
+ break;
+ case S.HEADER_VALUE_START:
+ if (c === SPACE) {
+ break;
+ }
+ mark("onHeaderValue");
+ state = S.HEADER_VALUE;
+ case S.HEADER_VALUE:
+ if (c === CR) {
+ dataCallback("onHeaderValue", true);
+ callback("onHeaderEnd");
+ state = S.HEADER_VALUE_ALMOST_DONE;
+ }
+ break;
+ case S.HEADER_VALUE_ALMOST_DONE:
+ if (c !== LF) {
+ return;
+ }
+ state = S.HEADER_FIELD_START;
+ break;
+ case S.HEADERS_ALMOST_DONE:
+ if (c !== LF) {
+ return;
+ }
+ callback("onHeadersEnd");
+ state = S.PART_DATA_START;
+ break;
+ case S.PART_DATA_START:
+ state = S.PART_DATA;
+ mark("onPartData");
+ case S.PART_DATA:
+ previousIndex = index;
+ if (index === 0) {
+ i2 += boundaryEnd;
+ while (i2 < bufferLength && !(data[i2] in boundaryChars)) {
+ i2 += boundaryLength;
+ }
+ i2 -= boundaryEnd;
+ c = data[i2];
+ }
+ if (index < boundary.length) {
+ if (boundary[index] === c) {
+ if (index === 0) {
+ dataCallback("onPartData", true);
+ }
+ index++;
+ } else {
+ index = 0;
+ }
+ } else if (index === boundary.length) {
+ index++;
+ if (c === CR) {
+ flags |= F.PART_BOUNDARY;
+ } else if (c === HYPHEN) {
+ flags |= F.LAST_BOUNDARY;
+ } else {
+ index = 0;
+ }
+ } else if (index - 1 === boundary.length) {
+ if (flags & F.PART_BOUNDARY) {
+ index = 0;
+ if (c === LF) {
+ flags &= ~F.PART_BOUNDARY;
+ callback("onPartEnd");
+ callback("onPartBegin");
+ state = S.HEADER_FIELD_START;
+ break;
+ }
+ } else if (flags & F.LAST_BOUNDARY) {
+ if (c === HYPHEN) {
+ callback("onPartEnd");
+ state = S.END;
+ flags = 0;
+ } else {
+ index = 0;
+ }
+ } else {
+ index = 0;
+ }
+ }
+ if (index > 0) {
+ lookbehind[index - 1] = c;
+ } else if (previousIndex > 0) {
+ const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
+ callback("onPartData", 0, previousIndex, _lookbehind);
+ previousIndex = 0;
+ mark("onPartData");
+ i2--;
+ }
+ break;
+ case S.END:
+ break;
+ default:
+ throw new Error(`Unexpected state entered: ${state}`);
+ }
+ }
+ dataCallback("onHeaderField");
+ dataCallback("onHeaderValue");
+ dataCallback("onPartData");
+ this.index = index;
+ this.state = state;
+ this.flags = flags;
+ }
+ end() {
+ if (this.state === S.HEADER_FIELD_START && this.index === 0 || this.state === S.PART_DATA && this.index === this.boundary.length) {
+ this.onPartEnd();
+ } else if (this.state !== S.END) {
+ throw new Error("MultipartParser.end(): stream ended unexpectedly");
+ }
+ }
+ };
+ }
+});
+
+// src/action.ts
+var import_core7 = __toESM(require_core(), 1);
+
+// src/lib/cache.ts
+var import_core = __toESM(require_core(), 1);
+var import_crypto = require("crypto");
+var import_fs = __toESM(require("fs"), 1);
+var import_util = require("util");
+var read = (0, import_util.promisify)(import_fs.default.readFile);
+var write = (0, import_util.promisify)(import_fs.default.writeFile);
+var md = (0, import_util.promisify)(import_fs.default.mkdir);
+var CacheRecord = class {
+ constructor(feedTitle, title, date) {
+ this.feedTitle = feedTitle;
+ this.title = title;
+ this.date = date;
+ }
+};
+var hash = (str) => {
+ return (0, import_crypto.createHash)("sha256").update(str).digest("hex");
+};
+var cacheSlug = (item) => {
+ const { feedTitle, title, created } = item;
+ let slug = "";
+ slug += feedTitle == null ? void 0 : feedTitle.toLowerCase().replace(/[^a-z0-9]/g, "-");
+ slug += title == null ? void 0 : title.toLowerCase().replace(/[^a-z0-9]/g, "-");
+ if (created) {
+ const date = new Date(created);
+ slug += `${slug}-${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
+ }
+ return slug;
+};
+var readCache = async (rssFeed, cacheDir) => {
+ try {
+ import_core.default.debug(`Retrieving previously published entries\u2026`);
+ const rssFeedUrl = new URL(rssFeed);
+ const cachePath = `${cacheDir}/${rssFeedUrl.hostname.replace(/\./g, "_")}.json`;
+ const cached = JSON.parse(await read(cachePath, "utf8"));
+ import_core.default.debug(`Found ${cached.length} cached items`);
+ return cached;
+ } catch (err) {
+ import_core.default.debug(err.message);
+ throw new Error("Failed to read cache");
+ }
+};
+var checkCache = async (rss, cached) => {
+ try {
+ if (rss == null ? void 0 : rss.items) {
+ const output = [];
+ for (const item of rss.items) {
+ let cacheHit = false;
+ for (const published in cached) {
+ const record = new CacheRecord(rss.title, item.title, item.created);
+ if (cached[published] === hash(cacheSlug(record))) {
+ cacheHit = true;
+ import_core.default.debug(`Cache hit for ${item.title}`);
+ }
+ }
+ if (!cacheHit)
+ output.push(item);
+ }
+ import_core.default.debug(`Found ${output.length} new items`);
+ return output;
+ } else {
+ import_core.default.debug("Nothing to check");
+ return [];
+ }
+ } catch (err) {
+ import_core.default.debug(err.message);
+ throw new Error("Error checking cache");
+ }
+};
+var writeCache = async (feedTitle, rssFeed, cacheDir, filtered, cached) => {
+ try {
+ const rssFeedUrl = new URL(rssFeed);
+ const cachePath = `${cacheDir}/${rssFeedUrl.hostname.replace(/\./g, "_")}.json`;
+ import_core.default.debug(`Writing cache to ${cachePath}`);
+ await md(cacheDir, { recursive: true });
+ const hashed = [...cached];
+ for (const sent of filtered) {
+ const record = new CacheRecord(feedTitle, sent.title, sent.created);
+ hashed.push(hash(cacheSlug(record)));
+ }
+ await write(cachePath, JSON.stringify(hashed));
+ } catch (err) {
+ import_core.default.debug(err.message);
+ throw new Error("Failed to write to cache");
+ }
+};
+
+// src/lib/getfeed.ts
+var import_core2 = __toESM(require_core(), 1);
+var import_dayjs = __toESM(require_dayjs_min(), 1);
+var import_rss_to_json = __toESM(require_dist(), 1);
+var getFeed = async (rssFeed, cacheDir, interval) => {
+ var _a, _b;
+ import_core2.default.debug(`Retrieving ${rssFeed}\u2026`);
+ const rss = await (0, import_rss_to_json.parse)(rssFeed, {});
+ import_core2.default.debug(`Feed has ${(_a = rss == null ? void 0 : rss.items) == null ? void 0 : _a.length} items`);
+ if ((_b = rss == null ? void 0 : rss.items) == null ? void 0 : _b.length) {
+ let toSend = [];
+ let cached = [];
+ if (cacheDir) {
+ import_core2.default.debug(`Retrieving previously cached entries\u2026`);
+ try {
+ cached = await readCache(rssFeed, cacheDir);
+ toSend = await checkCache(rss, cached);
+ } catch (err) {
+ import_core2.default.debug(err.message);
+ toSend = rss.items.filter((item) => {
+ return (0, import_dayjs.default)(item.created).isAfter((0, import_dayjs.default)().subtract(60, "minute"));
+ });
+ }
+ } else if (interval) {
+ import_core2.default.debug(`Selecting items posted in the last ${interval} minutes\u2026`);
+ toSend = rss.items.filter((item) => {
+ return (0, import_dayjs.default)(item.created).isAfter((0, import_dayjs.default)().subtract(interval, "minute"));
+ });
+ }
+ return { filtered: toSend, unfiltered: rss, cached };
+ } else {
+ throw new Error("No feed items found");
+ }
+};
+
+// src/lib/payload.ts
+var import_core4 = __toESM(require_core(), 1);
+var import_html_to_text = __toESM(require_html_to_text2(), 1);
+
+// node_modules/linkedom/esm/shared/symbols.js
+var CHANGED = Symbol("changed");
+var CLASS_LIST = Symbol("classList");
+var CUSTOM_ELEMENTS = Symbol("CustomElements");
+var CONTENT = Symbol("content");
+var DATASET = Symbol("dataset");
+var DOCTYPE = Symbol("doctype");
+var DOM_PARSER = Symbol("DOMParser");
+var END = Symbol("end");
+var EVENT_TARGET = Symbol("EventTarget");
+var GLOBALS = Symbol("globals");
+var IMAGE = Symbol("image");
+var MIME = Symbol("mime");
+var MUTATION_OBSERVER = Symbol("MutationObserver");
+var NEXT = Symbol("next");
+var OWNER_ELEMENT = Symbol("ownerElement");
+var PREV = Symbol("prev");
+var PRIVATE = Symbol("private");
+var SHEET = Symbol("sheet");
+var START = Symbol("start");
+var STYLE = Symbol("style");
+var UPGRADE = Symbol("upgrade");
+var VALUE = Symbol("value");
+
+// node_modules/linkedom/esm/shared/parse-from-string.js
+var HTMLParser2 = __toESM(require_lib7(), 1);
+
+// node_modules/linkedom/esm/shared/constants.js
+var NODE_END = -1;
+var ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = 2;
+var TEXT_NODE = 3;
+var COMMENT_NODE = 8;
+var DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = 11;
+var SHOW_ALL = -1;
+var SHOW_ELEMENT = 1;
+var SHOW_TEXT = 4;
+var SHOW_COMMENT = 128;
+var DOCUMENT_POSITION_DISCONNECTED = 1;
+var DOCUMENT_POSITION_PRECEDING = 2;
+var DOCUMENT_POSITION_FOLLOWING = 4;
+var DOCUMENT_POSITION_CONTAINS = 8;
+var DOCUMENT_POSITION_CONTAINED_BY = 16;
+var DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
+var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
+
+// node_modules/linkedom/esm/shared/object.js
+var {
+ assign,
+ create,
+ defineProperties,
+ entries,
+ getOwnPropertyDescriptors,
+ keys,
+ setPrototypeOf
+} = Object;
+
+// node_modules/linkedom/esm/shared/utils.js
+var $String = String;
+var getEnd = (node) => node.nodeType === ELEMENT_NODE ? node[END] : node;
+var ignoreCase = ({ ownerDocument }) => ownerDocument[MIME].ignoreCase;
+var knownAdjacent = (prev, next) => {
+ prev[NEXT] = next;
+ next[PREV] = prev;
+};
+var knownBoundaries = (prev, current, next) => {
+ knownAdjacent(prev, current);
+ knownAdjacent(getEnd(current), next);
+};
+var knownSegment = (prev, start, end, next) => {
+ knownAdjacent(prev, start);
+ knownAdjacent(getEnd(end), next);
+};
+var knownSiblings = (prev, current, next) => {
+ knownAdjacent(prev, current);
+ knownAdjacent(current, next);
+};
+var localCase = ({ localName, ownerDocument }) => {
+ return ownerDocument[MIME].ignoreCase ? localName.toUpperCase() : localName;
+};
+var setAdjacent = (prev, next) => {
+ if (prev)
+ prev[NEXT] = next;
+ if (next)
+ next[PREV] = prev;
+};
+
+// node_modules/linkedom/esm/interface/custom-element-registry.js
+var reactive = false;
+var Classes = /* @__PURE__ */ new WeakMap();
+var customElements = /* @__PURE__ */ new WeakMap();
+var attributeChangedCallback = (element, attributeName, oldValue, newValue) => {
+ if (reactive && customElements.has(element) && element.attributeChangedCallback && element.constructor.observedAttributes.includes(attributeName)) {
+ element.attributeChangedCallback(attributeName, oldValue, newValue);
+ }
+};
+var createTrigger = (method, isConnected2) => (element) => {
+ if (customElements.has(element)) {
+ const info = customElements.get(element);
+ if (info.connected !== isConnected2 && element.isConnected === isConnected2) {
+ info.connected = isConnected2;
+ if (method in element)
+ element[method]();
+ }
+ }
+};
+var triggerConnected = createTrigger("connectedCallback", true);
+var connectedCallback = (element) => {
+ if (reactive) {
+ triggerConnected(element);
+ let { [NEXT]: next, [END]: end } = element;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE)
+ triggerConnected(next);
+ next = next[NEXT];
+ }
+ }
+};
+var triggerDisconnected = createTrigger("disconnectedCallback", false);
+var disconnectedCallback = (element) => {
+ if (reactive) {
+ triggerDisconnected(element);
+ let { [NEXT]: next, [END]: end } = element;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE)
+ triggerDisconnected(next);
+ next = next[NEXT];
+ }
+ }
+};
+var CustomElementRegistry = class {
+ constructor(ownerDocument) {
+ this.ownerDocument = ownerDocument;
+ this.registry = /* @__PURE__ */ new Map();
+ this.waiting = /* @__PURE__ */ new Map();
+ this.active = false;
+ }
+ define(localName, Class, options = {}) {
+ const { ownerDocument, registry, waiting } = this;
+ if (registry.has(localName))
+ throw new Error("unable to redefine " + localName);
+ if (Classes.has(Class))
+ throw new Error("unable to redefine the same class: " + Class);
+ this.active = reactive = true;
+ const { extends: extend } = options;
+ Classes.set(Class, {
+ ownerDocument,
+ options: { is: extend ? localName : "" },
+ localName: extend || localName
+ });
+ const check = extend ? (element) => {
+ return element.localName === extend && element.getAttribute("is") === localName;
+ } : (element) => element.localName === localName;
+ registry.set(localName, { Class, check });
+ if (waiting.has(localName)) {
+ for (const resolve of waiting.get(localName))
+ resolve(Class);
+ waiting.delete(localName);
+ }
+ ownerDocument.querySelectorAll(extend ? `${extend}[is="${localName}"]` : localName).forEach(this.upgrade, this);
+ }
+ upgrade(element) {
+ if (customElements.has(element))
+ return;
+ const { ownerDocument, registry } = this;
+ const ce = element.getAttribute("is") || element.localName;
+ if (registry.has(ce)) {
+ const { Class, check } = registry.get(ce);
+ if (check(element)) {
+ const { attributes, isConnected: isConnected2 } = element;
+ for (const attr of attributes)
+ element.removeAttributeNode(attr);
+ const values = entries(element);
+ for (const [key2] of values)
+ delete element[key2];
+ setPrototypeOf(element, Class.prototype);
+ ownerDocument[UPGRADE] = { element, values };
+ new Class(ownerDocument, ce);
+ customElements.set(element, { connected: isConnected2 });
+ for (const attr of attributes)
+ element.setAttributeNode(attr);
+ if (isConnected2 && element.connectedCallback)
+ element.connectedCallback();
+ }
+ }
+ }
+ whenDefined(localName) {
+ const { registry, waiting } = this;
+ return new Promise((resolve) => {
+ if (registry.has(localName))
+ resolve(registry.get(localName).Class);
+ else {
+ if (!waiting.has(localName))
+ waiting.set(localName, []);
+ waiting.get(localName).push(resolve);
+ }
+ });
+ }
+ get(localName) {
+ const info = this.registry.get(localName);
+ return info && info.Class;
+ }
+};
+
+// node_modules/linkedom/esm/shared/parse-from-string.js
+var { Parser } = HTMLParser2;
+var notParsing = true;
+var append = (self2, node, active) => {
+ const end = self2[END];
+ node.parentNode = self2;
+ knownBoundaries(end[PREV], node, end);
+ if (active && node.nodeType === ELEMENT_NODE)
+ connectedCallback(node);
+ return node;
+};
+var attribute = (element, end, attribute2, value, active) => {
+ attribute2[VALUE] = value;
+ attribute2.ownerElement = element;
+ knownSiblings(end[PREV], attribute2, end);
+ if (attribute2.name === "class")
+ element.className = value;
+ if (active)
+ attributeChangedCallback(element, attribute2.name, null, value);
+};
+var parseFromString = (document2, isHTML, markupLanguage) => {
+ const { active, registry } = document2[CUSTOM_ELEMENTS];
+ let node = document2;
+ let ownerSVGElement = null;
+ notParsing = false;
+ const content = new Parser({
+ onprocessinginstruction(name, data) {
+ if (name.toLowerCase() === "!doctype")
+ document2.doctype = data.slice(name.length).trim();
+ },
+ onopentag(name, attributes) {
+ let create3 = true;
+ if (isHTML) {
+ if (ownerSVGElement) {
+ node = append(node, document2.createElementNS(SVG_NAMESPACE, name), active);
+ node.ownerSVGElement = ownerSVGElement;
+ create3 = false;
+ } else if (name === "svg" || name === "SVG") {
+ ownerSVGElement = document2.createElementNS(SVG_NAMESPACE, name);
+ node = append(node, ownerSVGElement, active);
+ create3 = false;
+ } else if (active) {
+ const ce = name.includes("-") ? name : attributes.is || "";
+ if (ce && registry.has(ce)) {
+ const { Class } = registry.get(ce);
+ node = append(node, new Class(), active);
+ delete attributes.is;
+ create3 = false;
+ }
+ }
+ }
+ if (create3)
+ node = append(node, document2.createElement(name), false);
+ let end = node[END];
+ for (const name2 of keys(attributes))
+ attribute(node, end, document2.createAttribute(name2), attributes[name2], active);
+ },
+ oncomment(data) {
+ append(node, document2.createComment(data), active);
+ },
+ ontext(text) {
+ append(node, document2.createTextNode(text), active);
+ },
+ onclosetag() {
+ if (isHTML && node === ownerSVGElement)
+ ownerSVGElement = null;
+ node = node.parentNode;
+ }
+ }, {
+ lowerCaseAttributeNames: false,
+ decodeEntities: true,
+ xmlMode: !isHTML
+ });
+ content.write(markupLanguage);
+ content.end();
+ notParsing = true;
+ return document2;
+};
+
+// node_modules/linkedom/esm/shared/register-html-class.js
+var htmlClasses = /* @__PURE__ */ new Map();
+var registerHTMLClass = (names, Class) => {
+ for (const name of [].concat(names)) {
+ htmlClasses.set(name, Class);
+ htmlClasses.set(name.toUpperCase(), Class);
+ }
+};
+
+// node_modules/linkedom/esm/interface/document.js
+var import_perf_hooks = __toESM(require_perf_hooks(), 1);
+
+// node_modules/linkedom/esm/shared/jsdon.js
+var loopSegment = ({ [NEXT]: next, [END]: end }, json) => {
+ while (next !== end) {
+ switch (next.nodeType) {
+ case ATTRIBUTE_NODE:
+ attrAsJSON(next, json);
+ break;
+ case TEXT_NODE:
+ case COMMENT_NODE:
+ characterDataAsJSON(next, json);
+ break;
+ case ELEMENT_NODE:
+ elementAsJSON(next, json);
+ next = getEnd(next);
+ break;
+ case DOCUMENT_TYPE_NODE:
+ documentTypeAsJSON(next, json);
+ break;
+ }
+ next = next[NEXT];
+ }
+ const last = json.length - 1;
+ const value = json[last];
+ if (typeof value === "number" && value < 0)
+ json[last] += NODE_END;
+ else
+ json.push(NODE_END);
+};
+var attrAsJSON = (attr, json) => {
+ json.push(ATTRIBUTE_NODE, attr.name);
+ const value = attr[VALUE].trim();
+ if (value)
+ json.push(value);
+};
+var characterDataAsJSON = (node, json) => {
+ const value = node[VALUE];
+ if (value.trim())
+ json.push(node.nodeType, value);
+};
+var nonElementAsJSON = (node, json) => {
+ json.push(node.nodeType);
+ loopSegment(node, json);
+};
+var documentTypeAsJSON = ({ name, publicId, systemId }, json) => {
+ json.push(DOCUMENT_TYPE_NODE, name);
+ if (publicId)
+ json.push(publicId);
+ if (systemId)
+ json.push(systemId);
+};
+var elementAsJSON = (element, json) => {
+ json.push(ELEMENT_NODE, element.localName);
+ loopSegment(element, json);
+};
+
+// node_modules/linkedom/esm/interface/mutation-observer.js
+var createRecord = (type, target, addedNodes, removedNodes, attributeName, oldValue) => ({ type, target, addedNodes, removedNodes, attributeName, oldValue });
+var queueAttribute = (observer, target, attributeName, attributeFilter, attributeOldValue, oldValue) => {
+ if (!attributeFilter || attributeFilter.includes(attributeName)) {
+ const { callback, records, scheduled } = observer;
+ records.push(createRecord("attributes", target, [], [], attributeName, attributeOldValue ? oldValue : void 0));
+ if (!scheduled) {
+ observer.scheduled = true;
+ Promise.resolve().then(() => {
+ observer.scheduled = false;
+ callback(records.splice(0), observer);
+ });
+ }
+ }
+};
+var attributeChangedCallback2 = (element, attributeName, oldValue) => {
+ const { ownerDocument } = element;
+ const { active, observers } = ownerDocument[MUTATION_OBSERVER];
+ if (active) {
+ for (const observer of observers) {
+ for (const [
+ target,
+ {
+ childList,
+ subtree,
+ attributes,
+ attributeFilter,
+ attributeOldValue
+ }
+ ] of observer.nodes) {
+ if (childList) {
+ if (subtree && (target === ownerDocument || target.contains(element)) || !subtree && target.children.includes(element)) {
+ queueAttribute(observer, element, attributeName, attributeFilter, attributeOldValue, oldValue);
+ break;
+ }
+ } else if (attributes && target === element) {
+ queueAttribute(observer, element, attributeName, attributeFilter, attributeOldValue, oldValue);
+ break;
+ }
+ }
+ }
+ }
+};
+var moCallback = (element, parentNode) => {
+ const { ownerDocument } = element;
+ const { active, observers } = ownerDocument[MUTATION_OBSERVER];
+ if (active) {
+ for (const observer of observers) {
+ for (const [target, { subtree, childList, characterData }] of observer.nodes) {
+ if (childList) {
+ if (parentNode && (target === parentNode || subtree && target.contains(parentNode)) || !parentNode && (subtree && (target === ownerDocument || target.contains(element)) || !subtree && target[characterData ? "childNodes" : "children"].includes(element))) {
+ const { callback, records, scheduled } = observer;
+ records.push(createRecord("childList", target, parentNode ? [] : [element], parentNode ? [element] : []));
+ if (!scheduled) {
+ observer.scheduled = true;
+ Promise.resolve().then(() => {
+ observer.scheduled = false;
+ callback(records.splice(0), observer);
+ });
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+};
+var MutationObserverClass = class {
+ constructor(ownerDocument) {
+ const observers = /* @__PURE__ */ new Set();
+ this.observers = observers;
+ this.active = false;
+ this.class = class MutationObserver {
+ constructor(callback) {
+ this.callback = callback;
+ this.nodes = /* @__PURE__ */ new Map();
+ this.records = [];
+ this.scheduled = false;
+ }
+ disconnect() {
+ this.records.splice(0);
+ this.nodes.clear();
+ observers.delete(this);
+ ownerDocument[MUTATION_OBSERVER].active = !!observers.size;
+ }
+ observe(target, options = {
+ subtree: false,
+ childList: false,
+ attributes: false,
+ attributeFilter: null,
+ attributeOldValue: false,
+ characterData: false
+ }) {
+ if ("attributeOldValue" in options || "attributeFilter" in options)
+ options.attributes = true;
+ options.childList = !!options.childList;
+ options.subtree = !!options.subtree;
+ this.nodes.set(target, options);
+ observers.add(this);
+ ownerDocument[MUTATION_OBSERVER].active = true;
+ }
+ takeRecords() {
+ return this.records.splice(0);
+ }
+ };
+ }
+};
+
+// node_modules/linkedom/esm/shared/attributes.js
+var emptyAttributes = /* @__PURE__ */ new Set([
+ "allowfullscreen",
+ "allowpaymentrequest",
+ "async",
+ "autofocus",
+ "autoplay",
+ "checked",
+ "class",
+ "contenteditable",
+ "controls",
+ "default",
+ "defer",
+ "disabled",
+ "draggable",
+ "formnovalidate",
+ "hidden",
+ "id",
+ "ismap",
+ "itemscope",
+ "loop",
+ "multiple",
+ "muted",
+ "nomodule",
+ "novalidate",
+ "open",
+ "playsinline",
+ "readonly",
+ "required",
+ "reversed",
+ "selected",
+ "style",
+ "truespeed"
+]);
+var setAttribute = (element, attribute2) => {
+ const { [VALUE]: value, name } = attribute2;
+ attribute2.ownerElement = element;
+ knownSiblings(element, attribute2, element[NEXT]);
+ if (name === "class")
+ element.className = value;
+ attributeChangedCallback2(element, name, null);
+ attributeChangedCallback(element, name, null, value);
+};
+var removeAttribute = (element, attribute2) => {
+ const { [VALUE]: value, name } = attribute2;
+ knownAdjacent(attribute2[PREV], attribute2[NEXT]);
+ attribute2.ownerElement = attribute2[PREV] = attribute2[NEXT] = null;
+ if (name === "class")
+ element[CLASS_LIST] = null;
+ attributeChangedCallback2(element, name, value);
+ attributeChangedCallback(element, name, value, null);
+};
+var booleanAttribute = {
+ get(element, name) {
+ return element.hasAttribute(name);
+ },
+ set(element, name, value) {
+ if (value)
+ element.setAttribute(name, "");
+ else
+ element.removeAttribute(name);
+ }
+};
+var numericAttribute = {
+ get(element, name) {
+ return parseFloat(element.getAttribute(name) || 0);
+ },
+ set(element, name, value) {
+ element.setAttribute(name, value);
+ }
+};
+var stringAttribute = {
+ get(element, name) {
+ return element.getAttribute(name) || "";
+ },
+ set(element, name, value) {
+ element.setAttribute(name, value);
+ }
+};
+
+// node_modules/linkedom/esm/interface/event-target.js
+var wm = /* @__PURE__ */ new WeakMap();
+function dispatch(event, listener) {
+ if (typeof listener === "function")
+ listener.call(event.target, event);
+ else
+ listener.handleEvent(event);
+ return event._stopImmediatePropagationFlag;
+}
+function invokeListeners({ currentTarget, target }) {
+ const map = wm.get(currentTarget);
+ if (map && map.has(this.type)) {
+ const listeners = map.get(this.type);
+ if (currentTarget === target) {
+ this.eventPhase = this.AT_TARGET;
+ } else {
+ this.eventPhase = this.BUBBLING_PHASE;
+ }
+ this.currentTarget = currentTarget;
+ this.target = target;
+ for (const [listener, options] of listeners) {
+ if (options && options.once)
+ listeners.delete(listener);
+ if (dispatch(this, listener))
+ break;
+ }
+ delete this.currentTarget;
+ delete this.target;
+ return this.cancelBubble;
+ }
+}
+var DOMEventTarget = class {
+ constructor() {
+ wm.set(this, /* @__PURE__ */ new Map());
+ }
+ _getParent() {
+ return null;
+ }
+ addEventListener(type, listener, options) {
+ const map = wm.get(this);
+ if (!map.has(type))
+ map.set(type, /* @__PURE__ */ new Map());
+ map.get(type).set(listener, options);
+ }
+ removeEventListener(type, listener) {
+ const map = wm.get(this);
+ if (map.has(type)) {
+ const listeners = map.get(type);
+ if (listeners.delete(listener) && !listeners.size)
+ map.delete(type);
+ }
+ }
+ dispatchEvent(event) {
+ let node = this;
+ event.eventPhase = event.CAPTURING_PHASE;
+ while (node) {
+ if (node.dispatchEvent)
+ event._path.push({ currentTarget: node, target: this });
+ node = event.bubbles && node._getParent && node._getParent();
+ }
+ event._path.some(invokeListeners, event);
+ event._path = [];
+ event.eventPhase = event.NONE;
+ return !event.defaultPrevented;
+ }
+};
+
+// node_modules/linkedom/esm/interface/node-list.js
+var NodeList = class extends Array {
+ item(i2) {
+ return i2 < this.length ? this[i2] : null;
+ }
+};
+
+// node_modules/linkedom/esm/interface/node.js
+var getParentNodeCount = ({ parentNode }) => {
+ let count = 0;
+ while (parentNode) {
+ count++;
+ parentNode = parentNode.parentNode;
+ }
+ return count;
+};
+var Node = class extends DOMEventTarget {
+ static get ELEMENT_NODE() {
+ return ELEMENT_NODE;
+ }
+ static get ATTRIBUTE_NODE() {
+ return ATTRIBUTE_NODE;
+ }
+ static get TEXT_NODE() {
+ return TEXT_NODE;
+ }
+ static get COMMENT_NODE() {
+ return COMMENT_NODE;
+ }
+ static get DOCUMENT_NODE() {
+ return DOCUMENT_NODE;
+ }
+ static get DOCUMENT_FRAGMENT_NODE() {
+ return DOCUMENT_FRAGMENT_NODE;
+ }
+ static get DOCUMENT_TYPE_NODE() {
+ return DOCUMENT_TYPE_NODE;
+ }
+ constructor(ownerDocument, localName, nodeType) {
+ super();
+ this.ownerDocument = ownerDocument;
+ this.localName = localName;
+ this.nodeType = nodeType;
+ this.parentNode = null;
+ this[NEXT] = null;
+ this[PREV] = null;
+ }
+ get ELEMENT_NODE() {
+ return ELEMENT_NODE;
+ }
+ get ATTRIBUTE_NODE() {
+ return ATTRIBUTE_NODE;
+ }
+ get TEXT_NODE() {
+ return TEXT_NODE;
+ }
+ get COMMENT_NODE() {
+ return COMMENT_NODE;
+ }
+ get DOCUMENT_NODE() {
+ return DOCUMENT_NODE;
+ }
+ get DOCUMENT_FRAGMENT_NODE() {
+ return DOCUMENT_FRAGMENT_NODE;
+ }
+ get DOCUMENT_TYPE_NODE() {
+ return DOCUMENT_TYPE_NODE;
+ }
+ get baseURI() {
+ const ownerDocument = this.nodeType === DOCUMENT_NODE ? this : this.ownerDocument;
+ if (ownerDocument) {
+ const base = ownerDocument.querySelector("base");
+ if (base)
+ return base.getAttribute("href");
+ const { location } = ownerDocument.defaultView;
+ if (location)
+ return location.href;
+ }
+ return null;
+ }
+ get isConnected() {
+ return false;
+ }
+ get nodeName() {
+ return this.localName;
+ }
+ get parentElement() {
+ return null;
+ }
+ get previousSibling() {
+ return null;
+ }
+ get previousElementSibling() {
+ return null;
+ }
+ get nextSibling() {
+ return null;
+ }
+ get nextElementSibling() {
+ return null;
+ }
+ get childNodes() {
+ return new NodeList();
+ }
+ get firstChild() {
+ return null;
+ }
+ get lastChild() {
+ return null;
+ }
+ get nodeValue() {
+ return null;
+ }
+ set nodeValue(value) {
+ }
+ get textContent() {
+ return null;
+ }
+ set textContent(value) {
+ }
+ normalize() {
+ }
+ cloneNode() {
+ return null;
+ }
+ contains() {
+ return false;
+ }
+ insertBefore(newNode, referenceNode) {
+ return newNode;
+ }
+ appendChild(child) {
+ return child;
+ }
+ replaceChild(newChild, oldChild) {
+ return oldChild;
+ }
+ removeChild(child) {
+ return child;
+ }
+ toString() {
+ return "";
+ }
+ hasChildNodes() {
+ return !!this.lastChild;
+ }
+ isSameNode(node) {
+ return this === node;
+ }
+ compareDocumentPosition(target) {
+ let result = 0;
+ if (this !== target) {
+ let self2 = getParentNodeCount(this);
+ let other = getParentNodeCount(target);
+ if (self2 < other) {
+ result += DOCUMENT_POSITION_FOLLOWING;
+ if (this.contains(target))
+ result += DOCUMENT_POSITION_CONTAINED_BY;
+ } else if (other < self2) {
+ result += DOCUMENT_POSITION_PRECEDING;
+ if (target.contains(this))
+ result += DOCUMENT_POSITION_CONTAINS;
+ } else if (self2 && other) {
+ const { childNodes } = this.parentNode;
+ if (childNodes.indexOf(this) < childNodes.indexOf(target))
+ result += DOCUMENT_POSITION_FOLLOWING;
+ else
+ result += DOCUMENT_POSITION_PRECEDING;
+ }
+ if (!self2 || !other) {
+ result += DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC;
+ result += DOCUMENT_POSITION_DISCONNECTED;
+ }
+ }
+ return result;
+ }
+ isEqualNode(node) {
+ if (this === node)
+ return true;
+ if (this.nodeType === node.nodeType) {
+ switch (this.nodeType) {
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE: {
+ const aNodes = this.childNodes;
+ const bNodes = node.childNodes;
+ return aNodes.length === bNodes.length && aNodes.every((node2, i2) => node2.isEqualNode(bNodes[i2]));
+ }
+ }
+ return this.toString() === node.toString();
+ }
+ return false;
+ }
+ _getParent() {
+ return this.parentNode;
+ }
+ getRootNode() {
+ let root = this;
+ while (root.parentNode)
+ root = root.parentNode;
+ return root.nodeType === DOCUMENT_NODE ? root.documentElement : root;
+ }
+};
+
+// node_modules/linkedom/esm/interface/attr.js
+var QUOTE = /"/g;
+var Attr = class extends Node {
+ constructor(ownerDocument, name, value = "") {
+ super(ownerDocument, "#attribute", ATTRIBUTE_NODE);
+ this.ownerElement = null;
+ this.name = $String(name);
+ this[VALUE] = $String(value);
+ this[CHANGED] = false;
+ }
+ get value() {
+ return this[VALUE];
+ }
+ set value(newValue) {
+ const { [VALUE]: oldValue, name, ownerElement } = this;
+ this[VALUE] = $String(newValue);
+ this[CHANGED] = true;
+ if (ownerElement) {
+ attributeChangedCallback2(ownerElement, name, oldValue);
+ attributeChangedCallback(ownerElement, name, oldValue, this[VALUE]);
+ }
+ }
+ cloneNode() {
+ const { ownerDocument, name, [VALUE]: value } = this;
+ return new Attr(ownerDocument, name, value);
+ }
+ toString() {
+ const { name, [VALUE]: value } = this;
+ return emptyAttributes.has(name) && !value ? name : `${name}="${value.replace(QUOTE, """)}"`;
+ }
+ toJSON() {
+ const json = [];
+ attrAsJSON(this, json);
+ return json;
+ }
+};
+
+// node_modules/linkedom/esm/shared/node.js
+var isConnected = ({ ownerDocument, parentNode }) => {
+ while (parentNode) {
+ if (parentNode === ownerDocument)
+ return true;
+ parentNode = parentNode.parentNode;
+ }
+ return false;
+};
+var parentElement = ({ parentNode }) => {
+ if (parentNode) {
+ switch (parentNode.nodeType) {
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ return null;
+ }
+ }
+ return parentNode;
+};
+var previousSibling = ({ [PREV]: prev }) => {
+ switch (prev ? prev.nodeType : 0) {
+ case NODE_END:
+ return prev[START];
+ case TEXT_NODE:
+ case COMMENT_NODE:
+ return prev;
+ }
+ return null;
+};
+var nextSibling = (node) => {
+ const next = getEnd(node)[NEXT];
+ return next && (next.nodeType === NODE_END ? null : next);
+};
+
+// node_modules/linkedom/esm/mixin/non-document-type-child-node.js
+var nextElementSibling = (node) => {
+ let next = nextSibling(node);
+ while (next && next.nodeType !== ELEMENT_NODE)
+ next = nextSibling(next);
+ return next;
+};
+var previousElementSibling = (node) => {
+ let prev = previousSibling(node);
+ while (prev && prev.nodeType !== ELEMENT_NODE)
+ prev = previousSibling(prev);
+ return prev;
+};
+
+// node_modules/linkedom/esm/mixin/child-node.js
+var asFragment = (ownerDocument, nodes) => {
+ const fragment = ownerDocument.createDocumentFragment();
+ fragment.append(...nodes);
+ return fragment;
+};
+var before = (node, nodes) => {
+ const { ownerDocument, parentNode } = node;
+ if (parentNode)
+ parentNode.insertBefore(asFragment(ownerDocument, nodes), node);
+};
+var after = (node, nodes) => {
+ const { ownerDocument, parentNode } = node;
+ if (parentNode)
+ parentNode.insertBefore(asFragment(ownerDocument, nodes), getEnd(node)[NEXT]);
+};
+var replaceWith = (node, nodes) => {
+ const { ownerDocument, parentNode } = node;
+ if (parentNode) {
+ parentNode.insertBefore(asFragment(ownerDocument, nodes), node);
+ node.remove();
+ }
+};
+var remove = (prev, current, next) => {
+ const { parentNode, nodeType } = current;
+ if (prev || next) {
+ setAdjacent(prev, next);
+ current[PREV] = null;
+ getEnd(current)[NEXT] = null;
+ }
+ if (parentNode) {
+ current.parentNode = null;
+ moCallback(current, parentNode);
+ if (nodeType === ELEMENT_NODE)
+ disconnectedCallback(current);
+ }
+};
+
+// node_modules/linkedom/esm/interface/character-data.js
+var CharacterData = class extends Node {
+ constructor(ownerDocument, localName, nodeType, data) {
+ super(ownerDocument, localName, nodeType);
+ this[VALUE] = $String(data);
+ }
+ get isConnected() {
+ return isConnected(this);
+ }
+ get parentElement() {
+ return parentElement(this);
+ }
+ get previousSibling() {
+ return previousSibling(this);
+ }
+ get nextSibling() {
+ return nextSibling(this);
+ }
+ get previousElementSibling() {
+ return previousElementSibling(this);
+ }
+ get nextElementSibling() {
+ return nextElementSibling(this);
+ }
+ before(...nodes) {
+ before(this, nodes);
+ }
+ after(...nodes) {
+ after(this, nodes);
+ }
+ replaceWith(...nodes) {
+ replaceWith(this, nodes);
+ }
+ remove() {
+ remove(this[PREV], this, this[NEXT]);
+ }
+ get data() {
+ return this[VALUE];
+ }
+ set data(value) {
+ this[VALUE] = $String(value);
+ moCallback(this, this.parentNode);
+ }
+ get nodeValue() {
+ return this.data;
+ }
+ set nodeValue(value) {
+ this.data = value;
+ }
+ get textContent() {
+ return this.data;
+ }
+ set textContent(value) {
+ this.data = value;
+ }
+ get length() {
+ return this.data.length;
+ }
+ substringData(offset, count) {
+ return this.data.substr(offset, count);
+ }
+ appendData(data) {
+ this.data += data;
+ }
+ insertData(offset, data) {
+ const { data: t2 } = this;
+ this.data = t2.slice(0, offset) + data + t2.slice(offset);
+ }
+ deleteData(offset, count) {
+ const { data: t2 } = this;
+ this.data = t2.slice(0, offset) + t2.slice(offset + count);
+ }
+ replaceData(offset, count, data) {
+ const { data: t2 } = this;
+ this.data = t2.slice(0, offset) + data + t2.slice(offset + count);
+ }
+ toJSON() {
+ const json = [];
+ characterDataAsJSON(this, json);
+ return json;
+ }
+};
+
+// node_modules/linkedom/esm/interface/comment.js
+var Comment = class extends CharacterData {
+ constructor(ownerDocument, data = "") {
+ super(ownerDocument, "#comment", COMMENT_NODE, data);
+ }
+ cloneNode() {
+ const { ownerDocument, [VALUE]: data } = this;
+ return new Comment(ownerDocument, data);
+ }
+ toString() {
+ return ``;
+ }
+};
+
+// node_modules/linkedom/esm/shared/matches.js
+var CSSselect = __toESM(require_lib10(), 1);
+var { isArray } = Array;
+var isTag = ({ nodeType }) => nodeType === ELEMENT_NODE;
+var existsOne = (test, elements) => elements.some((element) => isTag(element) && (test(element) || existsOne(test, getChildren(element))));
+var getAttributeValue = (element, name) => name === "class" ? element.classList.value : element.getAttribute(name);
+var getChildren = ({ childNodes }) => childNodes;
+var getName = (element) => {
+ const { localName } = element;
+ return ignoreCase(element) ? localName.toLowerCase() : localName;
+};
+var getParent = ({ parentNode }) => parentNode;
+var getSiblings = (element) => {
+ const { parentNode } = element;
+ return parentNode ? getChildren(parentNode) : element;
+};
+var getText = (node) => {
+ if (isArray(node))
+ return node.map(getText).join("");
+ if (isTag(node))
+ return getText(getChildren(node));
+ if (node.nodeType === TEXT_NODE)
+ return node.data;
+ return "";
+};
+var hasAttrib = (element, name) => element.hasAttribute(name);
+var removeSubsets = (nodes) => {
+ let { length } = nodes;
+ while (length--) {
+ const node = nodes[length];
+ if (length && -1 < nodes.lastIndexOf(node, length - 1)) {
+ nodes.splice(length, 1);
+ continue;
+ }
+ for (let { parentNode } = node; parentNode; parentNode = parentNode.parentNode) {
+ if (nodes.includes(parentNode)) {
+ nodes.splice(length, 1);
+ break;
+ }
+ }
+ }
+ return nodes;
+};
+var findAll = (test, nodes) => {
+ const matches2 = [];
+ for (const node of nodes) {
+ if (isTag(node)) {
+ if (test(node))
+ matches2.push(node);
+ matches2.push(...findAll(test, getChildren(node)));
+ }
+ }
+ return matches2;
+};
+var findOne = (test, nodes) => {
+ for (let node of nodes)
+ if (test(node) || (node = findOne(test, getChildren(node))))
+ return node;
+ return null;
+};
+var adapter = {
+ isTag,
+ existsOne,
+ getAttributeValue,
+ getChildren,
+ getName,
+ getParent,
+ getSiblings,
+ getText,
+ hasAttrib,
+ removeSubsets,
+ findAll,
+ findOne
+};
+var prepareMatch = (element, selectors) => {
+ return CSSselect.compile(selectors, {
+ xmlMode: !ignoreCase(element),
+ adapter
+ });
+};
+var matches = (element, selectors) => {
+ return CSSselect.is(element, selectors, {
+ strict: true,
+ xmlMode: !ignoreCase(element),
+ adapter
+ });
+};
+
+// node_modules/linkedom/esm/shared/text-escaper.js
+var { replace } = "";
+var ca = /[<>&\xA0]/g;
+var esca = {
+ "\xA0": " ",
+ "&": "&",
+ "<": "<",
+ ">": ">"
+};
+var pe = (m2) => esca[m2];
+var escape = (es) => replace.call(es, ca, pe);
+
+// node_modules/linkedom/esm/interface/text.js
+var Text = class extends CharacterData {
+ constructor(ownerDocument, data = "") {
+ super(ownerDocument, "#text", TEXT_NODE, data);
+ }
+ get wholeText() {
+ const text = [];
+ let { previousSibling: previousSibling2, nextSibling: nextSibling2 } = this;
+ while (previousSibling2) {
+ if (previousSibling2.nodeType === TEXT_NODE)
+ text.unshift(previousSibling2[VALUE]);
+ else
+ break;
+ previousSibling2 = previousSibling2.previousSibling;
+ }
+ text.push(this[VALUE]);
+ while (nextSibling2) {
+ if (nextSibling2.nodeType === TEXT_NODE)
+ text.push(nextSibling2[VALUE]);
+ else
+ break;
+ nextSibling2 = nextSibling2.nextSibling;
+ }
+ return text.join("");
+ }
+ cloneNode() {
+ const { ownerDocument, [VALUE]: data } = this;
+ return new Text(ownerDocument, data);
+ }
+ toString() {
+ return escape(this[VALUE]);
+ }
+};
+
+// node_modules/linkedom/esm/mixin/parent-node.js
+var isNode = (node) => node instanceof Node;
+var insert = (parentNode, child, nodes) => {
+ const { ownerDocument } = parentNode;
+ for (const node of nodes)
+ parentNode.insertBefore(isNode(node) ? node : new Text(ownerDocument, node), child);
+};
+var ParentNode = class extends Node {
+ constructor(ownerDocument, localName, nodeType) {
+ super(ownerDocument, localName, nodeType);
+ this[PRIVATE] = null;
+ this[NEXT] = this[END] = {
+ [NEXT]: null,
+ [PREV]: this,
+ [START]: this,
+ nodeType: NODE_END,
+ ownerDocument: this.ownerDocument,
+ parentNode: null
+ };
+ }
+ get childNodes() {
+ const childNodes = new NodeList();
+ let { firstChild } = this;
+ while (firstChild) {
+ childNodes.push(firstChild);
+ firstChild = nextSibling(firstChild);
+ }
+ return childNodes;
+ }
+ get children() {
+ const children = new NodeList();
+ let { firstElementChild } = this;
+ while (firstElementChild) {
+ children.push(firstElementChild);
+ firstElementChild = nextElementSibling(firstElementChild);
+ }
+ return children;
+ }
+ get firstChild() {
+ let { [NEXT]: next, [END]: end } = this;
+ while (next.nodeType === ATTRIBUTE_NODE)
+ next = next[NEXT];
+ return next === end ? null : next;
+ }
+ get firstElementChild() {
+ let { firstChild } = this;
+ while (firstChild) {
+ if (firstChild.nodeType === ELEMENT_NODE)
+ return firstChild;
+ firstChild = nextSibling(firstChild);
+ }
+ return null;
+ }
+ get lastChild() {
+ const prev = this[END][PREV];
+ switch (prev.nodeType) {
+ case NODE_END:
+ return prev[START];
+ case ATTRIBUTE_NODE:
+ return null;
+ }
+ return prev === this ? null : prev;
+ }
+ get lastElementChild() {
+ let { lastChild } = this;
+ while (lastChild) {
+ if (lastChild.nodeType === ELEMENT_NODE)
+ return lastChild;
+ lastChild = previousSibling(lastChild);
+ }
+ return null;
+ }
+ get childElementCount() {
+ return this.children.length;
+ }
+ prepend(...nodes) {
+ insert(this, this.firstChild, nodes);
+ }
+ append(...nodes) {
+ insert(this, this[END], nodes);
+ }
+ replaceChildren(...nodes) {
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end && next.nodeType === ATTRIBUTE_NODE)
+ next = next[NEXT];
+ while (next !== end) {
+ const after2 = getEnd(next)[NEXT];
+ next.remove();
+ next = after2;
+ }
+ if (nodes.length)
+ insert(this, end, nodes);
+ }
+ getElementsByClassName(className) {
+ const elements = new NodeList();
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE && next.hasAttribute("class") && next.classList.has(className))
+ elements.push(next);
+ next = next[NEXT];
+ }
+ return elements;
+ }
+ getElementsByTagName(tagName15) {
+ const elements = new NodeList();
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE && (next.localName === tagName15 || localCase(next) === tagName15))
+ elements.push(next);
+ next = next[NEXT];
+ }
+ return elements;
+ }
+ querySelector(selectors) {
+ const matches2 = prepareMatch(this, selectors);
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE && matches2(next))
+ return next;
+ next = next[NEXT];
+ }
+ return null;
+ }
+ querySelectorAll(selectors) {
+ const matches2 = prepareMatch(this, selectors);
+ const elements = new NodeList();
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE && matches2(next))
+ elements.push(next);
+ next = next[NEXT];
+ }
+ return elements;
+ }
+ appendChild(node) {
+ return this.insertBefore(node, this[END]);
+ }
+ contains(node) {
+ let parentNode = node;
+ while (parentNode && parentNode !== this)
+ parentNode = parentNode.parentNode;
+ return parentNode === this;
+ }
+ insertBefore(node, before2 = null) {
+ if (node === before2)
+ return node;
+ if (node === this)
+ throw new Error("unable to append a node to itself");
+ const next = before2 || this[END];
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node.remove();
+ node.parentNode = this;
+ knownBoundaries(next[PREV], node, next);
+ moCallback(node, null);
+ connectedCallback(node);
+ break;
+ case DOCUMENT_FRAGMENT_NODE: {
+ let { [PRIVATE]: parentNode, firstChild, lastChild } = node;
+ if (firstChild) {
+ knownSegment(next[PREV], firstChild, lastChild, next);
+ knownAdjacent(node, node[END]);
+ if (parentNode)
+ parentNode.replaceChildren();
+ do {
+ firstChild.parentNode = this;
+ moCallback(firstChild, null);
+ if (firstChild.nodeType === ELEMENT_NODE)
+ connectedCallback(firstChild);
+ } while (firstChild !== lastChild && (firstChild = nextSibling(firstChild)));
+ }
+ break;
+ }
+ case TEXT_NODE:
+ case COMMENT_NODE:
+ node.remove();
+ default:
+ node.parentNode = this;
+ knownSiblings(next[PREV], node, next);
+ moCallback(node, null);
+ break;
+ }
+ return node;
+ }
+ normalize() {
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ const { [NEXT]: $next, [PREV]: $prev, nodeType } = next;
+ if (nodeType === TEXT_NODE) {
+ if (!next[VALUE])
+ next.remove();
+ else if ($prev && $prev.nodeType === TEXT_NODE) {
+ $prev.textContent += next.textContent;
+ next.remove();
+ }
+ }
+ next = $next;
+ }
+ }
+ removeChild(node) {
+ if (node.parentNode !== this)
+ throw new Error("node is not a child");
+ node.remove();
+ return node;
+ }
+ replaceChild(node, replaced) {
+ const next = getEnd(replaced)[NEXT];
+ replaced.remove();
+ this.insertBefore(node, next);
+ return replaced;
+ }
+};
+
+// node_modules/linkedom/esm/mixin/non-element-parent-node.js
+var NonElementParentNode = class extends ParentNode {
+ getElementById(id) {
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE && next.id === id)
+ return next;
+ next = next[NEXT];
+ }
+ return null;
+ }
+ cloneNode(deep) {
+ const { ownerDocument, constructor } = this;
+ const nonEPN = new constructor(ownerDocument);
+ if (deep) {
+ const { [END]: end } = nonEPN;
+ for (const node of this.childNodes)
+ nonEPN.insertBefore(node.cloneNode(deep), end);
+ }
+ return nonEPN;
+ }
+ toString() {
+ const { childNodes, localName } = this;
+ return `<${localName}>${childNodes.join("")}${localName}>`;
+ }
+ toJSON() {
+ const json = [];
+ nonElementAsJSON(this, json);
+ return json;
+ }
+};
+
+// node_modules/linkedom/esm/interface/document-fragment.js
+var DocumentFragment = class extends NonElementParentNode {
+ constructor(ownerDocument) {
+ super(ownerDocument, "#document-fragment", DOCUMENT_FRAGMENT_NODE);
+ }
+};
+
+// node_modules/linkedom/esm/interface/document-type.js
+var DocumentType = class extends Node {
+ constructor(ownerDocument, name, publicId = "", systemId = "") {
+ super(ownerDocument, "#document-type", DOCUMENT_TYPE_NODE);
+ this.name = name;
+ this.publicId = publicId;
+ this.systemId = systemId;
+ }
+ cloneNode() {
+ const { ownerDocument, name, publicId, systemId } = this;
+ return new DocumentType(ownerDocument, name, publicId, systemId);
+ }
+ toString() {
+ const { name, publicId, systemId } = this;
+ const hasPublic = 0 < publicId.length;
+ const str = [name];
+ if (hasPublic)
+ str.push("PUBLIC", `"${publicId}"`);
+ if (systemId.length) {
+ if (!hasPublic)
+ str.push("SYSTEM");
+ str.push(`"${systemId}"`);
+ }
+ return ``;
+ }
+ toJSON() {
+ const json = [];
+ documentTypeAsJSON(this, json);
+ return json;
+ }
+};
+
+// node_modules/linkedom/esm/mixin/inner-html.js
+var getInnerHtml = (node) => node.childNodes.join("");
+var setInnerHtml = (node, html) => {
+ const { ownerDocument } = node;
+ const { constructor } = ownerDocument;
+ const document2 = new constructor();
+ document2[CUSTOM_ELEMENTS] = ownerDocument[CUSTOM_ELEMENTS];
+ const { childNodes } = parseFromString(document2, ignoreCase(node), html);
+ node.replaceChildren(...childNodes);
+};
+
+// node_modules/uhyphen/esm/index.js
+var esm_default = (camel) => camel.replace(/(([A-Z0-9])([A-Z0-9][a-z]))|(([a-z])([A-Z]))/g, "$2$5-$3$6").toLowerCase();
+
+// node_modules/linkedom/esm/dom/string-map.js
+var refs = /* @__PURE__ */ new WeakMap();
+var key = (name) => `data-${esm_default(name)}`;
+var prop = (name) => name.slice(5).replace(/-([a-z])/g, (_, $1) => $1.toUpperCase());
+var handler = {
+ get(dataset, name) {
+ if (name in dataset)
+ return refs.get(dataset).getAttribute(key(name));
+ },
+ set(dataset, name, value) {
+ dataset[name] = value;
+ refs.get(dataset).setAttribute(key(name), value);
+ return true;
+ },
+ deleteProperty(dataset, name) {
+ if (name in dataset)
+ refs.get(dataset).removeAttribute(key(name));
+ return delete dataset[name];
+ }
+};
+var DOMStringMap = class {
+ constructor(ref) {
+ for (const { name, value } of ref.attributes) {
+ if (/^data-/.test(name))
+ this[prop(name)] = value;
+ }
+ refs.set(this, ref);
+ return new Proxy(this, handler);
+ }
+};
+setPrototypeOf(DOMStringMap.prototype, null);
+
+// node_modules/linkedom/esm/dom/token-list.js
+var { add } = Set.prototype;
+var addTokens = (self2, tokens) => {
+ for (const token of tokens) {
+ if (token)
+ add.call(self2, token);
+ }
+};
+var update = ({ [OWNER_ELEMENT]: ownerElement, value }) => {
+ const attribute2 = ownerElement.getAttributeNode("class");
+ if (attribute2)
+ attribute2.value = value;
+ else
+ setAttribute(ownerElement, new Attr(ownerElement.ownerDocument, "class", value));
+};
+var DOMTokenList = class extends Set {
+ constructor(ownerElement) {
+ super();
+ this[OWNER_ELEMENT] = ownerElement;
+ const attribute2 = ownerElement.getAttributeNode("class");
+ if (attribute2)
+ addTokens(this, attribute2.value.split(/\s+/));
+ }
+ get length() {
+ return this.size;
+ }
+ get value() {
+ return [...this].join(" ");
+ }
+ add(...tokens) {
+ addTokens(this, tokens);
+ update(this);
+ }
+ contains(token) {
+ return this.has(token);
+ }
+ remove(...tokens) {
+ for (const token of tokens)
+ this.delete(token);
+ update(this);
+ }
+ toggle(token, force) {
+ if (this.has(token)) {
+ if (force)
+ return true;
+ this.delete(token);
+ update(this);
+ } else if (force || arguments.length === 1) {
+ super.add(token);
+ update(this);
+ return true;
+ }
+ return false;
+ }
+ replace(token, newToken) {
+ if (this.has(token)) {
+ this.delete(token);
+ super.add(newToken);
+ update(this);
+ return true;
+ }
+ return false;
+ }
+ supports() {
+ return true;
+ }
+};
+
+// node_modules/linkedom/esm/interface/css-style-declaration.js
+var refs2 = /* @__PURE__ */ new WeakMap();
+var getKeys = (style) => [...style.keys()].filter((key2) => key2 !== PRIVATE);
+var updateKeys = (style) => {
+ const attr = refs2.get(style).getAttributeNode("style");
+ if (!attr || attr[CHANGED] || style.get(PRIVATE) !== attr) {
+ style.clear();
+ if (attr) {
+ style.set(PRIVATE, attr);
+ for (const rule of attr[VALUE].split(/\s*;\s*/)) {
+ const pair = rule.split(/\s*:\s*/);
+ if (1 < pair.length) {
+ let [key2, value] = pair;
+ key2 = key2.trim();
+ value = value.trim();
+ if (key2 && value)
+ style.set(key2, value);
+ }
+ }
+ }
+ }
+ return attr;
+};
+var handler2 = {
+ get(style, name) {
+ if (name in prototype)
+ return style[name];
+ updateKeys(style);
+ if (name === "length")
+ return getKeys(style).length;
+ if (/^\d+$/.test(name))
+ return getKeys(style)[name];
+ return style.get(esm_default(name));
+ },
+ set(style, name, value) {
+ if (name === "cssText")
+ style[name] = value;
+ else {
+ let attr = updateKeys(style);
+ if (value == null)
+ style.delete(esm_default(name));
+ else
+ style.set(esm_default(name), value);
+ if (!attr) {
+ const element = refs2.get(style);
+ attr = element.ownerDocument.createAttribute("style");
+ element.setAttributeNode(attr);
+ style.set(PRIVATE, attr);
+ }
+ attr[CHANGED] = false;
+ attr[VALUE] = style.toString();
+ }
+ return true;
+ }
+};
+var CSSStyleDeclaration = class extends Map {
+ constructor(element) {
+ super();
+ refs2.set(this, element);
+ return new Proxy(this, handler2);
+ }
+ get cssText() {
+ return this.toString();
+ }
+ set cssText(value) {
+ refs2.get(this).setAttribute("style", value);
+ }
+ getPropertyValue(name) {
+ const self2 = this[PRIVATE];
+ return handler2.get(self2, name);
+ }
+ setProperty(name, value) {
+ const self2 = this[PRIVATE];
+ handler2.set(self2, name, value);
+ }
+ removeProperty(name) {
+ const self2 = this[PRIVATE];
+ handler2.set(self2, name, null);
+ }
+ [Symbol.iterator]() {
+ const keys2 = getKeys(this[PRIVATE]);
+ const { length } = keys2;
+ let i2 = 0;
+ return {
+ next() {
+ const done = i2 === length;
+ return { done, value: done ? null : keys2[i2++] };
+ }
+ };
+ }
+ get [PRIVATE]() {
+ return this;
+ }
+ toString() {
+ const self2 = this[PRIVATE];
+ updateKeys(self2);
+ const cssText = [];
+ self2.forEach(push, cssText);
+ return cssText.join(";");
+ }
+};
+var { prototype } = CSSStyleDeclaration;
+function push(value, key2) {
+ if (key2 !== PRIVATE)
+ this.push(`${key2}:${value}`);
+}
+
+// node_modules/linkedom/esm/interface/event.js
+var BUBBLING_PHASE = 3;
+var AT_TARGET = 2;
+var CAPTURING_PHASE = 1;
+var NONE = 0;
+var GlobalEvent = class {
+ static get BUBBLING_PHASE() {
+ return BUBBLING_PHASE;
+ }
+ static get AT_TARGET() {
+ return AT_TARGET;
+ }
+ static get CAPTURING_PHASE() {
+ return CAPTURING_PHASE;
+ }
+ static get NONE() {
+ return NONE;
+ }
+ constructor(type, eventInitDict = {}) {
+ this.type = type;
+ this.bubbles = !!eventInitDict.bubbles;
+ this.cancelBubble = false;
+ this._stopImmediatePropagationFlag = false;
+ this.cancelable = !!eventInitDict.cancelable;
+ this.eventPhase = this.NONE;
+ this.timeStamp = Date.now();
+ this.defaultPrevented = false;
+ this.originalTarget = null;
+ this.returnValue = null;
+ this.srcElement = null;
+ this.target = null;
+ this._path = [];
+ }
+ get BUBBLING_PHASE() {
+ return BUBBLING_PHASE;
+ }
+ get AT_TARGET() {
+ return AT_TARGET;
+ }
+ get CAPTURING_PHASE() {
+ return CAPTURING_PHASE;
+ }
+ get NONE() {
+ return NONE;
+ }
+ preventDefault() {
+ this.defaultPrevented = true;
+ }
+ composedPath() {
+ return this._path;
+ }
+ stopPropagation() {
+ this.cancelBubble = true;
+ }
+ stopImmediatePropagation() {
+ this.stopPropagation();
+ this._stopImmediatePropagationFlag = true;
+ }
+};
+
+// node_modules/linkedom/esm/interface/named-node-map.js
+var NamedNodeMap = class extends Array {
+ constructor(ownerElement) {
+ super();
+ this.ownerElement = ownerElement;
+ }
+ getNamedItem(name) {
+ return this.ownerElement.getAttributeNode(name);
+ }
+ setNamedItem(attr) {
+ this.ownerElement.setAttributeNode(attr);
+ this.unshift(attr);
+ }
+ removeNamedItem(name) {
+ const item = this.getNamedItem(name);
+ this.ownerElement.removeAttribute(name);
+ this.splice(this.indexOf(item), 1);
+ }
+ item(index) {
+ return index < this.length ? this[index] : null;
+ }
+ getNamedItemNS(_, name) {
+ return this.getNamedItem(name);
+ }
+ setNamedItemNS(_, attr) {
+ return this.setNamedItem(attr);
+ }
+ removeNamedItemNS(_, name) {
+ return this.removeNamedItem(name);
+ }
+};
+
+// node_modules/linkedom/esm/interface/shadow-root.js
+var ShadowRoot = class extends NonElementParentNode {
+ constructor(ownerDocument) {
+ super(ownerDocument, "#shadow-root", DOCUMENT_FRAGMENT_NODE);
+ }
+ get innerHTML() {
+ return getInnerHtml(this);
+ }
+ set innerHTML(html) {
+ setInnerHtml(this, html);
+ }
+};
+
+// node_modules/linkedom/esm/interface/element.js
+var attributesHandler = {
+ get(target, key2) {
+ return key2 in target ? target[key2] : target.find(({ name }) => name === key2);
+ }
+};
+var create2 = (ownerDocument, element, localName) => {
+ if ("ownerSVGElement" in element) {
+ const svg = ownerDocument.createElementNS(SVG_NAMESPACE, localName);
+ svg.ownerSVGElement = element.ownerSVGElement;
+ return svg;
+ }
+ return ownerDocument.createElement(localName);
+};
+var isVoid = ({ localName, ownerDocument }) => {
+ return ownerDocument[MIME].voidElements.test(localName);
+};
+var shadowRoots = /* @__PURE__ */ new WeakMap();
+var Element = class extends ParentNode {
+ constructor(ownerDocument, localName) {
+ super(ownerDocument, localName, ELEMENT_NODE);
+ this[CLASS_LIST] = null;
+ this[DATASET] = null;
+ this[STYLE] = null;
+ }
+ get isConnected() {
+ return isConnected(this);
+ }
+ get parentElement() {
+ return parentElement(this);
+ }
+ get previousSibling() {
+ return previousSibling(this);
+ }
+ get nextSibling() {
+ return nextSibling(this);
+ }
+ get previousElementSibling() {
+ return previousElementSibling(this);
+ }
+ get nextElementSibling() {
+ return nextElementSibling(this);
+ }
+ before(...nodes) {
+ before(this, nodes);
+ }
+ after(...nodes) {
+ after(this, nodes);
+ }
+ replaceWith(...nodes) {
+ replaceWith(this, nodes);
+ }
+ remove() {
+ remove(this[PREV], this, this[END][NEXT]);
+ }
+ get id() {
+ return stringAttribute.get(this, "id");
+ }
+ set id(value) {
+ stringAttribute.set(this, "id", value);
+ }
+ get className() {
+ return this.classList.value;
+ }
+ set className(value) {
+ const { classList } = this;
+ classList.clear();
+ classList.add(...value.split(/\s+/));
+ }
+ get nodeName() {
+ return localCase(this);
+ }
+ get tagName() {
+ return localCase(this);
+ }
+ get classList() {
+ return this[CLASS_LIST] || (this[CLASS_LIST] = new DOMTokenList(this));
+ }
+ get dataset() {
+ return this[DATASET] || (this[DATASET] = new DOMStringMap(this));
+ }
+ get nonce() {
+ return stringAttribute.get(this, "nonce");
+ }
+ set nonce(value) {
+ stringAttribute.set(this, "nonce", value);
+ }
+ get style() {
+ return this[STYLE] || (this[STYLE] = new CSSStyleDeclaration(this));
+ }
+ get tabIndex() {
+ return numericAttribute.get(this, "tabindex") || -1;
+ }
+ set tabIndex(value) {
+ numericAttribute.set(this, "tabindex", value);
+ }
+ get innerText() {
+ return this.textContent;
+ }
+ get textContent() {
+ const text = [];
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ if (next.nodeType === TEXT_NODE)
+ text.push(next.textContent);
+ next = next[NEXT];
+ }
+ return text.join("");
+ }
+ set textContent(text) {
+ this.replaceChildren();
+ if (text)
+ this.appendChild(new Text(this.ownerDocument, text));
+ }
+ get innerHTML() {
+ return getInnerHtml(this);
+ }
+ set innerHTML(html) {
+ setInnerHtml(this, html);
+ }
+ get outerHTML() {
+ return this.toString();
+ }
+ set outerHTML(html) {
+ const template = this.ownerDocument.createElement("");
+ template.innerHTML = html;
+ this.replaceWith(...template.childNodes);
+ }
+ get attributes() {
+ const attributes = new NamedNodeMap(this);
+ let next = this[NEXT];
+ while (next.nodeType === ATTRIBUTE_NODE) {
+ attributes.push(next);
+ next = next[NEXT];
+ }
+ return new Proxy(attributes, attributesHandler);
+ }
+ focus() {
+ this.dispatchEvent(new GlobalEvent("focus"));
+ }
+ getAttribute(name) {
+ if (name === "class")
+ return this.className;
+ const attribute2 = this.getAttributeNode(name);
+ return attribute2 && attribute2.value;
+ }
+ getAttributeNode(name) {
+ let next = this[NEXT];
+ while (next.nodeType === ATTRIBUTE_NODE) {
+ if (next.name === name)
+ return next;
+ next = next[NEXT];
+ }
+ return null;
+ }
+ getAttributeNames() {
+ const attributes = new NodeList();
+ let next = this[NEXT];
+ while (next.nodeType === ATTRIBUTE_NODE) {
+ attributes.push(next.name);
+ next = next[NEXT];
+ }
+ return attributes;
+ }
+ hasAttribute(name) {
+ return !!this.getAttributeNode(name);
+ }
+ hasAttributes() {
+ return this[NEXT].nodeType === ATTRIBUTE_NODE;
+ }
+ removeAttribute(name) {
+ if (name === "class" && this[CLASS_LIST])
+ this[CLASS_LIST].clear();
+ let next = this[NEXT];
+ while (next.nodeType === ATTRIBUTE_NODE) {
+ if (next.name === name) {
+ removeAttribute(this, next);
+ return;
+ }
+ next = next[NEXT];
+ }
+ }
+ removeAttributeNode(attribute2) {
+ let next = this[NEXT];
+ while (next.nodeType === ATTRIBUTE_NODE) {
+ if (next === attribute2) {
+ removeAttribute(this, next);
+ return;
+ }
+ next = next[NEXT];
+ }
+ }
+ setAttribute(name, value) {
+ if (name === "class")
+ this.className = value;
+ else {
+ const attribute2 = this.getAttributeNode(name);
+ if (attribute2)
+ attribute2.value = value;
+ else
+ setAttribute(this, new Attr(this.ownerDocument, name, value));
+ }
+ }
+ setAttributeNode(attribute2) {
+ const { name } = attribute2;
+ const previously = this.getAttributeNode(name);
+ if (previously !== attribute2) {
+ if (previously)
+ this.removeAttributeNode(previously);
+ const { ownerElement } = attribute2;
+ if (ownerElement)
+ ownerElement.removeAttributeNode(attribute2);
+ setAttribute(this, attribute2);
+ }
+ return previously;
+ }
+ toggleAttribute(name, force) {
+ if (this.hasAttribute(name)) {
+ if (!force) {
+ this.removeAttribute(name);
+ return false;
+ }
+ return true;
+ } else if (force || arguments.length === 1) {
+ this.setAttribute(name, "");
+ return true;
+ }
+ return false;
+ }
+ get shadowRoot() {
+ if (shadowRoots.has(this)) {
+ const { mode, shadowRoot } = shadowRoots.get(this);
+ if (mode === "open")
+ return shadowRoot;
+ }
+ return null;
+ }
+ attachShadow(init) {
+ if (shadowRoots.has(this))
+ throw new Error("operation not supported");
+ const shadowRoot = new ShadowRoot(this.ownerDocument);
+ shadowRoot.append(...this.childNodes);
+ shadowRoots.set(this, {
+ mode: init.mode,
+ shadowRoot
+ });
+ return shadowRoot;
+ }
+ matches(selectors) {
+ return matches(this, selectors);
+ }
+ closest(selectors) {
+ let parentElement2 = this;
+ const matches2 = prepareMatch(parentElement2, selectors);
+ while (parentElement2 && !matches2(parentElement2))
+ parentElement2 = parentElement2.parentElement;
+ return parentElement2;
+ }
+ insertAdjacentElement(position, element) {
+ const { parentElement: parentElement2 } = this;
+ switch (position) {
+ case "beforebegin":
+ if (parentElement2) {
+ parentElement2.insertBefore(element, this);
+ break;
+ }
+ return null;
+ case "afterbegin":
+ this.insertBefore(element, this.firstChild);
+ break;
+ case "beforeend":
+ this.insertBefore(element, null);
+ break;
+ case "afterend":
+ if (parentElement2) {
+ parentElement2.insertBefore(element, this.nextSibling);
+ break;
+ }
+ return null;
+ }
+ return element;
+ }
+ insertAdjacentHTML(position, html) {
+ const template = this.ownerDocument.createElement("template");
+ template.innerHTML = html;
+ this.insertAdjacentElement(position, template.content);
+ }
+ insertAdjacentText(position, text) {
+ const node = this.ownerDocument.createTextNode(text);
+ this.insertAdjacentElement(position, node);
+ }
+ cloneNode(deep = false) {
+ const { ownerDocument, localName } = this;
+ const addNext = (next2) => {
+ next2.parentNode = parentNode;
+ knownAdjacent($next, next2);
+ $next = next2;
+ };
+ const clone2 = create2(ownerDocument, this, localName);
+ let parentNode = clone2, $next = clone2;
+ let { [NEXT]: next, [END]: prev } = this;
+ while (next !== prev && (deep || next.nodeType === ATTRIBUTE_NODE)) {
+ switch (next.nodeType) {
+ case NODE_END:
+ knownAdjacent($next, parentNode[END]);
+ $next = parentNode[END];
+ parentNode = parentNode.parentNode;
+ break;
+ case ELEMENT_NODE: {
+ const node = create2(ownerDocument, next, next.localName);
+ addNext(node);
+ parentNode = node;
+ break;
+ }
+ case ATTRIBUTE_NODE:
+ case TEXT_NODE:
+ case COMMENT_NODE:
+ addNext(next.cloneNode(deep));
+ break;
+ }
+ next = next[NEXT];
+ }
+ knownAdjacent($next, clone2[END]);
+ return clone2;
+ }
+ toString() {
+ const out = [];
+ const { [END]: end } = this;
+ let next = { [NEXT]: this };
+ let isOpened = false;
+ do {
+ next = next[NEXT];
+ switch (next.nodeType) {
+ case ATTRIBUTE_NODE: {
+ const attr = " " + next;
+ switch (attr) {
+ case " id":
+ case " class":
+ case " style":
+ break;
+ default:
+ out.push(attr);
+ }
+ break;
+ }
+ case NODE_END: {
+ const start = next[START];
+ if (isOpened) {
+ if ("ownerSVGElement" in start)
+ out.push(" />");
+ else if (isVoid(start))
+ out.push(ignoreCase(start) ? ">" : " />");
+ else
+ out.push(`>${start.localName}>`);
+ isOpened = false;
+ } else
+ out.push(`${start.localName}>`);
+ break;
+ }
+ case ELEMENT_NODE:
+ if (isOpened)
+ out.push(">");
+ if (next.toString !== this.toString) {
+ out.push(next.toString());
+ next = next[END];
+ isOpened = false;
+ } else {
+ out.push(`<${next.localName}`);
+ isOpened = true;
+ }
+ break;
+ case TEXT_NODE:
+ case COMMENT_NODE:
+ out.push((isOpened ? ">" : "") + next);
+ isOpened = false;
+ break;
+ }
+ } while (next !== end);
+ return out.join("");
+ }
+ toJSON() {
+ const json = [];
+ elementAsJSON(this, json);
+ return json;
+ }
+ getAttributeNS(_, name) {
+ return this.getAttribute(name);
+ }
+ getElementsByTagNameNS(_, name) {
+ return this.getElementsByTagName(name);
+ }
+ hasAttributeNS(_, name) {
+ return this.hasAttribute(name);
+ }
+ removeAttributeNS(_, name) {
+ this.removeAttribute(name);
+ }
+ setAttributeNS(_, name, value) {
+ this.setAttribute(name, value);
+ }
+ setAttributeNodeNS(attr) {
+ return this.setAttributeNode(attr);
+ }
+};
+
+// node_modules/linkedom/esm/svg/element.js
+var classNames = /* @__PURE__ */ new WeakMap();
+var handler3 = {
+ get(target, name) {
+ return target[name];
+ },
+ set(target, name, value) {
+ target[name] = value;
+ return true;
+ }
+};
+var SVGElement = class extends Element {
+ constructor(ownerDocument, localName, ownerSVGElement = null) {
+ super(ownerDocument, localName);
+ this.ownerSVGElement = ownerSVGElement;
+ }
+ get className() {
+ if (!classNames.has(this))
+ classNames.set(this, new Proxy({ baseVal: "", animVal: "" }, handler3));
+ return classNames.get(this);
+ }
+ set className(value) {
+ const { classList } = this;
+ classList.clear();
+ classList.add(...value.split(/\s+/));
+ }
+ setAttribute(name, value) {
+ if (name === "style") {
+ const { className } = this;
+ className.baseVal = className.animVal = value;
+ }
+ super.setAttribute(name, value);
+ }
+};
+
+// node_modules/linkedom/esm/shared/facades.js
+var illegalConstructor = () => {
+ throw new TypeError("Illegal constructor");
+};
+function Attr2() {
+ illegalConstructor();
+}
+setPrototypeOf(Attr2, Attr);
+Attr2.prototype = Attr.prototype;
+function CharacterData2() {
+ illegalConstructor();
+}
+setPrototypeOf(CharacterData2, CharacterData);
+CharacterData2.prototype = CharacterData.prototype;
+function Comment2() {
+ illegalConstructor();
+}
+setPrototypeOf(Comment2, Comment);
+Comment2.prototype = Comment.prototype;
+function DocumentFragment2() {
+ illegalConstructor();
+}
+setPrototypeOf(DocumentFragment2, DocumentFragment);
+DocumentFragment2.prototype = DocumentFragment.prototype;
+function DocumentType2() {
+ illegalConstructor();
+}
+setPrototypeOf(DocumentType2, DocumentType);
+DocumentType2.prototype = DocumentType.prototype;
+function Element2() {
+ illegalConstructor();
+}
+setPrototypeOf(Element2, Element);
+Element2.prototype = Element.prototype;
+function Node2() {
+ illegalConstructor();
+}
+setPrototypeOf(Node2, Node);
+Node2.prototype = Node.prototype;
+function ShadowRoot2() {
+ illegalConstructor();
+}
+setPrototypeOf(ShadowRoot2, ShadowRoot);
+ShadowRoot2.prototype = ShadowRoot.prototype;
+function Text2() {
+ illegalConstructor();
+}
+setPrototypeOf(Text2, Text);
+Text2.prototype = Text.prototype;
+function SVGElement2() {
+ illegalConstructor();
+}
+setPrototypeOf(SVGElement2, SVGElement);
+SVGElement2.prototype = SVGElement.prototype;
+var Facades = {
+ Attr: Attr2,
+ CharacterData: CharacterData2,
+ Comment: Comment2,
+ DocumentFragment: DocumentFragment2,
+ DocumentType: DocumentType2,
+ Element: Element2,
+ Node: Node2,
+ ShadowRoot: ShadowRoot2,
+ Text: Text2,
+ SVGElement: SVGElement2
+};
+
+// node_modules/linkedom/esm/html/element.js
+var Level0 = /* @__PURE__ */ new WeakMap();
+var level0 = {
+ get(element, name) {
+ return Level0.has(element) && Level0.get(element)[name] || null;
+ },
+ set(element, name, value) {
+ if (!Level0.has(element))
+ Level0.set(element, {});
+ const handlers = Level0.get(element);
+ const type = name.slice(2);
+ if (handlers[name])
+ element.removeEventListener(type, handlers[name], false);
+ if (handlers[name] = value)
+ element.addEventListener(type, value, false);
+ }
+};
+var HTMLElement = class extends Element {
+ static get observedAttributes() {
+ return [];
+ }
+ constructor(ownerDocument = null, localName = "") {
+ super(ownerDocument, localName);
+ const ownerLess = !ownerDocument;
+ let options;
+ if (ownerLess) {
+ const { constructor: Class } = this;
+ if (!Classes.has(Class))
+ throw new Error("unable to initialize this Custom Element");
+ ({ ownerDocument, localName, options } = Classes.get(Class));
+ }
+ if (ownerDocument[UPGRADE]) {
+ const { element, values } = ownerDocument[UPGRADE];
+ ownerDocument[UPGRADE] = null;
+ for (const [key2, value] of values)
+ element[key2] = value;
+ return element;
+ }
+ if (ownerLess) {
+ this.ownerDocument = this[END].ownerDocument = ownerDocument;
+ this.localName = localName;
+ customElements.set(this, { connected: false });
+ if (options.is)
+ this.setAttribute("is", options.is);
+ }
+ }
+ blur() {
+ this.dispatchEvent(new GlobalEvent("blur"));
+ }
+ click() {
+ this.dispatchEvent(new GlobalEvent("click"));
+ }
+ get accessKeyLabel() {
+ const { accessKey } = this;
+ return accessKey && `Alt+Shift+${accessKey}`;
+ }
+ get isContentEditable() {
+ return this.hasAttribute("contenteditable");
+ }
+ get contentEditable() {
+ return booleanAttribute.get(this, "contenteditable");
+ }
+ set contentEditable(value) {
+ booleanAttribute.set(this, "contenteditable", value);
+ }
+ get draggable() {
+ return booleanAttribute.get(this, "draggable");
+ }
+ set draggable(value) {
+ booleanAttribute.set(this, "draggable", value);
+ }
+ get hidden() {
+ return booleanAttribute.get(this, "hidden");
+ }
+ set hidden(value) {
+ booleanAttribute.set(this, "hidden", value);
+ }
+ get spellcheck() {
+ return booleanAttribute.get(this, "spellcheck");
+ }
+ set spellcheck(value) {
+ booleanAttribute.set(this, "spellcheck", value);
+ }
+ get accessKey() {
+ return stringAttribute.get(this, "accesskey");
+ }
+ set accessKey(value) {
+ stringAttribute.set(this, "accesskey", value);
+ }
+ get dir() {
+ return stringAttribute.get(this, "dir");
+ }
+ set dir(value) {
+ stringAttribute.set(this, "dir", value);
+ }
+ get lang() {
+ return stringAttribute.get(this, "lang");
+ }
+ set lang(value) {
+ stringAttribute.set(this, "lang", value);
+ }
+ get title() {
+ return stringAttribute.get(this, "title");
+ }
+ set title(value) {
+ stringAttribute.set(this, "title", value);
+ }
+ get onabort() {
+ return level0.get(this, "onabort");
+ }
+ set onabort(value) {
+ level0.set(this, "onabort", value);
+ }
+ get onblur() {
+ return level0.get(this, "onblur");
+ }
+ set onblur(value) {
+ level0.set(this, "onblur", value);
+ }
+ get oncancel() {
+ return level0.get(this, "oncancel");
+ }
+ set oncancel(value) {
+ level0.set(this, "oncancel", value);
+ }
+ get oncanplay() {
+ return level0.get(this, "oncanplay");
+ }
+ set oncanplay(value) {
+ level0.set(this, "oncanplay", value);
+ }
+ get oncanplaythrough() {
+ return level0.get(this, "oncanplaythrough");
+ }
+ set oncanplaythrough(value) {
+ level0.set(this, "oncanplaythrough", value);
+ }
+ get onchange() {
+ return level0.get(this, "onchange");
+ }
+ set onchange(value) {
+ level0.set(this, "onchange", value);
+ }
+ get onclick() {
+ return level0.get(this, "onclick");
+ }
+ set onclick(value) {
+ level0.set(this, "onclick", value);
+ }
+ get onclose() {
+ return level0.get(this, "onclose");
+ }
+ set onclose(value) {
+ level0.set(this, "onclose", value);
+ }
+ get oncontextmenu() {
+ return level0.get(this, "oncontextmenu");
+ }
+ set oncontextmenu(value) {
+ level0.set(this, "oncontextmenu", value);
+ }
+ get oncuechange() {
+ return level0.get(this, "oncuechange");
+ }
+ set oncuechange(value) {
+ level0.set(this, "oncuechange", value);
+ }
+ get ondblclick() {
+ return level0.get(this, "ondblclick");
+ }
+ set ondblclick(value) {
+ level0.set(this, "ondblclick", value);
+ }
+ get ondrag() {
+ return level0.get(this, "ondrag");
+ }
+ set ondrag(value) {
+ level0.set(this, "ondrag", value);
+ }
+ get ondragend() {
+ return level0.get(this, "ondragend");
+ }
+ set ondragend(value) {
+ level0.set(this, "ondragend", value);
+ }
+ get ondragenter() {
+ return level0.get(this, "ondragenter");
+ }
+ set ondragenter(value) {
+ level0.set(this, "ondragenter", value);
+ }
+ get ondragleave() {
+ return level0.get(this, "ondragleave");
+ }
+ set ondragleave(value) {
+ level0.set(this, "ondragleave", value);
+ }
+ get ondragover() {
+ return level0.get(this, "ondragover");
+ }
+ set ondragover(value) {
+ level0.set(this, "ondragover", value);
+ }
+ get ondragstart() {
+ return level0.get(this, "ondragstart");
+ }
+ set ondragstart(value) {
+ level0.set(this, "ondragstart", value);
+ }
+ get ondrop() {
+ return level0.get(this, "ondrop");
+ }
+ set ondrop(value) {
+ level0.set(this, "ondrop", value);
+ }
+ get ondurationchange() {
+ return level0.get(this, "ondurationchange");
+ }
+ set ondurationchange(value) {
+ level0.set(this, "ondurationchange", value);
+ }
+ get onemptied() {
+ return level0.get(this, "onemptied");
+ }
+ set onemptied(value) {
+ level0.set(this, "onemptied", value);
+ }
+ get onended() {
+ return level0.get(this, "onended");
+ }
+ set onended(value) {
+ level0.set(this, "onended", value);
+ }
+ get onerror() {
+ return level0.get(this, "onerror");
+ }
+ set onerror(value) {
+ level0.set(this, "onerror", value);
+ }
+ get onfocus() {
+ return level0.get(this, "onfocus");
+ }
+ set onfocus(value) {
+ level0.set(this, "onfocus", value);
+ }
+ get oninput() {
+ return level0.get(this, "oninput");
+ }
+ set oninput(value) {
+ level0.set(this, "oninput", value);
+ }
+ get oninvalid() {
+ return level0.get(this, "oninvalid");
+ }
+ set oninvalid(value) {
+ level0.set(this, "oninvalid", value);
+ }
+ get onkeydown() {
+ return level0.get(this, "onkeydown");
+ }
+ set onkeydown(value) {
+ level0.set(this, "onkeydown", value);
+ }
+ get onkeypress() {
+ return level0.get(this, "onkeypress");
+ }
+ set onkeypress(value) {
+ level0.set(this, "onkeypress", value);
+ }
+ get onkeyup() {
+ return level0.get(this, "onkeyup");
+ }
+ set onkeyup(value) {
+ level0.set(this, "onkeyup", value);
+ }
+ get onload() {
+ return level0.get(this, "onload");
+ }
+ set onload(value) {
+ level0.set(this, "onload", value);
+ }
+ get onloadeddata() {
+ return level0.get(this, "onloadeddata");
+ }
+ set onloadeddata(value) {
+ level0.set(this, "onloadeddata", value);
+ }
+ get onloadedmetadata() {
+ return level0.get(this, "onloadedmetadata");
+ }
+ set onloadedmetadata(value) {
+ level0.set(this, "onloadedmetadata", value);
+ }
+ get onloadstart() {
+ return level0.get(this, "onloadstart");
+ }
+ set onloadstart(value) {
+ level0.set(this, "onloadstart", value);
+ }
+ get onmousedown() {
+ return level0.get(this, "onmousedown");
+ }
+ set onmousedown(value) {
+ level0.set(this, "onmousedown", value);
+ }
+ get onmouseenter() {
+ return level0.get(this, "onmouseenter");
+ }
+ set onmouseenter(value) {
+ level0.set(this, "onmouseenter", value);
+ }
+ get onmouseleave() {
+ return level0.get(this, "onmouseleave");
+ }
+ set onmouseleave(value) {
+ level0.set(this, "onmouseleave", value);
+ }
+ get onmousemove() {
+ return level0.get(this, "onmousemove");
+ }
+ set onmousemove(value) {
+ level0.set(this, "onmousemove", value);
+ }
+ get onmouseout() {
+ return level0.get(this, "onmouseout");
+ }
+ set onmouseout(value) {
+ level0.set(this, "onmouseout", value);
+ }
+ get onmouseover() {
+ return level0.get(this, "onmouseover");
+ }
+ set onmouseover(value) {
+ level0.set(this, "onmouseover", value);
+ }
+ get onmouseup() {
+ return level0.get(this, "onmouseup");
+ }
+ set onmouseup(value) {
+ level0.set(this, "onmouseup", value);
+ }
+ get onmousewheel() {
+ return level0.get(this, "onmousewheel");
+ }
+ set onmousewheel(value) {
+ level0.set(this, "onmousewheel", value);
+ }
+ get onpause() {
+ return level0.get(this, "onpause");
+ }
+ set onpause(value) {
+ level0.set(this, "onpause", value);
+ }
+ get onplay() {
+ return level0.get(this, "onplay");
+ }
+ set onplay(value) {
+ level0.set(this, "onplay", value);
+ }
+ get onplaying() {
+ return level0.get(this, "onplaying");
+ }
+ set onplaying(value) {
+ level0.set(this, "onplaying", value);
+ }
+ get onprogress() {
+ return level0.get(this, "onprogress");
+ }
+ set onprogress(value) {
+ level0.set(this, "onprogress", value);
+ }
+ get onratechange() {
+ return level0.get(this, "onratechange");
+ }
+ set onratechange(value) {
+ level0.set(this, "onratechange", value);
+ }
+ get onreset() {
+ return level0.get(this, "onreset");
+ }
+ set onreset(value) {
+ level0.set(this, "onreset", value);
+ }
+ get onresize() {
+ return level0.get(this, "onresize");
+ }
+ set onresize(value) {
+ level0.set(this, "onresize", value);
+ }
+ get onscroll() {
+ return level0.get(this, "onscroll");
+ }
+ set onscroll(value) {
+ level0.set(this, "onscroll", value);
+ }
+ get onseeked() {
+ return level0.get(this, "onseeked");
+ }
+ set onseeked(value) {
+ level0.set(this, "onseeked", value);
+ }
+ get onseeking() {
+ return level0.get(this, "onseeking");
+ }
+ set onseeking(value) {
+ level0.set(this, "onseeking", value);
+ }
+ get onselect() {
+ return level0.get(this, "onselect");
+ }
+ set onselect(value) {
+ level0.set(this, "onselect", value);
+ }
+ get onshow() {
+ return level0.get(this, "onshow");
+ }
+ set onshow(value) {
+ level0.set(this, "onshow", value);
+ }
+ get onstalled() {
+ return level0.get(this, "onstalled");
+ }
+ set onstalled(value) {
+ level0.set(this, "onstalled", value);
+ }
+ get onsubmit() {
+ return level0.get(this, "onsubmit");
+ }
+ set onsubmit(value) {
+ level0.set(this, "onsubmit", value);
+ }
+ get onsuspend() {
+ return level0.get(this, "onsuspend");
+ }
+ set onsuspend(value) {
+ level0.set(this, "onsuspend", value);
+ }
+ get ontimeupdate() {
+ return level0.get(this, "ontimeupdate");
+ }
+ set ontimeupdate(value) {
+ level0.set(this, "ontimeupdate", value);
+ }
+ get ontoggle() {
+ return level0.get(this, "ontoggle");
+ }
+ set ontoggle(value) {
+ level0.set(this, "ontoggle", value);
+ }
+ get onvolumechange() {
+ return level0.get(this, "onvolumechange");
+ }
+ set onvolumechange(value) {
+ level0.set(this, "onvolumechange", value);
+ }
+ get onwaiting() {
+ return level0.get(this, "onwaiting");
+ }
+ set onwaiting(value) {
+ level0.set(this, "onwaiting", value);
+ }
+ get onauxclick() {
+ return level0.get(this, "onauxclick");
+ }
+ set onauxclick(value) {
+ level0.set(this, "onauxclick", value);
+ }
+ get ongotpointercapture() {
+ return level0.get(this, "ongotpointercapture");
+ }
+ set ongotpointercapture(value) {
+ level0.set(this, "ongotpointercapture", value);
+ }
+ get onlostpointercapture() {
+ return level0.get(this, "onlostpointercapture");
+ }
+ set onlostpointercapture(value) {
+ level0.set(this, "onlostpointercapture", value);
+ }
+ get onpointercancel() {
+ return level0.get(this, "onpointercancel");
+ }
+ set onpointercancel(value) {
+ level0.set(this, "onpointercancel", value);
+ }
+ get onpointerdown() {
+ return level0.get(this, "onpointerdown");
+ }
+ set onpointerdown(value) {
+ level0.set(this, "onpointerdown", value);
+ }
+ get onpointerenter() {
+ return level0.get(this, "onpointerenter");
+ }
+ set onpointerenter(value) {
+ level0.set(this, "onpointerenter", value);
+ }
+ get onpointerleave() {
+ return level0.get(this, "onpointerleave");
+ }
+ set onpointerleave(value) {
+ level0.set(this, "onpointerleave", value);
+ }
+ get onpointermove() {
+ return level0.get(this, "onpointermove");
+ }
+ set onpointermove(value) {
+ level0.set(this, "onpointermove", value);
+ }
+ get onpointerout() {
+ return level0.get(this, "onpointerout");
+ }
+ set onpointerout(value) {
+ level0.set(this, "onpointerout", value);
+ }
+ get onpointerover() {
+ return level0.get(this, "onpointerover");
+ }
+ set onpointerover(value) {
+ level0.set(this, "onpointerover", value);
+ }
+ get onpointerup() {
+ return level0.get(this, "onpointerup");
+ }
+ set onpointerup(value) {
+ level0.set(this, "onpointerup", value);
+ }
+};
+
+// node_modules/linkedom/esm/html/template-element.js
+var tagName = "template";
+var HTMLTemplateElement = class extends HTMLElement {
+ constructor(ownerDocument) {
+ super(ownerDocument, tagName);
+ const content = this.ownerDocument.createDocumentFragment();
+ (this[CONTENT] = content)[PRIVATE] = this;
+ }
+ get content() {
+ if (this.hasChildNodes() && !this[CONTENT].hasChildNodes()) {
+ for (const node of this.childNodes)
+ this[CONTENT].appendChild(node.cloneNode(true));
+ }
+ return this[CONTENT];
+ }
+};
+registerHTMLClass(tagName, HTMLTemplateElement);
+
+// node_modules/linkedom/esm/html/html-element.js
+var HTMLHtmlElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "html") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/text-element.js
+var { toString } = HTMLElement.prototype;
+var TextElement = class extends HTMLElement {
+ get innerHTML() {
+ return this.textContent;
+ }
+ set innerHTML(html) {
+ this.textContent = html;
+ }
+ toString() {
+ const outerHTML = toString.call(this.cloneNode());
+ return outerHTML.replace(/>, `>${this.textContent}<`);
+ }
+};
+
+// node_modules/linkedom/esm/html/script-element.js
+var tagName2 = "script";
+var HTMLScriptElement = class extends TextElement {
+ constructor(ownerDocument, localName = tagName2) {
+ super(ownerDocument, localName);
+ }
+};
+registerHTMLClass(tagName2, HTMLScriptElement);
+
+// node_modules/linkedom/esm/html/frame-element.js
+var HTMLFrameElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "frame") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/i-frame-element.js
+var HTMLIFrameElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "iframe") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/object-element.js
+var HTMLObjectElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "object") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/head-element.js
+var HTMLHeadElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "head") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/body-element.js
+var HTMLBodyElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "body") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/style-element.js
+var import_cssom = __toESM(require_lib11(), 1);
+var tagName3 = "style";
+var HTMLStyleElement = class extends TextElement {
+ constructor(ownerDocument, localName = tagName3) {
+ super(ownerDocument, localName);
+ this[SHEET] = null;
+ }
+ get sheet() {
+ const sheet = this[SHEET];
+ if (sheet !== null) {
+ return sheet;
+ }
+ return this[SHEET] = (0, import_cssom.parse)(this.textContent);
+ }
+ get innerHTML() {
+ return super.innerHTML || "";
+ }
+ set innerHTML(value) {
+ super.textContent = value;
+ this[SHEET] = null;
+ }
+ get innerText() {
+ return super.innerText || "";
+ }
+ set innerText(value) {
+ super.textContent = value;
+ this[SHEET] = null;
+ }
+ get textContent() {
+ return super.textContent || "";
+ }
+ set textContent(value) {
+ super.textContent = value;
+ this[SHEET] = null;
+ }
+};
+registerHTMLClass(tagName3, HTMLStyleElement);
+
+// node_modules/linkedom/esm/html/time-element.js
+var HTMLTimeElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "time") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/field-set-element.js
+var HTMLFieldSetElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "fieldset") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/embed-element.js
+var HTMLEmbedElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "embed") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/hr-element.js
+var HTMLHRElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "hr") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/progress-element.js
+var HTMLProgressElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "progress") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/paragraph-element.js
+var HTMLParagraphElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "p") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/table-element.js
+var HTMLTableElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "table") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/frame-set-element.js
+var HTMLFrameSetElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "frameset") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/li-element.js
+var HTMLLIElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "li") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/base-element.js
+var HTMLBaseElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "base") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/data-list-element.js
+var HTMLDataListElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "datalist") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/input-element.js
+var tagName4 = "input";
+var HTMLInputElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName4) {
+ super(ownerDocument, localName);
+ }
+ get autofocus() {
+ return booleanAttribute.get(this, "autofocus") || -1;
+ }
+ set autofocus(value) {
+ booleanAttribute.set(this, "autofocus", value);
+ }
+ get disabled() {
+ return booleanAttribute.get(this, "disabled");
+ }
+ set disabled(value) {
+ booleanAttribute.set(this, "disabled", value);
+ }
+ get name() {
+ return this.getAttribute("name");
+ }
+ set name(value) {
+ this.setAttribute("name", value);
+ }
+ get placeholder() {
+ return this.getAttribute("placeholder");
+ }
+ set placeholder(value) {
+ this.setAttribute("placeholder", value);
+ }
+ get type() {
+ return this.getAttribute("type");
+ }
+ set type(value) {
+ this.setAttribute("type", value);
+ }
+};
+registerHTMLClass(tagName4, HTMLInputElement);
+
+// node_modules/linkedom/esm/html/param-element.js
+var HTMLParamElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "param") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/media-element.js
+var HTMLMediaElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "media") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/audio-element.js
+var HTMLAudioElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "audio") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/heading-element.js
+var tagName5 = "h1";
+var HTMLHeadingElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName5) {
+ super(ownerDocument, localName);
+ }
+};
+registerHTMLClass([tagName5, "h2", "h3", "h4", "h5", "h6"], HTMLHeadingElement);
+
+// node_modules/linkedom/esm/html/directory-element.js
+var HTMLDirectoryElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "dir") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/quote-element.js
+var HTMLQuoteElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "quote") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/canvas-element.js
+var import_canvas = __toESM(require_canvas(), 1);
+var { createCanvas } = import_canvas.default;
+var tagName6 = "canvas";
+var HTMLCanvasElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName6) {
+ super(ownerDocument, localName);
+ this[IMAGE] = createCanvas(300, 150);
+ }
+ get width() {
+ return this[IMAGE].width;
+ }
+ set width(value) {
+ numericAttribute.set(this, "width", value);
+ this[IMAGE].width = value;
+ }
+ get height() {
+ return this[IMAGE].height;
+ }
+ set height(value) {
+ numericAttribute.set(this, "height", value);
+ this[IMAGE].height = value;
+ }
+ getContext(type) {
+ return this[IMAGE].getContext(type);
+ }
+ toDataURL(...args) {
+ return this[IMAGE].toDataURL(...args);
+ }
+};
+registerHTMLClass(tagName6, HTMLCanvasElement);
+
+// node_modules/linkedom/esm/html/legend-element.js
+var HTMLLegendElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "legend") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/option-element.js
+var HTMLOptionElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "option") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/span-element.js
+var HTMLSpanElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "span") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/meter-element.js
+var HTMLMeterElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "meter") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/video-element.js
+var HTMLVideoElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "video") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/table-cell-element.js
+var HTMLTableCellElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "td") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/title-element.js
+var tagName7 = "title";
+var HTMLTitleElement = class extends TextElement {
+ constructor(ownerDocument, localName = tagName7) {
+ super(ownerDocument, localName);
+ }
+};
+registerHTMLClass(tagName7, HTMLTitleElement);
+
+// node_modules/linkedom/esm/html/output-element.js
+var HTMLOutputElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "output") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/table-row-element.js
+var HTMLTableRowElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "tr") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/data-element.js
+var HTMLDataElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "data") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/menu-element.js
+var HTMLMenuElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "menu") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/select-element.js
+var tagName8 = "select";
+var HTMLSelectElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName8) {
+ super(ownerDocument, localName);
+ }
+ get options() {
+ let children = new NodeList();
+ let { firstElementChild } = this;
+ while (firstElementChild) {
+ if (firstElementChild.tagName === "OPTGROUP")
+ children.push(...firstElementChild.children);
+ else
+ children.push(firstElementChild);
+ firstElementChild = firstElementChild.nextElementSibling;
+ }
+ return children;
+ }
+ get disabled() {
+ return booleanAttribute.get(this, "disabled");
+ }
+ set disabled(value) {
+ booleanAttribute.set(this, "disabled", value);
+ }
+ get name() {
+ return this.getAttribute("name");
+ }
+ set name(value) {
+ this.setAttribute("name", value);
+ }
+};
+registerHTMLClass(tagName8, HTMLSelectElement);
+
+// node_modules/linkedom/esm/html/br-element.js
+var HTMLBRElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "br") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/button-element.js
+var tagName9 = "button";
+var HTMLButtonElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName9) {
+ super(ownerDocument, localName);
+ }
+ get disabled() {
+ return booleanAttribute.get(this, "disabled");
+ }
+ set disabled(value) {
+ booleanAttribute.set(this, "disabled", value);
+ }
+ get name() {
+ return this.getAttribute("name");
+ }
+ set name(value) {
+ this.setAttribute("name", value);
+ }
+ get type() {
+ return this.getAttribute("type");
+ }
+ set type(value) {
+ this.setAttribute("type", value);
+ }
+};
+registerHTMLClass(tagName9, HTMLButtonElement);
+
+// node_modules/linkedom/esm/html/map-element.js
+var HTMLMapElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "map") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/opt-group-element.js
+var HTMLOptGroupElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "optgroup") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/d-list-element.js
+var HTMLDListElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "dl") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/text-area-element.js
+var tagName10 = "textarea";
+var HTMLTextAreaElement = class extends TextElement {
+ constructor(ownerDocument, localName = tagName10) {
+ super(ownerDocument, localName);
+ }
+ get disabled() {
+ return booleanAttribute.get(this, "disabled");
+ }
+ set disabled(value) {
+ booleanAttribute.set(this, "disabled", value);
+ }
+ get name() {
+ return this.getAttribute("name");
+ }
+ set name(value) {
+ this.setAttribute("name", value);
+ }
+ get placeholder() {
+ return this.getAttribute("placeholder");
+ }
+ set placeholder(value) {
+ this.setAttribute("placeholder", value);
+ }
+ get type() {
+ return this.getAttribute("type");
+ }
+ set type(value) {
+ this.setAttribute("type", value);
+ }
+ get value() {
+ return this.textContent;
+ }
+ set value(content) {
+ this.textContent = content;
+ }
+};
+registerHTMLClass(tagName10, HTMLTextAreaElement);
+
+// node_modules/linkedom/esm/html/font-element.js
+var HTMLFontElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "font") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/div-element.js
+var HTMLDivElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "div") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/link-element.js
+var tagName11 = "link";
+var HTMLLinkElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName11) {
+ super(ownerDocument, localName);
+ }
+ get disabled() {
+ return booleanAttribute.get(this, "disabled");
+ }
+ set disabled(value) {
+ booleanAttribute.set(this, "disabled", value);
+ }
+ get href() {
+ return stringAttribute.get(this, "href");
+ }
+ set href(value) {
+ stringAttribute.set(this, "href", value);
+ }
+ get hreflang() {
+ return stringAttribute.get(this, "hreflang");
+ }
+ set hreflang(value) {
+ stringAttribute.set(this, "hreflang", value);
+ }
+ get media() {
+ return stringAttribute.get(this, "media");
+ }
+ set media(value) {
+ stringAttribute.set(this, "media", value);
+ }
+ get rel() {
+ return stringAttribute.get(this, "rel");
+ }
+ set rel(value) {
+ stringAttribute.set(this, "rel", value);
+ }
+ get type() {
+ return stringAttribute.get(this, "type");
+ }
+ set type(value) {
+ stringAttribute.set(this, "type", value);
+ }
+};
+registerHTMLClass(tagName11, HTMLLinkElement);
+
+// node_modules/linkedom/esm/html/slot-element.js
+var HTMLSlotElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "slot") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/form-element.js
+var HTMLFormElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "form") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/image-element.js
+var tagName12 = "img";
+var HTMLImageElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName12) {
+ super(ownerDocument, localName);
+ }
+ get alt() {
+ return stringAttribute.get(this, "alt");
+ }
+ set alt(value) {
+ stringAttribute.set(this, "alt", value);
+ }
+ get sizes() {
+ return stringAttribute.get(this, "sizes");
+ }
+ set sizes(value) {
+ stringAttribute.set(this, "sizes", value);
+ }
+ get src() {
+ return stringAttribute.get(this, "src");
+ }
+ set src(value) {
+ stringAttribute.set(this, "src", value);
+ }
+ get srcset() {
+ return stringAttribute.get(this, "srcset");
+ }
+ set srcset(value) {
+ stringAttribute.set(this, "srcset", value);
+ }
+ get title() {
+ return stringAttribute.get(this, "title");
+ }
+ set title(value) {
+ stringAttribute.set(this, "title", value);
+ }
+ get width() {
+ return numericAttribute.get(this, "width");
+ }
+ set width(value) {
+ numericAttribute.set(this, "width", value);
+ }
+ get height() {
+ return numericAttribute.get(this, "height");
+ }
+ set height(value) {
+ numericAttribute.set(this, "height", value);
+ }
+};
+registerHTMLClass(tagName12, HTMLImageElement);
+
+// node_modules/linkedom/esm/html/pre-element.js
+var HTMLPreElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "pre") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/u-list-element.js
+var HTMLUListElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "ul") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/meta-element.js
+var HTMLMetaElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "meta") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/picture-element.js
+var HTMLPictureElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "picture") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/area-element.js
+var HTMLAreaElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "area") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/o-list-element.js
+var HTMLOListElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "ol") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/table-caption-element.js
+var HTMLTableCaptionElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "caption") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/anchor-element.js
+var tagName13 = "a";
+var HTMLAnchorElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName13) {
+ super(ownerDocument, localName);
+ }
+ get href() {
+ return encodeURI(stringAttribute.get(this, "href"));
+ }
+ set href(value) {
+ stringAttribute.set(this, "href", decodeURI(value));
+ }
+ get download() {
+ return encodeURI(stringAttribute.get(this, "download"));
+ }
+ set download(value) {
+ stringAttribute.set(this, "download", decodeURI(value));
+ }
+ get target() {
+ return stringAttribute.get(this, "target");
+ }
+ set target(value) {
+ stringAttribute.set(this, "target", value);
+ }
+ get type() {
+ return stringAttribute.get(this, "type");
+ }
+ set type(value) {
+ stringAttribute.set(this, "type", value);
+ }
+};
+registerHTMLClass(tagName13, HTMLAnchorElement);
+
+// node_modules/linkedom/esm/html/label-element.js
+var HTMLLabelElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "label") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/unknown-element.js
+var HTMLUnknownElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "unknown") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/mod-element.js
+var HTMLModElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "mod") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/details-element.js
+var HTMLDetailsElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "details") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/source-element.js
+var tagName14 = "source";
+var HTMLSourceElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = tagName14) {
+ super(ownerDocument, localName);
+ }
+ get src() {
+ return stringAttribute.get(this, "src");
+ }
+ set src(value) {
+ stringAttribute.set(this, "src", value);
+ }
+ get srcset() {
+ return stringAttribute.get(this, "srcset");
+ }
+ set srcset(value) {
+ stringAttribute.set(this, "srcset", value);
+ }
+ get sizes() {
+ return stringAttribute.get(this, "sizes");
+ }
+ set sizes(value) {
+ stringAttribute.set(this, "sizes", value);
+ }
+ get type() {
+ return stringAttribute.get(this, "type");
+ }
+ set type(value) {
+ stringAttribute.set(this, "type", value);
+ }
+};
+registerHTMLClass(tagName14, HTMLSourceElement);
+
+// node_modules/linkedom/esm/html/track-element.js
+var HTMLTrackElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "track") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/html/marquee-element.js
+var HTMLMarqueeElement = class extends HTMLElement {
+ constructor(ownerDocument, localName = "marquee") {
+ super(ownerDocument, localName);
+ }
+};
+
+// node_modules/linkedom/esm/shared/html-classes.js
+var HTMLClasses = {
+ HTMLElement,
+ HTMLTemplateElement,
+ HTMLHtmlElement,
+ HTMLScriptElement,
+ HTMLFrameElement,
+ HTMLIFrameElement,
+ HTMLObjectElement,
+ HTMLHeadElement,
+ HTMLBodyElement,
+ HTMLStyleElement,
+ HTMLTimeElement,
+ HTMLFieldSetElement,
+ HTMLEmbedElement,
+ HTMLHRElement,
+ HTMLProgressElement,
+ HTMLParagraphElement,
+ HTMLTableElement,
+ HTMLFrameSetElement,
+ HTMLLIElement,
+ HTMLBaseElement,
+ HTMLDataListElement,
+ HTMLInputElement,
+ HTMLParamElement,
+ HTMLMediaElement,
+ HTMLAudioElement,
+ HTMLHeadingElement,
+ HTMLDirectoryElement,
+ HTMLQuoteElement,
+ HTMLCanvasElement,
+ HTMLLegendElement,
+ HTMLOptionElement,
+ HTMLSpanElement,
+ HTMLMeterElement,
+ HTMLVideoElement,
+ HTMLTableCellElement,
+ HTMLTitleElement,
+ HTMLOutputElement,
+ HTMLTableRowElement,
+ HTMLDataElement,
+ HTMLMenuElement,
+ HTMLSelectElement,
+ HTMLBRElement,
+ HTMLButtonElement,
+ HTMLMapElement,
+ HTMLOptGroupElement,
+ HTMLDListElement,
+ HTMLTextAreaElement,
+ HTMLFontElement,
+ HTMLDivElement,
+ HTMLLinkElement,
+ HTMLSlotElement,
+ HTMLFormElement,
+ HTMLImageElement,
+ HTMLPreElement,
+ HTMLUListElement,
+ HTMLMetaElement,
+ HTMLPictureElement,
+ HTMLAreaElement,
+ HTMLOListElement,
+ HTMLTableCaptionElement,
+ HTMLAnchorElement,
+ HTMLLabelElement,
+ HTMLUnknownElement,
+ HTMLModElement,
+ HTMLDetailsElement,
+ HTMLSourceElement,
+ HTMLTrackElement,
+ HTMLMarqueeElement
+};
+
+// node_modules/linkedom/esm/shared/mime.js
+var voidElements = { test: () => true };
+var Mime = {
+ "text/html": {
+ docType: "",
+ ignoreCase: true,
+ voidElements: /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i
+ },
+ "image/svg+xml": {
+ docType: '',
+ ignoreCase: false,
+ voidElements
+ },
+ "text/xml": {
+ docType: '',
+ ignoreCase: false,
+ voidElements
+ },
+ "application/xml": {
+ docType: '',
+ ignoreCase: false,
+ voidElements
+ },
+ "application/xhtml+xml": {
+ docType: '',
+ ignoreCase: false,
+ voidElements
+ }
+};
+
+// node_modules/linkedom/esm/interface/custom-event.js
+var GlobalCustomEvent = typeof CustomEvent === "function" ? CustomEvent : class CustomEvent2 extends GlobalEvent {
+ constructor(type, eventInitDict = {}) {
+ super(type, eventInitDict);
+ this.detail = eventInitDict.detail;
+ }
+};
+
+// node_modules/linkedom/esm/interface/input-event.js
+var InputEvent = class extends GlobalEvent {
+ constructor(type, inputEventInit = {}) {
+ super(type, inputEventInit);
+ this.inputType = inputEventInit.inputType;
+ this.data = inputEventInit.data;
+ this.dataTransfer = inputEventInit.dataTransfer;
+ this.isComposing = inputEventInit.isComposing || false;
+ this.ranges = inputEventInit.ranges;
+ }
+};
+
+// node_modules/linkedom/esm/interface/image.js
+var ImageClass = (ownerDocument) => class Image extends HTMLImageElement {
+ constructor(width, height) {
+ super(ownerDocument);
+ switch (arguments.length) {
+ case 1:
+ this.height = width;
+ this.width = width;
+ break;
+ case 2:
+ this.height = height;
+ this.width = width;
+ break;
+ }
+ }
+};
+
+// node_modules/linkedom/esm/interface/range.js
+var deleteContents = ({ [START]: start, [END]: end }, fragment = null) => {
+ setAdjacent(start[PREV], end[NEXT]);
+ do {
+ const after2 = getEnd(start);
+ const next = after2 === end ? after2 : after2[NEXT];
+ if (fragment)
+ fragment.insertBefore(start, fragment[END]);
+ else
+ start.remove();
+ start = next;
+ } while (start !== end);
+};
+var Range = class {
+ constructor() {
+ this[START] = null;
+ this[END] = null;
+ this.commonAncestorContainer = null;
+ }
+ insertNode(newNode) {
+ this[END].parentNode.insertBefore(newNode, this[START]);
+ }
+ selectNode(node) {
+ this[START] = node;
+ this[END] = getEnd(node);
+ }
+ surroundContents(parentNode) {
+ parentNode.replaceChildren(this.extractContents());
+ }
+ setStartBefore(node) {
+ this[START] = node;
+ }
+ setStartAfter(node) {
+ this[START] = node.nextSibling;
+ }
+ setEndBefore(node) {
+ this[END] = getEnd(node.previousSibling);
+ }
+ setEndAfter(node) {
+ this[END] = getEnd(node);
+ }
+ cloneContents() {
+ let { [START]: start, [END]: end } = this;
+ const fragment = start.ownerDocument.createDocumentFragment();
+ while (start !== end) {
+ fragment.insertBefore(start.cloneNode(true), fragment[END]);
+ start = getEnd(start);
+ if (start !== end)
+ start = start[NEXT];
+ }
+ return fragment;
+ }
+ deleteContents() {
+ deleteContents(this);
+ }
+ extractContents() {
+ const fragment = this[START].ownerDocument.createDocumentFragment();
+ deleteContents(this, fragment);
+ return fragment;
+ }
+ createContextualFragment(html) {
+ const template = this.commonAncestorContainer.createElement("template");
+ template.innerHTML = html;
+ this.selectNode(template.content);
+ return template.content;
+ }
+ cloneRange() {
+ const range = new Range();
+ range[START] = this[START];
+ range[END] = this[END];
+ return range;
+ }
+};
+
+// node_modules/linkedom/esm/interface/tree-walker.js
+var isOK = ({ nodeType }, mask) => {
+ switch (nodeType) {
+ case ELEMENT_NODE:
+ return mask & SHOW_ELEMENT;
+ case TEXT_NODE:
+ return mask & SHOW_TEXT;
+ case COMMENT_NODE:
+ return mask & SHOW_COMMENT;
+ }
+ return 0;
+};
+var TreeWalker = class {
+ constructor(root, whatToShow = SHOW_ALL) {
+ this.root = root;
+ this.currentNode = root;
+ this.whatToShow = whatToShow;
+ let { [NEXT]: next, [END]: end } = root;
+ if (root.nodeType === DOCUMENT_NODE) {
+ const { documentElement } = root;
+ next = documentElement;
+ end = documentElement[END];
+ }
+ const nodes = [];
+ while (next !== end) {
+ if (isOK(next, whatToShow))
+ nodes.push(next);
+ next = next[NEXT];
+ }
+ this[PRIVATE] = { i: 0, nodes };
+ }
+ nextNode() {
+ const $ = this[PRIVATE];
+ this.currentNode = $.i < $.nodes.length ? $.nodes[$.i++] : null;
+ return this.currentNode;
+ }
+};
+
+// node_modules/linkedom/esm/interface/document.js
+var query = (method, ownerDocument, selectors) => {
+ let { [NEXT]: next, [END]: end } = ownerDocument;
+ return method.call({ ownerDocument, [NEXT]: next, [END]: end }, selectors);
+};
+var globalExports = assign({}, Facades, HTMLClasses, {
+ CustomEvent: GlobalCustomEvent,
+ Event: GlobalEvent,
+ EventTarget: DOMEventTarget,
+ InputEvent,
+ NamedNodeMap,
+ NodeList
+});
+var window2 = /* @__PURE__ */ new WeakMap();
+var Document = class extends NonElementParentNode {
+ constructor(type) {
+ super(null, "#document", DOCUMENT_NODE);
+ this[CUSTOM_ELEMENTS] = { active: false, registry: null };
+ this[MUTATION_OBSERVER] = { active: false, class: null };
+ this[MIME] = Mime[type];
+ this[DOCTYPE] = null;
+ this[DOM_PARSER] = null;
+ this[GLOBALS] = null;
+ this[IMAGE] = null;
+ this[UPGRADE] = null;
+ }
+ get defaultView() {
+ if (!window2.has(this))
+ window2.set(this, new Proxy(globalThis, {
+ set: (target, name, value) => {
+ switch (name) {
+ case "addEventListener":
+ case "removeEventListener":
+ case "dispatchEvent":
+ this[EVENT_TARGET][name] = value;
+ break;
+ default:
+ target[name] = value;
+ break;
+ }
+ return true;
+ },
+ get: (globalThis2, name) => {
+ switch (name) {
+ case "addEventListener":
+ case "removeEventListener":
+ case "dispatchEvent":
+ if (!this[EVENT_TARGET]) {
+ const et = this[EVENT_TARGET] = new DOMEventTarget();
+ et.dispatchEvent = et.dispatchEvent.bind(et);
+ et.addEventListener = et.addEventListener.bind(et);
+ et.removeEventListener = et.removeEventListener.bind(et);
+ }
+ return this[EVENT_TARGET][name];
+ case "document":
+ return this;
+ case "navigator":
+ return {
+ userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"
+ };
+ case "window":
+ return window2.get(this);
+ case "customElements":
+ if (!this[CUSTOM_ELEMENTS].registry)
+ this[CUSTOM_ELEMENTS] = new CustomElementRegistry(this);
+ return this[CUSTOM_ELEMENTS];
+ case "performance":
+ return import_perf_hooks.performance;
+ case "DOMParser":
+ return this[DOM_PARSER];
+ case "Image":
+ if (!this[IMAGE])
+ this[IMAGE] = ImageClass(this);
+ return this[IMAGE];
+ case "MutationObserver":
+ if (!this[MUTATION_OBSERVER].class)
+ this[MUTATION_OBSERVER] = new MutationObserverClass(this);
+ return this[MUTATION_OBSERVER].class;
+ }
+ return this[GLOBALS] && this[GLOBALS][name] || globalExports[name] || globalThis2[name];
+ }
+ }));
+ return window2.get(this);
+ }
+ get doctype() {
+ const docType = this[DOCTYPE];
+ if (docType)
+ return docType;
+ const { firstChild } = this;
+ if (firstChild && firstChild.nodeType === DOCUMENT_TYPE_NODE)
+ return this[DOCTYPE] = firstChild;
+ return null;
+ }
+ set doctype(value) {
+ if (/^([a-z:]+)(\s+system|\s+public(\s+"([^"]+)")?)?(\s+"([^"]+)")?/i.test(value)) {
+ const { $1: name, $4: publicId, $6: systemId } = RegExp;
+ this[DOCTYPE] = new DocumentType(this, name, publicId, systemId);
+ knownSiblings(this, this[DOCTYPE], this[NEXT]);
+ }
+ }
+ get documentElement() {
+ return this.firstElementChild;
+ }
+ get isConnected() {
+ return true;
+ }
+ _getParent() {
+ return this[EVENT_TARGET];
+ }
+ createAttribute(name) {
+ return new Attr(this, name);
+ }
+ createComment(textContent) {
+ return new Comment(this, textContent);
+ }
+ createDocumentFragment() {
+ return new DocumentFragment(this);
+ }
+ createDocumentType(name, publicId, systemId) {
+ return new DocumentType(this, name, publicId, systemId);
+ }
+ createElement(localName) {
+ return new Element(this, localName);
+ }
+ createRange() {
+ const range = new Range();
+ range.commonAncestorContainer = this;
+ return range;
+ }
+ createTextNode(textContent) {
+ return new Text(this, textContent);
+ }
+ createTreeWalker(root, whatToShow = -1) {
+ return new TreeWalker(root, whatToShow);
+ }
+ createNodeIterator(root, whatToShow = -1) {
+ return this.createTreeWalker(root, whatToShow);
+ }
+ createEvent(name) {
+ const event = create(name === "Event" ? new GlobalEvent("") : new GlobalCustomEvent(""));
+ event.initEvent = event.initCustomEvent = (type, canBubble = false, cancelable = false, detail) => {
+ defineProperties(event, {
+ type: { value: type },
+ canBubble: { value: canBubble },
+ cancelable: { value: cancelable },
+ detail: { value: detail }
+ });
+ };
+ return event;
+ }
+ cloneNode(deep = false) {
+ const {
+ constructor,
+ [CUSTOM_ELEMENTS]: customElements2,
+ [DOCTYPE]: doctype
+ } = this;
+ const document2 = new constructor();
+ document2[CUSTOM_ELEMENTS] = customElements2;
+ if (deep) {
+ const end = document2[END];
+ const { childNodes } = this;
+ for (let { length } = childNodes, i2 = 0; i2 < length; i2++)
+ document2.insertBefore(childNodes[i2].cloneNode(true), end);
+ if (doctype)
+ document2[DOCTYPE] = childNodes[0];
+ }
+ return document2;
+ }
+ importNode(externalNode) {
+ const deep = 1 < arguments.length && !!arguments[1];
+ const node = externalNode.cloneNode(deep);
+ const { [CUSTOM_ELEMENTS]: customElements2 } = this;
+ const { active } = customElements2;
+ const upgrade = (element) => {
+ const { ownerDocument, nodeType } = element;
+ element.ownerDocument = this;
+ if (active && ownerDocument !== this && nodeType === ELEMENT_NODE)
+ customElements2.upgrade(element);
+ };
+ upgrade(node);
+ if (deep) {
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE: {
+ let { [NEXT]: next, [END]: end } = node;
+ while (next !== end) {
+ if (next.nodeType === ELEMENT_NODE)
+ upgrade(next);
+ next = next[NEXT];
+ }
+ break;
+ }
+ }
+ }
+ return node;
+ }
+ toString() {
+ return this.childNodes.join("");
+ }
+ querySelector(selectors) {
+ return query(super.querySelector, this, selectors);
+ }
+ querySelectorAll(selectors) {
+ return query(super.querySelectorAll, this, selectors);
+ }
+ getElementsByTagNameNS(_, name) {
+ return this.getElementsByTagName(name);
+ }
+ createAttributeNS(_, name) {
+ return this.createAttribute(name);
+ }
+ createElementNS(nsp, localName, options) {
+ return nsp === SVG_NAMESPACE ? new SVGElement(this, localName, null) : this.createElement(localName, options);
+ }
+};
+setPrototypeOf(globalExports.Document = function Document2() {
+ illegalConstructor();
+}, Document).prototype = Document.prototype;
+
+// node_modules/linkedom/esm/html/document.js
+var createHTMLElement = (ownerDocument, builtin, localName, options) => {
+ if (!builtin && htmlClasses.has(localName)) {
+ const Class = htmlClasses.get(localName);
+ return new Class(ownerDocument, localName);
+ }
+ const { [CUSTOM_ELEMENTS]: { active, registry } } = ownerDocument;
+ if (active) {
+ const ce = builtin ? options.is : localName;
+ if (registry.has(ce)) {
+ const { Class } = registry.get(ce);
+ const element = new Class(ownerDocument, localName);
+ customElements.set(element, { connected: false });
+ return element;
+ }
+ }
+ return new HTMLElement(ownerDocument, localName);
+};
+var HTMLDocument = class extends Document {
+ constructor() {
+ super("text/html");
+ }
+ get all() {
+ const nodeList = new NodeList();
+ let { [NEXT]: next, [END]: end } = this;
+ while (next !== end) {
+ switch (next.nodeType) {
+ case ELEMENT_NODE:
+ nodeList.push(next);
+ break;
+ }
+ next = next[NEXT];
+ }
+ return nodeList;
+ }
+ get head() {
+ const { documentElement } = this;
+ let { firstElementChild } = documentElement;
+ if (!firstElementChild || firstElementChild.tagName !== "HEAD") {
+ firstElementChild = this.createElement("head");
+ documentElement.prepend(firstElementChild);
+ }
+ return firstElementChild;
+ }
+ get body() {
+ const { head } = this;
+ let { nextElementSibling: nextElementSibling2 } = head;
+ if (!nextElementSibling2 || nextElementSibling2.tagName !== "BODY") {
+ nextElementSibling2 = this.createElement("body");
+ head.after(nextElementSibling2);
+ }
+ return nextElementSibling2;
+ }
+ get title() {
+ const { head } = this;
+ let title = head.getElementsByTagName("title").shift();
+ return title ? title.textContent : "";
+ }
+ set title(textContent) {
+ const { head } = this;
+ let title = head.getElementsByTagName("title").shift();
+ if (title)
+ title.textContent = textContent;
+ else {
+ head.insertBefore(this.createElement("title"), head.firstChild).textContent = textContent;
+ }
+ }
+ createElement(localName, options) {
+ const builtin = !!(options && options.is);
+ const element = createHTMLElement(this, builtin, localName, options);
+ if (builtin)
+ element.setAttribute("is", options.is);
+ return element;
+ }
+};
+
+// node_modules/linkedom/esm/svg/document.js
+var SVGDocument = class extends Document {
+ constructor() {
+ super("image/svg+xml");
+ }
+ toString() {
+ return this[MIME].docType + super.toString();
+ }
+};
+
+// node_modules/linkedom/esm/xml/document.js
+var XMLDocument = class extends Document {
+ constructor() {
+ super("text/xml");
+ }
+ toString() {
+ return this[MIME].docType + super.toString();
+ }
+};
+
+// node_modules/linkedom/esm/dom/parser.js
+var DOMParser = class {
+ parseFromString(markupLanguage, mimeType, globals = null) {
+ let isHTML = false, document2;
+ if (mimeType === "text/html") {
+ isHTML = true;
+ document2 = new HTMLDocument();
+ } else if (mimeType === "image/svg+xml")
+ document2 = new SVGDocument();
+ else
+ document2 = new XMLDocument();
+ document2[DOM_PARSER] = DOMParser;
+ if (globals)
+ document2[GLOBALS] = globals;
+ return markupLanguage ? parseFromString(document2, isHTML, markupLanguage) : document2;
+ }
+};
+
+// node_modules/linkedom/esm/shared/parse-json.js
+var { parse: parse3 } = JSON;
+
+// node_modules/linkedom/esm/index.js
+var parseHTML = (html, globals = null) => new DOMParser().parseFromString(html, "text/html", globals).defaultView;
+function Document3() {
+ illegalConstructor();
+}
+setPrototypeOf(Document3, Document).prototype = Document.prototype;
+
+// src/lib/payload.ts
+var import_showdown = __toESM(require_showdown(), 1);
+
+// src/lib/feedimg.ts
+var import_core3 = __toESM(require_core(), 1);
+
+// node_modules/node-fetch/src/index.js
+var import_node_http2 = __toESM(require("node:http"), 1);
+var import_node_https = __toESM(require("node:https"), 1);
+var import_node_zlib = __toESM(require("node:zlib"), 1);
+var import_node_stream2 = __toESM(require("node:stream"), 1);
+var import_node_buffer2 = require("node:buffer");
+
+// node_modules/data-uri-to-buffer/dist/index.js
+function dataUriToBuffer(uri) {
+ if (!/^data:/i.test(uri)) {
+ throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
+ }
+ uri = uri.replace(/\r?\n/g, "");
+ const firstComma = uri.indexOf(",");
+ if (firstComma === -1 || firstComma <= 4) {
+ throw new TypeError("malformed data: URI");
+ }
+ const meta = uri.substring(5, firstComma).split(";");
+ let charset = "";
+ let base64 = false;
+ const type = meta[0] || "text/plain";
+ let typeFull = type;
+ for (let i2 = 1; i2 < meta.length; i2++) {
+ if (meta[i2] === "base64") {
+ base64 = true;
+ } else {
+ typeFull += `;${meta[i2]}`;
+ if (meta[i2].indexOf("charset=") === 0) {
+ charset = meta[i2].substring(8);
+ }
+ }
+ }
+ if (!meta[0] && !charset.length) {
+ typeFull += ";charset=US-ASCII";
+ charset = "US-ASCII";
+ }
+ const encoding = base64 ? "base64" : "ascii";
+ const data = unescape(uri.substring(firstComma + 1));
+ const buffer = Buffer.from(data, encoding);
+ buffer.type = type;
+ buffer.typeFull = typeFull;
+ buffer.charset = charset;
+ return buffer;
+}
+var dist_default = dataUriToBuffer;
+
+// node_modules/node-fetch/src/body.js
+var import_node_stream = __toESM(require("node:stream"), 1);
+var import_node_util = require("node:util");
+var import_node_buffer = require("node:buffer");
+init_fetch_blob();
+init_esm_min();
+
+// node_modules/node-fetch/src/errors/base.js
+var FetchBaseError = class extends Error {
+ constructor(message, type) {
+ super(message);
+ Error.captureStackTrace(this, this.constructor);
+ this.type = type;
+ }
+ get name() {
+ return this.constructor.name;
+ }
+ get [Symbol.toStringTag]() {
+ return this.constructor.name;
+ }
+};
+
+// node_modules/node-fetch/src/errors/fetch-error.js
+var FetchError = class extends FetchBaseError {
+ constructor(message, type, systemError) {
+ super(message, type);
+ if (systemError) {
+ this.code = this.errno = systemError.code;
+ this.erroredSysCall = systemError.syscall;
+ }
+ }
+};
+
+// node_modules/node-fetch/src/utils/is.js
+var NAME = Symbol.toStringTag;
+var isURLSearchParameters = (object) => {
+ return typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && typeof object.sort === "function" && object[NAME] === "URLSearchParams";
+};
+var isBlob = (object) => {
+ return object && typeof object === "object" && typeof object.arrayBuffer === "function" && typeof object.type === "string" && typeof object.stream === "function" && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[NAME]);
+};
+var isAbortSignal = (object) => {
+ return typeof object === "object" && (object[NAME] === "AbortSignal" || object[NAME] === "EventTarget");
+};
+var isDomainOrSubdomain = (destination, original) => {
+ const orig = new URL(original).hostname;
+ const dest = new URL(destination).hostname;
+ return orig === dest || orig.endsWith(`.${dest}`);
+};
+
+// node_modules/node-fetch/src/body.js
+var pipeline = (0, import_node_util.promisify)(import_node_stream.default.pipeline);
+var INTERNALS = Symbol("Body internals");
+var Body = class {
+ constructor(body, {
+ size = 0
+ } = {}) {
+ let boundary = null;
+ if (body === null) {
+ body = null;
+ } else if (isURLSearchParameters(body)) {
+ body = import_node_buffer.Buffer.from(body.toString());
+ } else if (isBlob(body)) {
+ } else if (import_node_buffer.Buffer.isBuffer(body)) {
+ } else if (import_node_util.types.isAnyArrayBuffer(body)) {
+ body = import_node_buffer.Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ body = import_node_buffer.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof import_node_stream.default) {
+ } else if (body instanceof FormData2) {
+ body = formDataToBlob(body);
+ boundary = body.type.split("=")[1];
+ } else {
+ body = import_node_buffer.Buffer.from(String(body));
+ }
+ let stream = body;
+ if (import_node_buffer.Buffer.isBuffer(body)) {
+ stream = import_node_stream.default.Readable.from(body);
+ } else if (isBlob(body)) {
+ stream = import_node_stream.default.Readable.from(body.stream());
+ }
+ this[INTERNALS] = {
+ body,
+ stream,
+ boundary,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+ if (body instanceof import_node_stream.default) {
+ body.on("error", (error_) => {
+ const error = error_ instanceof FetchBaseError ? error_ : new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, "system", error_);
+ this[INTERNALS].error = error;
+ });
+ }
+ }
+ get body() {
+ return this[INTERNALS].stream;
+ }
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ }
+ async arrayBuffer() {
+ const { buffer, byteOffset, byteLength } = await consumeBody(this);
+ return buffer.slice(byteOffset, byteOffset + byteLength);
+ }
+ async formData() {
+ const ct = this.headers.get("content-type");
+ if (ct.startsWith("application/x-www-form-urlencoded")) {
+ const formData = new FormData2();
+ const parameters = new URLSearchParams(await this.text());
+ for (const [name, value] of parameters) {
+ formData.append(name, value);
+ }
+ return formData;
+ }
+ const { toFormData: toFormData2 } = await Promise.resolve().then(() => (init_multipart_parser(), multipart_parser_exports));
+ return toFormData2(this.body, ct);
+ }
+ async blob() {
+ const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
+ const buf = await this.arrayBuffer();
+ return new fetch_blob_default([buf], {
+ type: ct
+ });
+ }
+ async json() {
+ const text = await this.text();
+ return JSON.parse(text);
+ }
+ async text() {
+ const buffer = await consumeBody(this);
+ return new TextDecoder().decode(buffer);
+ }
+ buffer() {
+ return consumeBody(this);
+ }
+};
+Body.prototype.buffer = (0, import_node_util.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
+Object.defineProperties(Body.prototype, {
+ body: { enumerable: true },
+ bodyUsed: { enumerable: true },
+ arrayBuffer: { enumerable: true },
+ blob: { enumerable: true },
+ json: { enumerable: true },
+ text: { enumerable: true },
+ data: { get: (0, import_node_util.deprecate)(() => {
+ }, "data doesn't exist, use json(), text(), arrayBuffer(), or body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (response)") }
+});
+async function consumeBody(data) {
+ if (data[INTERNALS].disturbed) {
+ throw new TypeError(`body used already for: ${data.url}`);
+ }
+ data[INTERNALS].disturbed = true;
+ if (data[INTERNALS].error) {
+ throw data[INTERNALS].error;
+ }
+ const { body } = data;
+ if (body === null) {
+ return import_node_buffer.Buffer.alloc(0);
+ }
+ if (!(body instanceof import_node_stream.default)) {
+ return import_node_buffer.Buffer.alloc(0);
+ }
+ const accum = [];
+ let accumBytes = 0;
+ try {
+ for await (const chunk of body) {
+ if (data.size > 0 && accumBytes + chunk.length > data.size) {
+ const error = new FetchError(`content size at ${data.url} over limit: ${data.size}`, "max-size");
+ body.destroy(error);
+ throw error;
+ }
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ }
+ } catch (error) {
+ const error_ = error instanceof FetchBaseError ? error : new FetchError(`Invalid response body while trying to fetch ${data.url}: ${error.message}`, "system", error);
+ throw error_;
+ }
+ if (body.readableEnded === true || body._readableState.ended === true) {
+ try {
+ if (accum.every((c) => typeof c === "string")) {
+ return import_node_buffer.Buffer.from(accum.join(""));
+ }
+ return import_node_buffer.Buffer.concat(accum, accumBytes);
+ } catch (error) {
+ throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, "system", error);
+ }
+ } else {
+ throw new FetchError(`Premature close of server response while trying to fetch ${data.url}`);
+ }
+}
+var clone = (instance, highWaterMark) => {
+ let p1;
+ let p2;
+ let { body } = instance[INTERNALS];
+ if (instance.bodyUsed) {
+ throw new Error("cannot clone body after it is used");
+ }
+ if (body instanceof import_node_stream.default && typeof body.getBoundary !== "function") {
+ p1 = new import_node_stream.PassThrough({ highWaterMark });
+ p2 = new import_node_stream.PassThrough({ highWaterMark });
+ body.pipe(p1);
+ body.pipe(p2);
+ instance[INTERNALS].stream = p1;
+ body = p2;
+ }
+ return body;
+};
+var getNonSpecFormDataBoundary = (0, import_node_util.deprecate)((body) => body.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167");
+var extractContentType = (body, request) => {
+ if (body === null) {
+ return null;
+ }
+ if (typeof body === "string") {
+ return "text/plain;charset=UTF-8";
+ }
+ if (isURLSearchParameters(body)) {
+ return "application/x-www-form-urlencoded;charset=UTF-8";
+ }
+ if (isBlob(body)) {
+ return body.type || null;
+ }
+ if (import_node_buffer.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
+ return null;
+ }
+ if (body instanceof FormData2) {
+ return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
+ }
+ if (body && typeof body.getBoundary === "function") {
+ return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
+ }
+ if (body instanceof import_node_stream.default) {
+ return null;
+ }
+ return "text/plain;charset=UTF-8";
+};
+var getTotalBytes = (request) => {
+ const { body } = request[INTERNALS];
+ if (body === null) {
+ return 0;
+ }
+ if (isBlob(body)) {
+ return body.size;
+ }
+ if (import_node_buffer.Buffer.isBuffer(body)) {
+ return body.length;
+ }
+ if (body && typeof body.getLengthSync === "function") {
+ return body.hasKnownLength && body.hasKnownLength() ? body.getLengthSync() : null;
+ }
+ return null;
+};
+var writeToStream = async (dest, { body }) => {
+ if (body === null) {
+ dest.end();
+ } else {
+ await pipeline(body, dest);
+ }
+};
+
+// node_modules/node-fetch/src/headers.js
+var import_node_util2 = require("node:util");
+var import_node_http = __toESM(require("node:http"), 1);
+var validateHeaderName = typeof import_node_http.default.validateHeaderName === "function" ? import_node_http.default.validateHeaderName : (name) => {
+ if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
+ const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
+ Object.defineProperty(error, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
+ throw error;
+ }
+};
+var validateHeaderValue = typeof import_node_http.default.validateHeaderValue === "function" ? import_node_http.default.validateHeaderValue : (name, value) => {
+ if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
+ const error = new TypeError(`Invalid character in header content ["${name}"]`);
+ Object.defineProperty(error, "code", { value: "ERR_INVALID_CHAR" });
+ throw error;
+ }
+};
+var Headers = class extends URLSearchParams {
+ constructor(init) {
+ let result = [];
+ if (init instanceof Headers) {
+ const raw = init.raw();
+ for (const [name, values] of Object.entries(raw)) {
+ result.push(...values.map((value) => [name, value]));
+ }
+ } else if (init == null) {
+ } else if (typeof init === "object" && !import_node_util2.types.isBoxedPrimitive(init)) {
+ const method = init[Symbol.iterator];
+ if (method == null) {
+ result.push(...Object.entries(init));
+ } else {
+ if (typeof method !== "function") {
+ throw new TypeError("Header pairs must be iterable");
+ }
+ result = [...init].map((pair) => {
+ if (typeof pair !== "object" || import_node_util2.types.isBoxedPrimitive(pair)) {
+ throw new TypeError("Each header pair must be an iterable object");
+ }
+ return [...pair];
+ }).map((pair) => {
+ if (pair.length !== 2) {
+ throw new TypeError("Each header pair must be a name/value tuple");
+ }
+ return [...pair];
+ });
+ }
+ } else {
+ throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence> or record)");
+ }
+ result = result.length > 0 ? result.map(([name, value]) => {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return [String(name).toLowerCase(), String(value)];
+ }) : void 0;
+ super(result);
+ return new Proxy(this, {
+ get(target, p, receiver) {
+ switch (p) {
+ case "append":
+ case "set":
+ return (name, value) => {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return URLSearchParams.prototype[p].call(target, String(name).toLowerCase(), String(value));
+ };
+ case "delete":
+ case "has":
+ case "getAll":
+ return (name) => {
+ validateHeaderName(name);
+ return URLSearchParams.prototype[p].call(target, String(name).toLowerCase());
+ };
+ case "keys":
+ return () => {
+ target.sort();
+ return new Set(URLSearchParams.prototype.keys.call(target)).keys();
+ };
+ default:
+ return Reflect.get(target, p, receiver);
+ }
+ }
+ });
+ }
+ get [Symbol.toStringTag]() {
+ return this.constructor.name;
+ }
+ toString() {
+ return Object.prototype.toString.call(this);
+ }
+ get(name) {
+ const values = this.getAll(name);
+ if (values.length === 0) {
+ return null;
+ }
+ let value = values.join(", ");
+ if (/^content-encoding$/i.test(name)) {
+ value = value.toLowerCase();
+ }
+ return value;
+ }
+ forEach(callback, thisArg = void 0) {
+ for (const name of this.keys()) {
+ Reflect.apply(callback, thisArg, [this.get(name), name, this]);
+ }
+ }
+ *values() {
+ for (const name of this.keys()) {
+ yield this.get(name);
+ }
+ }
+ *entries() {
+ for (const name of this.keys()) {
+ yield [name, this.get(name)];
+ }
+ }
+ [Symbol.iterator]() {
+ return this.entries();
+ }
+ raw() {
+ return [...this.keys()].reduce((result, key2) => {
+ result[key2] = this.getAll(key2);
+ return result;
+ }, {});
+ }
+ [Symbol.for("nodejs.util.inspect.custom")]() {
+ return [...this.keys()].reduce((result, key2) => {
+ const values = this.getAll(key2);
+ if (key2 === "host") {
+ result[key2] = values[0];
+ } else {
+ result[key2] = values.length > 1 ? values : values[0];
+ }
+ return result;
+ }, {});
+ }
+};
+Object.defineProperties(Headers.prototype, ["get", "entries", "forEach", "values"].reduce((result, property) => {
+ result[property] = { enumerable: true };
+ return result;
+}, {}));
+function fromRawHeaders(headers = []) {
+ return new Headers(headers.reduce((result, value, index, array) => {
+ if (index % 2 === 0) {
+ result.push(array.slice(index, index + 2));
+ }
+ return result;
+ }, []).filter(([name, value]) => {
+ try {
+ validateHeaderName(name);
+ validateHeaderValue(name, String(value));
+ return true;
+ } catch {
+ return false;
+ }
+ }));
+}
+
+// node_modules/node-fetch/src/utils/is-redirect.js
+var redirectStatus = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
+var isRedirect = (code) => {
+ return redirectStatus.has(code);
+};
+
+// node_modules/node-fetch/src/response.js
+var INTERNALS2 = Symbol("Response internals");
+var Response = class extends Body {
+ constructor(body = null, options = {}) {
+ super(body, options);
+ const status = options.status != null ? options.status : 200;
+ const headers = new Headers(options.headers);
+ if (body !== null && !headers.has("Content-Type")) {
+ const contentType = extractContentType(body, this);
+ if (contentType) {
+ headers.append("Content-Type", contentType);
+ }
+ }
+ this[INTERNALS2] = {
+ type: "default",
+ url: options.url,
+ status,
+ statusText: options.statusText || "",
+ headers,
+ counter: options.counter,
+ highWaterMark: options.highWaterMark
+ };
+ }
+ get type() {
+ return this[INTERNALS2].type;
+ }
+ get url() {
+ return this[INTERNALS2].url || "";
+ }
+ get status() {
+ return this[INTERNALS2].status;
+ }
+ get ok() {
+ return this[INTERNALS2].status >= 200 && this[INTERNALS2].status < 300;
+ }
+ get redirected() {
+ return this[INTERNALS2].counter > 0;
+ }
+ get statusText() {
+ return this[INTERNALS2].statusText;
+ }
+ get headers() {
+ return this[INTERNALS2].headers;
+ }
+ get highWaterMark() {
+ return this[INTERNALS2].highWaterMark;
+ }
+ clone() {
+ return new Response(clone(this, this.highWaterMark), {
+ type: this.type,
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected,
+ size: this.size,
+ highWaterMark: this.highWaterMark
+ });
+ }
+ static redirect(url, status = 302) {
+ if (!isRedirect(status)) {
+ throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
+ }
+ return new Response(null, {
+ headers: {
+ location: new URL(url).toString()
+ },
+ status
+ });
+ }
+ static error() {
+ const response = new Response(null, { status: 0, statusText: "" });
+ response[INTERNALS2].type = "error";
+ return response;
+ }
+ get [Symbol.toStringTag]() {
+ return "Response";
+ }
+};
+Object.defineProperties(Response.prototype, {
+ type: { enumerable: true },
+ url: { enumerable: true },
+ status: { enumerable: true },
+ ok: { enumerable: true },
+ redirected: { enumerable: true },
+ statusText: { enumerable: true },
+ headers: { enumerable: true },
+ clone: { enumerable: true }
+});
+
+// node_modules/node-fetch/src/request.js
+var import_node_url = require("node:url");
+var import_node_util3 = require("node:util");
+
+// node_modules/node-fetch/src/utils/get-search.js
+var getSearch = (parsedURL) => {
+ if (parsedURL.search) {
+ return parsedURL.search;
+ }
+ const lastOffset = parsedURL.href.length - 1;
+ const hash2 = parsedURL.hash || (parsedURL.href[lastOffset] === "#" ? "#" : "");
+ return parsedURL.href[lastOffset - hash2.length] === "?" ? "?" : "";
+};
+
+// node_modules/node-fetch/src/utils/referrer.js
+var import_node_net = require("node:net");
+function stripURLForUseAsAReferrer(url, originOnly = false) {
+ if (url == null) {
+ return "no-referrer";
+ }
+ url = new URL(url);
+ if (/^(about|blob|data):$/.test(url.protocol)) {
+ return "no-referrer";
+ }
+ url.username = "";
+ url.password = "";
+ url.hash = "";
+ if (originOnly) {
+ url.pathname = "";
+ url.search = "";
+ }
+ return url;
+}
+var ReferrerPolicy = /* @__PURE__ */ new Set([
+ "",
+ "no-referrer",
+ "no-referrer-when-downgrade",
+ "same-origin",
+ "origin",
+ "strict-origin",
+ "origin-when-cross-origin",
+ "strict-origin-when-cross-origin",
+ "unsafe-url"
+]);
+var DEFAULT_REFERRER_POLICY = "strict-origin-when-cross-origin";
+function validateReferrerPolicy(referrerPolicy) {
+ if (!ReferrerPolicy.has(referrerPolicy)) {
+ throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);
+ }
+ return referrerPolicy;
+}
+function isOriginPotentiallyTrustworthy(url) {
+ if (/^(http|ws)s:$/.test(url.protocol)) {
+ return true;
+ }
+ const hostIp = url.host.replace(/(^\[)|(]$)/g, "");
+ const hostIPVersion = (0, import_node_net.isIP)(hostIp);
+ if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
+ return true;
+ }
+ if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {
+ return true;
+ }
+ if (/^(.+\.)*localhost$/.test(url.host)) {
+ return false;
+ }
+ if (url.protocol === "file:") {
+ return true;
+ }
+ return false;
+}
+function isUrlPotentiallyTrustworthy(url) {
+ if (/^about:(blank|srcdoc)$/.test(url)) {
+ return true;
+ }
+ if (url.protocol === "data:") {
+ return true;
+ }
+ if (/^(blob|filesystem):$/.test(url.protocol)) {
+ return true;
+ }
+ return isOriginPotentiallyTrustworthy(url);
+}
+function determineRequestsReferrer(request, { referrerURLCallback, referrerOriginCallback } = {}) {
+ if (request.referrer === "no-referrer" || request.referrerPolicy === "") {
+ return null;
+ }
+ const policy = request.referrerPolicy;
+ if (request.referrer === "about:client") {
+ return "no-referrer";
+ }
+ const referrerSource = request.referrer;
+ let referrerURL = stripURLForUseAsAReferrer(referrerSource);
+ let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);
+ if (referrerURL.toString().length > 4096) {
+ referrerURL = referrerOrigin;
+ }
+ if (referrerURLCallback) {
+ referrerURL = referrerURLCallback(referrerURL);
+ }
+ if (referrerOriginCallback) {
+ referrerOrigin = referrerOriginCallback(referrerOrigin);
+ }
+ const currentURL = new URL(request.url);
+ switch (policy) {
+ case "no-referrer":
+ return "no-referrer";
+ case "origin":
+ return referrerOrigin;
+ case "unsafe-url":
+ return referrerURL;
+ case "strict-origin":
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return "no-referrer";
+ }
+ return referrerOrigin.toString();
+ case "strict-origin-when-cross-origin":
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return "no-referrer";
+ }
+ return referrerOrigin;
+ case "same-origin":
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+ return "no-referrer";
+ case "origin-when-cross-origin":
+ if (referrerURL.origin === currentURL.origin) {
+ return referrerURL;
+ }
+ return referrerOrigin;
+ case "no-referrer-when-downgrade":
+ if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
+ return "no-referrer";
+ }
+ return referrerURL;
+ default:
+ throw new TypeError(`Invalid referrerPolicy: ${policy}`);
+ }
+}
+function parseReferrerPolicyFromHeader(headers) {
+ const policyTokens = (headers.get("referrer-policy") || "").split(/[,\s]+/);
+ let policy = "";
+ for (const token of policyTokens) {
+ if (token && ReferrerPolicy.has(token)) {
+ policy = token;
+ }
+ }
+ return policy;
+}
+
+// node_modules/node-fetch/src/request.js
+var INTERNALS3 = Symbol("Request internals");
+var isRequest = (object) => {
+ return typeof object === "object" && typeof object[INTERNALS3] === "object";
+};
+var doBadDataWarn = (0, import_node_util3.deprecate)(() => {
+}, ".data is not a valid RequestInit property, use .body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (request)");
+var Request = class extends Body {
+ constructor(input, init = {}) {
+ let parsedURL;
+ if (isRequest(input)) {
+ parsedURL = new URL(input.url);
+ } else {
+ parsedURL = new URL(input);
+ input = {};
+ }
+ if (parsedURL.username !== "" || parsedURL.password !== "") {
+ throw new TypeError(`${parsedURL} is an url with embedded credentials.`);
+ }
+ let method = init.method || input.method || "GET";
+ method = method.toUpperCase();
+ if ("data" in init) {
+ doBadDataWarn();
+ }
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) {
+ throw new TypeError("Request with GET/HEAD method cannot have body");
+ }
+ const inputBody = init.body ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+ super(inputBody, {
+ size: init.size || input.size || 0
+ });
+ const headers = new Headers(init.headers || input.headers || {});
+ if (inputBody !== null && !headers.has("Content-Type")) {
+ const contentType = extractContentType(inputBody, this);
+ if (contentType) {
+ headers.set("Content-Type", contentType);
+ }
+ }
+ let signal = isRequest(input) ? input.signal : null;
+ if ("signal" in init) {
+ signal = init.signal;
+ }
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");
+ }
+ let referrer = init.referrer == null ? input.referrer : init.referrer;
+ if (referrer === "") {
+ referrer = "no-referrer";
+ } else if (referrer) {
+ const parsedReferrer = new URL(referrer);
+ referrer = /^about:(\/\/)?client$/.test(parsedReferrer) ? "client" : parsedReferrer;
+ } else {
+ referrer = void 0;
+ }
+ this[INTERNALS3] = {
+ method,
+ redirect: init.redirect || input.redirect || "follow",
+ headers,
+ parsedURL,
+ signal,
+ referrer
+ };
+ this.follow = init.follow === void 0 ? input.follow === void 0 ? 20 : input.follow : init.follow;
+ this.compress = init.compress === void 0 ? input.compress === void 0 ? true : input.compress : init.compress;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
+ this.highWaterMark = init.highWaterMark || input.highWaterMark || 16384;
+ this.insecureHTTPParser = init.insecureHTTPParser || input.insecureHTTPParser || false;
+ this.referrerPolicy = init.referrerPolicy || input.referrerPolicy || "";
+ }
+ get method() {
+ return this[INTERNALS3].method;
+ }
+ get url() {
+ return (0, import_node_url.format)(this[INTERNALS3].parsedURL);
+ }
+ get headers() {
+ return this[INTERNALS3].headers;
+ }
+ get redirect() {
+ return this[INTERNALS3].redirect;
+ }
+ get signal() {
+ return this[INTERNALS3].signal;
+ }
+ get referrer() {
+ if (this[INTERNALS3].referrer === "no-referrer") {
+ return "";
+ }
+ if (this[INTERNALS3].referrer === "client") {
+ return "about:client";
+ }
+ if (this[INTERNALS3].referrer) {
+ return this[INTERNALS3].referrer.toString();
+ }
+ return void 0;
+ }
+ get referrerPolicy() {
+ return this[INTERNALS3].referrerPolicy;
+ }
+ set referrerPolicy(referrerPolicy) {
+ this[INTERNALS3].referrerPolicy = validateReferrerPolicy(referrerPolicy);
+ }
+ clone() {
+ return new Request(this);
+ }
+ get [Symbol.toStringTag]() {
+ return "Request";
+ }
+};
+Object.defineProperties(Request.prototype, {
+ method: { enumerable: true },
+ url: { enumerable: true },
+ headers: { enumerable: true },
+ redirect: { enumerable: true },
+ clone: { enumerable: true },
+ signal: { enumerable: true },
+ referrer: { enumerable: true },
+ referrerPolicy: { enumerable: true }
+});
+var getNodeRequestOptions = (request) => {
+ const { parsedURL } = request[INTERNALS3];
+ const headers = new Headers(request[INTERNALS3].headers);
+ if (!headers.has("Accept")) {
+ headers.set("Accept", "*/*");
+ }
+ let contentLengthValue = null;
+ if (request.body === null && /^(post|put)$/i.test(request.method)) {
+ contentLengthValue = "0";
+ }
+ if (request.body !== null) {
+ const totalBytes = getTotalBytes(request);
+ if (typeof totalBytes === "number" && !Number.isNaN(totalBytes)) {
+ contentLengthValue = String(totalBytes);
+ }
+ }
+ if (contentLengthValue) {
+ headers.set("Content-Length", contentLengthValue);
+ }
+ if (request.referrerPolicy === "") {
+ request.referrerPolicy = DEFAULT_REFERRER_POLICY;
+ }
+ if (request.referrer && request.referrer !== "no-referrer") {
+ request[INTERNALS3].referrer = determineRequestsReferrer(request);
+ } else {
+ request[INTERNALS3].referrer = "no-referrer";
+ }
+ if (request[INTERNALS3].referrer instanceof URL) {
+ headers.set("Referer", request.referrer);
+ }
+ if (!headers.has("User-Agent")) {
+ headers.set("User-Agent", "node-fetch");
+ }
+ if (request.compress && !headers.has("Accept-Encoding")) {
+ headers.set("Accept-Encoding", "gzip,deflate,br");
+ }
+ let { agent } = request;
+ if (typeof agent === "function") {
+ agent = agent(parsedURL);
+ }
+ if (!headers.has("Connection") && !agent) {
+ headers.set("Connection", "close");
+ }
+ const search = getSearch(parsedURL);
+ const options = {
+ path: parsedURL.pathname + search,
+ method: request.method,
+ headers: headers[Symbol.for("nodejs.util.inspect.custom")](),
+ insecureHTTPParser: request.insecureHTTPParser,
+ agent
+ };
+ return {
+ parsedURL,
+ options
+ };
+};
+
+// node_modules/node-fetch/src/errors/abort-error.js
+var AbortError = class extends FetchBaseError {
+ constructor(message, type = "aborted") {
+ super(message, type);
+ }
+};
+
+// node_modules/node-fetch/src/index.js
+init_esm_min();
+init_from();
+var supportedSchemas = /* @__PURE__ */ new Set(["data:", "http:", "https:"]);
+async function fetch(url, options_) {
+ return new Promise((resolve, reject) => {
+ const request = new Request(url, options_);
+ const { parsedURL, options } = getNodeRequestOptions(request);
+ if (!supportedSchemas.has(parsedURL.protocol)) {
+ throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, "")}" is not supported.`);
+ }
+ if (parsedURL.protocol === "data:") {
+ const data = dist_default(request.url);
+ const response2 = new Response(data, { headers: { "Content-Type": data.typeFull } });
+ resolve(response2);
+ return;
+ }
+ const send = (parsedURL.protocol === "https:" ? import_node_https.default : import_node_http2.default).request;
+ const { signal } = request;
+ let response = null;
+ const abort = () => {
+ const error = new AbortError("The operation was aborted.");
+ reject(error);
+ if (request.body && request.body instanceof import_node_stream2.default.Readable) {
+ request.body.destroy(error);
+ }
+ if (!response || !response.body) {
+ return;
+ }
+ response.body.emit("error", error);
+ };
+ if (signal && signal.aborted) {
+ abort();
+ return;
+ }
+ const abortAndFinalize = () => {
+ abort();
+ finalize();
+ };
+ const request_ = send(parsedURL.toString(), options);
+ if (signal) {
+ signal.addEventListener("abort", abortAndFinalize);
+ }
+ const finalize = () => {
+ request_.abort();
+ if (signal) {
+ signal.removeEventListener("abort", abortAndFinalize);
+ }
+ };
+ request_.on("error", (error) => {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, "system", error));
+ finalize();
+ });
+ fixResponseChunkedTransferBadEnding(request_, (error) => {
+ response.body.destroy(error);
+ });
+ if (process.version < "v14") {
+ request_.on("socket", (s2) => {
+ let endedWithEventsCount;
+ s2.prependListener("end", () => {
+ endedWithEventsCount = s2._eventsCount;
+ });
+ s2.prependListener("close", (hadError) => {
+ if (response && endedWithEventsCount < s2._eventsCount && !hadError) {
+ const error = new Error("Premature close");
+ error.code = "ERR_STREAM_PREMATURE_CLOSE";
+ response.body.emit("error", error);
+ }
+ });
+ });
+ }
+ request_.on("response", (response_) => {
+ request_.setTimeout(0);
+ const headers = fromRawHeaders(response_.rawHeaders);
+ if (isRedirect(response_.statusCode)) {
+ const location = headers.get("Location");
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL(location, request.url);
+ } catch {
+ if (request.redirect !== "manual") {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
+ finalize();
+ return;
+ }
+ }
+ switch (request.redirect) {
+ case "error":
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect"));
+ finalize();
+ return;
+ case "manual":
+ break;
+ case "follow": {
+ if (locationURL === null) {
+ break;
+ }
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect"));
+ finalize();
+ return;
+ }
+ const requestOptions = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: clone(request),
+ signal: request.signal,
+ size: request.size,
+ referrer: request.referrer,
+ referrerPolicy: request.referrerPolicy
+ };
+ if (!isDomainOrSubdomain(request.url, locationURL)) {
+ for (const name of ["authorization", "www-authenticate", "cookie", "cookie2"]) {
+ requestOptions.headers.delete(name);
+ }
+ }
+ if (response_.statusCode !== 303 && request.body && options_.body instanceof import_node_stream2.default.Readable) {
+ reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
+ finalize();
+ return;
+ }
+ if (response_.statusCode === 303 || (response_.statusCode === 301 || response_.statusCode === 302) && request.method === "POST") {
+ requestOptions.method = "GET";
+ requestOptions.body = void 0;
+ requestOptions.headers.delete("content-length");
+ }
+ const responseReferrerPolicy = parseReferrerPolicyFromHeader(headers);
+ if (responseReferrerPolicy) {
+ requestOptions.referrerPolicy = responseReferrerPolicy;
+ }
+ resolve(fetch(new Request(locationURL, requestOptions)));
+ finalize();
+ return;
+ }
+ default:
+ return reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`));
+ }
+ }
+ if (signal) {
+ response_.once("end", () => {
+ signal.removeEventListener("abort", abortAndFinalize);
+ });
+ }
+ let body = (0, import_node_stream2.pipeline)(response_, new import_node_stream2.PassThrough(), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ if (process.version < "v12.10") {
+ response_.on("aborted", abortAndFinalize);
+ }
+ const responseOptions = {
+ url: request.url,
+ status: response_.statusCode,
+ statusText: response_.statusMessage,
+ headers,
+ size: request.size,
+ counter: request.counter,
+ highWaterMark: request.highWaterMark
+ };
+ const codings = headers.get("Content-Encoding");
+ if (!request.compress || request.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+ const zlibOptions = {
+ flush: import_node_zlib.default.Z_SYNC_FLUSH,
+ finishFlush: import_node_zlib.default.Z_SYNC_FLUSH
+ };
+ if (codings === "gzip" || codings === "x-gzip") {
+ body = (0, import_node_stream2.pipeline)(body, import_node_zlib.default.createGunzip(zlibOptions), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+ if (codings === "deflate" || codings === "x-deflate") {
+ const raw = (0, import_node_stream2.pipeline)(response_, new import_node_stream2.PassThrough(), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ raw.once("data", (chunk) => {
+ if ((chunk[0] & 15) === 8) {
+ body = (0, import_node_stream2.pipeline)(body, import_node_zlib.default.createInflate(), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ } else {
+ body = (0, import_node_stream2.pipeline)(body, import_node_zlib.default.createInflateRaw(), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ }
+ response = new Response(body, responseOptions);
+ resolve(response);
+ });
+ raw.once("end", () => {
+ if (!response) {
+ response = new Response(body, responseOptions);
+ resolve(response);
+ }
+ });
+ return;
+ }
+ if (codings === "br") {
+ body = (0, import_node_stream2.pipeline)(body, import_node_zlib.default.createBrotliDecompress(), (error) => {
+ if (error) {
+ reject(error);
+ }
+ });
+ response = new Response(body, responseOptions);
+ resolve(response);
+ return;
+ }
+ response = new Response(body, responseOptions);
+ resolve(response);
+ });
+ writeToStream(request_, request).catch(reject);
+ });
+}
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ const LAST_CHUNK = import_node_buffer2.Buffer.from("0\r\n\r\n");
+ let isChunkedTransfer = false;
+ let properLastChunkReceived = false;
+ let previousChunk;
+ request.on("response", (response) => {
+ const { headers } = response;
+ isChunkedTransfer = headers["transfer-encoding"] === "chunked" && !headers["content-length"];
+ });
+ request.on("socket", (socket) => {
+ const onSocketClose = () => {
+ if (isChunkedTransfer && !properLastChunkReceived) {
+ const error = new Error("Premature close");
+ error.code = "ERR_STREAM_PREMATURE_CLOSE";
+ errorCallback(error);
+ }
+ };
+ socket.prependListener("close", onSocketClose);
+ request.on("abort", () => {
+ socket.removeListener("close", onSocketClose);
+ });
+ socket.on("data", (buf) => {
+ properLastChunkReceived = import_node_buffer2.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
+ if (!properLastChunkReceived && previousChunk) {
+ properLastChunkReceived = import_node_buffer2.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && import_node_buffer2.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0;
+ }
+ previousChunk = buf;
+ });
+ });
+}
+
+// src/lib/feedimg.ts
+var getFeedImg = async (rssFeed) => {
+ var _a, _b;
+ const url = new URL(rssFeed);
+ const host = url.hostname.replace("//status.", "//").replace("//feed.", "//").replace("//feeds.", "//").replace("//rss.", "//");
+ import_core3.default.debug(`Getting favicons for ${host}`);
+ let favicon;
+ try {
+ const icons = await (await fetch(`https:/favicongrabber.com/api/grab/${host}`)).json();
+ import_core3.default.debug(`Icons: ${JSON.stringify(icons)}`);
+ if (icons == null ? void 0 : icons.icons) {
+ favicon = ((_a = icons.icons.find((i2) => (i2 == null ? void 0 : i2.sizes) === "180x180" || (i2 == null ? void 0 : i2.sizes) === "144x144" || (i2 == null ? void 0 : i2.sizes) === "72x72")) == null ? void 0 : _a.src) || ((_b = icons.icons[0]) == null ? void 0 : _b.src);
+ import_core3.default.debug(`Favicon: ${favicon}`);
+ }
+ } catch (err) {
+ import_core3.default.debug(err.message);
+ favicon = void 0;
+ }
+ return favicon;
+};
+
+// src/lib/payload.ts
+var converter = new import_showdown.default.Converter();
+var html2txt = (0, import_html_to_text.compile)({
+ wordwrap: 120
+});
+var genPayload = async (filtered, unfiltered, rssFeed, unfurl) => {
+ try {
+ const blocks = filtered.map((item) => {
+ let text = "";
+ if (!unfurl) {
+ if (item.title)
+ text += `*${html2txt(item.title)}*
+`;
+ if (item.description) {
+ const { document: document2 } = parseHTML("");
+ let desc = item.description;
+ if (/>.+</.test(item.description)) {
+ desc = item.description.replace(/>/g, ">").replace(/</g, "<").replace(/\n/g, "").replace(/
/g, "\n").replace(/\\\\-/g, "-");
+ }
+ const markdown = converter.makeMarkdown(desc, document2);
+ text += `${html2txt(markdown).replace(/[Rr]ead more/g, "\u2026")}
+`;
+ }
+ if (item.link)
+ text += `<${item.link}|Read more>`;
+ } else {
+ if (item.title)
+ text += `<${item.link}|${html2txt(item.title + item.created)}>`;
+ }
+ return {
+ type: "section",
+ text: {
+ type: "mrkdwn",
+ text
+ }
+ };
+ });
+ const payload = {
+ as_user: false,
+ username: unfiltered.title ? html2txt(unfiltered.title) : "FeedBot",
+ icon_url: await getFeedImg(rssFeed),
+ unfurl_links: unfurl,
+ unfurl_media: unfurl,
+ blocks
+ };
+ import_core4.default.debug(JSON.stringify(payload));
+ return payload;
+ } catch (err) {
+ import_core4.default.debug(err.message);
+ throw new Error("Failed to generated Slack payload");
+ }
+};
+
+// src/lib/slack.ts
+var import_core5 = __toESM(require_core(), 1);
+var slack = async (payload, webhook) => {
+ const res = await fetch(webhook, {
+ method: "POST",
+ body: JSON.stringify(payload),
+ headers: {
+ "Content-Type": "application/json; charset=utf-8",
+ Accept: "application/json"
+ }
+ });
+ import_core5.default.debug(`Slack response: ${await res.text()}`);
+};
+
+// src/lib/validate.ts
+var import_core6 = __toESM(require_core(), 1);
+var validate = () => {
+ import_core6.default.debug(`Validating inputs\u2026`);
+ if (!import_core6.default.getInput("rss") || !import_core6.default.getInput("rss").startsWith("http")) {
+ throw new Error("No feed or invalid feed specified");
+ }
+ if (!import_core6.default.getInput("slack_webhook") || !import_core6.default.getInput("slack_webhook").startsWith("https")) {
+ throw new Error("No Slack webhook or invalid webhook specified");
+ }
+ if (!import_core6.default.getInput("interval") && !import_core6.default.getInput("cache_dir")) {
+ throw new Error("No interval or cache folder specified");
+ }
+ if (import_core6.default.getInput("interval") && parseInt(import_core6.default.getInput("interval")).toString() === "NaN") {
+ throw new Error("Invalid interval specified");
+ }
+};
+
+// src/action.ts
+var run = async () => {
+ try {
+ validate();
+ const slackWebhook = import_core7.default.getInput("slack_webhook");
+ const rssFeed = import_core7.default.getInput("rss");
+ const cacheDir = import_core7.default.getInput("cache_dir");
+ const interval = import_core7.default.getInput("interval") ? parseInt(import_core7.default.getInput("interval")) : void 0;
+ let unfurl = false;
+ try {
+ unfurl = import_core7.default.getBooleanInput("unfurl");
+ } catch (err) {
+ import_core7.default.debug(err.message);
+ }
+ const { filtered, unfiltered, cached } = await getFeed(rssFeed, cacheDir, interval);
+ if (filtered.length) {
+ const payload = await genPayload(filtered, unfiltered, rssFeed, unfurl);
+ await slack(payload, slackWebhook);
+ if (cacheDir)
+ await writeCache((unfiltered == null ? void 0 : unfiltered.title) || "", rssFeed, cacheDir, filtered, cached);
+ } else {
+ import_core7.default.info(`No new items found`);
+ }
+ } catch (err) {
+ import_core7.default.debug("Operation failed due to error");
+ import_core7.default.setFailed(err.message);
+ }
+};
+(async () => {
+ await run();
+})();
+/*! fetch-blob. MIT License. Jimmy Wärting */
+/*! formdata-polyfill. MIT License. Jimmy Wärting */
+/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
+/*! node-domexception. MIT License. Jimmy Wärting */
+/*! showdown v 2.0.3 - 08-03-2022 */
diff --git a/dist/index.js b/dist/index.js
deleted file mode 100644
index 8e3a429..0000000
--- a/dist/index.js
+++ /dev/null
@@ -1,23754 +0,0 @@
-import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
-/******/ var __webpack_modules__ = ({
-
-/***/ 7351:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.issue = exports.issueCommand = void 0;
-const os = __importStar(__nccwpck_require__(2037));
-const utils_1 = __nccwpck_require__(5278);
-/**
- * Commands
- *
- * Command Format:
- * ::name key=value,key=value::message
- *
- * Examples:
- * ::warning::This is the message
- * ::set-env name=MY_VAR::some value
- */
-function issueCommand(command, properties, message) {
- const cmd = new Command(command, properties, message);
- process.stdout.write(cmd.toString() + os.EOL);
-}
-exports.issueCommand = issueCommand;
-function issue(name, message = '') {
- issueCommand(name, {}, message);
-}
-exports.issue = issue;
-const CMD_STRING = '::';
-class Command {
- constructor(command, properties, message) {
- if (!command) {
- command = 'missing.command';
- }
- this.command = command;
- this.properties = properties;
- this.message = message;
- }
- toString() {
- let cmdStr = CMD_STRING + this.command;
- if (this.properties && Object.keys(this.properties).length > 0) {
- cmdStr += ' ';
- let first = true;
- for (const key in this.properties) {
- if (this.properties.hasOwnProperty(key)) {
- const val = this.properties[key];
- if (val) {
- if (first) {
- first = false;
- }
- else {
- cmdStr += ',';
- }
- cmdStr += `${key}=${escapeProperty(val)}`;
- }
- }
- }
- }
- cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
- return cmdStr;
- }
-}
-function escapeData(s) {
- return utils_1.toCommandValue(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A');
-}
-function escapeProperty(s) {
- return utils_1.toCommandValue(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A')
- .replace(/:/g, '%3A')
- .replace(/,/g, '%2C');
-}
-//# sourceMappingURL=command.js.map
-
-/***/ }),
-
-/***/ 2186:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
-const command_1 = __nccwpck_require__(7351);
-const file_command_1 = __nccwpck_require__(717);
-const utils_1 = __nccwpck_require__(5278);
-const os = __importStar(__nccwpck_require__(2037));
-const path = __importStar(__nccwpck_require__(1017));
-const oidc_utils_1 = __nccwpck_require__(8041);
-/**
- * The code to exit an action
- */
-var ExitCode;
-(function (ExitCode) {
- /**
- * A code indicating that the action was successful
- */
- ExitCode[ExitCode["Success"] = 0] = "Success";
- /**
- * A code indicating that the action was a failure
- */
- ExitCode[ExitCode["Failure"] = 1] = "Failure";
-})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
-//-----------------------------------------------------------------------
-// Variables
-//-----------------------------------------------------------------------
-/**
- * Sets env variable for this action and future actions in the job
- * @param name the name of the variable to set
- * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function exportVariable(name, val) {
- const convertedVal = utils_1.toCommandValue(val);
- process.env[name] = convertedVal;
- const filePath = process.env['GITHUB_ENV'] || '';
- if (filePath) {
- const delimiter = '_GitHubActionsFileCommandDelimeter_';
- const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
- file_command_1.issueCommand('ENV', commandValue);
- }
- else {
- command_1.issueCommand('set-env', { name }, convertedVal);
- }
-}
-exports.exportVariable = exportVariable;
-/**
- * Registers a secret which will get masked from logs
- * @param secret value of the secret
- */
-function setSecret(secret) {
- command_1.issueCommand('add-mask', {}, secret);
-}
-exports.setSecret = setSecret;
-/**
- * Prepends inputPath to the PATH (for this action and future actions)
- * @param inputPath
- */
-function addPath(inputPath) {
- const filePath = process.env['GITHUB_PATH'] || '';
- if (filePath) {
- file_command_1.issueCommand('PATH', inputPath);
- }
- else {
- command_1.issueCommand('add-path', {}, inputPath);
- }
- process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
-}
-exports.addPath = addPath;
-/**
- * Gets the value of an input.
- * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
- * Returns an empty string if the value is not defined.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string
- */
-function getInput(name, options) {
- const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
- if (options && options.required && !val) {
- throw new Error(`Input required and not supplied: ${name}`);
- }
- if (options && options.trimWhitespace === false) {
- return val;
- }
- return val.trim();
-}
-exports.getInput = getInput;
-/**
- * Gets the values of an multiline input. Each value is also trimmed.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string[]
- *
- */
-function getMultilineInput(name, options) {
- const inputs = getInput(name, options)
- .split('\n')
- .filter(x => x !== '');
- return inputs;
-}
-exports.getMultilineInput = getMultilineInput;
-/**
- * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
- * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
- * The return value is also in boolean type.
- * ref: https://yaml.org/spec/1.2/spec.html#id2804923
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns boolean
- */
-function getBooleanInput(name, options) {
- const trueValue = ['true', 'True', 'TRUE'];
- const falseValue = ['false', 'False', 'FALSE'];
- const val = getInput(name, options);
- if (trueValue.includes(val))
- return true;
- if (falseValue.includes(val))
- return false;
- throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
- `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
-}
-exports.getBooleanInput = getBooleanInput;
-/**
- * Sets the value of an output.
- *
- * @param name name of the output to set
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function setOutput(name, value) {
- process.stdout.write(os.EOL);
- command_1.issueCommand('set-output', { name }, value);
-}
-exports.setOutput = setOutput;
-/**
- * Enables or disables the echoing of commands into stdout for the rest of the step.
- * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
- *
- */
-function setCommandEcho(enabled) {
- command_1.issue('echo', enabled ? 'on' : 'off');
-}
-exports.setCommandEcho = setCommandEcho;
-//-----------------------------------------------------------------------
-// Results
-//-----------------------------------------------------------------------
-/**
- * Sets the action status to failed.
- * When the action exits it will be with an exit code of 1
- * @param message add error issue message
- */
-function setFailed(message) {
- process.exitCode = ExitCode.Failure;
- error(message);
-}
-exports.setFailed = setFailed;
-//-----------------------------------------------------------------------
-// Logging Commands
-//-----------------------------------------------------------------------
-/**
- * Gets whether Actions Step Debug is on or not
- */
-function isDebug() {
- return process.env['RUNNER_DEBUG'] === '1';
-}
-exports.isDebug = isDebug;
-/**
- * Writes debug message to user log
- * @param message debug message
- */
-function debug(message) {
- command_1.issueCommand('debug', {}, message);
-}
-exports.debug = debug;
-/**
- * Adds an error issue
- * @param message error issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function error(message, properties = {}) {
- command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
-}
-exports.error = error;
-/**
- * Adds a warning issue
- * @param message warning issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function warning(message, properties = {}) {
- command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
-}
-exports.warning = warning;
-/**
- * Adds a notice issue
- * @param message notice issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function notice(message, properties = {}) {
- command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
-}
-exports.notice = notice;
-/**
- * Writes info to log with console.log.
- * @param message info message
- */
-function info(message) {
- process.stdout.write(message + os.EOL);
-}
-exports.info = info;
-/**
- * Begin an output group.
- *
- * Output until the next `groupEnd` will be foldable in this group
- *
- * @param name The name of the output group
- */
-function startGroup(name) {
- command_1.issue('group', name);
-}
-exports.startGroup = startGroup;
-/**
- * End an output group.
- */
-function endGroup() {
- command_1.issue('endgroup');
-}
-exports.endGroup = endGroup;
-/**
- * Wrap an asynchronous function call in a group.
- *
- * Returns the same type as the function itself.
- *
- * @param name The name of the group
- * @param fn The function to wrap in the group
- */
-function group(name, fn) {
- return __awaiter(this, void 0, void 0, function* () {
- startGroup(name);
- let result;
- try {
- result = yield fn();
- }
- finally {
- endGroup();
- }
- return result;
- });
-}
-exports.group = group;
-//-----------------------------------------------------------------------
-// Wrapper action state
-//-----------------------------------------------------------------------
-/**
- * Saves state for current action, the state can only be retrieved by this action's post job execution.
- *
- * @param name name of the state to store
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function saveState(name, value) {
- command_1.issueCommand('save-state', { name }, value);
-}
-exports.saveState = saveState;
-/**
- * Gets the value of an state set by this action's main execution.
- *
- * @param name name of the state to get
- * @returns string
- */
-function getState(name) {
- return process.env[`STATE_${name}`] || '';
-}
-exports.getState = getState;
-function getIDToken(aud) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield oidc_utils_1.OidcClient.getIDToken(aud);
- });
-}
-exports.getIDToken = getIDToken;
-//# sourceMappingURL=core.js.map
-
-/***/ }),
-
-/***/ 717:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-
-// For internal use, subject to change.
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.issueCommand = void 0;
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
-const fs = __importStar(__nccwpck_require__(7147));
-const os = __importStar(__nccwpck_require__(2037));
-const utils_1 = __nccwpck_require__(5278);
-function issueCommand(command, message) {
- const filePath = process.env[`GITHUB_${command}`];
- if (!filePath) {
- throw new Error(`Unable to find environment variable for file command ${command}`);
- }
- if (!fs.existsSync(filePath)) {
- throw new Error(`Missing file at path: ${filePath}`);
- }
- fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
- encoding: 'utf8'
- });
-}
-exports.issueCommand = issueCommand;
-//# sourceMappingURL=file-command.js.map
-
-/***/ }),
-
-/***/ 8041:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.OidcClient = void 0;
-const http_client_1 = __nccwpck_require__(9925);
-const auth_1 = __nccwpck_require__(3702);
-const core_1 = __nccwpck_require__(2186);
-class OidcClient {
- static createHttpClient(allowRetry = true, maxRetry = 10) {
- const requestOptions = {
- allowRetries: allowRetry,
- maxRetries: maxRetry
- };
- return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
- }
- static getRequestToken() {
- const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
- if (!token) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
- }
- return token;
- }
- static getIDTokenUrl() {
- const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
- if (!runtimeUrl) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
- }
- return runtimeUrl;
- }
- static getCall(id_token_url) {
- var _a;
- return __awaiter(this, void 0, void 0, function* () {
- const httpclient = OidcClient.createHttpClient();
- const res = yield httpclient
- .getJson(id_token_url)
- .catch(error => {
- throw new Error(`Failed to get ID Token. \n
- Error Code : ${error.statusCode}\n
- Error Message: ${error.result.message}`);
- });
- const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
- if (!id_token) {
- throw new Error('Response json body do not have ID Token field');
- }
- return id_token;
- });
- }
- static getIDToken(audience) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- // New ID Token is requested from action service
- let id_token_url = OidcClient.getIDTokenUrl();
- if (audience) {
- const encodedAudience = encodeURIComponent(audience);
- id_token_url = `${id_token_url}&audience=${encodedAudience}`;
- }
- core_1.debug(`ID token url is ${id_token_url}`);
- const id_token = yield OidcClient.getCall(id_token_url);
- core_1.setSecret(id_token);
- return id_token;
- }
- catch (error) {
- throw new Error(`Error message: ${error.message}`);
- }
- });
- }
-}
-exports.OidcClient = OidcClient;
-//# sourceMappingURL=oidc-utils.js.map
-
-/***/ }),
-
-/***/ 5278:
-/***/ ((__unused_webpack_module, exports) => {
-
-
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toCommandProperties = exports.toCommandValue = void 0;
-/**
- * Sanitizes an input into a string so it can be passed into issueCommand safely
- * @param input input to sanitize into a string
- */
-function toCommandValue(input) {
- if (input === null || input === undefined) {
- return '';
- }
- else if (typeof input === 'string' || input instanceof String) {
- return input;
- }
- return JSON.stringify(input);
-}
-exports.toCommandValue = toCommandValue;
-/**
- *
- * @param annotationProperties
- * @returns The command properties to send with the actual annotation command
- * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
- */
-function toCommandProperties(annotationProperties) {
- if (!Object.keys(annotationProperties).length) {
- return {};
- }
- return {
- title: annotationProperties.title,
- file: annotationProperties.file,
- line: annotationProperties.startLine,
- endLine: annotationProperties.endLine,
- col: annotationProperties.startColumn,
- endColumn: annotationProperties.endColumn
- };
-}
-exports.toCommandProperties = toCommandProperties;
-//# sourceMappingURL=utils.js.map
-
-/***/ }),
-
-/***/ 3702:
-/***/ ((__unused_webpack_module, exports) => {
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-class BasicCredentialHandler {
- constructor(username, password) {
- this.username = username;
- this.password = password;
- }
- prepareRequest(options) {
- options.headers['Authorization'] =
- 'Basic ' +
- Buffer.from(this.username + ':' + this.password).toString('base64');
- }
- // This handler cannot handle 401
- canHandleAuthentication(response) {
- return false;
- }
- handleAuthentication(httpClient, requestInfo, objs) {
- return null;
- }
-}
-exports.BasicCredentialHandler = BasicCredentialHandler;
-class BearerCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- options.headers['Authorization'] = 'Bearer ' + this.token;
- }
- // This handler cannot handle 401
- canHandleAuthentication(response) {
- return false;
- }
- handleAuthentication(httpClient, requestInfo, objs) {
- return null;
- }
-}
-exports.BearerCredentialHandler = BearerCredentialHandler;
-class PersonalAccessTokenCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- options.headers['Authorization'] =
- 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');
- }
- // This handler cannot handle 401
- canHandleAuthentication(response) {
- return false;
- }
- handleAuthentication(httpClient, requestInfo, objs) {
- return null;
- }
-}
-exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
-
-
-/***/ }),
-
-/***/ 9925:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-const http = __nccwpck_require__(3685);
-const https = __nccwpck_require__(5687);
-const pm = __nccwpck_require__(6443);
-let tunnel;
-var HttpCodes;
-(function (HttpCodes) {
- HttpCodes[HttpCodes["OK"] = 200] = "OK";
- HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
- HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
- HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
- HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
- HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
- HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
- HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
- HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
- HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
- HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
- HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
- HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
- HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
- HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
- HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
- HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
- HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
- HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
- HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
- HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
- HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
- HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
- HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
- HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
- HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
- HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
-})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
-var Headers;
-(function (Headers) {
- Headers["Accept"] = "accept";
- Headers["ContentType"] = "content-type";
-})(Headers = exports.Headers || (exports.Headers = {}));
-var MediaTypes;
-(function (MediaTypes) {
- MediaTypes["ApplicationJson"] = "application/json";
-})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
-/**
- * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
-function getProxyUrl(serverUrl) {
- let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
- return proxyUrl ? proxyUrl.href : '';
-}
-exports.getProxyUrl = getProxyUrl;
-const HttpRedirectCodes = [
- HttpCodes.MovedPermanently,
- HttpCodes.ResourceMoved,
- HttpCodes.SeeOther,
- HttpCodes.TemporaryRedirect,
- HttpCodes.PermanentRedirect
-];
-const HttpResponseRetryCodes = [
- HttpCodes.BadGateway,
- HttpCodes.ServiceUnavailable,
- HttpCodes.GatewayTimeout
-];
-const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
-const ExponentialBackoffCeiling = 10;
-const ExponentialBackoffTimeSlice = 5;
-class HttpClientError extends Error {
- constructor(message, statusCode) {
- super(message);
- this.name = 'HttpClientError';
- this.statusCode = statusCode;
- Object.setPrototypeOf(this, HttpClientError.prototype);
- }
-}
-exports.HttpClientError = HttpClientError;
-class HttpClientResponse {
- constructor(message) {
- this.message = message;
- }
- readBody() {
- return new Promise(async (resolve, reject) => {
- let output = Buffer.alloc(0);
- this.message.on('data', (chunk) => {
- output = Buffer.concat([output, chunk]);
- });
- this.message.on('end', () => {
- resolve(output.toString());
- });
- });
- }
-}
-exports.HttpClientResponse = HttpClientResponse;
-function isHttps(requestUrl) {
- let parsedUrl = new URL(requestUrl);
- return parsedUrl.protocol === 'https:';
-}
-exports.isHttps = isHttps;
-class HttpClient {
- constructor(userAgent, handlers, requestOptions) {
- this._ignoreSslError = false;
- this._allowRedirects = true;
- this._allowRedirectDowngrade = false;
- this._maxRedirects = 50;
- this._allowRetries = false;
- this._maxRetries = 1;
- this._keepAlive = false;
- this._disposed = false;
- this.userAgent = userAgent;
- this.handlers = handlers || [];
- this.requestOptions = requestOptions;
- if (requestOptions) {
- if (requestOptions.ignoreSslError != null) {
- this._ignoreSslError = requestOptions.ignoreSslError;
- }
- this._socketTimeout = requestOptions.socketTimeout;
- if (requestOptions.allowRedirects != null) {
- this._allowRedirects = requestOptions.allowRedirects;
- }
- if (requestOptions.allowRedirectDowngrade != null) {
- this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
- }
- if (requestOptions.maxRedirects != null) {
- this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
- }
- if (requestOptions.keepAlive != null) {
- this._keepAlive = requestOptions.keepAlive;
- }
- if (requestOptions.allowRetries != null) {
- this._allowRetries = requestOptions.allowRetries;
- }
- if (requestOptions.maxRetries != null) {
- this._maxRetries = requestOptions.maxRetries;
- }
- }
- }
- options(requestUrl, additionalHeaders) {
- return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
- }
- get(requestUrl, additionalHeaders) {
- return this.request('GET', requestUrl, null, additionalHeaders || {});
- }
- del(requestUrl, additionalHeaders) {
- return this.request('DELETE', requestUrl, null, additionalHeaders || {});
- }
- post(requestUrl, data, additionalHeaders) {
- return this.request('POST', requestUrl, data, additionalHeaders || {});
- }
- patch(requestUrl, data, additionalHeaders) {
- return this.request('PATCH', requestUrl, data, additionalHeaders || {});
- }
- put(requestUrl, data, additionalHeaders) {
- return this.request('PUT', requestUrl, data, additionalHeaders || {});
- }
- head(requestUrl, additionalHeaders) {
- return this.request('HEAD', requestUrl, null, additionalHeaders || {});
- }
- sendStream(verb, requestUrl, stream, additionalHeaders) {
- return this.request(verb, requestUrl, stream, additionalHeaders);
- }
- /**
- * Gets a typed object from an endpoint
- * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
- */
- async getJson(requestUrl, additionalHeaders = {}) {
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- let res = await this.get(requestUrl, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- }
- async postJson(requestUrl, obj, additionalHeaders = {}) {
- let data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- let res = await this.post(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- }
- async putJson(requestUrl, obj, additionalHeaders = {}) {
- let data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- let res = await this.put(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- }
- async patchJson(requestUrl, obj, additionalHeaders = {}) {
- let data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- let res = await this.patch(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- }
- /**
- * Makes a raw http request.
- * All other methods such as get, post, patch, and request ultimately call this.
- * Prefer get, del, post and patch
- */
- async request(verb, requestUrl, data, headers) {
- if (this._disposed) {
- throw new Error('Client has already been disposed.');
- }
- let parsedUrl = new URL(requestUrl);
- let info = this._prepareRequest(verb, parsedUrl, headers);
- // Only perform retries on reads since writes may not be idempotent.
- let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
- ? this._maxRetries + 1
- : 1;
- let numTries = 0;
- let response;
- while (numTries < maxTries) {
- response = await this.requestRaw(info, data);
- // Check if it's an authentication challenge
- if (response &&
- response.message &&
- response.message.statusCode === HttpCodes.Unauthorized) {
- let authenticationHandler;
- for (let i = 0; i < this.handlers.length; i++) {
- if (this.handlers[i].canHandleAuthentication(response)) {
- authenticationHandler = this.handlers[i];
- break;
- }
- }
- if (authenticationHandler) {
- return authenticationHandler.handleAuthentication(this, info, data);
- }
- else {
- // We have received an unauthorized response but have no handlers to handle it.
- // Let the response return to the caller.
- return response;
- }
- }
- let redirectsRemaining = this._maxRedirects;
- while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
- this._allowRedirects &&
- redirectsRemaining > 0) {
- const redirectUrl = response.message.headers['location'];
- if (!redirectUrl) {
- // if there's no location to redirect to, we won't
- break;
- }
- let parsedRedirectUrl = new URL(redirectUrl);
- if (parsedUrl.protocol == 'https:' &&
- parsedUrl.protocol != parsedRedirectUrl.protocol &&
- !this._allowRedirectDowngrade) {
- throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
- }
- // we need to finish reading the response before reassigning response
- // which will leak the open socket.
- await response.readBody();
- // strip authorization header if redirected to a different hostname
- if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
- for (let header in headers) {
- // header names are case insensitive
- if (header.toLowerCase() === 'authorization') {
- delete headers[header];
- }
- }
- }
- // let's make the request with the new redirectUrl
- info = this._prepareRequest(verb, parsedRedirectUrl, headers);
- response = await this.requestRaw(info, data);
- redirectsRemaining--;
- }
- if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
- // If not a retry code, return immediately instead of retrying
- return response;
- }
- numTries += 1;
- if (numTries < maxTries) {
- await response.readBody();
- await this._performExponentialBackoff(numTries);
- }
- }
- return response;
- }
- /**
- * Needs to be called if keepAlive is set to true in request options.
- */
- dispose() {
- if (this._agent) {
- this._agent.destroy();
- }
- this._disposed = true;
- }
- /**
- * Raw request.
- * @param info
- * @param data
- */
- requestRaw(info, data) {
- return new Promise((resolve, reject) => {
- let callbackForResult = function (err, res) {
- if (err) {
- reject(err);
- }
- resolve(res);
- };
- this.requestRawWithCallback(info, data, callbackForResult);
- });
- }
- /**
- * Raw request with callback.
- * @param info
- * @param data
- * @param onResult
- */
- requestRawWithCallback(info, data, onResult) {
- let socket;
- if (typeof data === 'string') {
- info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
- }
- let callbackCalled = false;
- let handleResult = (err, res) => {
- if (!callbackCalled) {
- callbackCalled = true;
- onResult(err, res);
- }
- };
- let req = info.httpModule.request(info.options, (msg) => {
- let res = new HttpClientResponse(msg);
- handleResult(null, res);
- });
- req.on('socket', sock => {
- socket = sock;
- });
- // If we ever get disconnected, we want the socket to timeout eventually
- req.setTimeout(this._socketTimeout || 3 * 60000, () => {
- if (socket) {
- socket.end();
- }
- handleResult(new Error('Request timeout: ' + info.options.path), null);
- });
- req.on('error', function (err) {
- // err has statusCode property
- // res should have headers
- handleResult(err, null);
- });
- if (data && typeof data === 'string') {
- req.write(data, 'utf8');
- }
- if (data && typeof data !== 'string') {
- data.on('close', function () {
- req.end();
- });
- data.pipe(req);
- }
- else {
- req.end();
- }
- }
- /**
- * Gets an http agent. This function is useful when you need an http agent that handles
- * routing through a proxy server - depending upon the url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
- getAgent(serverUrl) {
- let parsedUrl = new URL(serverUrl);
- return this._getAgent(parsedUrl);
- }
- _prepareRequest(method, requestUrl, headers) {
- const info = {};
- info.parsedUrl = requestUrl;
- const usingSsl = info.parsedUrl.protocol === 'https:';
- info.httpModule = usingSsl ? https : http;
- const defaultPort = usingSsl ? 443 : 80;
- info.options = {};
- info.options.host = info.parsedUrl.hostname;
- info.options.port = info.parsedUrl.port
- ? parseInt(info.parsedUrl.port)
- : defaultPort;
- info.options.path =
- (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
- info.options.method = method;
- info.options.headers = this._mergeHeaders(headers);
- if (this.userAgent != null) {
- info.options.headers['user-agent'] = this.userAgent;
- }
- info.options.agent = this._getAgent(info.parsedUrl);
- // gives handlers an opportunity to participate
- if (this.handlers) {
- this.handlers.forEach(handler => {
- handler.prepareRequest(info.options);
- });
- }
- return info;
- }
- _mergeHeaders(headers) {
- const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
- if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
- }
- return lowercaseKeys(headers || {});
- }
- _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
- const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
- let clientHeader;
- if (this.requestOptions && this.requestOptions.headers) {
- clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
- }
- return additionalHeaders[header] || clientHeader || _default;
- }
- _getAgent(parsedUrl) {
- let agent;
- let proxyUrl = pm.getProxyUrl(parsedUrl);
- let useProxy = proxyUrl && proxyUrl.hostname;
- if (this._keepAlive && useProxy) {
- agent = this._proxyAgent;
- }
- if (this._keepAlive && !useProxy) {
- agent = this._agent;
- }
- // if agent is already assigned use that agent.
- if (!!agent) {
- return agent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- let maxSockets = 100;
- if (!!this.requestOptions) {
- maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
- }
- if (useProxy) {
- // If using proxy, need tunnel
- if (!tunnel) {
- tunnel = __nccwpck_require__(4294);
- }
- const agentOptions = {
- maxSockets: maxSockets,
- keepAlive: this._keepAlive,
- proxy: {
- ...((proxyUrl.username || proxyUrl.password) && {
- proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
- }),
- host: proxyUrl.hostname,
- port: proxyUrl.port
- }
- };
- let tunnelAgent;
- const overHttps = proxyUrl.protocol === 'https:';
- if (usingSsl) {
- tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
- }
- else {
- tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
- }
- agent = tunnelAgent(agentOptions);
- this._proxyAgent = agent;
- }
- // if reusing agent across request and tunneling agent isn't assigned create a new agent
- if (this._keepAlive && !agent) {
- const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };
- agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
- this._agent = agent;
- }
- // if not using private agent and tunnel agent isn't setup then use global agent
- if (!agent) {
- agent = usingSsl ? https.globalAgent : http.globalAgent;
- }
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- agent.options = Object.assign(agent.options || {}, {
- rejectUnauthorized: false
- });
- }
- return agent;
- }
- _performExponentialBackoff(retryNumber) {
- retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
- const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
- return new Promise(resolve => setTimeout(() => resolve(), ms));
- }
- static dateTimeDeserializer(key, value) {
- if (typeof value === 'string') {
- let a = new Date(value);
- if (!isNaN(a.valueOf())) {
- return a;
- }
- }
- return value;
- }
- async _processResponse(res, options) {
- return new Promise(async (resolve, reject) => {
- const statusCode = res.message.statusCode;
- const response = {
- statusCode: statusCode,
- result: null,
- headers: {}
- };
- // not found leads to null obj returned
- if (statusCode == HttpCodes.NotFound) {
- resolve(response);
- }
- let obj;
- let contents;
- // get the result from the body
- try {
- contents = await res.readBody();
- if (contents && contents.length > 0) {
- if (options && options.deserializeDates) {
- obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
- }
- else {
- obj = JSON.parse(contents);
- }
- response.result = obj;
- }
- response.headers = res.message.headers;
- }
- catch (err) {
- // Invalid resource (contents not json); leaving result obj null
- }
- // note that 3xx redirects are handled by the http layer.
- if (statusCode > 299) {
- let msg;
- // if exception/error in body, attempt to get better error
- if (obj && obj.message) {
- msg = obj.message;
- }
- else if (contents && contents.length > 0) {
- // it may be the case that the exception is in the body message as string
- msg = contents;
- }
- else {
- msg = 'Failed request: (' + statusCode + ')';
- }
- let err = new HttpClientError(msg, statusCode);
- err.result = response.result;
- reject(err);
- }
- else {
- resolve(response);
- }
- });
- }
-}
-exports.HttpClient = HttpClient;
-
-
-/***/ }),
-
-/***/ 6443:
-/***/ ((__unused_webpack_module, exports) => {
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-function getProxyUrl(reqUrl) {
- let usingSsl = reqUrl.protocol === 'https:';
- let proxyUrl;
- if (checkBypass(reqUrl)) {
- return proxyUrl;
- }
- let proxyVar;
- if (usingSsl) {
- proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
- }
- else {
- proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
- }
- if (proxyVar) {
- proxyUrl = new URL(proxyVar);
- }
- return proxyUrl;
-}
-exports.getProxyUrl = getProxyUrl;
-function checkBypass(reqUrl) {
- if (!reqUrl.hostname) {
- return false;
- }
- let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
- if (!noProxy) {
- return false;
- }
- // Determine the request port
- let reqPort;
- if (reqUrl.port) {
- reqPort = Number(reqUrl.port);
- }
- else if (reqUrl.protocol === 'http:') {
- reqPort = 80;
- }
- else if (reqUrl.protocol === 'https:') {
- reqPort = 443;
- }
- // Format the request hostname and hostname with port
- let upperReqHosts = [reqUrl.hostname.toUpperCase()];
- if (typeof reqPort === 'number') {
- upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
- }
- // Compare request host against noproxy
- for (let upperNoProxyItem of noProxy
- .split(',')
- .map(x => x.trim().toUpperCase())
- .filter(x => x)) {
- if (upperReqHosts.some(x => x === upperNoProxyItem)) {
- return true;
- }
- }
- return false;
-}
-exports.checkBypass = checkBypass;
-
-
-/***/ }),
-
-/***/ 6545:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-module.exports = __nccwpck_require__(2618);
-
-/***/ }),
-
-/***/ 8104:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var settle = __nccwpck_require__(3211);
-var buildFullPath = __nccwpck_require__(1934);
-var buildURL = __nccwpck_require__(646);
-var http = __nccwpck_require__(3685);
-var https = __nccwpck_require__(5687);
-var httpFollow = (__nccwpck_require__(7707).http);
-var httpsFollow = (__nccwpck_require__(7707).https);
-var url = __nccwpck_require__(7310);
-var zlib = __nccwpck_require__(9796);
-var pkg = __nccwpck_require__(8593);
-var createError = __nccwpck_require__(5226);
-var enhanceError = __nccwpck_require__(1516);
-
-var isHttps = /https:?/;
-
-/**
- *
- * @param {http.ClientRequestArgs} options
- * @param {AxiosProxyConfig} proxy
- * @param {string} location
- */
-function setProxy(options, proxy, location) {
- options.hostname = proxy.host;
- options.host = proxy.host;
- options.port = proxy.port;
- options.path = location;
-
- // Basic proxy authorization
- if (proxy.auth) {
- var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
- options.headers['Proxy-Authorization'] = 'Basic ' + base64;
- }
-
- // If a proxy is used, any redirects must also pass through the proxy
- options.beforeRedirect = function beforeRedirect(redirection) {
- redirection.headers.host = redirection.host;
- setProxy(redirection, proxy, redirection.href);
- };
-}
-
-/*eslint consistent-return:0*/
-module.exports = function httpAdapter(config) {
- return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
- var resolve = function resolve(value) {
- resolvePromise(value);
- };
- var reject = function reject(value) {
- rejectPromise(value);
- };
- var data = config.data;
- var headers = config.headers;
-
- // Set User-Agent (required by some servers)
- // See https://github.com/axios/axios/issues/69
- if ('User-Agent' in headers || 'user-agent' in headers) {
- // User-Agent is specified; handle case where no UA header is desired
- if (!headers['User-Agent'] && !headers['user-agent']) {
- delete headers['User-Agent'];
- delete headers['user-agent'];
- }
- // Otherwise, use specified value
- } else {
- // Only set header if it hasn't been set in config
- headers['User-Agent'] = 'axios/' + pkg.version;
- }
-
- if (data && !utils.isStream(data)) {
- if (Buffer.isBuffer(data)) {
- // Nothing to do...
- } else if (utils.isArrayBuffer(data)) {
- data = Buffer.from(new Uint8Array(data));
- } else if (utils.isString(data)) {
- data = Buffer.from(data, 'utf-8');
- } else {
- return reject(createError(
- 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
- config
- ));
- }
-
- // Add Content-Length header if data exists
- headers['Content-Length'] = data.length;
- }
-
- // HTTP basic authentication
- var auth = undefined;
- if (config.auth) {
- var username = config.auth.username || '';
- var password = config.auth.password || '';
- auth = username + ':' + password;
- }
-
- // Parse url
- var fullPath = buildFullPath(config.baseURL, config.url);
- var parsed = url.parse(fullPath);
- var protocol = parsed.protocol || 'http:';
-
- if (!auth && parsed.auth) {
- var urlAuth = parsed.auth.split(':');
- var urlUsername = urlAuth[0] || '';
- var urlPassword = urlAuth[1] || '';
- auth = urlUsername + ':' + urlPassword;
- }
-
- if (auth) {
- delete headers.Authorization;
- }
-
- var isHttpsRequest = isHttps.test(protocol);
- var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
-
- var options = {
- path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
- method: config.method.toUpperCase(),
- headers: headers,
- agent: agent,
- agents: { http: config.httpAgent, https: config.httpsAgent },
- auth: auth
- };
-
- if (config.socketPath) {
- options.socketPath = config.socketPath;
- } else {
- options.hostname = parsed.hostname;
- options.port = parsed.port;
- }
-
- var proxy = config.proxy;
- if (!proxy && proxy !== false) {
- var proxyEnv = protocol.slice(0, -1) + '_proxy';
- var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
- if (proxyUrl) {
- var parsedProxyUrl = url.parse(proxyUrl);
- var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
- var shouldProxy = true;
-
- if (noProxyEnv) {
- var noProxy = noProxyEnv.split(',').map(function trim(s) {
- return s.trim();
- });
-
- shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
- if (!proxyElement) {
- return false;
- }
- if (proxyElement === '*') {
- return true;
- }
- if (proxyElement[0] === '.' &&
- parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
- return true;
- }
-
- return parsed.hostname === proxyElement;
- });
- }
-
- if (shouldProxy) {
- proxy = {
- host: parsedProxyUrl.hostname,
- port: parsedProxyUrl.port,
- protocol: parsedProxyUrl.protocol
- };
-
- if (parsedProxyUrl.auth) {
- var proxyUrlAuth = parsedProxyUrl.auth.split(':');
- proxy.auth = {
- username: proxyUrlAuth[0],
- password: proxyUrlAuth[1]
- };
- }
- }
- }
- }
-
- if (proxy) {
- options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
- setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
- }
-
- var transport;
- var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
- if (config.transport) {
- transport = config.transport;
- } else if (config.maxRedirects === 0) {
- transport = isHttpsProxy ? https : http;
- } else {
- if (config.maxRedirects) {
- options.maxRedirects = config.maxRedirects;
- }
- transport = isHttpsProxy ? httpsFollow : httpFollow;
- }
-
- if (config.maxBodyLength > -1) {
- options.maxBodyLength = config.maxBodyLength;
- }
-
- // Create the request
- var req = transport.request(options, function handleResponse(res) {
- if (req.aborted) return;
-
- // uncompress the response body transparently if required
- var stream = res;
-
- // return the last request in case of redirects
- var lastRequest = res.req || req;
-
-
- // if no content, is HEAD request or decompress disabled we should not decompress
- if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
- switch (res.headers['content-encoding']) {
- /*eslint default-case:0*/
- case 'gzip':
- case 'compress':
- case 'deflate':
- // add the unzipper to the body stream processing pipeline
- stream = stream.pipe(zlib.createUnzip());
-
- // remove the content-encoding in order to not confuse downstream operations
- delete res.headers['content-encoding'];
- break;
- }
- }
-
- var response = {
- status: res.statusCode,
- statusText: res.statusMessage,
- headers: res.headers,
- config: config,
- request: lastRequest
- };
-
- if (config.responseType === 'stream') {
- response.data = stream;
- settle(resolve, reject, response);
- } else {
- var responseBuffer = [];
- var totalResponseBytes = 0;
- stream.on('data', function handleStreamData(chunk) {
- responseBuffer.push(chunk);
- totalResponseBytes += chunk.length;
-
- // make sure the content length is not over the maxContentLength if specified
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
- stream.destroy();
- reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
- config, null, lastRequest));
- }
- });
-
- stream.on('error', function handleStreamError(err) {
- if (req.aborted) return;
- reject(enhanceError(err, config, null, lastRequest));
- });
-
- stream.on('end', function handleStreamEnd() {
- var responseData = Buffer.concat(responseBuffer);
- if (config.responseType !== 'arraybuffer') {
- responseData = responseData.toString(config.responseEncoding);
- if (!config.responseEncoding || config.responseEncoding === 'utf8') {
- responseData = utils.stripBOM(responseData);
- }
- }
-
- response.data = responseData;
- settle(resolve, reject, response);
- });
- }
- });
-
- // Handle errors
- req.on('error', function handleRequestError(err) {
- if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
- reject(enhanceError(err, config, null, req));
- });
-
- // Handle request timeout
- if (config.timeout) {
- // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
- var timeout = parseInt(config.timeout, 10);
-
- if (isNaN(timeout)) {
- reject(createError(
- 'error trying to parse `config.timeout` to int',
- config,
- 'ERR_PARSE_TIMEOUT',
- req
- ));
-
- return;
- }
-
- // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
- // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
- // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
- // And then these socket which be hang up will devoring CPU little by little.
- // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
- req.setTimeout(timeout, function handleRequestTimeout() {
- req.abort();
- reject(createError(
- 'timeout of ' + timeout + 'ms exceeded',
- config,
- config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
- req
- ));
- });
- }
-
- if (config.cancelToken) {
- // Handle cancellation
- config.cancelToken.promise.then(function onCanceled(cancel) {
- if (req.aborted) return;
-
- req.abort();
- reject(cancel);
- });
- }
-
- // Send the request
- if (utils.isStream(data)) {
- data.on('error', function handleStreamError(err) {
- reject(enhanceError(err, config, null, req));
- }).pipe(req);
- } else {
- req.end(data);
- }
- });
-};
-
-
-/***/ }),
-
-/***/ 3454:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var settle = __nccwpck_require__(3211);
-var cookies = __nccwpck_require__(1545);
-var buildURL = __nccwpck_require__(646);
-var buildFullPath = __nccwpck_require__(1934);
-var parseHeaders = __nccwpck_require__(6455);
-var isURLSameOrigin = __nccwpck_require__(3608);
-var createError = __nccwpck_require__(5226);
-
-module.exports = function xhrAdapter(config) {
- return new Promise(function dispatchXhrRequest(resolve, reject) {
- var requestData = config.data;
- var requestHeaders = config.headers;
- var responseType = config.responseType;
-
- if (utils.isFormData(requestData)) {
- delete requestHeaders['Content-Type']; // Let the browser set it
- }
-
- var request = new XMLHttpRequest();
-
- // HTTP basic authentication
- if (config.auth) {
- var username = config.auth.username || '';
- var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
- requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
- }
-
- var fullPath = buildFullPath(config.baseURL, config.url);
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
-
- // Set the request timeout in MS
- request.timeout = config.timeout;
-
- function onloadend() {
- if (!request) {
- return;
- }
- // Prepare the response
- var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
- var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
- request.responseText : request.response;
- var response = {
- data: responseData,
- status: request.status,
- statusText: request.statusText,
- headers: responseHeaders,
- config: config,
- request: request
- };
-
- settle(resolve, reject, response);
-
- // Clean up request
- request = null;
- }
-
- if ('onloadend' in request) {
- // Use onloadend if available
- request.onloadend = onloadend;
- } else {
- // Listen for ready state to emulate onloadend
- request.onreadystatechange = function handleLoad() {
- if (!request || request.readyState !== 4) {
- return;
- }
-
- // The request errored out and we didn't get a response, this will be
- // handled by onerror instead
- // With one exception: request that using file: protocol, most browsers
- // will return status as 0 even though it's a successful request
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
- return;
- }
- // readystate handler is calling before onerror or ontimeout handlers,
- // so we should call onloadend on the next 'tick'
- setTimeout(onloadend);
- };
- }
-
- // Handle browser request cancellation (as opposed to a manual cancellation)
- request.onabort = function handleAbort() {
- if (!request) {
- return;
- }
-
- reject(createError('Request aborted', config, 'ECONNABORTED', request));
-
- // Clean up request
- request = null;
- };
-
- // Handle low level network errors
- request.onerror = function handleError() {
- // Real errors are hidden from us by the browser
- // onerror should only fire if it's a network error
- reject(createError('Network Error', config, null, request));
-
- // Clean up request
- request = null;
- };
-
- // Handle timeout
- request.ontimeout = function handleTimeout() {
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
- if (config.timeoutErrorMessage) {
- timeoutErrorMessage = config.timeoutErrorMessage;
- }
- reject(createError(
- timeoutErrorMessage,
- config,
- config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
- request));
-
- // Clean up request
- request = null;
- };
-
- // Add xsrf header
- // This is only done if running in a standard browser environment.
- // Specifically not if we're in a web worker, or react-native.
- if (utils.isStandardBrowserEnv()) {
- // Add xsrf header
- var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
- cookies.read(config.xsrfCookieName) :
- undefined;
-
- if (xsrfValue) {
- requestHeaders[config.xsrfHeaderName] = xsrfValue;
- }
- }
-
- // Add headers to the request
- if ('setRequestHeader' in request) {
- utils.forEach(requestHeaders, function setRequestHeader(val, key) {
- if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
- // Remove Content-Type if data is undefined
- delete requestHeaders[key];
- } else {
- // Otherwise add header to the request
- request.setRequestHeader(key, val);
- }
- });
- }
-
- // Add withCredentials to request if needed
- if (!utils.isUndefined(config.withCredentials)) {
- request.withCredentials = !!config.withCredentials;
- }
-
- // Add responseType to request if needed
- if (responseType && responseType !== 'json') {
- request.responseType = config.responseType;
- }
-
- // Handle progress if needed
- if (typeof config.onDownloadProgress === 'function') {
- request.addEventListener('progress', config.onDownloadProgress);
- }
-
- // Not all browsers support upload events
- if (typeof config.onUploadProgress === 'function' && request.upload) {
- request.upload.addEventListener('progress', config.onUploadProgress);
- }
-
- if (config.cancelToken) {
- // Handle cancellation
- config.cancelToken.promise.then(function onCanceled(cancel) {
- if (!request) {
- return;
- }
-
- request.abort();
- reject(cancel);
- // Clean up request
- request = null;
- });
- }
-
- if (!requestData) {
- requestData = null;
- }
-
- // Send the request
- request.send(requestData);
- });
-};
-
-
-/***/ }),
-
-/***/ 2618:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var bind = __nccwpck_require__(7065);
-var Axios = __nccwpck_require__(8178);
-var mergeConfig = __nccwpck_require__(4831);
-var defaults = __nccwpck_require__(8190);
-
-/**
- * Create an instance of Axios
- *
- * @param {Object} defaultConfig The default config for the instance
- * @return {Axios} A new instance of Axios
- */
-function createInstance(defaultConfig) {
- var context = new Axios(defaultConfig);
- var instance = bind(Axios.prototype.request, context);
-
- // Copy axios.prototype to instance
- utils.extend(instance, Axios.prototype, context);
-
- // Copy context to instance
- utils.extend(instance, context);
-
- return instance;
-}
-
-// Create the default instance to be exported
-var axios = createInstance(defaults);
-
-// Expose Axios class to allow class inheritance
-axios.Axios = Axios;
-
-// Factory for creating new instances
-axios.create = function create(instanceConfig) {
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
-};
-
-// Expose Cancel & CancelToken
-axios.Cancel = __nccwpck_require__(8875);
-axios.CancelToken = __nccwpck_require__(1587);
-axios.isCancel = __nccwpck_require__(4057);
-
-// Expose all/spread
-axios.all = function all(promises) {
- return Promise.all(promises);
-};
-axios.spread = __nccwpck_require__(4850);
-
-// Expose isAxiosError
-axios.isAxiosError = __nccwpck_require__(650);
-
-module.exports = axios;
-
-// Allow use of default import syntax in TypeScript
-module.exports["default"] = axios;
-
-
-/***/ }),
-
-/***/ 8875:
-/***/ ((module) => {
-
-
-
-/**
- * A `Cancel` is an object that is thrown when an operation is canceled.
- *
- * @class
- * @param {string=} message The message.
- */
-function Cancel(message) {
- this.message = message;
-}
-
-Cancel.prototype.toString = function toString() {
- return 'Cancel' + (this.message ? ': ' + this.message : '');
-};
-
-Cancel.prototype.__CANCEL__ = true;
-
-module.exports = Cancel;
-
-
-/***/ }),
-
-/***/ 1587:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var Cancel = __nccwpck_require__(8875);
-
-/**
- * A `CancelToken` is an object that can be used to request cancellation of an operation.
- *
- * @class
- * @param {Function} executor The executor function.
- */
-function CancelToken(executor) {
- if (typeof executor !== 'function') {
- throw new TypeError('executor must be a function.');
- }
-
- var resolvePromise;
- this.promise = new Promise(function promiseExecutor(resolve) {
- resolvePromise = resolve;
- });
-
- var token = this;
- executor(function cancel(message) {
- if (token.reason) {
- // Cancellation has already been requested
- return;
- }
-
- token.reason = new Cancel(message);
- resolvePromise(token.reason);
- });
-}
-
-/**
- * Throws a `Cancel` if cancellation has been requested.
- */
-CancelToken.prototype.throwIfRequested = function throwIfRequested() {
- if (this.reason) {
- throw this.reason;
- }
-};
-
-/**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
-CancelToken.source = function source() {
- var cancel;
- var token = new CancelToken(function executor(c) {
- cancel = c;
- });
- return {
- token: token,
- cancel: cancel
- };
-};
-
-module.exports = CancelToken;
-
-
-/***/ }),
-
-/***/ 4057:
-/***/ ((module) => {
-
-
-
-module.exports = function isCancel(value) {
- return !!(value && value.__CANCEL__);
-};
-
-
-/***/ }),
-
-/***/ 8178:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var buildURL = __nccwpck_require__(646);
-var InterceptorManager = __nccwpck_require__(3214);
-var dispatchRequest = __nccwpck_require__(5062);
-var mergeConfig = __nccwpck_require__(4831);
-var validator = __nccwpck_require__(1632);
-
-var validators = validator.validators;
-/**
- * Create a new instance of Axios
- *
- * @param {Object} instanceConfig The default config for the instance
- */
-function Axios(instanceConfig) {
- this.defaults = instanceConfig;
- this.interceptors = {
- request: new InterceptorManager(),
- response: new InterceptorManager()
- };
-}
-
-/**
- * Dispatch a request
- *
- * @param {Object} config The config specific for this request (merged with this.defaults)
- */
-Axios.prototype.request = function request(config) {
- /*eslint no-param-reassign:0*/
- // Allow for axios('example/url'[, config]) a la fetch API
- if (typeof config === 'string') {
- config = arguments[1] || {};
- config.url = arguments[0];
- } else {
- config = config || {};
- }
-
- config = mergeConfig(this.defaults, config);
-
- // Set config.method
- if (config.method) {
- config.method = config.method.toLowerCase();
- } else if (this.defaults.method) {
- config.method = this.defaults.method.toLowerCase();
- } else {
- config.method = 'get';
- }
-
- var transitional = config.transitional;
-
- if (transitional !== undefined) {
- validator.assertOptions(transitional, {
- silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
- forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
- clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
- }, false);
- }
-
- // filter out skipped interceptors
- var requestInterceptorChain = [];
- var synchronousRequestInterceptors = true;
- this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
- if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
- return;
- }
-
- synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
-
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
- });
-
- var responseInterceptorChain = [];
- this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
- responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
- });
-
- var promise;
-
- if (!synchronousRequestInterceptors) {
- var chain = [dispatchRequest, undefined];
-
- Array.prototype.unshift.apply(chain, requestInterceptorChain);
- chain = chain.concat(responseInterceptorChain);
-
- promise = Promise.resolve(config);
- while (chain.length) {
- promise = promise.then(chain.shift(), chain.shift());
- }
-
- return promise;
- }
-
-
- var newConfig = config;
- while (requestInterceptorChain.length) {
- var onFulfilled = requestInterceptorChain.shift();
- var onRejected = requestInterceptorChain.shift();
- try {
- newConfig = onFulfilled(newConfig);
- } catch (error) {
- onRejected(error);
- break;
- }
- }
-
- try {
- promise = dispatchRequest(newConfig);
- } catch (error) {
- return Promise.reject(error);
- }
-
- while (responseInterceptorChain.length) {
- promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
- }
-
- return promise;
-};
-
-Axios.prototype.getUri = function getUri(config) {
- config = mergeConfig(this.defaults, config);
- return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
-};
-
-// Provide aliases for supported request methods
-utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
- /*eslint func-names:0*/
- Axios.prototype[method] = function(url, config) {
- return this.request(mergeConfig(config || {}, {
- method: method,
- url: url,
- data: (config || {}).data
- }));
- };
-});
-
-utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
- /*eslint func-names:0*/
- Axios.prototype[method] = function(url, data, config) {
- return this.request(mergeConfig(config || {}, {
- method: method,
- url: url,
- data: data
- }));
- };
-});
-
-module.exports = Axios;
-
-
-/***/ }),
-
-/***/ 3214:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-function InterceptorManager() {
- this.handlers = [];
-}
-
-/**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
-InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
- this.handlers.push({
- fulfilled: fulfilled,
- rejected: rejected,
- synchronous: options ? options.synchronous : false,
- runWhen: options ? options.runWhen : null
- });
- return this.handlers.length - 1;
-};
-
-/**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- */
-InterceptorManager.prototype.eject = function eject(id) {
- if (this.handlers[id]) {
- this.handlers[id] = null;
- }
-};
-
-/**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- */
-InterceptorManager.prototype.forEach = function forEach(fn) {
- utils.forEach(this.handlers, function forEachHandler(h) {
- if (h !== null) {
- fn(h);
- }
- });
-};
-
-module.exports = InterceptorManager;
-
-
-/***/ }),
-
-/***/ 1934:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var isAbsoluteURL = __nccwpck_require__(1301);
-var combineURLs = __nccwpck_require__(7189);
-
-/**
- * Creates a new URL by combining the baseURL with the requestedURL,
- * only when the requestedURL is not already an absolute URL.
- * If the requestURL is absolute, this function returns the requestedURL untouched.
- *
- * @param {string} baseURL The base URL
- * @param {string} requestedURL Absolute or relative URL to combine
- * @returns {string} The combined full path
- */
-module.exports = function buildFullPath(baseURL, requestedURL) {
- if (baseURL && !isAbsoluteURL(requestedURL)) {
- return combineURLs(baseURL, requestedURL);
- }
- return requestedURL;
-};
-
-
-/***/ }),
-
-/***/ 5226:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var enhanceError = __nccwpck_require__(1516);
-
-/**
- * Create an Error with the specified message, config, error code, request and response.
- *
- * @param {string} message The error message.
- * @param {Object} config The config.
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
- * @param {Object} [request] The request.
- * @param {Object} [response] The response.
- * @returns {Error} The created error.
- */
-module.exports = function createError(message, config, code, request, response) {
- var error = new Error(message);
- return enhanceError(error, config, code, request, response);
-};
-
-
-/***/ }),
-
-/***/ 5062:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var transformData = __nccwpck_require__(9812);
-var isCancel = __nccwpck_require__(4057);
-var defaults = __nccwpck_require__(8190);
-
-/**
- * Throws a `Cancel` if cancellation has been requested.
- */
-function throwIfCancellationRequested(config) {
- if (config.cancelToken) {
- config.cancelToken.throwIfRequested();
- }
-}
-
-/**
- * Dispatch a request to the server using the configured adapter.
- *
- * @param {object} config The config that is to be used for the request
- * @returns {Promise} The Promise to be fulfilled
- */
-module.exports = function dispatchRequest(config) {
- throwIfCancellationRequested(config);
-
- // Ensure headers exist
- config.headers = config.headers || {};
-
- // Transform request data
- config.data = transformData.call(
- config,
- config.data,
- config.headers,
- config.transformRequest
- );
-
- // Flatten headers
- config.headers = utils.merge(
- config.headers.common || {},
- config.headers[config.method] || {},
- config.headers
- );
-
- utils.forEach(
- ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
- function cleanHeaderConfig(method) {
- delete config.headers[method];
- }
- );
-
- var adapter = config.adapter || defaults.adapter;
-
- return adapter(config).then(function onAdapterResolution(response) {
- throwIfCancellationRequested(config);
-
- // Transform response data
- response.data = transformData.call(
- config,
- response.data,
- response.headers,
- config.transformResponse
- );
-
- return response;
- }, function onAdapterRejection(reason) {
- if (!isCancel(reason)) {
- throwIfCancellationRequested(config);
-
- // Transform response data
- if (reason && reason.response) {
- reason.response.data = transformData.call(
- config,
- reason.response.data,
- reason.response.headers,
- config.transformResponse
- );
- }
- }
-
- return Promise.reject(reason);
- });
-};
-
-
-/***/ }),
-
-/***/ 1516:
-/***/ ((module) => {
-
-
-
-/**
- * Update an Error with the specified config, error code, and response.
- *
- * @param {Error} error The error to update.
- * @param {Object} config The config.
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
- * @param {Object} [request] The request.
- * @param {Object} [response] The response.
- * @returns {Error} The error.
- */
-module.exports = function enhanceError(error, config, code, request, response) {
- error.config = config;
- if (code) {
- error.code = code;
- }
-
- error.request = request;
- error.response = response;
- error.isAxiosError = true;
-
- error.toJSON = function toJSON() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: this.config,
- code: this.code
- };
- };
- return error;
-};
-
-
-/***/ }),
-
-/***/ 4831:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-/**
- * Config-specific merge-function which creates a new config-object
- * by merging two configuration objects together.
- *
- * @param {Object} config1
- * @param {Object} config2
- * @returns {Object} New object resulting from merging config2 to config1
- */
-module.exports = function mergeConfig(config1, config2) {
- // eslint-disable-next-line no-param-reassign
- config2 = config2 || {};
- var config = {};
-
- var valueFromConfig2Keys = ['url', 'method', 'data'];
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
- var defaultToConfig2Keys = [
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
- 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
- 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
- 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
- ];
- var directMergeKeys = ['validateStatus'];
-
- function getMergedValue(target, source) {
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
- return utils.merge(target, source);
- } else if (utils.isPlainObject(source)) {
- return utils.merge({}, source);
- } else if (utils.isArray(source)) {
- return source.slice();
- }
- return source;
- }
-
- function mergeDeepProperties(prop) {
- if (!utils.isUndefined(config2[prop])) {
- config[prop] = getMergedValue(config1[prop], config2[prop]);
- } else if (!utils.isUndefined(config1[prop])) {
- config[prop] = getMergedValue(undefined, config1[prop]);
- }
- }
-
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
- if (!utils.isUndefined(config2[prop])) {
- config[prop] = getMergedValue(undefined, config2[prop]);
- }
- });
-
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
-
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
- if (!utils.isUndefined(config2[prop])) {
- config[prop] = getMergedValue(undefined, config2[prop]);
- } else if (!utils.isUndefined(config1[prop])) {
- config[prop] = getMergedValue(undefined, config1[prop]);
- }
- });
-
- utils.forEach(directMergeKeys, function merge(prop) {
- if (prop in config2) {
- config[prop] = getMergedValue(config1[prop], config2[prop]);
- } else if (prop in config1) {
- config[prop] = getMergedValue(undefined, config1[prop]);
- }
- });
-
- var axiosKeys = valueFromConfig2Keys
- .concat(mergeDeepPropertiesKeys)
- .concat(defaultToConfig2Keys)
- .concat(directMergeKeys);
-
- var otherKeys = Object
- .keys(config1)
- .concat(Object.keys(config2))
- .filter(function filterAxiosKeys(key) {
- return axiosKeys.indexOf(key) === -1;
- });
-
- utils.forEach(otherKeys, mergeDeepProperties);
-
- return config;
-};
-
-
-/***/ }),
-
-/***/ 3211:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var createError = __nccwpck_require__(5226);
-
-/**
- * Resolve or reject a Promise based on response status.
- *
- * @param {Function} resolve A function that resolves the promise.
- * @param {Function} reject A function that rejects the promise.
- * @param {object} response The response.
- */
-module.exports = function settle(resolve, reject, response) {
- var validateStatus = response.config.validateStatus;
- if (!response.status || !validateStatus || validateStatus(response.status)) {
- resolve(response);
- } else {
- reject(createError(
- 'Request failed with status code ' + response.status,
- response.config,
- null,
- response.request,
- response
- ));
- }
-};
-
-
-/***/ }),
-
-/***/ 9812:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var defaults = __nccwpck_require__(8190);
-
-/**
- * Transform the data for a request or a response
- *
- * @param {Object|String} data The data to be transformed
- * @param {Array} headers The headers for the request or response
- * @param {Array|Function} fns A single function or Array of functions
- * @returns {*} The resulting transformed data
- */
-module.exports = function transformData(data, headers, fns) {
- var context = this || defaults;
- /*eslint no-param-reassign:0*/
- utils.forEach(fns, function transform(fn) {
- data = fn.call(context, data, headers);
- });
-
- return data;
-};
-
-
-/***/ }),
-
-/***/ 8190:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-var normalizeHeaderName = __nccwpck_require__(6240);
-var enhanceError = __nccwpck_require__(1516);
-
-var DEFAULT_CONTENT_TYPE = {
- 'Content-Type': 'application/x-www-form-urlencoded'
-};
-
-function setContentTypeIfUnset(headers, value) {
- if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
- headers['Content-Type'] = value;
- }
-}
-
-function getDefaultAdapter() {
- var adapter;
- if (typeof XMLHttpRequest !== 'undefined') {
- // For browsers use XHR adapter
- adapter = __nccwpck_require__(3454);
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
- // For node use HTTP adapter
- adapter = __nccwpck_require__(8104);
- }
- return adapter;
-}
-
-function stringifySafely(rawValue, parser, encoder) {
- if (utils.isString(rawValue)) {
- try {
- (parser || JSON.parse)(rawValue);
- return utils.trim(rawValue);
- } catch (e) {
- if (e.name !== 'SyntaxError') {
- throw e;
- }
- }
- }
-
- return (encoder || JSON.stringify)(rawValue);
-}
-
-var defaults = {
-
- transitional: {
- silentJSONParsing: true,
- forcedJSONParsing: true,
- clarifyTimeoutError: false
- },
-
- adapter: getDefaultAdapter(),
-
- transformRequest: [function transformRequest(data, headers) {
- normalizeHeaderName(headers, 'Accept');
- normalizeHeaderName(headers, 'Content-Type');
-
- if (utils.isFormData(data) ||
- utils.isArrayBuffer(data) ||
- utils.isBuffer(data) ||
- utils.isStream(data) ||
- utils.isFile(data) ||
- utils.isBlob(data)
- ) {
- return data;
- }
- if (utils.isArrayBufferView(data)) {
- return data.buffer;
- }
- if (utils.isURLSearchParams(data)) {
- setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
- return data.toString();
- }
- if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
- setContentTypeIfUnset(headers, 'application/json');
- return stringifySafely(data);
- }
- return data;
- }],
-
- transformResponse: [function transformResponse(data) {
- var transitional = this.transitional;
- var silentJSONParsing = transitional && transitional.silentJSONParsing;
- var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
- var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
-
- if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
- try {
- return JSON.parse(data);
- } catch (e) {
- if (strictJSONParsing) {
- if (e.name === 'SyntaxError') {
- throw enhanceError(e, this, 'E_JSON_PARSE');
- }
- throw e;
- }
- }
- }
-
- return data;
- }],
-
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
-
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
-
- maxContentLength: -1,
- maxBodyLength: -1,
-
- validateStatus: function validateStatus(status) {
- return status >= 200 && status < 300;
- }
-};
-
-defaults.headers = {
- common: {
- 'Accept': 'application/json, text/plain, */*'
- }
-};
-
-utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
- defaults.headers[method] = {};
-});
-
-utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
-});
-
-module.exports = defaults;
-
-
-/***/ }),
-
-/***/ 7065:
-/***/ ((module) => {
-
-
-
-module.exports = function bind(fn, thisArg) {
- return function wrap() {
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
- return fn.apply(thisArg, args);
- };
-};
-
-
-/***/ }),
-
-/***/ 646:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-function encode(val) {
- return encodeURIComponent(val).
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%20/g, '+').
- replace(/%5B/gi, '[').
- replace(/%5D/gi, ']');
-}
-
-/**
- * Build a URL by appending params to the end
- *
- * @param {string} url The base of the url (e.g., http://www.google.com)
- * @param {object} [params] The params to be appended
- * @returns {string} The formatted url
- */
-module.exports = function buildURL(url, params, paramsSerializer) {
- /*eslint no-param-reassign:0*/
- if (!params) {
- return url;
- }
-
- var serializedParams;
- if (paramsSerializer) {
- serializedParams = paramsSerializer(params);
- } else if (utils.isURLSearchParams(params)) {
- serializedParams = params.toString();
- } else {
- var parts = [];
-
- utils.forEach(params, function serialize(val, key) {
- if (val === null || typeof val === 'undefined') {
- return;
- }
-
- if (utils.isArray(val)) {
- key = key + '[]';
- } else {
- val = [val];
- }
-
- utils.forEach(val, function parseValue(v) {
- if (utils.isDate(v)) {
- v = v.toISOString();
- } else if (utils.isObject(v)) {
- v = JSON.stringify(v);
- }
- parts.push(encode(key) + '=' + encode(v));
- });
- });
-
- serializedParams = parts.join('&');
- }
-
- if (serializedParams) {
- var hashmarkIndex = url.indexOf('#');
- if (hashmarkIndex !== -1) {
- url = url.slice(0, hashmarkIndex);
- }
-
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
- }
-
- return url;
-};
-
-
-/***/ }),
-
-/***/ 7189:
-/***/ ((module) => {
-
-
-
-/**
- * Creates a new URL by combining the specified URLs
- *
- * @param {string} baseURL The base URL
- * @param {string} relativeURL The relative URL
- * @returns {string} The combined URL
- */
-module.exports = function combineURLs(baseURL, relativeURL) {
- return relativeURL
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
- : baseURL;
-};
-
-
-/***/ }),
-
-/***/ 1545:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-module.exports = (
- utils.isStandardBrowserEnv() ?
-
- // Standard browser envs support document.cookie
- (function standardBrowserEnv() {
- return {
- write: function write(name, value, expires, path, domain, secure) {
- var cookie = [];
- cookie.push(name + '=' + encodeURIComponent(value));
-
- if (utils.isNumber(expires)) {
- cookie.push('expires=' + new Date(expires).toGMTString());
- }
-
- if (utils.isString(path)) {
- cookie.push('path=' + path);
- }
-
- if (utils.isString(domain)) {
- cookie.push('domain=' + domain);
- }
-
- if (secure === true) {
- cookie.push('secure');
- }
-
- document.cookie = cookie.join('; ');
- },
-
- read: function read(name) {
- var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
- return (match ? decodeURIComponent(match[3]) : null);
- },
-
- remove: function remove(name) {
- this.write(name, '', Date.now() - 86400000);
- }
- };
- })() :
-
- // Non standard browser env (web workers, react-native) lack needed support.
- (function nonStandardBrowserEnv() {
- return {
- write: function write() {},
- read: function read() { return null; },
- remove: function remove() {}
- };
- })()
-);
-
-
-/***/ }),
-
-/***/ 1301:
-/***/ ((module) => {
-
-
-
-/**
- * Determines whether the specified URL is absolute
- *
- * @param {string} url The URL to test
- * @returns {boolean} True if the specified URL is absolute, otherwise false
- */
-module.exports = function isAbsoluteURL(url) {
- // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
- // by any combination of letters, digits, plus, period, or hyphen.
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
-};
-
-
-/***/ }),
-
-/***/ 650:
-/***/ ((module) => {
-
-
-
-/**
- * Determines whether the payload is an error thrown by Axios
- *
- * @param {*} payload The value to test
- * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
- */
-module.exports = function isAxiosError(payload) {
- return (typeof payload === 'object') && (payload.isAxiosError === true);
-};
-
-
-/***/ }),
-
-/***/ 3608:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-module.exports = (
- utils.isStandardBrowserEnv() ?
-
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- (function standardBrowserEnv() {
- var msie = /(msie|trident)/i.test(navigator.userAgent);
- var urlParsingNode = document.createElement('a');
- var originURL;
-
- /**
- * Parse a URL to discover it's components
- *
- * @param {String} url The URL to be parsed
- * @returns {Object}
- */
- function resolveURL(url) {
- var href = url;
-
- if (msie) {
- // IE needs attribute set twice to normalize properties
- urlParsingNode.setAttribute('href', href);
- href = urlParsingNode.href;
- }
-
- urlParsingNode.setAttribute('href', href);
-
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
- urlParsingNode.pathname :
- '/' + urlParsingNode.pathname
- };
- }
-
- originURL = resolveURL(window.location.href);
-
- /**
- * Determine if a URL shares the same origin as the current location
- *
- * @param {String} requestURL The URL to test
- * @returns {boolean} True if URL shares the same origin, otherwise false
- */
- return function isURLSameOrigin(requestURL) {
- var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
- return (parsed.protocol === originURL.protocol &&
- parsed.host === originURL.host);
- };
- })() :
-
- // Non standard browser envs (web workers, react-native) lack needed support.
- (function nonStandardBrowserEnv() {
- return function isURLSameOrigin() {
- return true;
- };
- })()
-);
-
-
-/***/ }),
-
-/***/ 6240:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-module.exports = function normalizeHeaderName(headers, normalizedName) {
- utils.forEach(headers, function processHeader(value, name) {
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
- headers[normalizedName] = value;
- delete headers[name];
- }
- });
-};
-
-
-/***/ }),
-
-/***/ 6455:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var utils = __nccwpck_require__(328);
-
-// Headers whose duplicates are ignored by node
-// c.f. https://nodejs.org/api/http.html#http_message_headers
-var ignoreDuplicateOf = [
- 'age', 'authorization', 'content-length', 'content-type', 'etag',
- 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
- 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
- 'referer', 'retry-after', 'user-agent'
-];
-
-/**
- * Parse headers into an object
- *
- * ```
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
- * Content-Type: application/json
- * Connection: keep-alive
- * Transfer-Encoding: chunked
- * ```
- *
- * @param {String} headers Headers needing to be parsed
- * @returns {Object} Headers parsed into an object
- */
-module.exports = function parseHeaders(headers) {
- var parsed = {};
- var key;
- var val;
- var i;
-
- if (!headers) { return parsed; }
-
- utils.forEach(headers.split('\n'), function parser(line) {
- i = line.indexOf(':');
- key = utils.trim(line.substr(0, i)).toLowerCase();
- val = utils.trim(line.substr(i + 1));
-
- if (key) {
- if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
- return;
- }
- if (key === 'set-cookie') {
- parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
- } else {
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
- }
- }
- });
-
- return parsed;
-};
-
-
-/***/ }),
-
-/***/ 4850:
-/***/ ((module) => {
-
-
-
-/**
- * Syntactic sugar for invoking a function and expanding an array for arguments.
- *
- * Common use case would be to use `Function.prototype.apply`.
- *
- * ```js
- * function f(x, y, z) {}
- * var args = [1, 2, 3];
- * f.apply(null, args);
- * ```
- *
- * With `spread` this example can be re-written.
- *
- * ```js
- * spread(function(x, y, z) {})([1, 2, 3]);
- * ```
- *
- * @param {Function} callback
- * @returns {Function}
- */
-module.exports = function spread(callback) {
- return function wrap(arr) {
- return callback.apply(null, arr);
- };
-};
-
-
-/***/ }),
-
-/***/ 1632:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var pkg = __nccwpck_require__(8593);
-
-var validators = {};
-
-// eslint-disable-next-line func-names
-['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
- validators[type] = function validator(thing) {
- return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
- };
-});
-
-var deprecatedWarnings = {};
-var currentVerArr = pkg.version.split('.');
-
-/**
- * Compare package versions
- * @param {string} version
- * @param {string?} thanVersion
- * @returns {boolean}
- */
-function isOlderVersion(version, thanVersion) {
- var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
- var destVer = version.split('.');
- for (var i = 0; i < 3; i++) {
- if (pkgVersionArr[i] > destVer[i]) {
- return true;
- } else if (pkgVersionArr[i] < destVer[i]) {
- return false;
- }
- }
- return false;
-}
-
-/**
- * Transitional option validator
- * @param {function|boolean?} validator
- * @param {string?} version
- * @param {string} message
- * @returns {function}
- */
-validators.transitional = function transitional(validator, version, message) {
- var isDeprecated = version && isOlderVersion(version);
-
- function formatMessage(opt, desc) {
- return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
- }
-
- // eslint-disable-next-line func-names
- return function(value, opt, opts) {
- if (validator === false) {
- throw new Error(formatMessage(opt, ' has been removed in ' + version));
- }
-
- if (isDeprecated && !deprecatedWarnings[opt]) {
- deprecatedWarnings[opt] = true;
- // eslint-disable-next-line no-console
- console.warn(
- formatMessage(
- opt,
- ' has been deprecated since v' + version + ' and will be removed in the near future'
- )
- );
- }
-
- return validator ? validator(value, opt, opts) : true;
- };
-};
-
-/**
- * Assert object's properties type
- * @param {object} options
- * @param {object} schema
- * @param {boolean?} allowUnknown
- */
-
-function assertOptions(options, schema, allowUnknown) {
- if (typeof options !== 'object') {
- throw new TypeError('options must be an object');
- }
- var keys = Object.keys(options);
- var i = keys.length;
- while (i-- > 0) {
- var opt = keys[i];
- var validator = schema[opt];
- if (validator) {
- var value = options[opt];
- var result = value === undefined || validator(value, opt, options);
- if (result !== true) {
- throw new TypeError('option ' + opt + ' must be ' + result);
- }
- continue;
- }
- if (allowUnknown !== true) {
- throw Error('Unknown option ' + opt);
- }
- }
-}
-
-module.exports = {
- isOlderVersion: isOlderVersion,
- assertOptions: assertOptions,
- validators: validators
-};
-
-
-/***/ }),
-
-/***/ 328:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-
-var bind = __nccwpck_require__(7065);
-
-// utils is a library of generic helper functions non-specific to axios
-
-var toString = Object.prototype.toString;
-
-/**
- * Determine if a value is an Array
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is an Array, otherwise false
- */
-function isArray(val) {
- return toString.call(val) === '[object Array]';
-}
-
-/**
- * Determine if a value is undefined
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if the value is undefined, otherwise false
- */
-function isUndefined(val) {
- return typeof val === 'undefined';
-}
-
-/**
- * Determine if a value is a Buffer
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Buffer, otherwise false
- */
-function isBuffer(val) {
- return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
- && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
-}
-
-/**
- * Determine if a value is an ArrayBuffer
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is an ArrayBuffer, otherwise false
- */
-function isArrayBuffer(val) {
- return toString.call(val) === '[object ArrayBuffer]';
-}
-
-/**
- * Determine if a value is a FormData
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is an FormData, otherwise false
- */
-function isFormData(val) {
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
-}
-
-/**
- * Determine if a value is a view on an ArrayBuffer
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
- */
-function isArrayBufferView(val) {
- var result;
- if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
- result = ArrayBuffer.isView(val);
- } else {
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
- }
- return result;
-}
-
-/**
- * Determine if a value is a String
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a String, otherwise false
- */
-function isString(val) {
- return typeof val === 'string';
-}
-
-/**
- * Determine if a value is a Number
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Number, otherwise false
- */
-function isNumber(val) {
- return typeof val === 'number';
-}
-
-/**
- * Determine if a value is an Object
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is an Object, otherwise false
- */
-function isObject(val) {
- return val !== null && typeof val === 'object';
-}
-
-/**
- * Determine if a value is a plain Object
- *
- * @param {Object} val The value to test
- * @return {boolean} True if value is a plain Object, otherwise false
- */
-function isPlainObject(val) {
- if (toString.call(val) !== '[object Object]') {
- return false;
- }
-
- var prototype = Object.getPrototypeOf(val);
- return prototype === null || prototype === Object.prototype;
-}
-
-/**
- * Determine if a value is a Date
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Date, otherwise false
- */
-function isDate(val) {
- return toString.call(val) === '[object Date]';
-}
-
-/**
- * Determine if a value is a File
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a File, otherwise false
- */
-function isFile(val) {
- return toString.call(val) === '[object File]';
-}
-
-/**
- * Determine if a value is a Blob
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Blob, otherwise false
- */
-function isBlob(val) {
- return toString.call(val) === '[object Blob]';
-}
-
-/**
- * Determine if a value is a Function
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Function, otherwise false
- */
-function isFunction(val) {
- return toString.call(val) === '[object Function]';
-}
-
-/**
- * Determine if a value is a Stream
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a Stream, otherwise false
- */
-function isStream(val) {
- return isObject(val) && isFunction(val.pipe);
-}
-
-/**
- * Determine if a value is a URLSearchParams object
- *
- * @param {Object} val The value to test
- * @returns {boolean} True if value is a URLSearchParams object, otherwise false
- */
-function isURLSearchParams(val) {
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
-}
-
-/**
- * Trim excess whitespace off the beginning and end of a string
- *
- * @param {String} str The String to trim
- * @returns {String} The String freed of excess whitespace
- */
-function trim(str) {
- return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
-}
-
-/**
- * Determine if we're running in a standard browser environment
- *
- * This allows axios to run in a web worker, and react-native.
- * Both environments support XMLHttpRequest, but not fully standard globals.
- *
- * web workers:
- * typeof window -> undefined
- * typeof document -> undefined
- *
- * react-native:
- * navigator.product -> 'ReactNative'
- * nativescript
- * navigator.product -> 'NativeScript' or 'NS'
- */
-function isStandardBrowserEnv() {
- if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
- navigator.product === 'NativeScript' ||
- navigator.product === 'NS')) {
- return false;
- }
- return (
- typeof window !== 'undefined' &&
- typeof document !== 'undefined'
- );
-}
-
-/**
- * Iterate over an Array or an Object invoking a function for each item.
- *
- * If `obj` is an Array callback will be called passing
- * the value, index, and complete array for each item.
- *
- * If 'obj' is an Object callback will be called passing
- * the value, key, and complete object for each property.
- *
- * @param {Object|Array} obj The object to iterate
- * @param {Function} fn The callback to invoke for each item
- */
-function forEach(obj, fn) {
- // Don't bother if no value provided
- if (obj === null || typeof obj === 'undefined') {
- return;
- }
-
- // Force an array if not already something iterable
- if (typeof obj !== 'object') {
- /*eslint no-param-reassign:0*/
- obj = [obj];
- }
-
- if (isArray(obj)) {
- // Iterate over array values
- for (var i = 0, l = obj.length; i < l; i++) {
- fn.call(null, obj[i], i, obj);
- }
- } else {
- // Iterate over object keys
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- fn.call(null, obj[key], key, obj);
- }
- }
- }
-}
-
-/**
- * Accepts varargs expecting each argument to be an object, then
- * immutably merges the properties of each object and returns result.
- *
- * When multiple objects contain the same key the later object in
- * the arguments list will take precedence.
- *
- * Example:
- *
- * ```js
- * var result = merge({foo: 123}, {foo: 456});
- * console.log(result.foo); // outputs 456
- * ```
- *
- * @param {Object} obj1 Object to merge
- * @returns {Object} Result of all merge properties
- */
-function merge(/* obj1, obj2, obj3, ... */) {
- var result = {};
- function assignValue(val, key) {
- if (isPlainObject(result[key]) && isPlainObject(val)) {
- result[key] = merge(result[key], val);
- } else if (isPlainObject(val)) {
- result[key] = merge({}, val);
- } else if (isArray(val)) {
- result[key] = val.slice();
- } else {
- result[key] = val;
- }
- }
-
- for (var i = 0, l = arguments.length; i < l; i++) {
- forEach(arguments[i], assignValue);
- }
- return result;
-}
-
-/**
- * Extends object a by mutably adding to it the properties of object b.
- *
- * @param {Object} a The object to be extended
- * @param {Object} b The object to copy properties from
- * @param {Object} thisArg The object to bind function to
- * @return {Object} The resulting value of object a
- */
-function extend(a, b, thisArg) {
- forEach(b, function assignValue(val, key) {
- if (thisArg && typeof val === 'function') {
- a[key] = bind(val, thisArg);
- } else {
- a[key] = val;
- }
- });
- return a;
-}
-
-/**
- * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
- *
- * @param {string} content with BOM
- * @return {string} content value without BOM
- */
-function stripBOM(content) {
- if (content.charCodeAt(0) === 0xFEFF) {
- content = content.slice(1);
- }
- return content;
-}
-
-module.exports = {
- isArray: isArray,
- isArrayBuffer: isArrayBuffer,
- isBuffer: isBuffer,
- isFormData: isFormData,
- isArrayBufferView: isArrayBufferView,
- isString: isString,
- isNumber: isNumber,
- isObject: isObject,
- isPlainObject: isPlainObject,
- isUndefined: isUndefined,
- isDate: isDate,
- isFile: isFile,
- isBlob: isBlob,
- isFunction: isFunction,
- isStream: isStream,
- isURLSearchParams: isURLSearchParams,
- isStandardBrowserEnv: isStandardBrowserEnv,
- forEach: forEach,
- merge: merge,
- extend: extend,
- trim: trim,
- stripBOM: stripBOM
-};
-
-
-/***/ }),
-
-/***/ 7401:
-/***/ (function(module) {
-
-!function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t) {
-
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-exports.destroy = (() => {
- let warned = false;
-
- return () => {
- if (!warned) {
- warned = true;
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
- }
- };
-})();
-
-/**
- * Colors.
- */
-
-exports.colors = [
- '#0000CC',
- '#0000FF',
- '#0033CC',
- '#0033FF',
- '#0066CC',
- '#0066FF',
- '#0099CC',
- '#0099FF',
- '#00CC00',
- '#00CC33',
- '#00CC66',
- '#00CC99',
- '#00CCCC',
- '#00CCFF',
- '#3300CC',
- '#3300FF',
- '#3333CC',
- '#3333FF',
- '#3366CC',
- '#3366FF',
- '#3399CC',
- '#3399FF',
- '#33CC00',
- '#33CC33',
- '#33CC66',
- '#33CC99',
- '#33CCCC',
- '#33CCFF',
- '#6600CC',
- '#6600FF',
- '#6633CC',
- '#6633FF',
- '#66CC00',
- '#66CC33',
- '#9900CC',
- '#9900FF',
- '#9933CC',
- '#9933FF',
- '#99CC00',
- '#99CC33',
- '#CC0000',
- '#CC0033',
- '#CC0066',
- '#CC0099',
- '#CC00CC',
- '#CC00FF',
- '#CC3300',
- '#CC3333',
- '#CC3366',
- '#CC3399',
- '#CC33CC',
- '#CC33FF',
- '#CC6600',
- '#CC6633',
- '#CC9900',
- '#CC9933',
- '#CCCC00',
- '#CCCC33',
- '#FF0000',
- '#FF0033',
- '#FF0066',
- '#FF0099',
- '#FF00CC',
- '#FF00FF',
- '#FF3300',
- '#FF3333',
- '#FF3366',
- '#FF3399',
- '#FF33CC',
- '#FF33FF',
- '#FF6600',
- '#FF6633',
- '#FF9900',
- '#FF9933',
- '#FFCC00',
- '#FFCC33'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-// eslint-disable-next-line complexity
-function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
- return true;
- }
-
- // Internet Explorer and Edge do not support colors.
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- }
-
- // Is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
- // Is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
- // Is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
- // Double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- args[0] = (this.useColors ? '%c' : '') +
- this.namespace +
- (this.useColors ? ' %c' : ' ') +
- args[0] +
- (this.useColors ? '%c ' : ' ') +
- '+' + module.exports.humanize(this.diff);
-
- if (!this.useColors) {
- return;
- }
-
- const c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit');
-
- // The final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
- let index = 0;
- let lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, match => {
- if (match === '%%') {
- return;
- }
- index++;
- if (match === '%c') {
- // We only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
-
- args.splice(lastC, 0, c);
-}
-
-/**
- * Invokes `console.debug()` when available.
- * No-op when `console.debug` is not a "function".
- * If `console.debug` is not available, falls back
- * to `console.log`.
- *
- * @api public
- */
-exports.log = console.debug || console.log || (() => {});
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- try {
- if (namespaces) {
- exports.storage.setItem('debug', namespaces);
- } else {
- exports.storage.removeItem('debug');
- }
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-function load() {
- let r;
- try {
- r = exports.storage.getItem('debug');
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = process.env.DEBUG;
- }
-
- return r;
-}
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage() {
- try {
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
- // The Browser also has localStorage in the global context.
- return localStorage;
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-module.exports = __nccwpck_require__(6243)(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
- try {
- return JSON.stringify(v);
- } catch (error) {
- return '[UnexpectedJSONParseError]: ' + error.message;
- }
-};
-
-
-/***/ }),
-
-/***/ 6243:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
-
-function setup(env) {
- createDebug.debug = createDebug;
- createDebug.default = createDebug;
- createDebug.coerce = coerce;
- createDebug.disable = disable;
- createDebug.enable = enable;
- createDebug.enabled = enabled;
- createDebug.humanize = __nccwpck_require__(900);
- createDebug.destroy = destroy;
-
- Object.keys(env).forEach(key => {
- createDebug[key] = env[key];
- });
-
- /**
- * The currently active debug mode names, and names to skip.
- */
-
- createDebug.names = [];
- createDebug.skips = [];
-
- /**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
- createDebug.formatters = {};
-
- /**
- * Selects a color for a debug namespace
- * @param {String} namespace The namespace string for the debug instance to be colored
- * @return {Number|String} An ANSI color code for the given namespace
- * @api private
- */
- function selectColor(namespace) {
- let hash = 0;
-
- for (let i = 0; i < namespace.length; i++) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
- }
- createDebug.selectColor = selectColor;
-
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
- function createDebug(namespace) {
- let prevTime;
- let enableOverride = null;
- let namespacesCache;
- let enabledCache;
-
- function debug(...args) {
- // Disabled?
- if (!debug.enabled) {
- return;
- }
-
- const self = debug;
-
- // Set `diff` timestamp
- const curr = Number(new Date());
- const ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- args[0] = createDebug.coerce(args[0]);
-
- if (typeof args[0] !== 'string') {
- // Anything else let's inspect with %O
- args.unshift('%O');
- }
-
- // Apply any `formatters` transformations
- let index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
- // If we encounter an escaped % then don't increase the array index
- if (match === '%%') {
- return '%';
- }
- index++;
- const formatter = createDebug.formatters[format];
- if (typeof formatter === 'function') {
- const val = args[index];
- match = formatter.call(self, val);
-
- // Now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
-
- // Apply env-specific formatting (colors, etc.)
- createDebug.formatArgs.call(self, args);
-
- const logFn = self.log || createDebug.log;
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.useColors = createDebug.useColors();
- debug.color = createDebug.selectColor(namespace);
- debug.extend = extend;
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
-
- Object.defineProperty(debug, 'enabled', {
- enumerable: true,
- configurable: false,
- get: () => {
- if (enableOverride !== null) {
- return enableOverride;
- }
- if (namespacesCache !== createDebug.namespaces) {
- namespacesCache = createDebug.namespaces;
- enabledCache = createDebug.enabled(namespace);
- }
-
- return enabledCache;
- },
- set: v => {
- enableOverride = v;
- }
- });
-
- // Env-specific initialization logic for debug instances
- if (typeof createDebug.init === 'function') {
- createDebug.init(debug);
- }
-
- return debug;
- }
-
- function extend(namespace, delimiter) {
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
- newDebug.log = this.log;
- return newDebug;
- }
-
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
- function enable(namespaces) {
- createDebug.save(namespaces);
- createDebug.namespaces = namespaces;
-
- createDebug.names = [];
- createDebug.skips = [];
-
- let i;
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- const len = split.length;
-
- for (i = 0; i < len; i++) {
- if (!split[i]) {
- // ignore empty strings
- continue;
- }
-
- namespaces = split[i].replace(/\*/g, '.*?');
-
- if (namespaces[0] === '-') {
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
- }
-
- /**
- * Disable debug output.
- *
- * @return {String} namespaces
- * @api public
- */
- function disable() {
- const namespaces = [
- ...createDebug.names.map(toNamespace),
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
- ].join(',');
- createDebug.enable('');
- return namespaces;
- }
-
- /**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
- function enabled(name) {
- if (name[name.length - 1] === '*') {
- return true;
- }
-
- let i;
- let len;
-
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
- if (createDebug.skips[i].test(name)) {
- return false;
- }
- }
-
- for (i = 0, len = createDebug.names.length; i < len; i++) {
- if (createDebug.names[i].test(name)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Convert regexp to namespace
- *
- * @param {RegExp} regxep
- * @return {String} namespace
- * @api private
- */
- function toNamespace(regexp) {
- return regexp.toString()
- .substring(2, regexp.toString().length - 2)
- .replace(/\.\*\?$/, '*');
- }
-
- /**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
- function coerce(val) {
- if (val instanceof Error) {
- return val.stack || val.message;
- }
- return val;
- }
-
- /**
- * XXX DO NOT USE. This is a temporary stub function.
- * XXX It WILL be removed in the next major release.
- */
- function destroy() {
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
- }
-
- createDebug.enable(createDebug.load());
-
- return createDebug;
-}
-
-module.exports = setup;
-
-
-/***/ }),
-
-/***/ 8237:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * Detect Electron renderer / nwjs process, which is node, but we should
- * treat as a browser.
- */
-
-if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
- module.exports = __nccwpck_require__(8222);
-} else {
- module.exports = __nccwpck_require__(5332);
-}
-
-
-/***/ }),
-
-/***/ 5332:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-/**
- * Module dependencies.
- */
-
-const tty = __nccwpck_require__(6224);
-const util = __nccwpck_require__(3837);
-
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.destroy = util.deprecate(
- () => {},
- 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
-);
-
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
- // eslint-disable-next-line import/no-extraneous-dependencies
- const supportsColor = __nccwpck_require__(8432);
-
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
- exports.colors = [
- 20,
- 21,
- 26,
- 27,
- 32,
- 33,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44,
- 45,
- 56,
- 57,
- 62,
- 63,
- 68,
- 69,
- 74,
- 75,
- 76,
- 77,
- 78,
- 79,
- 80,
- 81,
- 92,
- 93,
- 98,
- 99,
- 112,
- 113,
- 128,
- 129,
- 134,
- 135,
- 148,
- 149,
- 160,
- 161,
- 162,
- 163,
- 164,
- 165,
- 166,
- 167,
- 168,
- 169,
- 170,
- 171,
- 172,
- 173,
- 178,
- 179,
- 184,
- 185,
- 196,
- 197,
- 198,
- 199,
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 209,
- 214,
- 215,
- 220,
- 221
- ];
- }
-} catch (error) {
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-exports.inspectOpts = Object.keys(process.env).filter(key => {
- return /^debug_/i.test(key);
-}).reduce((obj, key) => {
- // Camel-case
- const prop = key
- .substring(6)
- .toLowerCase()
- .replace(/_([a-z])/g, (_, k) => {
- return k.toUpperCase();
- });
-
- // Coerce string value into JS value
- let val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === 'null') {
- val = null;
- } else {
- val = Number(val);
- }
-
- obj[prop] = val;
- return obj;
-}, {});
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
- return 'colors' in exports.inspectOpts ?
- Boolean(exports.inspectOpts.colors) :
- tty.isatty(process.stderr.fd);
-}
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- const {namespace: name, useColors} = this;
-
- if (useColors) {
- const c = this.color;
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
-
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
- } else {
- args[0] = getDate() + name + ' ' + args[0];
- }
-}
-
-function getDate() {
- if (exports.inspectOpts.hideDate) {
- return '';
- }
- return new Date().toISOString() + ' ';
-}
-
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-function log(...args) {
- return process.stderr.write(util.format(...args) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- if (namespaces) {
- process.env.DEBUG = namespaces;
- } else {
- // If you set a process.env field to null or undefined, it gets cast to the
- // string 'null' or 'undefined'. Just delete instead.
- delete process.env.DEBUG;
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
- return process.env.DEBUG;
-}
-
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-function init(debug) {
- debug.inspectOpts = {};
-
- const keys = Object.keys(exports.inspectOpts);
- for (let i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
-}
-
-module.exports = __nccwpck_require__(6243)(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts)
- .split('\n')
- .map(str => str.trim())
- .join(' ');
-};
-
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-formatters.O = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
-
-
-/***/ }),
-
-/***/ 6323:
-/***/ ((module) => {
-
-
-
-var isMergeableObject = function isMergeableObject(value) {
- return isNonNullObject(value)
- && !isSpecial(value)
-};
-
-function isNonNullObject(value) {
- return !!value && typeof value === 'object'
-}
-
-function isSpecial(value) {
- var stringValue = Object.prototype.toString.call(value);
-
- return stringValue === '[object RegExp]'
- || stringValue === '[object Date]'
- || isReactElement(value)
-}
-
-// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
-var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
-
-function isReactElement(value) {
- return value.$$typeof === REACT_ELEMENT_TYPE
-}
-
-function emptyTarget(val) {
- return Array.isArray(val) ? [] : {}
-}
-
-function cloneUnlessOtherwiseSpecified(value, options) {
- return (options.clone !== false && options.isMergeableObject(value))
- ? deepmerge(emptyTarget(value), value, options)
- : value
-}
-
-function defaultArrayMerge(target, source, options) {
- return target.concat(source).map(function(element) {
- return cloneUnlessOtherwiseSpecified(element, options)
- })
-}
-
-function getMergeFunction(key, options) {
- if (!options.customMerge) {
- return deepmerge
- }
- var customMerge = options.customMerge(key);
- return typeof customMerge === 'function' ? customMerge : deepmerge
-}
-
-function getEnumerableOwnPropertySymbols(target) {
- return Object.getOwnPropertySymbols
- ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
- return target.propertyIsEnumerable(symbol)
- })
- : []
-}
-
-function getKeys(target) {
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
-}
-
-function propertyIsOnObject(object, property) {
- try {
- return property in object
- } catch(_) {
- return false
- }
-}
-
-// Protects from prototype poisoning and unexpected merging up the prototype chain.
-function propertyIsUnsafe(target, key) {
- return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
- && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
- && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
-}
-
-function mergeObject(target, source, options) {
- var destination = {};
- if (options.isMergeableObject(target)) {
- getKeys(target).forEach(function(key) {
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
- });
- }
- getKeys(source).forEach(function(key) {
- if (propertyIsUnsafe(target, key)) {
- return
- }
-
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
- } else {
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
- }
- });
- return destination
-}
-
-function deepmerge(target, source, options) {
- options = options || {};
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
- // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
- // implementations can use it. The caller may not replace it.
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
-
- var sourceIsArray = Array.isArray(source);
- var targetIsArray = Array.isArray(target);
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
-
- if (!sourceAndTargetTypesMatch) {
- return cloneUnlessOtherwiseSpecified(source, options)
- } else if (sourceIsArray) {
- return options.arrayMerge(target, source, options)
- } else {
- return mergeObject(target, source, options)
- }
-}
-
-deepmerge.all = function deepmergeAll(array, options) {
- if (!Array.isArray(array)) {
- throw new Error('first argument should be an array')
- }
-
- return array.reduce(function(prev, next) {
- return deepmerge(prev, next, options)
- }, {})
-};
-
-var deepmerge_1 = deepmerge;
-
-module.exports = deepmerge_1;
-
-
-/***/ }),
-
-/***/ 4802:
-/***/ ((__unused_webpack_module, exports) => {
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.attributeNames = exports.elementNames = void 0;
-exports.elementNames = new Map([
- ["altglyph", "altGlyph"],
- ["altglyphdef", "altGlyphDef"],
- ["altglyphitem", "altGlyphItem"],
- ["animatecolor", "animateColor"],
- ["animatemotion", "animateMotion"],
- ["animatetransform", "animateTransform"],
- ["clippath", "clipPath"],
- ["feblend", "feBlend"],
- ["fecolormatrix", "feColorMatrix"],
- ["fecomponenttransfer", "feComponentTransfer"],
- ["fecomposite", "feComposite"],
- ["feconvolvematrix", "feConvolveMatrix"],
- ["fediffuselighting", "feDiffuseLighting"],
- ["fedisplacementmap", "feDisplacementMap"],
- ["fedistantlight", "feDistantLight"],
- ["fedropshadow", "feDropShadow"],
- ["feflood", "feFlood"],
- ["fefunca", "feFuncA"],
- ["fefuncb", "feFuncB"],
- ["fefuncg", "feFuncG"],
- ["fefuncr", "feFuncR"],
- ["fegaussianblur", "feGaussianBlur"],
- ["feimage", "feImage"],
- ["femerge", "feMerge"],
- ["femergenode", "feMergeNode"],
- ["femorphology", "feMorphology"],
- ["feoffset", "feOffset"],
- ["fepointlight", "fePointLight"],
- ["fespecularlighting", "feSpecularLighting"],
- ["fespotlight", "feSpotLight"],
- ["fetile", "feTile"],
- ["feturbulence", "feTurbulence"],
- ["foreignobject", "foreignObject"],
- ["glyphref", "glyphRef"],
- ["lineargradient", "linearGradient"],
- ["radialgradient", "radialGradient"],
- ["textpath", "textPath"],
-]);
-exports.attributeNames = new Map([
- ["definitionurl", "definitionURL"],
- ["attributename", "attributeName"],
- ["attributetype", "attributeType"],
- ["basefrequency", "baseFrequency"],
- ["baseprofile", "baseProfile"],
- ["calcmode", "calcMode"],
- ["clippathunits", "clipPathUnits"],
- ["diffuseconstant", "diffuseConstant"],
- ["edgemode", "edgeMode"],
- ["filterunits", "filterUnits"],
- ["glyphref", "glyphRef"],
- ["gradienttransform", "gradientTransform"],
- ["gradientunits", "gradientUnits"],
- ["kernelmatrix", "kernelMatrix"],
- ["kernelunitlength", "kernelUnitLength"],
- ["keypoints", "keyPoints"],
- ["keysplines", "keySplines"],
- ["keytimes", "keyTimes"],
- ["lengthadjust", "lengthAdjust"],
- ["limitingconeangle", "limitingConeAngle"],
- ["markerheight", "markerHeight"],
- ["markerunits", "markerUnits"],
- ["markerwidth", "markerWidth"],
- ["maskcontentunits", "maskContentUnits"],
- ["maskunits", "maskUnits"],
- ["numoctaves", "numOctaves"],
- ["pathlength", "pathLength"],
- ["patterncontentunits", "patternContentUnits"],
- ["patterntransform", "patternTransform"],
- ["patternunits", "patternUnits"],
- ["pointsatx", "pointsAtX"],
- ["pointsaty", "pointsAtY"],
- ["pointsatz", "pointsAtZ"],
- ["preservealpha", "preserveAlpha"],
- ["preserveaspectratio", "preserveAspectRatio"],
- ["primitiveunits", "primitiveUnits"],
- ["refx", "refX"],
- ["refy", "refY"],
- ["repeatcount", "repeatCount"],
- ["repeatdur", "repeatDur"],
- ["requiredextensions", "requiredExtensions"],
- ["requiredfeatures", "requiredFeatures"],
- ["specularconstant", "specularConstant"],
- ["specularexponent", "specularExponent"],
- ["spreadmethod", "spreadMethod"],
- ["startoffset", "startOffset"],
- ["stddeviation", "stdDeviation"],
- ["stitchtiles", "stitchTiles"],
- ["surfacescale", "surfaceScale"],
- ["systemlanguage", "systemLanguage"],
- ["tablevalues", "tableValues"],
- ["targetx", "targetX"],
- ["targety", "targetY"],
- ["textlength", "textLength"],
- ["viewbox", "viewBox"],
- ["viewtarget", "viewTarget"],
- ["xchannelselector", "xChannelSelector"],
- ["ychannelselector", "yChannelSelector"],
- ["zoomandpan", "zoomAndPan"],
-]);
-
-
-/***/ }),
-
-/***/ 8621:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-
-var __assign = (this && this.__assign) || function () {
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length; i < n; i++) {
- s = arguments[i];
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- return __assign.apply(this, arguments);
-};
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-/*
- * Module dependencies
- */
-var ElementType = __importStar(__nccwpck_require__(3944));
-var entities_1 = __nccwpck_require__(3000);
-/**
- * Mixed-case SVG and MathML tags & attributes
- * recognized by the HTML parser.
- *
- * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
- */
-var foreignNames_1 = __nccwpck_require__(4802);
-var unencodedElements = new Set([
- "style",
- "script",
- "xmp",
- "iframe",
- "noembed",
- "noframes",
- "plaintext",
- "noscript",
-]);
-/**
- * Format attributes
- */
-function formatAttributes(attributes, opts) {
- if (!attributes)
- return;
- return Object.keys(attributes)
- .map(function (key) {
- var _a, _b;
- var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
- if (opts.xmlMode === "foreign") {
- /* Fix up mixed-case attribute names */
- key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
- }
- if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
- return key;
- }
- return key + "=\"" + (opts.decodeEntities !== false
- ? entities_1.encodeXML(value)
- : value.replace(/"/g, """)) + "\"";
- })
- .join(" ");
-}
-/**
- * Self-enclosing tags
- */
-var singleTag = new Set([
- "area",
- "base",
- "basefont",
- "br",
- "col",
- "command",
- "embed",
- "frame",
- "hr",
- "img",
- "input",
- "isindex",
- "keygen",
- "link",
- "meta",
- "param",
- "source",
- "track",
- "wbr",
-]);
-/**
- * Renders a DOM node or an array of DOM nodes to a string.
- *
- * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
- *
- * @param node Node to be rendered.
- * @param options Changes serialization behavior
- */
-function render(node, options) {
- if (options === void 0) { options = {}; }
- var nodes = "length" in node ? node : [node];
- var output = "";
- for (var i = 0; i < nodes.length; i++) {
- output += renderNode(nodes[i], options);
- }
- return output;
-}
-exports["default"] = render;
-function renderNode(node, options) {
- switch (node.type) {
- case ElementType.Root:
- return render(node.children, options);
- case ElementType.Directive:
- case ElementType.Doctype:
- return renderDirective(node);
- case ElementType.Comment:
- return renderComment(node);
- case ElementType.CDATA:
- return renderCdata(node);
- case ElementType.Script:
- case ElementType.Style:
- case ElementType.Tag:
- return renderTag(node, options);
- case ElementType.Text:
- return renderText(node, options);
- }
-}
-var foreignModeIntegrationPoints = new Set([
- "mi",
- "mo",
- "mn",
- "ms",
- "mtext",
- "annotation-xml",
- "foreignObject",
- "desc",
- "title",
-]);
-var foreignElements = new Set(["svg", "math"]);
-function renderTag(elem, opts) {
- var _a;
- // Handle SVG / MathML in HTML
- if (opts.xmlMode === "foreign") {
- /* Fix up mixed-case element names */
- elem.name = (_a = foreignNames_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
- /* Exit foreign mode at integration points */
- if (elem.parent &&
- foreignModeIntegrationPoints.has(elem.parent.name)) {
- opts = __assign(__assign({}, opts), { xmlMode: false });
- }
- }
- if (!opts.xmlMode && foreignElements.has(elem.name)) {
- opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
- }
- var tag = "<" + elem.name;
- var attribs = formatAttributes(elem.attribs, opts);
- if (attribs) {
- tag += " " + attribs;
- }
- if (elem.children.length === 0 &&
- (opts.xmlMode
- ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
- opts.selfClosingTags !== false
- : // User explicitly asked for self-closing tags, even in HTML mode
- opts.selfClosingTags && singleTag.has(elem.name))) {
- if (!opts.xmlMode)
- tag += " ";
- tag += "/>";
- }
- else {
- tag += ">";
- if (elem.children.length > 0) {
- tag += render(elem.children, opts);
- }
- if (opts.xmlMode || !singleTag.has(elem.name)) {
- tag += "" + elem.name + ">";
- }
- }
- return tag;
-}
-function renderDirective(elem) {
- return "<" + elem.data + ">";
-}
-function renderText(elem, opts) {
- var data = elem.data || "";
- // If entities weren't decoded, no need to encode them back
- if (opts.decodeEntities !== false &&
- !(!opts.xmlMode &&
- elem.parent &&
- unencodedElements.has(elem.parent.name))) {
- data = entities_1.encodeXML(data);
- }
- return data;
-}
-function renderCdata(elem) {
- return "";
-}
-function renderComment(elem) {
- return "";
-}
-
-
-/***/ }),
-
-/***/ 3944:
-/***/ ((__unused_webpack_module, exports) => {
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
-/** Types of elements found in htmlparser2's DOM */
-var ElementType;
-(function (ElementType) {
- /** Type for the root element of a document */
- ElementType["Root"] = "root";
- /** Type for Text */
- ElementType["Text"] = "text";
- /** Type for ... ?> */
- ElementType["Directive"] = "directive";
- /** Type for */
- ElementType["Comment"] = "comment";
- /** Type for